CrustRouter01
Mantle0x2c2954cf16f974033e1e2345fce1ca434dc14497
Solidity v0.8.13+commit.abaa5c0e
🤖
Query this contract from your AI
Reference:
0x2c2954cf16f974033e1e2345fce1ca434dc14497
Sample prompt:
"Tell me the current state of mantle/0x2c2954cf16f974033e1e2345fce1ca434dc14497"
No AI wired up yet? →
mcp.smarts.md
Mantle 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
12
Write Functions
16
Events
0
Read Functions
factory()
view
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
getAmountOut(amountIn: uint256, tokenIn: address, tokenOut: address)
view
dev: Performs chained getAmountOut calculations on any number of pairs.
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| tokenIn | address | |
| tokenOut | address |
Returns
| Name | Type | Description |
|---|---|---|
| amount | uint256 | |
| stable | bool |
getAmountsOut(amountIn: uint256, routes: tuple[])
view
dev: Performs chained getAmountOut calculations on any number of pairs.
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| routes | tuple[] |
Returns
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] |
getExactAmountOut(amountIn: uint256, tokenIn: address, tokenOut: address, stable: bool)
view
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| tokenIn | address | |
| tokenOut | address | |
| stable | bool |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
getReserves(tokenA: address, tokenB: address, stable: bool)
view
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool |
Returns
| Name | Type | Description |
|---|---|---|
| reserveA | uint256 | |
| reserveB | uint256 |
isPair(pair: address)
view
Parameters
| Name | Type | Description |
|---|---|---|
| pair | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
pairFor(tokenA: address, tokenB: address, stable: bool)
view
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool |
Returns
| Name | Type | Description |
|---|---|---|
| pair | address |
quoteAddLiquidity(tokenA: address, tokenB: address, stable: bool, amountADesired: uint256, amountBDesired: uint256)
view
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool | |
| amountADesired | uint256 | |
| amountBDesired | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| amountB | uint256 | |
| liquidity | uint256 |
quoteLiquidity(amountA: uint256, reserveA: uint256, reserveB: uint256)
pure
Parameters
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| reserveA | uint256 | |
| reserveB | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountB | uint256 |
quoteRemoveLiquidity(tokenA: address, tokenB: address, stable: bool, liquidity: uint256)
view
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool | |
| liquidity | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| amountB | uint256 |
sortTokens(tokenA: address, tokenB: address)
pure
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address |
Returns
| Name | Type | Description |
|---|---|---|
| token0 | address | |
| token1 | address |
wmnt()
view
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Write Functions
UNSAFE_swapExactTokensForTokens(amounts: uint256[], routes: tuple[], to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256[] |
addLiquidity(tokenA: address, tokenB: address, stable: bool, amountADesired: uint256, amountBDesired: uint256, amountAMin: uint256, amountBMin: uint256, to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool | |
| amountADesired | uint256 | |
| amountBDesired | uint256 | |
| amountAMin | uint256 | |
| amountBMin | uint256 | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| amountB | uint256 | |
| liquidity | uint256 |
addLiquidityMNT(token: address, stable: bool, amountTokenDesired: uint256, amountTokenMin: uint256, amountMNTMin: uint256, to: address, deadline: uint256)
payable
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| stable | bool | |
| amountTokenDesired | uint256 | |
| amountTokenMin | uint256 | |
| amountMNTMin | uint256 | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountToken | uint256 | |
| amountMNT | uint256 | |
| liquidity | uint256 |
removeLiquidity(tokenA: address, tokenB: address, stable: bool, liquidity: uint256, amountAMin: uint256, amountBMin: uint256, to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountAMin | uint256 | |
| amountBMin | uint256 | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| amountB | uint256 |
removeLiquidityMNT(token: address, stable: bool, liquidity: uint256, amountTokenMin: uint256, amountMNTMin: uint256, to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountTokenMin | uint256 | |
| amountMNTMin | uint256 | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountToken | uint256 | |
| amountMNT | uint256 |
removeLiquidityMNTSupportingFeeOnTransferTokens(token: address, stable: bool, liquidity: uint256, amountTokenMin: uint256, amountMNTMin: uint256, to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountTokenMin | uint256 | |
| amountMNTMin | uint256 | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amountToken | uint256 | |
| amountFTM | uint256 |
removeLiquidityMNTWithPermit(token: address, stable: bool, liquidity: uint256, amountTokenMin: uint256, amountMNTMin: uint256, to: address, deadline: uint256, approveMax: bool, v: uint8, r: bytes32, s: bytes32)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountTokenMin | uint256 | |
| amountMNTMin | uint256 | |
| to | address | |
| deadline | uint256 | |
| approveMax | bool | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| amountToken | uint256 | |
| amountMNT | uint256 |
removeLiquidityMNTWithPermitSupportingFeeOnTransferTokens(token: address, stable: bool, liquidity: uint256, amountTokenMin: uint256, amountMNTMin: uint256, to: address, deadline: uint256, approveMax: bool, v: uint8, r: bytes32, s: bytes32)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountTokenMin | uint256 | |
| amountMNTMin | uint256 | |
| to | address | |
| deadline | uint256 | |
| approveMax | bool | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| amountToken | uint256 | |
| amountFTM | uint256 |
removeLiquidityWithPermit(tokenA: address, tokenB: address, stable: bool, liquidity: uint256, amountAMin: uint256, amountBMin: uint256, to: address, deadline: uint256, approveMax: bool, v: uint8, r: bytes32, s: bytes32)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| tokenA | address | |
| tokenB | address | |
| stable | bool | |
| liquidity | uint256 | |
| amountAMin | uint256 | |
| amountBMin | uint256 | |
| to | address | |
| deadline | uint256 | |
| approveMax | bool | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| amountA | uint256 | |
| amountB | uint256 |
swapExactMNTForTokens(amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
payable
Parameters
| Name | Type | Description |
|---|---|---|
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] |
swapExactMNTForTokensSupportingFeeOnTransferTokens(amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
payable
Parameters
| Name | Type | Description |
|---|---|---|
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
swapExactTokensForMNT(amountIn: uint256, amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] |
swapExactTokensForMNTSupportingFeeOnTransferTokens(amountIn: uint256, amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
swapExactTokensForTokens(amountIn: uint256, amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] |
swapExactTokensForTokensSimple(amountIn: uint256, amountOutMin: uint256, tokenFrom: address, tokenTo: address, stable: bool, to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| amountOutMin | uint256 | |
| tokenFrom | address | |
| tokenTo | address | |
| stable | bool | |
| to | address | |
| deadline | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] |
swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: uint256, amountOutMin: uint256, routes: tuple[], to: address, deadline: uint256)
nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| amountIn | uint256 | |
| amountOutMin | uint256 | |
| routes | tuple[] | |
| to | address | |
| deadline | uint256 |