UniversalRouter

Celo

0xcb695bc5d3aa22cad1e6df07801b061a05a0233a

Solidity v0.8.26+commit.8a97fa7a

🤖
透過你的 AI 查詢此合約
參考: 0xcb695bc5d3aa22cad1e6df07801b061a05a0233a
範例提示詞: "Tell me the current state of celo/0xcb695bc5d3aa22cad1e6df07801b061a05a0233a"
還沒有接入 AI?→ mcp.smarts.md
Celo 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。

概覽

讀取函式
4
寫入函式
4
事件
0

讀取函式

V3_POSITION_MANAGER() view

Returns the address of the Uniswap V3 Nonfungible Position Manager used by the router.✨ AI

回傳值

名稱 類型 描述
address The address of the Uniswap V3 Nonfungible Position Manager contract that the router interacts with.✨ AI
V4_POSITION_MANAGER() view

Returns the address of the V4 position manager used by this router.✨ AI

回傳值

名稱 類型 描述
address The address of the V4 position manager contract.✨ AI
msgSender() view

Public view function to be used instead of msg.sender, as the contract performs self-reentrancy and at times msg.sender == address(this). Instead msgSender() returns the initiator of the lock

開發者: overrides BaseActionsRouter.msgSender in V4Router

回傳值

名稱 類型 描述
address
poolManager() view

The Uniswap v4 PoolManager contract

回傳值

名稱 類型 描述
address

寫入函式

execute(commands: bytes, inputs: bytes[]) payable

Executes encoded commands along with provided inputs.

參數

名稱 類型 描述
commands bytes A set of concatenated commands, each 1 byte in length
inputs bytes[] An array of byte strings containing abi encoded inputs for each command
execute(commands: bytes, inputs: bytes[], deadline: uint256) payable

Executes encoded commands along with provided inputs.

參數

名稱 類型 描述
commands bytes A set of concatenated commands, each 1 byte in length
inputs bytes[] An array of byte strings containing abi encoded inputs for each command
deadline uint256
uniswapV3SwapCallback(amount0Delta: int256, amount1Delta: int256, data: bytes) nonpayable

Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.

開發者: In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.

參數

名稱 類型 描述
amount0Delta int256 The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.
amount1Delta int256 The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.
data bytes Any data passed through by the caller via the IUniswapV3PoolActions#swap call
unlockCallback(data: bytes) nonpayable

Execute an unlock callback using provided data and return the callback response bytes.✨ AI

開發者: We force the onlyPoolManager modifier by exposing a virtual function after the onlyPoolManager check.

參數

名稱 類型 描述
data bytes Encoded input data for the unlock callback, supplied by the caller or a prior operation.✨ AI

回傳值

名稱 類型 描述
bytes Raw bytes returned by the callback, representing the result or instructions for the router's next steps.✨ AI