UniversalRouter
Linea0x85974429677c2a701af470b82f3118e74307826e
Solidity v0.8.28+commit.7893614a
🤖
Query this contract from your AI
Reference:
0x85974429677c2a701af470b82f3118e74307826e
Sample prompt:
"Tell me the current state of linea/0x85974429677c2a701af470b82f3118e74307826e"
No AI wired up yet? →
mcp.smarts.md
Linea is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.
Overview
Read Functions
4
Write Functions
4
Events
1
Read Functions
onERC1155BatchReceived(address, address, uint256[], uint256[], bytes)
pure
dev: 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).
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256[] | |
| — | uint256[] | |
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes4 | `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed |
onERC1155Received(address, address, uint256, uint256, bytes)
pure
dev: 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).
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256 | |
| — | uint256 | |
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes4 | `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed |
onERC721Received(address, address, uint256, bytes)
pure
dev: 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`.
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256 | |
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes4 |
supportsInterface(interfaceId: bytes4)
pure
///////////////////////////////////////////////////////////
Parameters
| Name | Type | Description |
|---|---|---|
| interfaceId | bytes4 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Write Functions
collectRewards(looksRareClaim: bytes)
nonpayable
Fetches users' LooksRare rewards and sends them to the distributor contract
Parameters
| Name | Type | Description |
|---|---|---|
| looksRareClaim | bytes | The data required by LooksRare to claim reward tokens |
execute(commands: bytes, inputs: bytes[])
payable
Executes encoded commands along with provided inputs.
Parameters
| Name | Type | Description |
|---|---|---|
| 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.
Parameters
| Name | Type | Description |
|---|---|---|
| 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.
dev: 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.
Parameters
| Name | Type | Description |
|---|---|---|
| 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 |
Events
RewardsSent(amount: uint256)
| Name | Type | Indexed | Description |
|---|---|---|---|
| amount | uint256 |