UniversalRouter

Linea

0x85974429677c2a701af470b82f3118e74307826e

Solidity v0.8.28+commit.7893614a

🤖
通过你的 AI 查询此合约
引用: 0x85974429677c2a701af470b82f3118e74307826e
示例提示词: "Tell me the current state of linea/0x85974429677c2a701af470b82f3118e74307826e"
还没有接入 AI?→ mcp.smarts.md
Linea 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
4
写入函数
4
事件
1

读取函数

onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) pure

Handles ERC-1155 batch transfer callbacks and returns the selector required to accept the transfer.✨ AI

开发者: Handles the receipt of a multiple ERC-1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector).

参数

名称 类型 描述
address
address
uint256[]
uint256[]
bytes

返回值

名称 类型 描述
bytes4 `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
onERC1155Received(address, address, uint256, uint256, bytes) pure

Handle incoming single ERC-1155 token transfers and return the acceptance selector.✨ AI

开发者: Handles the receipt of a single ERC-1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector).

参数

名称 类型 描述
address
address
uint256
uint256
bytes

返回值

名称 类型 描述
bytes4 `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
onERC721Received(address, address, uint256, bytes) pure

Handles an incoming ERC-721 transfer and returns the selector that confirms receipt.✨ AI

开发者: Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.

参数

名称 类型 描述
address
address
uint256
bytes

返回值

名称 类型 描述
bytes4 Bytes4 selector that signals successful receipt of the ERC-721 token (0x150b7a02).✨ AI
supportsInterface(interfaceId: bytes4) pure

///////////////////////////////////////////////////////////

参数

名称 类型 描述
interfaceId bytes4

返回值

名称 类型 描述
bool

写入函数

collectRewards(looksRareClaim: bytes) nonpayable

Fetches users' LooksRare rewards and sends them to the distributor contract

参数

名称 类型 描述
looksRareClaim bytes The data required by LooksRare to claim reward tokens
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

事件

RewardsSent(amount: uint256)
名称 类型 已索引 描述
amount uint256