Developers
Contracts
What each GIWATER contract on GIWA Sepolia (chain ID 91342) does, with the functions and events you are most likely to need. Every address, with its explorer link and ABI, is on Addresses. Signatures name struct parameters by their Solidity struct (PoolKey, PermitSingle, …); the full definitions are in each ABI.
Core
The Vault holds every pool's tokens and enforces flash accounting; CLPoolManager holds the state of every CL pool and emits the events an indexer follows. You read from both, but trades and liquidity changes normally reach them through the periphery: CLPoolManager accepts swaps and liquidity changes from any contract holding the Vault lock, and initialize needs no lock at all.
Vault
Holds every pool's tokens and runs flash accounting: inside a lock, each balance change is recorded as a per-currency delta, and the lock only closes once every delta is back to zero.
Functions
- lock(bytes data)
- Opens a lock and calls back lockAcquired(data) on the caller. The periphery contracts do this for you; call it directly only from your own contract.
- sync(address currency)
- Checkpoints the Vault's balance of an ERC-20 before you transfer it in, so the following settle() can measure the payment.
- settle()
- Credits the tokens paid since sync() (or msg.value for native ETH) against the caller's delta.
- take(address currency, address to, uint256 amount)
- Sends tokens out of the Vault and subtracts the amount from the caller's delta for that currency.
- currencyDelta(address settler, address currency)
- The open delta of one currency for one settler in the current lock. Non-zero at the end of a lock reverts the transaction.
- balanceOf(address owner, address currency)
- Balance an account holds inside the Vault (minted claims), separate from its ERC-20 wallet balance.
Events
- Transfer(address caller, address indexed from, address indexed to, address indexed currency, uint256 amount)
- Movements of Vault-held balances. Ordinary swaps and liquidity changes settle in ERC-20s and do not emit it.
All functions / All events
function allowance(
address owner,
address spender,
address currency
) external view returns (uint256 amount);
function appCurrencyDeficit(
address app,
address currency
) external view returns (uint256);
function balanceOf(
address owner,
address currency
) external view returns (uint256 balance);
function currencyDelta(
address settler,
address currency
) external view returns (int256);
function getAppDeficitCount() external view returns (uint256);
function getLocker() external view returns (address);
function getUnsettledDeltasCount() external view returns (uint256);
function getVaultReserve() external view returns (address, uint256);
function isAppRegistered(address app) external view returns (bool isRegistered);
function isOperator(
address owner,
address operator
) external view returns (bool isOperator);
function owner() external view returns (address);
function pendingOwner() external view returns (address);
function reservesOfApp(
address app,
address currency
) external view returns (uint256 reserve);
function supportsInterface(bytes4 interfaceId) external view returns (bool);function acceptOwnership() external;
function accountAppBalanceDelta(
address currency,
int128 delta,
address settler
) external;
function accountAppBalanceDelta(
address currency0,
address currency1,
int256 delta,
address settler,
int256 hookDelta,
address hook
) external;
function accountAppBalanceDelta(
address currency0,
address currency1,
int256 delta,
address settler
) external;
function approve(
address spender,
address currency,
uint256 amount
) external returns (bool);
function burn(address from, address currency, uint256 amount) external;
function clear(address currency, uint256 amount) external;
function collectFee(
address currency,
uint256 amount,
address recipient
) external;
function lock(bytes data) external returns (bytes result);
function mint(address to, address currency, uint256 amount) external;
function registerApp(address app) external;
function renounceOwnership() external;
function setOperator(address operator, bool approved) external returns (bool);
function settle() external payable returns (uint256);
function settleFor(address recipient) external payable returns (uint256);
function sync(address currency) external;
function take(address currency, address to, uint256 amount) external;
function transfer(
address receiver,
address currency,
uint256 amount
) external returns (bool);
function transferFrom(
address sender,
address receiver,
address currency,
uint256 amount
) external returns (bool);
function transferOwnership(address newOwner) external;event AppRegistered(address indexed app);
event Approval(
address indexed owner,
address indexed spender,
address indexed currency,
uint256 amount
);
event OperatorSet(
address indexed owner,
address indexed operator,
bool approved
);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event OwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);
event Transfer(
address caller,
address indexed from,
address indexed to,
address indexed currency,
uint256 amount
);CLPoolManager
Owns the state of every concentrated-liquidity pool — price, ticks, liquidity, fee growth — and emits the events an indexer follows. Pools are addressed by id = keccak256(abi.encode(PoolKey)).
Functions
- getSlot0(bytes32 id)
- Current sqrtPriceX96, tick, protocol fee and LP fee of a pool.
- getLiquidity(bytes32 id)
- Liquidity active at the current tick.
- getPoolTickInfo(bytes32 id, int24 tick)
- Gross and net liquidity and fee growth outside one initialized tick.
- getFeeGrowthGlobals(bytes32 id)
- Cumulative fees per unit of liquidity for each currency, as Q128 values.
- poolIdToPoolKey(bytes32 id)
- Recovers the PoolKey (currencies, hooks, poolManager, fee, parameters) from a pool id.
- getPosition(bytes32 id, address owner, int24 tickLower, int24 tickUpper, bytes32 salt)
- Raw position state. For a position NFT, owner is CLPositionManager and salt is the token id as bytes32.
Events
- Initialize(bytes32 indexed id, address indexed currency0, address indexed currency1, address hooks, uint24 fee, bytes32 parameters, uint160 sqrtPriceX96, int24 tick)
- A pool was created. parameters packs the tick spacing (bits 16–39) and the hook permission bitmap (bits 0–15).
- Swap(bytes32 indexed id, address indexed sender, int128 amount0, int128 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick, uint24 fee, uint16 protocolFee)
- One swap (one hop) in one pool, with the price and liquidity after it. sender is the contract that called the pool — the router — not the trader's wallet.
- ModifyLiquidity(bytes32 indexed id, address indexed sender, int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt)
- Liquidity added (positive delta) or removed (negative). For position NFTs, sender is CLPositionManager and salt is the token id.
- Donate(bytes32 indexed id, address indexed sender, uint256 amount0, uint256 amount1, int24 tick)
- Tokens donated to in-range liquidity providers.
All functions / All events
function extsload(bytes32 slot) external view returns (bytes32);
function extsload(bytes32[] slots) external view returns (bytes32[]);
function getFeeGrowthGlobals(bytes32 id) external view returns (uint256 feeGrowthGlobal0x128, uint256 feeGrowthGlobal1x128);
function getLiquidity(
bytes32 id,
address _owner,
int24 tickLower,
int24 tickUpper,
bytes32 salt
) external view returns (uint128 liquidity);
function getLiquidity(bytes32 id) external view returns (uint128 liquidity);
function getPoolBitmapInfo(
bytes32 id,
int16 word
) external view returns (uint256 tickBitmap);
function getPoolTickInfo(
bytes32 id,
int24 tick
) external view returns ((uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128));
function getPosition(
bytes32 id,
address owner,
int24 tickLower,
int24 tickUpper,
bytes32 salt
) external view returns ((uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128));
function getSlot0(bytes32 id) external view returns (uint160 sqrtPriceX96, int24 tick, uint24 protocolFee, uint24 lpFee);
function owner() external view returns (address);
function paused() external view returns (bool res);
function poolIdToPoolKey(bytes32 id) external view returns (address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters);
function protocolFeeController() external view returns (address);
function protocolFeesAccrued(address currency) external view returns (uint256 amount);
function vault() external view returns (address);function collectProtocolFees(
address recipient,
address currency,
uint256 amount
) external returns (uint256 amountCollected);
function donate(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint256 amount0,
uint256 amount1,
bytes hookData
) external returns (int256 delta);
function initialize(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint160 sqrtPriceX96
) external returns (int24 tick);
function modifyLiquidity(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt),
bytes hookData
) external returns (int256 delta, int256 feeDelta);
function pause() external;
function setProtocolFee(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint24 newProtocolFee
) external;
function setProtocolFeeController(address controller) external;
function swap(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96),
bytes hookData
) external returns (int256 delta);
function transferOwnership(address newOwner) external;
function unpause() external;
function updateDynamicLPFee(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint24 newDynamicLPFee
) external;event Donate(
bytes32 indexed id,
address indexed sender,
uint256 amount0,
uint256 amount1,
int24 tick
);
event DynamicLPFeeUpdated(bytes32 indexed id, uint24 dynamicLPFee);
event Initialize(
bytes32 indexed id,
address indexed currency0,
address indexed currency1,
address hooks,
uint24 fee,
bytes32 parameters,
uint160 sqrtPriceX96,
int24 tick
);
event ModifyLiquidity(
bytes32 indexed id,
address indexed sender,
int24 tickLower,
int24 tickUpper,
int256 liquidityDelta,
bytes32 salt
);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event Paused(address account);
event ProtocolFeeControllerUpdated(address indexed protocolFeeController);
event ProtocolFeeUpdated(bytes32 indexed id, uint24 protocolFee);
event Swap(
bytes32 indexed id,
address indexed sender,
int128 amount0,
int128 amount1,
uint160 sqrtPriceX96,
uint128 liquidity,
int24 tick,
uint24 fee,
uint16 protocolFee
);
event Unpaused(address account);CLPoolManagerOwner
Owns CLPoolManager and holds its admin powers (pausing it, choosing its protocol fee controller) behind one contract. Integrators only read from it.
Functions
- poolManager()
- The CLPoolManager this contract owns.
- owner()
- Account that controls this contract.
- hasPausableRole(address account)
- Whether an account may pause the pool manager.
Events
- PoolManagerOwnershipTransferred(address indexed previousOwner, address indexed newOwner)
- Ownership of CLPoolManager moved.
All functions / All events
function hasPausableRole(address account) external view returns (bool hasPausableRole);
function owner() external view returns (address);
function pendingOwner() external view returns (address);
function pendingPoolManagerOwner() external view returns (address);
function poolManager() external view returns (address);function acceptOwnership() external;
function acceptPoolManagerOwnership() external;
function grantPausableRole(address account) external;
function pausePoolManager() external;
function renounceOwnership() external;
function revokePausableRole(address account) external;
function setProtocolFeeController(address protocolFeeController) external;
function transferOwnership(address newOwner) external;
function transferPoolManagerOwnership(address newPoolManagerOwner) external;
function unpausePoolManager() external;event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event OwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);
event PausableRoleGranted(address indexed account);
event PausableRoleRevoked(address indexed account);
event PoolManagerOwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event PoolManagerOwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);ProtocolFeeController
Sets and collects the protocol's share of swap fees for CLPoolManager pools. Integrators read a pool's protocol fee from it; the setters and the collector are restricted.
Functions
- protocolFeeForPool(PoolKey poolKey)
- The protocol fee configured for one pool.
- protocolFeeSplitRatio()
- Share of the protocol fee that the protocol keeps.
- defaultProtocolFeeForDynamicFeePool()
- Protocol fee applied to pools with a dynamic LP fee.
Events
- ProtocolFeeCollected(address indexed currency, uint256 amount)
- Accrued protocol fees were collected.
All functions / All events
function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
function defaultProtocolFeeForDynamicFeePool() external view returns (uint24);
function FEE_SETTER_ROLE() external view returns (bytes32);
function getLPFeeFromTotalFee(uint24 totalFee) external view returns (uint24);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function getRoleMember(
bytes32 role,
uint256 index
) external view returns (address);
function getRoleMemberCount(bytes32 role) external view returns (uint256);
function getRoleMembers(bytes32 role) external view returns (address[]);
function hasRole(bytes32 role, address account) external view returns (bool);
function owner() external view returns (address);
function pendingOwner() external view returns (address);
function poolManager() external view returns (address);
function protocolFeeForPool((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters)) external view returns (uint24 protocolFee);
function protocolFeeSplitRatio() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);function acceptOwnership() external;
function batchCollectProtocolFee(
address[] recipients,
address[] currencies,
uint256[] amounts
) external;
function batchRefreshProtocolFee((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters)[]) external;
function batchSetProtocolFee(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters)[],
uint24[] newProtocolFees
) external;
function collectProtocolFee(
address recipient,
address currency,
uint256 amount
) external;
function grantRole(bytes32 role, address account) external;
function renounceOwnership() external;
function renounceRole(bytes32 role, address callerConfirmation) external;
function revokeRole(bytes32 role, address account) external;
function setDefaultProtocolFeeForDynamicFeePool(uint24 newDefaultProtocolFeeForDynamicFeePool) external;
function setProtocolFee(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint24 newProtocolFee
) external;
function setProtocolFeeSplitRatio(uint256 newProtocolFeeSplitRatio) external;
function transferOwnership(address newOwner) external;event DefaultProtocolFeeForDynamicFeePoolUpdated(
uint24 oldDefaultProtocolFeeForDynamicFeePool,
uint24 newDefaultProtocolFeeForDynamicFeePool
);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event OwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);
event ProtocolFeeCollected(address indexed currency, uint256 amount);
event ProtocolFeeSplitRatioUpdated(
uint256 oldProtocolFeeSplitRatio,
uint256 newProtocolFeeSplitRatio
);
event RoleAdminChanged(
bytes32 indexed role,
bytes32 indexed previousAdminRole,
bytes32 indexed newAdminRole
);
event RoleGranted(
bytes32 indexed role,
address indexed account,
address indexed sender
);
event RoleRevoked(
bytes32 indexed role,
address indexed account,
address indexed sender
);Periphery
The contracts you send transactions to. UniversalRouter executes swaps, CLPositionManager mints and changes liquidity positions, and CLQuoter and CLTickLens answer read-only questions about prices and ticks.
CLPositionManager
Mints liquidity positions as ERC-721 NFTs and changes them through batched actions. Pulls tokens through Permit2, with itself as the Permit2 spender.
Functions
- modifyLiquidities(bytes payload, uint256 deadline)
- Runs an action plan: payload = abi.encode(bytes actions, bytes[] params). Mint 0x02, increase 0x00, decrease 0x01, burn 0x03, then settle/take or CLOSE_CURRENCY 0x12 per currency.
- initializePool(PoolKey key, uint160 sqrtPriceX96)
- Creates a pool at a starting price. Never reverts: returns the new tick, or type(int24).max if initialization failed (for example, the pool already exists). Batch it with the first mint through multicall.
- permitBatch(address owner, PermitBatch _permitBatch, bytes signature)
- Submits a signed Permit2 allowance for both pool currencies, usually as the first call of a multicall.
- multicall(bytes[] data)
- Runs several calls in one transaction, e.g. permitBatch + modifyLiquidities, or initializePool + mint.
- positions(uint256 tokenId)
- PoolKey, tick range, liquidity and fee-growth checkpoints of a position.
- getPoolAndPositionInfo(uint256 tokenId)
- PoolKey plus a packed info word (tick range, subscriber flag) — cheaper than positions().
- ownerOf(uint256 id)
- Current owner of a position NFT.
Events
- MintPosition(uint256 indexed tokenId)
- A new position NFT was minted.
- ModifyLiquidity(uint256 indexed tokenId, int256 liquidityChange, int256 feesAccrued)
- A position's liquidity changed. feesAccrued is a packed BalanceDelta: amount0 in the upper 128 bits, amount1 in the lower.
- Transfer(address indexed from, address indexed to, uint256 indexed id)
- ERC-721 transfer; from is the zero address on mint and to on burn.
All functions / All events
function balanceOf(address owner) external view returns (uint256);
function clPoolManager() external view returns (address);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function getApproved(uint256) external view returns (address);
function getPoolAndPositionInfo(uint256 tokenId) external view returns ((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), uint256 info);
function getPositionLiquidity(uint256 tokenId) external view returns (uint128 liquidity);
function isApprovedForAll(address, address) external view returns (bool);
function msgSender() external view returns (address);
function name() external view returns (string);
function nextTokenId() external view returns (uint256);
function nonces(
address owner,
uint256 word
) external view returns (uint256 bitmap);
function ownerOf(uint256 id) external view returns (address owner);
function permit2() external view returns (address);
function poolKeys(bytes25 poolId) external view returns (address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters);
function positionInfo(uint256 tokenId) external view returns (uint256 info);
function positions(uint256 tokenId) external view returns ((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, address _subscriber);
function subscriber(uint256 tokenId) external view returns (address subscriber);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function symbol() external view returns (string);
function tokenDescriptor() external view returns (address);
function tokenURI(uint256 tokenId) external view returns (string);
function unsubscribeGasLimit() external view returns (uint256);
function vault() external view returns (address);
function WETH9() external view returns (address);function approve(address spender, uint256 id) external;
function initializePool(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint160 sqrtPriceX96
) external payable returns (int24);
function lockAcquired(bytes data) external returns (bytes);
function modifyLiquidities(bytes payload, uint256 deadline) external payable;
function modifyLiquiditiesWithoutLock(
bytes actions,
bytes[] params
) external payable;
function multicall(bytes[] data) external payable returns (bytes[] results);
function permit(
address owner,
((address token, uint160 amount, uint48 expiration, uint48 nonce), address spender, uint256 sigDeadline),
bytes signature
) external payable returns (bytes err);
function permit(
address spender,
uint256 tokenId,
uint256 deadline,
uint256 nonce,
bytes signature
) external payable;
function permitBatch(
address owner,
((address token, uint160 amount, uint48 expiration, uint48 nonce)[], address spender, uint256 sigDeadline),
bytes signature
) external payable returns (bytes err);
function permitForAll(
address owner,
address operator,
bool approved,
uint256 deadline,
uint256 nonce,
bytes signature
) external payable;
function revokeNonce(uint256 nonce) external payable;
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes data
) external;
function safeTransferFrom(address from, address to, uint256 id) external;
function setApprovalForAll(address operator, bool approved) external;
function subscribe(
uint256 tokenId,
address newSubscriber,
bytes data
) external payable;
function transferFrom(address from, address to, uint256 id) external;
function unsubscribe(uint256 tokenId) external payable;event Approval(
address indexed owner,
address indexed spender,
uint256 indexed id
);
event ApprovalForAll(
address indexed owner,
address indexed operator,
bool approved
);
event MintPosition(uint256 indexed tokenId);
event ModifyLiquidity(
uint256 indexed tokenId,
int256 liquidityChange,
int256 feesAccrued
);
event Subscription(uint256 indexed tokenId, address indexed subscriber);
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Unsubscription(uint256 indexed tokenId, address indexed subscriber);CLQuoter
Simulates swaps to price them. The quote functions are non-view — they run the swap and revert internally — so call them with eth_call, never in a transaction.
Functions
- quoteExactInputSingle(QuoteExactSingleParams params)
- Output amount and gas estimate for an exact input in one pool. params = (PoolKey poolKey, bool zeroForOne, uint128 exactAmount, bytes hookData).
- quoteExactInput(QuoteExactParams params)
- Output amount and gas estimate for an exact input along a multi-pool path. params = (address exactCurrency, PathKey[] path, uint128 exactAmount).
- quoteExactOutputSingle(QuoteExactSingleParams params)
- Input amount required for an exact output in one pool.
- quoteExactOutput(QuoteExactParams params)
- Input amount required for an exact output along a path; exactCurrency is the output currency and the path runs backwards.
All functions / All events
function poolManager() external view returns (address);
function vault() external view returns (address);function _quoteExactInput((address exactCurrency, (address intermediateCurrency, uint24 fee, address hooks, address poolManager, bytes hookData, bytes32 parameters)[], uint128 exactAmount)) external returns (bytes);
function _quoteExactInputSingle(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)) external returns (bytes);
function _quoteExactInputSingleList(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)[]) external returns (bytes);
function _quoteExactOutput((address exactCurrency, (address intermediateCurrency, uint24 fee, address hooks, address poolManager, bytes hookData, bytes32 parameters)[], uint128 exactAmount)) external returns (bytes);
function _quoteExactOutputSingle(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)) external returns (bytes);
function lockAcquired(bytes data) external returns (bytes);
function quoteExactInput((address exactCurrency, (address intermediateCurrency, uint24 fee, address hooks, address poolManager, bytes hookData, bytes32 parameters)[], uint128 exactAmount)) external returns (uint256 amountOut, uint256 gasEstimate);
function quoteExactInputSingle(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)) external returns (uint256 amountOut, uint256 gasEstimate);
function quoteExactInputSingleList(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)[]) external returns (uint256 amountIn, uint256 gasEstimate);
function quoteExactOutput((address exactCurrency, (address intermediateCurrency, uint24 fee, address hooks, address poolManager, bytes hookData, bytes32 parameters)[], uint128 exactAmount)) external returns (uint256 amountIn, uint256 gasEstimate);
function quoteExactOutputSingle(((address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters), bool zeroForOne, uint128 exactAmount, bytes hookData)) external returns (uint256 amountIn, uint256 gasEstimate);CLTickLens
Read-only helper that lists a pool's initialized ticks, for drawing liquidity depth or simulating swaps off-chain.
Functions
- getPopulatedTicksInWord(bytes32 id, int16 tickBitmapIndex)
- Every initialized tick in one 256-tick bitmap word, with liquidityNet and liquidityGross.
- getPopulatedTicksInWord(PoolKey key, int16 tickBitmapIndex)
- Same, addressed by PoolKey instead of pool id.
All functions / All events
function getPopulatedTicksInWord(
bytes32 id,
int16 tickBitmapIndex
) external view returns ((int24 tick, int128 liquidityNet, uint128 liquidityGross)[]);
function getPopulatedTicksInWord(
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
int16 tickBitmapIndex
) external view returns ((int24 tick, int128 liquidityNet, uint128 liquidityGross)[]);
function poolManager() external view returns (address);UniversalRouter
Entry point for swaps. Executes a list of commands — Permit2 permit, wrap/unwrap, Infinity swap, sweep — in one transaction. This deployment supports Infinity CL pools only.
Functions
- execute(bytes commands, bytes[] inputs, uint256 deadline)
- One command byte per input. Swaps use INFI_SWAP 0x10, whose input is an action plan like modifyLiquidities' (swap 0x06–0x09, then settle and take). Also PERMIT2_PERMIT 0x0a, WRAP_ETH 0x0b, UNWRAP_WETH 0x0c, SWEEP 0x04.
- execute(bytes commands, bytes[] inputs)
- Same without a deadline. Prefer the deadline overload for user transactions.
All functions / All events
function binPoolManager() external view returns (address);
function clPoolManager() external view returns (address);
function INFI_BIN_POSITION_MANAGER() external view returns (address);
function INFI_CL_POSITION_MANAGER() external view returns (address);
function msgSender() external view returns (address);
function owner() external view returns (address);
function paused() external view returns (bool);
function pendingOwner() external view returns (address);
function stableSwapFactory() external view returns (address);
function stableSwapInfo() external view returns (address);
function V3_POSITION_MANAGER() external view returns (address);
function vault() external view returns (address);function acceptOwnership() external;
function execute(
bytes commands,
bytes[] inputs,
uint256 deadline
) external payable;
function execute(bytes commands, bytes[] inputs) external payable;
function lockAcquired(bytes data) external returns (bytes);
function pancakeV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes data
) external;
function pause() external;
function renounceOwnership() external;
function setStableSwap(address _factory, address _info) external;
function transferOwnership(address newOwner) external;
function unpause() external;event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event OwnershipTransferStarted(
address indexed previousOwner,
address indexed newOwner
);
event Paused(address account);
event SetStableSwap(address indexed factory, address indexed info);
event Unpaused(address account);CLPositionDescriptorOffChain
Builds the tokenURI of CLPositionManager's position NFTs, pointing at an off-chain metadata service. No ABI is published for it, because integrators never call it directly: read a position's metadata with tokenURI(tokenId) on CLPositionManager.
Hook
The pool hook deployed on GIWA Sepolia. A pool uses a hook by setting its address as hooks in the PoolKey. DojangGateHook is a proxy: integrate with the proxy address on Addresses. The implementation behind it is listed there only for reference, changes when the proxy is upgraded, and is not for integration.
DojangGateHook
A CL pool hook that admits new liquidity only from addresses holding a Dojang attestation from the trusted attester. Only adding liquidity is gated: swaps and removing liquidity are not, so an expired attestation never traps a position. Through CLPositionManager, the address checked is the one that calls modifyLiquidities and funds the position, so a router or vault adding liquidity for a user must hold an attestation itself. A pool uses the hook by setting this address as hooks in its PoolKey. The address listed is the proxy.
This is a proxy: integrate with its proxy address. The implementation behind it, listed on Addresses for reference, changes on upgrade and is not for integration.
Functions
- getHooksRegistrationBitmap()
- The hook permission bitmap a pool's parameters must carry to use this hook.
- dojangScroll()
- The Dojang attestation registry the hook checks.
- dojangAttesterId()
- The attester whose attestations the hook trusts.
- poolManager()
- The CLPoolManager the hook serves.
Events
- DojangScrollUpdated(address indexed scroll)
- The attestation registry was changed.
- TrustedAttesterUpdated(bytes32 indexed attesterId)
- The trusted attester was changed.
All functions / All events
function CONFIG_MANAGER_ROLE() external view returns (bytes32);
function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
function defaultAdmin() external view returns (address);
function defaultAdminDelay() external view returns (uint48);
function defaultAdminDelayIncreaseWait() external view returns (uint48);
function dojangAttesterId() external view returns (bytes32);
function dojangScroll() external view returns (address);
function getHooksRegistrationBitmap() external pure returns (uint16);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function hasRole(bytes32 role, address account) external view returns (bool);
function MAX_ADMIN_DELAY() external view returns (uint48);
function owner() external view returns (address);
function pendingDefaultAdmin() external view returns (address newAdmin, uint48 schedule);
function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 schedule);
function POOL_INITIALIZER_ROLE() external view returns (bytes32);
function poolManager() external view returns (address);
function positionManager() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function UPGRADE_INTERFACE_VERSION() external view returns (string);
function vault() external view returns (address);function acceptDefaultAdminTransfer() external;
function afterAddLiquidity(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt),
int256 delta,
int256 feesAccrued,
bytes hookData
) external returns (bytes4, int256);
function afterDonate(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint256 amount0,
uint256 amount1,
bytes hookData
) external returns (bytes4);
function afterInitialize(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint160 sqrtPriceX96,
int24 tick
) external returns (bytes4);
function afterRemoveLiquidity(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt),
int256 delta,
int256 feesAccrued,
bytes hookData
) external returns (bytes4, int256);
function afterSwap(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96),
int256 delta,
bytes hookData
) external returns (bytes4, int128);
function beforeAddLiquidity(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt),
bytes hookData
) external returns (bytes4);
function beforeDonate(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint256 amount0,
uint256 amount1,
bytes hookData
) external returns (bytes4);
function beforeInitialize(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
uint160 sqrtPriceX96
) external returns (bytes4);
function beforeRemoveLiquidity(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt),
bytes hookData
) external returns (bytes4);
function beforeSwap(
address sender,
(address currency0, address currency1, address hooks, address poolManager, uint24 fee, bytes32 parameters),
(bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96),
bytes hookData
) external returns (bytes4, int256, uint24);
function beginDefaultAdminTransfer(address newAdmin) external;
function cancelDefaultAdminTransfer() external;
function changeDefaultAdminDelay(uint48 newDelay) external;
function grantRole(bytes32 role, address account) external;
function initialize(
uint48 adminDelay,
address admin,
address configManager,
address scroll,
bytes32 attesterId
) external;
function renounceRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function rollbackDefaultAdminDelay() external;
function setDojangScroll(address scroll) external;
function setTrustedAttester(bytes32 attesterId) external;
function upgradeToAndCall(
address newImplementation,
bytes data
) external payable;event DefaultAdminDelayChangeCanceled();
event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule);
event DefaultAdminTransferCanceled();
event DefaultAdminTransferScheduled(
address indexed newAdmin,
uint48 acceptSchedule
);
event DojangScrollUpdated(address indexed scroll);
event Initialized(uint64 version);
event RoleAdminChanged(
bytes32 indexed role,
bytes32 indexed previousAdminRole,
bytes32 indexed newAdminRole
);
event RoleGranted(
bytes32 indexed role,
address indexed account,
address indexed sender
);
event RoleRevoked(
bytes32 indexed role,
address indexed account,
address indexed sender
);
event TrustedAttesterUpdated(bytes32 indexed attesterId);
event Upgraded(address indexed implementation);Apps
The exchange's own testnet apps. The Faucet and the Gacha are proxies, so use the proxy address and ignore the implementation address listed beneath it.
Faucet
Hands out test tokens and testnet ETH against a server-signed claim. The one-day cooldown applies per eligibility ID, not per account. The address listed is the proxy.
This is a proxy: integrate with its proxy address. The implementation behind it, listed on Addresses for reference, changes on upgrade and is not for integration.
Functions
- claim(bytes32 eligibilityId, uint256 deadline, bytes signature)
- Claims for the caller with a signature issued by the claim signer.
- claimFor(address account, bytes32 eligibilityId, uint256 deadline, bytes signature)
- Lets a relayer submit the claim for a wallet with no gas; the payout always goes to the signed account.
- nextClaimAt(bytes32 eligibilityId)
- Timestamp from which that eligibility can claim again.
- COOLDOWN()
- Seconds between claims for one eligibility ID (one day).
- ethAmount()
- Testnet ETH paid per claim, only to a wallet holding less than this amount; otherwise the claim pays tokens only.
Events
- Claimed(address indexed account, bytes32 indexed eligibilityId)
- A claim was paid out.
All functions / All events
function amounts(uint256) external view returns (uint256);
function CLAIM_TYPEHASH() external view returns (bytes32);
function claimSigner() external view returns (address);
function COOLDOWN() external view returns (uint256);
function eip712Domain() external view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions);
function ethAmount() external view returns (uint256);
function nextClaimAt(bytes32 eligibilityId) external view returns (uint256 timestamp);
function owner() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function tokens(uint256) external view returns (address);
function UPGRADE_INTERFACE_VERSION() external view returns (string);function claim(
bytes32 eligibilityId,
uint256 deadline,
bytes signature
) external;
function claimFor(
address account,
bytes32 eligibilityId,
uint256 deadline,
bytes signature
) external;
function initialize(
address[5] tokenList,
uint256[5] claimAmounts,
address claimSigner_,
address upgradeOwner_
) external;
function renounceOwnership() external;
function setClaimSigner(address newSigner) external;
function setEthAmount(uint256 newAmount) external;
function transferOwnership(address newOwner) external;
function upgradeToAndCall(
address newImplementation,
bytes data
) external payable;
function withdraw(address token, address recipient, uint256 amount) external;
function withdrawEth(address recipient, uint256 amount) external;event Claimed(address indexed account, bytes32 indexed eligibilityId);
event ClaimSignerUpdated(
address indexed previousSigner,
address indexed newSigner
);
event EIP712DomainChanged();
event EthAmountUpdated(uint256 previousAmount, uint256 newAmount);
event Initialized(uint64 version);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event Upgraded(address indexed implementation);Gacha
Test-only collectible game: pay in the payment token to open card packs (packId 0–3, up to 10 per call) that mint ERC-721 cards. Payment goes to the treasury. Draws use testnet pseudo-randomness, not a VRF. The address listed is the proxy.
This is a proxy: integrate with its proxy address. The implementation behind it, listed on Addresses for reference, changes on upgrade and is not for integration.
Functions
- openPack(uint8 packId, uint8 quantity)
- Pays for and opens packs; approve the payment token first.
- packPrice(uint8 packId)
- Price of one pack in the payment token.
- paymentToken()
- The ERC-20 packs are paid in.
- rarityOf(uint256 tokenId)
- Rarity of one card.
Events
- PackOpened(address indexed account, uint8 indexed packId, uint8 quantity, uint256 firstTokenId, uint256 paid)
- Packs were opened; the cards are tokens firstTokenId onward.
- CardPulled(address indexed account, uint256 indexed tokenId, uint8 cardId, uint8 rarity)
- One card was minted.
All functions / All events
function balanceOf(address owner) external view returns (uint256);
function cardTypes(uint256 tokenId) external view returns (uint8 cardId);
function getApproved(uint256 tokenId) external view returns (address);
function isApprovedForAll(
address owner,
address operator
) external view returns (bool);
function MAX_PACKS() external view returns (uint8);
function name() external pure returns (string);
function nextTokenId() external view returns (uint256);
function owner() external view returns (address);
function ownerOf(uint256 tokenId) external view returns (address);
function PACK_COUNT() external view returns (uint8);
function packPrice(uint8 packId) external view returns (uint256);
function paymentToken() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function rarityOf(uint256 tokenId) external view returns (uint8);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function symbol() external pure returns (string);
function tokenURI(uint256 tokenId) external view returns (string);
function treasury() external view returns (address);
function UPGRADE_INTERFACE_VERSION() external view returns (string);function approve(address to, uint256 tokenId) external;
function initialize(
address paymentToken_,
address treasury_,
address upgradeOwner_,
uint256[4] prices_
) external;
function openPack(uint8 packId, uint8 quantity) external;
function renounceOwnership() external;
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes data
) external;
function safeTransferFrom(address from, address to, uint256 tokenId) external;
function setApprovalForAll(address operator, bool approved) external;
function transferFrom(address from, address to, uint256 tokenId) external;
function transferOwnership(address newOwner) external;
function upgradeToAndCall(
address newImplementation,
bytes data
) external payable;event Approval(
address indexed owner,
address indexed approved,
uint256 indexed tokenId
);
event ApprovalForAll(
address indexed owner,
address indexed operator,
bool approved
);
event CardPulled(
address indexed account,
uint256 indexed tokenId,
uint8 cardId,
uint8 rarity
);
event Initialized(uint64 version);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
event PackOpened(
address indexed account,
uint8 indexed packId,
uint8 quantity,
uint256 firstTokenId,
uint256 paid
);
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
event Upgraded(address indexed implementation);Earn vaults
earnUSD, sentUSD and ogUSDx are ERC-4626 test vaults over mock USDC.
earnUSD
ERC-4626 test vault over mock USDC; one of three test vaults. Testnet only.
Functions
- asset()
- The underlying token, mock USDC.
- deposit(uint256 assets, address receiver)
- Deposits assets and mints shares to receiver.
- redeem(uint256 shares, address receiver, address owner)
- Burns shares and sends the assets to receiver.
- convertToAssets(uint256 shares)
- Assets that a number of shares are worth now.
Events
- Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares)
- Assets were deposited.
- Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
- Assets were withdrawn.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function asset() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function convertToAssets(uint256 shares) external view returns (uint256);
function convertToShares(uint256 assets) external view returns (uint256);
function decimals() external view returns (uint8);
function maxDeposit(address) external view returns (uint256);
function maxMint(address) external view returns (uint256);
function maxRedeem(address owner) external view returns (uint256);
function maxWithdraw(address owner) external view returns (uint256);
function name() external view returns (string);
function previewDeposit(uint256 assets) external view returns (uint256);
function previewMint(uint256 shares) external view returns (uint256);
function previewRedeem(uint256 shares) external view returns (uint256);
function previewWithdraw(uint256 assets) external view returns (uint256);
function symbol() external view returns (string);
function totalAssets() external view returns (uint256);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 value) external returns (bool);
function deposit(uint256 assets, address receiver) external returns (uint256);
function mint(uint256 shares, address receiver) external returns (uint256);
function redeem(
uint256 shares,
address receiver,
address owner
) external returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function withdraw(
uint256 assets,
address receiver,
address owner
) external returns (uint256);event Approval(address indexed owner, address indexed spender, uint256 value);
event Deposit(
address indexed sender,
address indexed owner,
uint256 assets,
uint256 shares
);
event Transfer(address indexed from, address indexed to, uint256 value);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);sentUSD
ERC-4626 test vault over mock USDC; one of three test vaults. Testnet only.
Functions
- asset()
- The underlying token, mock USDC.
- deposit(uint256 assets, address receiver)
- Deposits assets and mints shares to receiver.
- redeem(uint256 shares, address receiver, address owner)
- Burns shares and sends the assets to receiver.
- convertToAssets(uint256 shares)
- Assets that a number of shares are worth now.
Events
- Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares)
- Assets were deposited.
- Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
- Assets were withdrawn.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function asset() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function convertToAssets(uint256 shares) external view returns (uint256);
function convertToShares(uint256 assets) external view returns (uint256);
function decimals() external view returns (uint8);
function maxDeposit(address) external view returns (uint256);
function maxMint(address) external view returns (uint256);
function maxRedeem(address owner) external view returns (uint256);
function maxWithdraw(address owner) external view returns (uint256);
function name() external view returns (string);
function previewDeposit(uint256 assets) external view returns (uint256);
function previewMint(uint256 shares) external view returns (uint256);
function previewRedeem(uint256 shares) external view returns (uint256);
function previewWithdraw(uint256 assets) external view returns (uint256);
function symbol() external view returns (string);
function totalAssets() external view returns (uint256);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 value) external returns (bool);
function deposit(uint256 assets, address receiver) external returns (uint256);
function mint(uint256 shares, address receiver) external returns (uint256);
function redeem(
uint256 shares,
address receiver,
address owner
) external returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function withdraw(
uint256 assets,
address receiver,
address owner
) external returns (uint256);event Approval(address indexed owner, address indexed spender, uint256 value);
event Deposit(
address indexed sender,
address indexed owner,
uint256 assets,
uint256 shares
);
event Transfer(address indexed from, address indexed to, uint256 value);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);ogUSDx
ERC-4626 test vault over mock USDC; one of three test vaults. Testnet only.
Functions
- asset()
- The underlying token, mock USDC.
- deposit(uint256 assets, address receiver)
- Deposits assets and mints shares to receiver.
- redeem(uint256 shares, address receiver, address owner)
- Burns shares and sends the assets to receiver.
- convertToAssets(uint256 shares)
- Assets that a number of shares are worth now.
Events
- Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares)
- Assets were deposited.
- Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
- Assets were withdrawn.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function asset() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function convertToAssets(uint256 shares) external view returns (uint256);
function convertToShares(uint256 assets) external view returns (uint256);
function decimals() external view returns (uint8);
function maxDeposit(address) external view returns (uint256);
function maxMint(address) external view returns (uint256);
function maxRedeem(address owner) external view returns (uint256);
function maxWithdraw(address owner) external view returns (uint256);
function name() external view returns (string);
function previewDeposit(uint256 assets) external view returns (uint256);
function previewMint(uint256 shares) external view returns (uint256);
function previewRedeem(uint256 shares) external view returns (uint256);
function previewWithdraw(uint256 assets) external view returns (uint256);
function symbol() external view returns (string);
function totalAssets() external view returns (uint256);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 value) external returns (bool);
function deposit(uint256 assets, address receiver) external returns (uint256);
function mint(uint256 shares, address receiver) external returns (uint256);
function redeem(
uint256 shares,
address receiver,
address owner
) external returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function withdraw(
uint256 assets,
address receiver,
address owner
) external returns (uint256);event Approval(address indexed owner, address indexed spender, uint256 value);
event Deposit(
address indexed sender,
address indexed owner,
uint256 assets,
uint256 shares
);
event Transfer(address indexed from, address indexed to, uint256 value);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);Shared
Standard contracts at their canonical addresses, the same as on other chains: Permit2 for token approvals, WETH9 at the OP Stack predeploy address, and Multicall3 for batching reads.
Permit2
Token approval manager at its canonical address. Approve an ERC-20 to Permit2 once; Permit2 then grants time-limited allowances to UniversalRouter and CLPositionManager.
Functions
- approve(address token, address spender, uint160 amount, uint48 expiration)
- On-chain allowance from the caller to a spender (e.g. UniversalRouter) until expiration.
- allowance(address, address, address)
- (owner, token, spender) → amount, expiration and the next nonce for a signed permit.
- permit(address owner, PermitSingle permitSingle, bytes signature)
- Sets an allowance from an EIP-712 signature instead of a transaction. Usually relayed by the spender (router command 0x0a).
Events
- Approval(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration)
- An allowance was set with approve().
- Permit(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration, uint48 nonce)
- An allowance was set from a signature.
All functions / All events
function allowance(
address,
address,
address
) external view returns (uint160 amount, uint48 expiration, uint48 nonce);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function nonceBitmap(address, uint256) external view returns (uint256);function approve(
address token,
address spender,
uint160 amount,
uint48 expiration
) external;
function invalidateNonces(
address token,
address spender,
uint48 newNonce
) external;
function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;
function lockdown((address token, address spender)[]) external;
function permit(
address owner,
((address token, uint160 amount, uint48 expiration, uint48 nonce)[], address spender, uint256 sigDeadline),
bytes signature
) external;
function permit(
address owner,
((address token, uint160 amount, uint48 expiration, uint48 nonce), address spender, uint256 sigDeadline),
bytes signature
) external;
function permitTransferFrom(
((address token, uint256 amount)[], uint256 nonce, uint256 deadline),
(address to, uint256 requestedAmount)[],
address owner,
bytes signature
) external;
function permitTransferFrom(
((address token, uint256 amount), uint256 nonce, uint256 deadline),
(address to, uint256 requestedAmount),
address owner,
bytes signature
) external;
function permitWitnessTransferFrom(
((address token, uint256 amount)[], uint256 nonce, uint256 deadline),
(address to, uint256 requestedAmount)[],
address owner,
bytes32 witness,
string witnessTypeString,
bytes signature
) external;
function permitWitnessTransferFrom(
((address token, uint256 amount), uint256 nonce, uint256 deadline),
(address to, uint256 requestedAmount),
address owner,
bytes32 witness,
string witnessTypeString,
bytes signature
) external;
function transferFrom(
address from,
address to,
uint160 amount,
address token
) external;
function transferFrom((address from, address to, uint160 amount, address token)[]) external;event Approval(
address indexed owner,
address indexed token,
address indexed spender,
uint160 amount,
uint48 expiration
);
event Lockdown(address indexed owner, address token, address spender);
event NonceInvalidation(
address indexed owner,
address indexed token,
address indexed spender,
uint48 newNonce,
uint48 oldNonce
);
event Permit(
address indexed owner,
address indexed token,
address indexed spender,
uint160 amount,
uint48 expiration,
uint48 nonce
);
event UnorderedNonceInvalidation(
address indexed owner,
uint256 word,
uint256 mask
);WETH9
Wrapped ETH at the OP Stack predeploy address. Pools may hold native ETH (address zero) or WETH; the router wraps and unwraps only when the plan says so, with the WRAP_ETH / UNWRAP_WETH commands (0x0b / 0x0c) or the WRAP / UNWRAP actions (0x15 / 0x16).
Functions
- deposit()
- Wraps the ETH sent as msg.value into WETH.
- withdraw(uint256 wad)
- Unwraps WETH back to ETH.
Events
- Deposit(address indexed dst, uint256 wad)
- ETH wrapped.
- Withdrawal(address indexed src, uint256 wad)
- WETH unwrapped.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function deposit() external payable;
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
function withdraw(uint256 wad) external;event Approval(address indexed owner, address indexed spender, uint256 value);
event Deposit(address indexed dst, uint256 wad);
event Transfer(address indexed from, address indexed to, uint256 value);
event Withdrawal(address indexed src, uint256 wad);Multicall3
Batches read calls into one RPC request at its canonical address. The app reads pool state and runs quotes through it.
Functions
- aggregate3((address,bool,bytes)[] calls)
- Runs each (target, allowFailure, callData) and returns (success, returnData) per call.
- getEthBalance(address addr)
- Native ETH balance, batchable with token reads.
All functions / All events
function aggregate3((address target, bool allowFailure, bytes callData)[]) external view returns ((bool success, bytes returnData)[]);
function getCurrentBlockTimestamp() external view returns (uint256 timestamp);
function getEthBalance(address addr) external view returns (uint256 balance);Test tokens
Mock ERC-20 tokens for testing on GIWA Sepolia only. They have no value, and their decimals differ between tokens, so read decimals() rather than assuming 18. Their ABI is the standard ERC-20 ABI.
USDC
Mock USDC, the underlying asset of the test vaults. Testnet-only mock ERC-20 with 6 decimals and no real value; get it from the Faucet.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);BTC
Mock BTC. Testnet-only mock ERC-20 with 8 decimals and no real value; get it from the Faucet.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);AAPL
Mock AAPL stock token. Testnet-only mock ERC-20 with 18 decimals and no real value; get it from the Faucet.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);SKHY
Mock SKHY stock token. Testnet-only mock ERC-20 with 18 decimals and no real value; get it from the Faucet.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);SPCX
Mock SPCX stock token. Testnet-only mock ERC-20 with 18 decimals and no real value; get it from the Faucet.
All functions / All events
function allowance(
address owner,
address spender
) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function name() external view returns (string);
function symbol() external view returns (string);
function totalSupply() external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);ABIs
The copy button in the ABI column on Addresses copies a contract's full ABI as JSON. The same ABI is served as a static file at /docs/abis/<key>.json, where <key> is one of vault, clPoolManager, clPoolManagerOwner, clProtocolFeeController, clPositionManager, clQuoter, clTickLens, universalRouter, dojangGateHook, faucet, gacha, earnUSD, sentUSD, ogUSDx, permit2, weth9, multicall3, mockUsdc, mockBtc, mockAapl, mockSkhy and mockSpcx — for example /docs/abis/clQuoter.json.
ABIs come from the same build's artifacts as the deployment manifest, so they match the contracts the app itself uses. CLPositionDescriptorOffChain publishes no ABI, so it has no file or copy button. For a proxy, the file is the ABI of the logic behind the proxy address. WETH9 and Multicall3 are predeploys outside that build: the WETH9 file is the standard ERC-20 ABI plus deposit, withdraw and their events, and the Multicall3 file covers the members viem uses (aggregate3, getEthBalance, getCurrentBlockTimestamp).