UniversalRouter

Unichain

0xef740bf23acae26f6492b10de645d6b98dc8eaf3

Solidity v0.8.26+commit.8a97fa7a

🤖
通过你的 AI 查询此合约
引用: 0xef740bf23acae26f6492b10de645d6b98dc8eaf3
示例提示词: "Tell me the current state of unichain/0xef740bf23acae26f6492b10de645d6b98dc8eaf3"
还没有接入 AI?→ mcp.smarts.md
Unichain 在 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