UniversalRouter
Unichain0xef740bf23acae26f6492b10de645d6b98dc8eaf3
Solidity v0.8.26+commit.8a97fa7a
🤖
Query this contract from your AI
Reference:
0xef740bf23acae26f6492b10de645d6b98dc8eaf3
Sample prompt:
"Tell me the current state of unichain/0xef740bf23acae26f6492b10de645d6b98dc8eaf3"
No AI wired up yet? →
mcp.smarts.md
Unichain 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
0
Read Functions
V3_POSITION_MANAGER()
view
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
V4_POSITION_MANAGER()
view
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
msgSender()
view
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
dev: overrides BaseActionsRouter.msgSender in V4Router
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
poolManager()
view
The Uniswap v4 PoolManager contract
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Write Functions
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 |
unlockCallback(data: bytes)
nonpayable
dev: We force the onlyPoolManager modifier by exposing a virtual function after the onlyPoolManager check.
Parameters
| Name | Type | Description |
|---|---|---|
| data | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes |