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