UniversalRouter
Celo0xcb695bc5d3aa22cad1e6df07801b061a05a0233a
Solidity v0.8.26+commit.8a97fa7a
概覽
讀取函式
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 |
Returns the address of the V4 position manager used by this router.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address of the V4 position manager contract.✨ AI |
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
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address |
The Uniswap v4 PoolManager contract
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address |
寫入函式
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 |
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 |
Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| 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 |
Execute an unlock callback using provided data and return the callback response bytes.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| 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 |