L2StandardBridge

Base

0x4200000000000000000000000000000000000010

Proxy 實作合約: 0xc0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d30010

Solidity v0.8.15+commit.e14f2714

🤖
透過你的 AI 查詢此合約
參考: 0x4200000000000000000000000000000000000010
範例提示詞: "Tell me the current state of base/0x4200000000000000000000000000000000000010"
還沒有接入 AI?→ mcp.smarts.md

管理與風險

誰能修改規則?

Detected upgradeable controls from the verified ABI.

Upgradeable

當前控制

Implementation
0xc0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d3c0d30010 ↗ Basescan → smarts proxy

概覽

讀取函式
6
寫入函式
9
事件
6

讀取函式

Block #46,488,831 · just now
MESSENGER() view → 0x4200000000000000000000000000000000000007

Returns the messenger contract address used for cross-domain messaging.✨ AI

回傳值

名稱 類型 描述
address The messenger contract address used to send and receive cross-domain messages.✨ AI
OTHER_BRIDGE() view → 0x3154cf16ccdb4c6d922629664174b904d80f2c35

Returns the address of the contract used as the counterpart bridge on the other layer.✨ AI

回傳值

名稱 類型 描述
address The address of the counterpart bridge contract on the other layer.✨ AI
deposits(address, address) view

Returns the deposited token balance for a given L1 token and depositor.✨ AI

參數

名稱 類型 描述
address
address

回傳值

名稱 類型 描述
uint256 Total amount of the specified L1 token deposited by that depositor (bridge accounting).✨ AI
l1TokenBridge() view → 0x3154cf16ccdb4c6d922629664174b904d80f2c35

Retrieves the access of the corresponding L1 bridge contract.

回傳值

名稱 類型 描述
address Address of the corresponding L1 bridge contract.
messenger() view → 0x4200000000000000000000000000000000000007

Legacy getter for messenger contract.

回傳值

名稱 類型 描述
address Messenger contract on this domain.
version() view → 1.1.0

Returns the full semver contract version.

回傳值

名稱 類型 描述
string Semver contract version as a string.

寫入函式

bridgeERC20(_localToken: address, _remoteToken: address, _amount: uint256, _minGasLimit: uint32, _extraData: bytes) nonpayable

Sends ERC20 tokens to the sender's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.

參數

名稱 類型 描述
_localToken address Address of the ERC20 on this chain.
_remoteToken address Address of the corresponding token on the remote chain.
_amount uint256 Amount of local tokens to deposit.
_minGasLimit uint32 Minimum amount of gas that the bridge can be relayed with.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
bridgeERC20To(_localToken: address, _remoteToken: address, _to: address, _amount: uint256, _minGasLimit: uint32, _extraData: bytes) nonpayable

Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.

參數

名稱 類型 描述
_localToken address Address of the ERC20 on this chain.
_remoteToken address Address of the corresponding token on the remote chain.
_to address Address of the receiver.
_amount uint256 Amount of local tokens to deposit.
_minGasLimit uint32 Minimum amount of gas that the bridge can be relayed with.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
bridgeETH(_minGasLimit: uint32, _extraData: bytes) payable

Sends ETH to the sender's address on the other chain.

參數

名稱 類型 描述
_minGasLimit uint32 Minimum amount of gas that the bridge can be relayed with.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
bridgeETHTo(_to: address, _minGasLimit: uint32, _extraData: bytes) payable

Sends ETH to a receiver's address on the other chain. Note that if ETH is sent to a smart contract and the call fails, the ETH will be temporarily locked in the StandardBridge on the other chain until the call is replayed. If the call cannot be replayed with any amount of gas (call always reverts), then the ETH will be permanently locked in the StandardBridge on the other chain. ETH will also be locked if the receiver is the other bridge, because finalizeBridgeETH will revert in that case.

參數

名稱 類型 描述
_to address Address of the receiver.
_minGasLimit uint32 Minimum amount of gas that the bridge can be relayed with.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
finalizeBridgeERC20(_localToken: address, _remoteToken: address, _from: address, _to: address, _amount: uint256, _extraData: bytes) nonpayable

Finalizes an ERC20 bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.

參數

名稱 類型 描述
_localToken address Address of the ERC20 on this chain.
_remoteToken address Address of the corresponding token on the remote chain.
_from address Address of the sender.
_to address Address of the receiver.
_amount uint256 Amount of the ERC20 being bridged.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
finalizeBridgeETH(_from: address, _to: address, _amount: uint256, _extraData: bytes) payable

Finalizes an ETH bridge on this chain. Can only be triggered by the other StandardBridge contract on the remote chain.

參數

名稱 類型 描述
_from address Address of the sender.
_to address Address of the receiver.
_amount uint256 Amount of ETH being bridged.
_extraData bytes Extra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.
finalizeDeposit(_l1Token: address, _l2Token: address, _from: address, _to: address, _amount: uint256, _extraData: bytes) payable

Finalizes a deposit from L1 to L2. To finalize a deposit of ether, use address(0) and the l1Token and the Legacy ERC20 ether predeploy address as the l2Token.

參數

名稱 類型 描述
_l1Token address Address of the L1 token to deposit.
_l2Token address Address of the corresponding L2 token.
_from address Address of the depositor.
_to address Address of the recipient.
_amount uint256 Amount of the tokens being deposited.
_extraData bytes Extra data attached to the deposit.
withdraw(_l2Token: address, _amount: uint256, _minGasLimit: uint32, _extraData: bytes) payable

Initiates a withdrawal from L2 to L1. This function only works with OptimismMintableERC20 tokens or ether. Use the `bridgeERC20` function to bridge native L2 tokens to L1.

參數

名稱 類型 描述
_l2Token address Address of the L2 token to withdraw.
_amount uint256 Amount of the L2 token to withdraw.
_minGasLimit uint32 Minimum gas limit to use for the transaction.
_extraData bytes Extra data attached to the withdrawal.
withdrawTo(_l2Token: address, _to: address, _amount: uint256, _minGasLimit: uint32, _extraData: bytes) payable

Initiates a withdrawal from L2 to L1 to a target account on L1. Note that if ETH is sent to a contract on L1 and the call fails, then that ETH will be locked in the L1StandardBridge. ETH may be recoverable if the call can be successfully replayed by increasing the amount of gas supplied to the call. If the call will fail for any amount of gas, then the ETH will be locked permanently. This function only works with OptimismMintableERC20 tokens or ether. Use the `bridgeERC20To` function to bridge native L2 tokens to L1.

參數

名稱 類型 描述
_l2Token address Address of the L2 token to withdraw.
_to address Recipient account on L1.
_amount uint256 Amount of the L2 token to withdraw.
_minGasLimit uint32 Minimum gas limit to use for the transaction.
_extraData bytes Extra data attached to the withdrawal.

事件

DepositFinalized(l1Token: address, l2Token: address, from: address, to: address, amount: uint256, extraData: bytes)

Emitted whenever an ERC20 deposit is finalized.

名稱 類型 已索引 描述
l1Token address Address of the token on L1.
l2Token address Address of the corresponding token on L2.
from address Address of the depositor.
to address Address of the recipient on L2.
amount uint256 Amount of the ERC20 deposited.
extraData bytes Extra data attached to the deposit.
ERC20BridgeFinalized(localToken: address, remoteToken: address, from: address, to: address, amount: uint256, extraData: bytes)

Emitted when an ERC20 bridge is finalized on this chain.

名稱 類型 已索引 描述
localToken address Address of the ERC20 on this chain.
remoteToken address Address of the ERC20 on the remote chain.
from address Address of the sender.
to address Address of the receiver.
amount uint256 Amount of the ERC20 sent.
extraData bytes Extra data sent with the transaction.
ERC20BridgeInitiated(localToken: address, remoteToken: address, from: address, to: address, amount: uint256, extraData: bytes)

Emitted when an ERC20 bridge is initiated to the other chain.

名稱 類型 已索引 描述
localToken address Address of the ERC20 on this chain.
remoteToken address Address of the ERC20 on the remote chain.
from address Address of the sender.
to address Address of the receiver.
amount uint256 Amount of the ERC20 sent.
extraData bytes Extra data sent with the transaction.
ETHBridgeFinalized(from: address, to: address, amount: uint256, extraData: bytes)

Emitted when an ETH bridge is finalized on this chain.

名稱 類型 已索引 描述
from address Address of the sender.
to address Address of the receiver.
amount uint256 Amount of ETH sent.
extraData bytes Extra data sent with the transaction.
ETHBridgeInitiated(from: address, to: address, amount: uint256, extraData: bytes)

Emitted when an ETH bridge is initiated to the other chain.

名稱 類型 已索引 描述
from address Address of the sender.
to address Address of the receiver.
amount uint256 Amount of ETH sent.
extraData bytes Extra data sent with the transaction.
WithdrawalInitiated(l1Token: address, l2Token: address, from: address, to: address, amount: uint256, extraData: bytes)

Emitted whenever a withdrawal from L2 to L1 is initiated.

名稱 類型 已索引 描述
l1Token address Address of the token on L1.
l2Token address Address of the corresponding token on L2.
from address Address of the withdrawer.
to address Address of the recipient on L1.
amount uint256 Amount of the ERC20 withdrawn.
extraData bytes Extra data attached to the withdrawal.