Multicall3

Sonic

0xca11bde05977b3631167028862be2a173976ca11

Solidity v0.8.12+commit.f00d7308

🤖
通过你的 AI 查询此合约
引用: 0xca11bde05977b3631167028862be2a173976ca11
示例提示词: "Tell me the current state of sonic/0xca11bde05977b3631167028862be2a173976ca11"
还没有接入 AI?→ mcp.smarts.md
Sonic 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
10
写入函数
6
事件
0

读取函数

getBasefee() view

Can revert if the BASEFEE opcode is not implemented by the given chain

返回值

名称 类型 描述
basefee uint256
getBlockHash(blockNumber: uint256) view

Returns the block hash for the given block number

参数

名称 类型 描述
blockNumber uint256 The block number

返回值

名称 类型 描述
blockHash bytes32
getBlockNumber() view

Returns the block number

返回值

名称 类型 描述
blockNumber uint256
getChainId() view

Returns the chain id

返回值

名称 类型 描述
chainid uint256
getCurrentBlockCoinbase() view

Returns the block coinbase

返回值

名称 类型 描述
coinbase address
getCurrentBlockDifficulty() view

Returns the block difficulty

返回值

名称 类型 描述
difficulty uint256
getCurrentBlockGasLimit() view

Returns the block gas limit

返回值

名称 类型 描述
gaslimit uint256
getCurrentBlockTimestamp() view

Returns the block timestamp

返回值

名称 类型 描述
timestamp uint256
getEthBalance(addr: address) view

Returns the (ETH) balance of a given address

参数

名称 类型 描述
addr address

返回值

名称 类型 描述
balance uint256
getLastBlockHash() view

Returns the block hash of the last block

返回值

名称 类型 描述
blockHash bytes32

写入函数

aggregate(calls: tuple[]) payable

Backwards-compatible call aggregation with Multicall

参数

名称 类型 描述
calls tuple[] An array of Call structs

返回值

名称 类型 描述
blockNumber uint256 blockNumber The block number where the calls were executed
returnData bytes[] returnData An array of bytes containing the responses
aggregate3(calls: tuple[]) payable

Aggregate calls, ensuring each returns success if required

参数

名称 类型 描述
calls tuple[] An array of Call3 structs

返回值

名称 类型 描述
returnData tuple[] returnData An array of Result structs
aggregate3Value(calls: tuple[]) payable

Reverts if msg.value is less than the sum of the call values

参数

名称 类型 描述
calls tuple[] An array of Call3Value structs

返回值

名称 类型 描述
returnData tuple[] returnData An array of Result structs
blockAndAggregate(calls: tuple[]) payable

Aggregate calls and allow failures using tryAggregate

参数

名称 类型 描述
calls tuple[] An array of Call structs

返回值

名称 类型 描述
blockNumber uint256 blockNumber The block number where the calls were executed
blockHash bytes32 blockHash The hash of the block where the calls were executed
returnData tuple[] returnData An array of Result structs
tryAggregate(requireSuccess: bool, calls: tuple[]) payable

Aggregate calls without requiring success

参数

名称 类型 描述
requireSuccess bool If true, require all calls to succeed
calls tuple[] An array of Call structs

返回值

名称 类型 描述
returnData tuple[] returnData An array of Result structs
tryBlockAndAggregate(requireSuccess: bool, calls: tuple[]) payable

Aggregate calls and allow failures using tryAggregate

参数

名称 类型 描述
requireSuccess bool
calls tuple[] An array of Call structs

返回值

名称 类型 描述
blockNumber uint256 blockNumber The block number where the calls were executed
blockHash bytes32 blockHash The hash of the block where the calls were executed
returnData tuple[] returnData An array of Result structs