🤖
透過你的 AI 查詢此合約
參考:
0x8f51a95226f8bad1b4b3a0f61f6a53d084a7e033
範例提示詞:
"Tell me the current state of mantle/0x8f51a95226f8bad1b4b3a0f61f6a53d084a7e033"
還沒有接入 AI?→
mcp.smarts.md
· 瀏覽鏈
Mantle 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。
概覽
讀取函式
3
寫入函式
4
事件
0
讀取函式
WETH9()
view
Returns the address of the WETH9 token contract used to wrap native ETH.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | Returns the address of WETH9 |
factory()
view
The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The contract address |
uniswapV3SwapCallback(amount0Delta: int256, amount1Delta: int256, path: bytes)
view
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. |
| path | bytes |
寫入函式
quoteExactInput(path: bytes, amountIn: uint256)
nonpayable
Returns the amount out received for a given exact input swap without executing the swap
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| path | bytes | The path of the swap, i.e. each token pair and the pool fee |
| amountIn | uint256 | The amount of the first token to swap |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| amountOut | uint256 | amountOut The amount of the last token that would be received |
| sqrtPriceX96AfterList | uint160[] | sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | gasEstimate The estimate of the gas that the swap consumes |
quoteExactInputSingle(params: tuple)
nonpayable
Returns the amount out received for a given exact input but for a swap of a single pool
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| params | tuple | The params for the quote, encoded as `QuoteExactInputSingleParams` tokenIn The token being swapped in tokenOut The token being swapped out fee The fee of the token pool to consider for the pair amountIn The desired input amount sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| amountOut | uint256 | amountOut The amount of `tokenOut` that would be received |
| sqrtPriceX96After | uint160 | sqrtPriceX96After The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | initializedTicksCrossed The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | gasEstimate The estimate of the gas that the swap consumes |
quoteExactOutput(path: bytes, amountOut: uint256)
nonpayable
Returns the amount in required for a given exact output swap without executing the swap
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| path | bytes | The path of the swap, i.e. each token pair and the pool fee. Path must be provided in reverse order |
| amountOut | uint256 | The amount of the last token to receive |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| amountIn | uint256 | amountIn The amount of first token required to be paid |
| sqrtPriceX96AfterList | uint160[] | sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | gasEstimate The estimate of the gas that the swap consumes |
quoteExactOutputSingle(params: tuple)
nonpayable
Returns the amount in required to receive the given exact output amount but for a swap of a single pool
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| params | tuple | The params for the quote, encoded as `QuoteExactOutputSingleParams` tokenIn The token being swapped in tokenOut The token being swapped out fee The fee of the token pool to consider for the pair amountOut The desired output amount sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| amountIn | uint256 | amountIn The amount required as the input for the swap in order to receive `amountOut` |
| sqrtPriceX96After | uint160 | sqrtPriceX96After The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | initializedTicksCrossed The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | gasEstimate The estimate of the gas that the swap consumes |