Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Arbitrum_Adapter
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "../interfaces/AdapterInterface.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface ArbitrumL1InboxLike {
function createRetryableTicket(
address destAddr,
uint256 arbTxCallValue,
uint256 maxSubmissionCost,
address submissionRefundAddress,
address valueRefundAddress,
uint256 maxGas,
uint256 gasPriceBid,
bytes calldata data
) external payable returns (uint256);
}
interface ArbitrumL1ERC20GatewayLike {
function outboundTransfer(
address _token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) external payable returns (bytes memory);
function outboundTransferCustomRefund(
address _token,
address _refundTo,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) external payable returns (bytes memory);
function getGateway(address _token) external view returns (address);
}
/**
* @notice Contract containing logic to send messages from L1 to Arbitrum.
* @dev Public functions calling external contracts do not guard against reentrancy because they are expected to be
* called via delegatecall, which will execute this contract's logic within the context of the originating contract.
* For example, the HubPool will delegatecall these functions, therefore its only necessary that the HubPool's methods
* that call this contract's logic guard against reentrancy.
*/
// solhint-disable-next-line contract-name-camelcase
contract Arbitrum_Adapter is AdapterInterface {
using SafeERC20 for IERC20;
// Amount of ETH allocated to pay for the base submission fee. The base submission fee is a parameter unique to
// retryable transactions; the user is charged the base submission fee to cover the storage costs of keeping their
// ticket’s calldata in the retry buffer. (current base submission fee is queryable via
// ArbRetryableTx.getSubmissionPrice). ArbRetryableTicket precompile interface exists at L2 address
// 0x000000000000000000000000000000000000006E.
uint256 public constant l2MaxSubmissionCost = 0.01e18;
// L2 Gas price bid for immediate L2 execution attempt (queryable via standard eth*gasPrice RPC)
uint256 public constant l2GasPrice = 5e9; // 5 gWei
uint32 public constant RELAY_TOKENS_L2_GAS_LIMIT = 300_000;
uint32 public constant RELAY_MESSAGE_L2_GAS_LIMIT = 2_000_000;
// This address on L2 receives extra ETH that is left over after relaying a message via the inbox.
address public constant l2RefundL2Address = 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010;
ArbitrumL1InboxLike public immutable l1Inbox;
ArbitrumL1ERC20GatewayLike public immutable l1ERC20GatewayRouter;
/**
* @notice Constructs new Adapter.
* @param _l1ArbitrumInbox Inbox helper contract to send messages to Arbitrum.
* @param _l1ERC20GatewayRouter ERC20 gateway router contract to send tokens to Arbitrum.
*/
constructor(ArbitrumL1InboxLike _l1ArbitrumInbox, ArbitrumL1ERC20GatewayLike _l1ERC20GatewayRouter) {
l1Inbox = _l1ArbitrumInbox;
l1ERC20GatewayRouter = _l1ERC20GatewayRouter;
}
/**
* @notice Send cross-chain message to target on Arbitrum.
* @notice This contract must hold at least getL1CallValue() amount of ETH to send a message via the Inbox
* successfully, or the message will get stuck.
* @param target Contract on Arbitrum that will receive message.
* @param message Data to send to target.
*/
function relayMessage(address target, bytes memory message) external payable override {
uint256 requiredL1CallValue = _contractHasSufficientEthBalance(RELAY_MESSAGE_L2_GAS_LIMIT);
l1Inbox.createRetryableTicket{ value: requiredL1CallValue }(
target, // destAddr destination L2 contract address
0, // l2CallValue call value for retryable L2 message
l2MaxSubmissionCost, // maxSubmissionCost Max gas deducted from user's L2 balance to cover base fee
l2RefundL2Address, // excessFeeRefundAddress maxgas * gasprice - execution cost gets credited here on L2
l2RefundL2Address, // callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled
RELAY_MESSAGE_L2_GAS_LIMIT, // maxGas Max gas deducted from user's L2 balance to cover L2 execution
l2GasPrice, // gasPriceBid price bid for L2 execution
message // data ABI encoded data of L2 message
);
emit MessageRelayed(target, message);
}
/**
* @notice Bridge tokens to Arbitrum.
* @notice This contract must hold at least getL1CallValue() amount of ETH to send a message via the Inbox
* successfully, or the message will get stuck.
* @param l1Token L1 token to deposit.
* @param l2Token L2 token to receive.
* @param amount Amount of L1 tokens to deposit and L2 tokens to receive.
* @param to Bridge recipient.
*/
function relayTokens(
address l1Token,
address l2Token, // l2Token is unused for Arbitrum.
uint256 amount,
address to
) external payable override {
uint256 requiredL1CallValue = _contractHasSufficientEthBalance(RELAY_TOKENS_L2_GAS_LIMIT);
// Approve the gateway, not the router, to spend the hub pool's balance. The gateway, which is different
// per L1 token, will temporarily escrow the tokens to be bridged and pull them from this contract.
address erc20Gateway = l1ERC20GatewayRouter.getGateway(l1Token);
IERC20(l1Token).safeIncreaseAllowance(erc20Gateway, amount);
// `outboundTransfer` expects that the caller includes a bytes message as the last param that includes the
// maxSubmissionCost to use when creating an L2 retryable ticket: https://github.com/OffchainLabs/arbitrum/blob/e98d14873dd77513b569771f47b5e05b72402c5e/packages/arb-bridge-peripherals/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol#L232
bytes memory data = abi.encode(l2MaxSubmissionCost, "");
// Note: Legacy routers don't have the outboundTransferCustomRefund method, so default to using
// outboundTransfer(). Legacy routers are used for the following tokens that are currently enabled:
// - DAI
if (l1Token == 0x6B175474E89094C44Da98b954EedeAC495271d0F) {
// Note: outboundTransfer() will ultimately create a retryable ticket and set this contract's address as the
// refund address. This means that the excess ETH to pay for the L2 transaction will be sent to the aliased
// contract address on L2, which we'd have to retrieve via a custom adapter
// (i.e. the Arbitrum_RescueAdapter).
l1ERC20GatewayRouter.outboundTransfer{ value: requiredL1CallValue }(
l1Token,
to,
amount,
RELAY_TOKENS_L2_GAS_LIMIT,
l2GasPrice,
data
);
} else {
l1ERC20GatewayRouter.outboundTransferCustomRefund{ value: requiredL1CallValue }(
l1Token,
l2RefundL2Address,
to,
amount,
RELAY_TOKENS_L2_GAS_LIMIT,
l2GasPrice,
data
);
}
emit TokensRelayed(l1Token, l2Token, amount, to);
}
/**
* @notice Returns required amount of ETH to send a message via the Inbox.
* @return amount of ETH that this contract needs to hold in order for relayMessage to succeed.
*/
function getL1CallValue(uint32 l2GasLimit) public pure returns (uint256) {
return l2MaxSubmissionCost + l2GasPrice * l2GasLimit;
}
function _contractHasSufficientEthBalance(uint32 l2GasLimit) internal view returns (uint256 requiredL1CallValue) {
requiredL1CallValue = getL1CallValue(l2GasLimit);
require(address(this).balance >= requiredL1CallValue, "Insufficient ETH balance");
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
/**
* @notice Sends cross chain messages and tokens to contracts on a specific L2 network.
*/
interface AdapterInterface {
event MessageRelayed(address target, bytes message);
event TokensRelayed(address l1Token, address l2Token, uint256 amount, address to);
function relayMessage(address target, bytes calldata message) external payable;
function relayTokens(
address l1Token,
address l2Token,
uint256 amount,
address to
) external payable;
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 1000000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ArbitrumL1InboxLike","name":"_l1ArbitrumInbox","type":"address"},{"internalType":"contract ArbitrumL1ERC20GatewayLike","name":"_l1ERC20GatewayRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"MessageRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"l1Token","type":"address"},{"indexed":false,"internalType":"address","name":"l2Token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"TokensRelayed","type":"event"},{"inputs":[],"name":"RELAY_MESSAGE_L2_GAS_LIMIT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELAY_TOKENS_L2_GAS_LIMIT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"l2GasLimit","type":"uint32"}],"name":"getL1CallValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"l1ERC20GatewayRouter","outputs":[{"internalType":"contract ArbitrumL1ERC20GatewayLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Inbox","outputs":[{"internalType":"contract ArbitrumL1InboxLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2GasPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2MaxSubmissionCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2RefundL2Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"relayMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"l1Token","type":"address"},{"internalType":"address","name":"l2Token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"relayTokens","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
60c060405234801561001057600080fd5b5060405161128338038061128383398101604081905261002f9161005e565b6001600160a01b039182166080521660a052610098565b6001600160a01b038116811461005b57600080fd5b50565b6000806040838503121561007157600080fd5b825161007c81610046565b602084015190925061008d81610046565b809150509250929050565b60805160a0516111ab6100d86000396000818160c8015281816102c40152818161041b015261050c015260008181610195015261064c01526111ab6000f3fe6080604052600436106100b15760003560e01c80639ae3668511610069578063c735281e1161004e578063c735281e146101f8578063e599477e1461020f578063e6eb8ade1461022a57600080fd5b80639ae36685146101b75780639c3ba200146101d057600080fd5b806328f2716e1161009a57806328f2716e1461014257806352c8c75c1461016e5780638134f3851461018357600080fd5b80631ba4a9cb146100b65780631fc1ba7614610114575b600080fd5b3480156100c257600080fd5b506100ea7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561012057600080fd5b5061013461012f366004610c27565b61023d565b60405190815260200161010b565b34801561014e57600080fd5b50610159620493e081565b60405163ffffffff909116815260200161010b565b61018161017c366004610c72565b61026b565b005b34801561018f57600080fd5b506100ea7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c357600080fd5b5061013464012a05f20081565b3480156101dc57600080fd5b506100ea73428ab2ba90eba0a4be7af34c9ac451ab061ac01081565b34801561020457600080fd5b50610159621e848081565b34801561021b57600080fd5b50610134662386f26fc1000081565b610181610238366004610d89565b61063a565b600061025463ffffffff831664012a05f200610e4b565b61026590662386f26fc10000610e88565b92915050565b6000610279620493e0610758565b6040517fbda009fe00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063bda009fe90602401602060405180830381865afa15801561030b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032f9190610ea0565b905061035273ffffffffffffffffffffffffffffffffffffffff871682866107d9565b6000662386f26fc1000060405160200161037d91815260406020820181905260009082015260600190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905073ffffffffffffffffffffffffffffffffffffffff8716736b175474e89094c44da98b954eedeac495271d0f036104cf576040517fd2ce7d6500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063d2ce7d65908590610464908b9089908b90620493e09064012a05f200908a90600401610f33565b60006040518083038185885af1158015610482573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526104c99190810190610f90565b506105d2565b6040517f4fb1a07b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634fb1a07b90859061056b908b9073428ab2ba90eba0a4be7af34c9ac451ab061ac010908a908c90620493e09064012a05f200908b90600401611007565b60006040518083038185885af1158015610589573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105d09190810190610f90565b505b6040805173ffffffffffffffffffffffffffffffffffffffff898116825288811660208301528183018890528616606082015290517fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9181900360800190a150505050505050565b6000610648621e8480610758565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663679b6ded82856000662386f26fc1000073428ab2ba90eba0a4be7af34c9ac451ab061ac01080621e848064012a05f2008b6040518a63ffffffff1660e01b81526004016106d698979695949392919061106d565b60206040518083038185885af11580156106f4573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061071991906110dc565b507f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac4838360405161074b9291906110f5565b60405180910390a1505050565b60006107638261023d565b9050804710156107d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e73756666696369656e74204554482062616c616e6365000000000000000060448201526064015b60405180910390fd5b919050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610850573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087491906110dc565b61087e9190610e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905290915061090e908590610914565b50505050565b6000610976826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a259092919063ffffffff16565b805190915015610a2057808060200190518101906109949190611124565b610a20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107cb565b505050565b6060610a348484600085610a3e565b90505b9392505050565b606082471015610ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107cb565b73ffffffffffffffffffffffffffffffffffffffff85163b610b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107cb565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610b779190611146565b60006040518083038185875af1925050503d8060008114610bb4576040519150601f19603f3d011682016040523d82523d6000602084013e610bb9565b606091505b5091509150610bc9828286610bd4565b979650505050505050565b60608315610be3575081610a37565b825115610bf35782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb9190611162565b600060208284031215610c3957600080fd5b813563ffffffff81168114610a3757600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610c6f57600080fd5b50565b60008060008060808587031215610c8857600080fd5b8435610c9381610c4d565b93506020850135610ca381610c4d565b9250604085013591506060850135610cba81610c4d565b939692955090935050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d3b57610d3b610cc5565b604052919050565b600067ffffffffffffffff821115610d5d57610d5d610cc5565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060408385031215610d9c57600080fd5b8235610da781610c4d565b9150602083013567ffffffffffffffff811115610dc357600080fd5b8301601f81018513610dd457600080fd5b8035610de7610de282610d43565b610cf4565b818152866020838501011115610dfc57600080fd5b816020840160208301376000602083830101528093505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610e8357610e83610e1c565b500290565b60008219821115610e9b57610e9b610e1c565b500190565b600060208284031215610eb257600080fd5b8151610a3781610c4d565b60005b83811015610ed8578181015183820152602001610ec0565b8381111561090e5750506000910152565b60008151808452610f01816020860160208601610ebd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600073ffffffffffffffffffffffffffffffffffffffff808916835280881660208401525085604083015263ffffffff8516606083015283608083015260c060a0830152610f8460c0830184610ee9565b98975050505050505050565b600060208284031215610fa257600080fd5b815167ffffffffffffffff811115610fb957600080fd5b8201601f81018413610fca57600080fd5b8051610fd8610de282610d43565b818152856020838501011115610fed57600080fd5b610ffe826020830160208601610ebd565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a168352808916602084015280881660408401525085606083015263ffffffff851660808301528360a083015260e060c083015261106060e0830184610ee9565b9998505050505050505050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c1684528a6020850152896040850152808916606085015280881660808501525063ffffffff861660a08401528460c08401528060e08401526110cd81840185610ee9565b9b9a5050505050505050505050565b6000602082840312156110ee57600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000610a346040830184610ee9565b60006020828403121561113657600080fd5b81518015158114610a3757600080fd5b60008251611158818460208701610ebd565b9190910192915050565b602081526000610a376020830184610ee956fea2646970667358221220b1f5489e25d9caa366e02e9f1600d99235c2ecffa1dee5130a86e9d1a2b8130064736f6c634300080d00330000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef
Deployed Bytecode
0x6080604052600436106100b15760003560e01c80639ae3668511610069578063c735281e1161004e578063c735281e146101f8578063e599477e1461020f578063e6eb8ade1461022a57600080fd5b80639ae36685146101b75780639c3ba200146101d057600080fd5b806328f2716e1161009a57806328f2716e1461014257806352c8c75c1461016e5780638134f3851461018357600080fd5b80631ba4a9cb146100b65780631fc1ba7614610114575b600080fd5b3480156100c257600080fd5b506100ea7f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561012057600080fd5b5061013461012f366004610c27565b61023d565b60405190815260200161010b565b34801561014e57600080fd5b50610159620493e081565b60405163ffffffff909116815260200161010b565b61018161017c366004610c72565b61026b565b005b34801561018f57600080fd5b506100ea7f0000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f81565b3480156101c357600080fd5b5061013464012a05f20081565b3480156101dc57600080fd5b506100ea73428ab2ba90eba0a4be7af34c9ac451ab061ac01081565b34801561020457600080fd5b50610159621e848081565b34801561021b57600080fd5b50610134662386f26fc1000081565b610181610238366004610d89565b61063a565b600061025463ffffffff831664012a05f200610e4b565b61026590662386f26fc10000610e88565b92915050565b6000610279620493e0610758565b6040517fbda009fe00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529192506000917f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef169063bda009fe90602401602060405180830381865afa15801561030b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032f9190610ea0565b905061035273ffffffffffffffffffffffffffffffffffffffff871682866107d9565b6000662386f26fc1000060405160200161037d91815260406020820181905260009082015260600190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905073ffffffffffffffffffffffffffffffffffffffff8716736b175474e89094c44da98b954eedeac495271d0f036104cf576040517fd2ce7d6500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef169063d2ce7d65908590610464908b9089908b90620493e09064012a05f200908a90600401610f33565b60006040518083038185885af1158015610482573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526104c99190810190610f90565b506105d2565b6040517f4fb1a07b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef1690634fb1a07b90859061056b908b9073428ab2ba90eba0a4be7af34c9ac451ab061ac010908a908c90620493e09064012a05f200908b90600401611007565b60006040518083038185885af1158015610589573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105d09190810190610f90565b505b6040805173ffffffffffffffffffffffffffffffffffffffff898116825288811660208301528183018890528616606082015290517fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9181900360800190a150505050505050565b6000610648621e8480610758565b90507f0000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f73ffffffffffffffffffffffffffffffffffffffff1663679b6ded82856000662386f26fc1000073428ab2ba90eba0a4be7af34c9ac451ab061ac01080621e848064012a05f2008b6040518a63ffffffff1660e01b81526004016106d698979695949392919061106d565b60206040518083038185885af11580156106f4573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061071991906110dc565b507f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac4838360405161074b9291906110f5565b60405180910390a1505050565b60006107638261023d565b9050804710156107d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e73756666696369656e74204554482062616c616e6365000000000000000060448201526064015b60405180910390fd5b919050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015610850573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087491906110dc565b61087e9190610e88565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905290915061090e908590610914565b50505050565b6000610976826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a259092919063ffffffff16565b805190915015610a2057808060200190518101906109949190611124565b610a20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107cb565b505050565b6060610a348484600085610a3e565b90505b9392505050565b606082471015610ad0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107cb565b73ffffffffffffffffffffffffffffffffffffffff85163b610b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107cb565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610b779190611146565b60006040518083038185875af1925050503d8060008114610bb4576040519150601f19603f3d011682016040523d82523d6000602084013e610bb9565b606091505b5091509150610bc9828286610bd4565b979650505050505050565b60608315610be3575081610a37565b825115610bf35782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb9190611162565b600060208284031215610c3957600080fd5b813563ffffffff81168114610a3757600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610c6f57600080fd5b50565b60008060008060808587031215610c8857600080fd5b8435610c9381610c4d565b93506020850135610ca381610c4d565b9250604085013591506060850135610cba81610c4d565b939692955090935050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d3b57610d3b610cc5565b604052919050565b600067ffffffffffffffff821115610d5d57610d5d610cc5565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060408385031215610d9c57600080fd5b8235610da781610c4d565b9150602083013567ffffffffffffffff811115610dc357600080fd5b8301601f81018513610dd457600080fd5b8035610de7610de282610d43565b610cf4565b818152866020838501011115610dfc57600080fd5b816020840160208301376000602083830101528093505050509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610e8357610e83610e1c565b500290565b60008219821115610e9b57610e9b610e1c565b500190565b600060208284031215610eb257600080fd5b8151610a3781610c4d565b60005b83811015610ed8578181015183820152602001610ec0565b8381111561090e5750506000910152565b60008151808452610f01816020860160208601610ebd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600073ffffffffffffffffffffffffffffffffffffffff808916835280881660208401525085604083015263ffffffff8516606083015283608083015260c060a0830152610f8460c0830184610ee9565b98975050505050505050565b600060208284031215610fa257600080fd5b815167ffffffffffffffff811115610fb957600080fd5b8201601f81018413610fca57600080fd5b8051610fd8610de282610d43565b818152856020838501011115610fed57600080fd5b610ffe826020830160208601610ebd565b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808a168352808916602084015280881660408401525085606083015263ffffffff851660808301528360a083015260e060c083015261106060e0830184610ee9565b9998505050505050505050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c1684528a6020850152896040850152808916606085015280881660808501525063ffffffff861660a08401528460c08401528060e08401526110cd81840185610ee9565b9b9a5050505050505050505050565b6000602082840312156110ee57600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000610a346040830184610ee9565b60006020828403121561113657600080fd5b81518015158114610a3757600080fd5b60008251611158818460208701610ebd565b9190910192915050565b602081526000610a376020830184610ee956fea2646970667358221220b1f5489e25d9caa366e02e9f1600d99235c2ecffa1dee5130a86e9d1a2b8130064736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef
-----Decoded View---------------
Arg [0] : _l1ArbitrumInbox (address): 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f
Arg [1] : _l1ERC20GatewayRouter (address): 0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f
Arg [1] : 00000000000000000000000072ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.