UniversalRouter
Linea0x85974429677c2a701af470b82f3118e74307826e
Solidity v0.8.28+commit.7893614a
概览
读取函数
Handles ERC-1155 batch transfer callbacks and returns the selector required to accept the transfer.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256[] | |
| — | uint256[] | |
| — | bytes |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes4 | `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed |
Handle incoming single ERC-1155 token transfers and return the acceptance selector.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256 | |
| — | uint256 | |
| — | bytes |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes4 | `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed |
Handles an incoming ERC-721 transfer and returns the selector that confirms receipt.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256 | |
| — | bytes |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes4 | Bytes4 selector that signals successful receipt of the ERC-721 token (0x150b7a02).✨ AI |
///////////////////////////////////////////////////////////
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| interfaceId | bytes4 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
写入函数
Fetches users' LooksRare rewards and sends them to the distributor contract
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| looksRareClaim | bytes | The data required by LooksRare to claim reward tokens |
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 |
事件
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| amount | uint256 |