Bridge

Taiko Browse chains

0x1670000000000000000000000000000000000001

Proxy implementation: 0x95ae2918dcbc6aff8b4c1f1bcc1bf819b6e08b83

Solidity v0.8.27+commit.40a35a09

🤖
Query this contract from your AI
Reference: 0x1670000000000000000000000000000000000001
Sample prompt: "Tell me the current state of taiko/0x1670000000000000000000000000000000000001"
No AI wired up yet? → mcp.smarts.md · Browse chains
Taiko 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
23
Write Functions
15
Events
11

Read Functions

GAS_OVERHEAD() view

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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
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

Returns

Name Type Description
address The address of the AddressManager contract used for bridge configuration and lookups.✨ AI
context() view

Gets the current context.

Returns

Name Type Description
ctx_ tuple
getMessageMinGasLimit(dataLength: uint256) pure

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

Parameters

Name Type Description
dataLength uint256 The length of message.data.

Returns

Name Type Description
uint32 The minimal gas limit required for sending this message.
hashMessage(_message: tuple) pure

Hash the message

Parameters

Name Type Description
_message tuple The message struct variable to be hashed.

Returns

Name Type Description
bytes32 The message's hash.
impl() view

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

Returns

Name Type Description
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

Returns

Name Type Description
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.

Parameters

Name Type Description
_chainId uint64 The destination chain ID.

Returns

Name Type Description
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.

Parameters

Name Type Description
_message tuple The message.
_proof bytes The merkle inclusion proof.

Returns

Name Type Description
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.

Parameters

Name Type Description
_message tuple The message.
_proof bytes The merkle inclusion proof.

Returns

Name Type Description
bool true if the message has been received, false otherwise.
isMessageSent(_message: tuple) view

Checks if the message was sent.

Parameters

Name Type Description
_message tuple The message.

Returns

Name Type Description
bool true if the message was sent.
lastUnpausedAt() view

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

Returns

Name Type Description
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

Parameters

Name Type Description
msgHash bytes32 Keccak256 hash of the message whose status is queried.✨ AI

Returns

Name Type Description
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

Returns

Name Type Description
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

dev: Returns the address of the current owner.

Returns

Name Type Description
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.

Returns

Name Type Description
bool true if paused, false otherwise.
pendingOwner() view

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

dev: Returns the address of the pending owner.

Returns

Name Type Description
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

dev: 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.

Returns

Name Type Description
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.

Parameters

Name Type Description
_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)`.

Returns

Name Type Description
address Address associated with the given name.
resolve(_name: bytes32, _allowZeroAddress: bool) view

Resolves a name to its address deployed on this chain.

Parameters

Name Type Description
_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)`.

Returns

Name Type Description
address Address associated with the given name.
signalForFailedMessage(_msgHash: bytes32) pure

Returns a signal representing a failed/recalled message.

Parameters

Name Type Description
_msgHash bytes32 The message hash.

Returns

Name Type Description
bytes32 The failed representation of it as bytes32.

Write Functions

acceptOwnership() nonpayable

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

dev: The new owner accepts the ownership transfer.
failMessage(_message: tuple) nonpayable

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

dev: This function can only be called by `message.destOwner`.

Parameters

Name Type Description
_message tuple The message to fail. message.
init(_owner: address, _sharedAddressManager: address) nonpayable

Initializes the contract.

Parameters

Name Type Description
_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

dev: 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%`.

Parameters

Name Type Description
_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

Returns

Name Type Description
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.

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

Parameters

Name Type Description
_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

dev: 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.

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

Parameters

Name Type Description
_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.

Parameters

Name Type Description
_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.

Parameters

Name Type Description
_message tuple The message to be sent.

Returns

Name Type Description
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

dev: 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.

Parameters

Name Type Description
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

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

Parameters

Name Type Description
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

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

Parameters

Name Type Description
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

Events

AdminChanged(previousAdmin: address, newAdmin: address)
Name Type Indexed Description
previousAdmin address
newAdmin address
BeaconUpgraded(beacon: address)
Name Type Indexed Description
beacon address
Initialized(version: uint8)
Name Type Indexed Description
version uint8
MessageProcessed(msgHash: bytes32, message: tuple, stats: tuple)
Name Type Indexed Description
msgHash bytes32
message tuple
stats tuple
MessageSent(msgHash: bytes32, message: tuple)

Emitted when a message is sent.

Name Type Indexed Description
msgHash bytes32 The hash of the message.
message tuple The message.
MessageStatusChanged(msgHash: bytes32, status: uint8)

Emitted when the status of a message changes.

Name Type Indexed Description
msgHash bytes32 The hash of the message.
status uint8 The new status of the message.
OwnershipTransferStarted(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
Paused(account: address)

Emitted when the contract is paused.

Name Type Indexed Description
account address The account that paused the contract.
Unpaused(account: address)

Emitted when the contract is unpaused.

Name Type Indexed Description
account address The account that unpaused the contract.
Upgraded(implementation: address)
Name Type Indexed Description
implementation address