Bridge

Taiko

0x1670000000000000000000000000000000000001

Proxy 实现合约: 0x95ae2918dcbc6aff8b4c1f1bcc1bf819b6e08b83

Solidity v0.8.27+commit.40a35a09

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

概览

读取函数
23
写入函数
15
事件
11

读取函数

GAS_OVERHEAD() view

Returns the configured gas overhead used by the bridge for message execution.✨ AI

返回值

名称 类型 描述
uint32 The gas overhead as a uint32 value added to estimated gas for bridge message execution.✨ AI
GAS_RESERVE() view

Shows the gas reserve value the bridge keeps as a safety buffer.✨ AI

返回值

名称 类型 描述
uint32 uint32 gas reserve the bridge retains (in gas units) as a buffer for internal operations.✨ AI
RELAYER_MAX_PROOF_BYTES() view

Returns the maximum allowed proof size in bytes that a relayer may submit.✨ AI

返回值

名称 类型 描述
uint256 Maximum allowed proof size in bytes that the Bridge accepts from relayers.✨ AI
addressManager() view

Returns the AddressManager contract address used by the bridge.✨ AI

返回值

名称 类型 描述
address The address of the AddressManager contract used for bridge configuration and lookups.✨ AI
context() view

Gets the current context.

返回值

名称 类型 描述
ctx_ tuple
getMessageMinGasLimit(dataLength: uint256) pure

Returns the minimal gas limit required for sending a given message.

参数

名称 类型 描述
dataLength uint256 The length of message.data.

返回值

名称 类型 描述
uint32 The minimal gas limit required for sending this message.
hashMessage(_message: tuple) pure

Hash the message

参数

名称 类型 描述
_message tuple The message struct variable to be hashed.

返回值

名称 类型 描述
bytes32 The message's hash.
impl() view

Returns the current implementation contract address used by the bridge.✨ AI

返回值

名称 类型 描述
address The address of the implementation contract that the bridge delegates calls to.✨ AI
inNonReentrant() view

Indicates whether the contract is currently not in a reentrant call.✨ AI

返回值

名称 类型 描述
bool True if the current call is not inside a reentrant execution; false if a reentrant call is in progress.✨ AI
isDestChainEnabled(_chainId: uint64) view

Checks if the destination chain is enabled.

参数

名称 类型 描述
_chainId uint64 The destination chain ID.

返回值

名称 类型 描述
enabled_ bool enabled_ True if the destination chain is enabled.
destBridge_ address destBridge_ The bridge of the destination chain.
isMessageFailed(_message: tuple, _proof: bytes) view

Checks if a msgHash has failed on its destination chain. This is the 'readonly' version of proveMessageFailed.

参数

名称 类型 描述
_message tuple The message.
_proof bytes The merkle inclusion proof.

返回值

名称 类型 描述
bool true if the message has failed, false otherwise.
isMessageReceived(_message: tuple, _proof: bytes) view

Checks if a msgHash has been received on its source chain. This is the 'readonly' version of proveMessageReceived.

参数

名称 类型 描述
_message tuple The message.
_proof bytes The merkle inclusion proof.

返回值

名称 类型 描述
bool true if the message has been received, false otherwise.
isMessageSent(_message: tuple) view

Checks if the message was sent.

参数

名称 类型 描述
_message tuple The message.

返回值

名称 类型 描述
bool true if the message was sent.
lastUnpausedAt() view

Return the UNIX timestamp when the contract was last unpaused.✨ AI

返回值

名称 类型 描述
uint64 Unix timestamp (seconds) of the last unpause event, stored as a uint64; zero if never unpaused.✨ AI
messageStatus(msgHash: bytes32) view

Get the current processing status of a message by its hash.✨ AI

参数

名称 类型 描述
msgHash bytes32 Keccak256 hash of the message whose status is queried.✨ AI

返回值

名称 类型 描述
status uint8 Status code of the message as an unsigned 8-bit integer; numeric values map to contract-defined states.✨ AI
nextMessageId() view

Returns the next message identifier that the bridge will assign.✨ AI

返回值

名称 类型 描述
uint64 Next sequential message identifier (uint64) to be assigned to the next created message.✨ AI
owner() view

Returns the current owner address of the Bridge contract.✨ AI

开发者: Returns the address of the current owner.

返回值

名称 类型 描述
address The address of the account that owns and administers this contract.✨ AI
paused() view

Returns true if the contract is paused, and false otherwise.

返回值

名称 类型 描述
bool true if paused, false otherwise.
pendingOwner() view

Return the address currently nominated to become the contract owner.✨ AI

开发者: Returns the address of the pending owner.

返回值

名称 类型 描述
address The address nominated as pending owner who can accept ownership; zero address if no nomination exists.✨ AI
proxiableUUID() view

Return the UUID that identifies the contract's proxiable implementation storage slot.✨ AI

开发者: Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.

返回值

名称 类型 描述
bytes32 bytes32 UUID identifying the proxiable implementation storage slot (used by UUPS/ERC1822 proxies).✨ AI
resolve(_chainId: uint64, _name: bytes32, _allowZeroAddress: bool) view

Resolves a name to its address deployed on this chain.

参数

名称 类型 描述
_chainId uint64
_name bytes32 Name whose address is to be resolved.
_allowZeroAddress bool If set to true, does not throw if the resolved address is `address(0)`.

返回值

名称 类型 描述
address Address associated with the given name.
resolve(_name: bytes32, _allowZeroAddress: bool) view

Resolves a name to its address deployed on this chain.

参数

名称 类型 描述
_name bytes32 Name whose address is to be resolved.
_allowZeroAddress bool If set to true, does not throw if the resolved address is `address(0)`.

返回值

名称 类型 描述
address Address associated with the given name.
signalForFailedMessage(_msgHash: bytes32) pure

Returns a signal representing a failed/recalled message.

参数

名称 类型 描述
_msgHash bytes32 The message hash.

返回值

名称 类型 描述
bytes32 The failed representation of it as bytes32.

写入函数

acceptOwnership() nonpayable

Accept a pending ownership transfer and make the caller the contract owner.✨ AI

开发者: The new owner accepts the ownership transfer.
failMessage(_message: tuple) nonpayable

Mark a message as failed if the message is currently retriable.

开发者: This function can only be called by `message.destOwner`.

参数

名称 类型 描述
_message tuple The message to fail. message.
init(_owner: address, _sharedAddressManager: address) nonpayable

Initializes the contract.

参数

名称 类型 描述
_owner address The owner of this contract. msg.sender will be used if this value is zero.
_sharedAddressManager address The address of the {AddressManager} contract.
init2() nonpayable

This function shall be called by previously deployed contracts.

pause() nonpayable

Pauses the contract.

processMessage(_message: tuple, _proof: bytes) nonpayable

Validates and executes an incoming cross-chain message by verifying its proof and applying its payload.✨ AI

开发者: To ensure successful execution, we recommend this transaction's gas limit not to be smaller than: `(message.gasLimit - GAS_RESERVE) * 64 / 63 + GAS_RESERVE`, Or we can use a simplified rule: `tx.gaslimit = message.gaslimit * 102%`.

参数

名称 类型 描述
_message tuple Structured message to process (contains origin, destination, nonce, payload, etc.).✨ AI
_proof bytes Cryptographic proof bytes used to validate the message origin and integrity.✨ AI

返回值

名称 类型 描述
status_ uint8 status_: Execution status code where 0 = success and nonzero indicates failure.✨ AI
reason_ uint8 reason_: Subcode indicating specific failure reason or processing stage for status_.✨ AI
recallMessage(_message: tuple, _proof: bytes) nonpayable

Recalls a failed message on its source chain, releasing associated assets.

开发者: This function checks if the message failed on the source chain and releases associated Ether or tokens.

参数

名称 类型 描述
_message tuple The message whose associated Ether should be released.
_proof bytes The merkle inclusion proof.
renounceOwnership() nonpayable

Renounce contract ownership to remove the owner and disable owner-only functions.✨ AI

开发者: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
retryMessage(_message: tuple, _isLastAttempt: bool) nonpayable

Retries to invoke the messageCall after releasing associated Ether and tokens.

开发者: This function can be called by any address, including the `message.destOwner`. It attempts to invoke the messageCall and updates the message status accordingly.

参数

名称 类型 描述
_message tuple The message to retry.
_isLastAttempt bool Specifies if this is the last attempt to retry the message.
selfDelegate(_anyToken: address) nonpayable

Delegates a given token's voting power to the bridge itself.

参数

名称 类型 描述
_anyToken address Any token that supports delegation.
sendMessage(_message: tuple) payable

Sends a message to the destination chain and takes custody of Ether required in this contract.

参数

名称 类型 描述
_message tuple The message to be sent.

返回值

名称 类型 描述
msgHash_ bytes32 msgHash_ The hash of the sent message.
message_ tuple message_ The updated message sent.
transferOwnership(newOwner: address) nonpayable

Transfers ownership of the Bridge contract to the specified new owner address.✨ AI

开发者: Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.

参数

名称 类型 描述
newOwner address Address to set as the new owner of the contract.✨ AI
unpause() nonpayable

Unpauses the contract.

upgradeTo(newImplementation: address) nonpayable

Upgrade the contract to a new implementation address.✨ AI

开发者: Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

参数

名称 类型 描述
newImplementation address Address of the new contract implementation to switch to.✨ AI
upgradeToAndCall(newImplementation: address, data: bytes) payable

Upgrade the contract implementation, optionally send Ether, and immediately call a function on the new implementation.✨ AI

开发者: Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

参数

名称 类型 描述
newImplementation address Address of the new implementation contract to set.✨ AI
data bytes Calldata to execute on the new implementation after upgrade; can be empty.✨ AI

事件

AdminChanged(previousAdmin: address, newAdmin: address)
名称 类型 已索引 描述
previousAdmin address
newAdmin address
BeaconUpgraded(beacon: address)
名称 类型 已索引 描述
beacon address
Initialized(version: uint8)
名称 类型 已索引 描述
version uint8
MessageProcessed(msgHash: bytes32, message: tuple, stats: tuple)
名称 类型 已索引 描述
msgHash bytes32
message tuple
stats tuple
MessageSent(msgHash: bytes32, message: tuple)

Emitted when a message is sent.

名称 类型 已索引 描述
msgHash bytes32 The hash of the message.
message tuple The message.
MessageStatusChanged(msgHash: bytes32, status: uint8)

Emitted when the status of a message changes.

名称 类型 已索引 描述
msgHash bytes32 The hash of the message.
status uint8 The new status of the message.
OwnershipTransferStarted(previousOwner: address, newOwner: address)
名称 类型 已索引 描述
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
名称 类型 已索引 描述
previousOwner address
newOwner address
Paused(account: address)

Emitted when the contract is paused.

名称 类型 已索引 描述
account address The account that paused the contract.
Unpaused(account: address)

Emitted when the contract is unpaused.

名称 类型 已索引 描述
account address The account that unpaused the contract.
Upgraded(implementation: address)
名称 类型 已索引 描述
implementation address