Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Relay Message | 21580566 | 135 days ago | IN | 0 ETH | 0.00161527 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Optimism_Adapter
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./interfaces/AdapterInterface.sol"; import "../external/interfaces/WETH9Interface.sol"; // @dev Use local modified CrossDomainEnabled contract instead of one exported by eth-optimism because we need // this contract's state variables to be `immutable` because of the delegateCall call. import "./CrossDomainEnabled.sol"; import "@eth-optimism/contracts/L1/messaging/IL1StandardBridge.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @notice Interface for Synthetix custom bridge to Optimism. */ interface SynthetixBridgeToOptimism is IL1StandardBridge { /** * @notice Send tokens to Optimism. * @param to Address to send tokens to on L2. * @param amount Amount of tokens to send. */ function depositTo(address to, uint256 amount) external; } /** * @notice Contract containing logic to send messages from L1 to Optimism. * @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 it's only necessary that the HubPool's methods * that call this contract's logic guard against reentrancy. */ // solhint-disable-next-line contract-name-camelcase contract Optimism_Adapter is CrossDomainEnabled, AdapterInterface { using SafeERC20 for IERC20; uint32 public immutable l2GasLimit = 200_000; WETH9Interface public immutable l1Weth; IL1StandardBridge public immutable l1StandardBridge; // Optimism has the ability to support "custom" bridges. These bridges are not supported by the canonical bridge // and so we need to store the address of the custom token and the associated bridge. In the event we want to // support a new token that is not supported by Optimism, we can add a new custom bridge for it and re-deploy the // adapter. A full list of custom optimism tokens and their associated bridges can be found here: // https://github.com/ethereum-optimism/ethereum-optimism.github.io/blob/master/optimism.tokenlist.json address public immutable dai = 0x6B175474E89094C44Da98b954EedeAC495271d0F; address public immutable daiOptimismBridge = 0x10E6593CDda8c58a1d0f14C5164B376352a55f2F; address public immutable snx = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F; address public immutable snxOptimismBridge = 0x39Ea01a0298C315d149a490E34B59Dbf2EC7e48F; /** * @notice Constructs new Adapter. * @param _l1Weth WETH address on L1. * @param _crossDomainMessenger XDomainMessenger Optimism system contract. * @param _l1StandardBridge Standard bridge contract. */ constructor( WETH9Interface _l1Weth, address _crossDomainMessenger, IL1StandardBridge _l1StandardBridge ) CrossDomainEnabled(_crossDomainMessenger) { l1Weth = _l1Weth; l1StandardBridge = _l1StandardBridge; } /** * @notice Send cross-chain message to target on Optimism. * @param target Contract on Optimism that will receive message. * @param message Data to send to target. */ function relayMessage(address target, bytes calldata message) external payable override { sendCrossDomainMessage(target, uint32(l2GasLimit), message); emit MessageRelayed(target, message); } /** * @notice Bridge tokens to Optimism. * @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, uint256 amount, address to ) external payable override { // If the l1Token is weth then unwrap it to ETH then send the ETH to the standard bridge. if (l1Token == address(l1Weth)) { l1Weth.withdraw(amount); l1StandardBridge.depositETHTo{ value: amount }(to, l2GasLimit, ""); } else { address bridgeToUse = address(l1StandardBridge); // Check if the L1 token requires a custom bridge. If so, use that bridge over the standard bridge. if (l1Token == dai) bridgeToUse = daiOptimismBridge; // 1. DAI if (l1Token == snx) bridgeToUse = snxOptimismBridge; // 2. SNX IERC20(l1Token).safeIncreaseAllowance(bridgeToUse, amount); if (l1Token == snx) SynthetixBridgeToOptimism(bridgeToUse).depositTo(to, amount); else IL1StandardBridge(bridgeToUse).depositERC20To(l1Token, l2Token, to, amount, l2GasLimit, ""); } emit TokensRelayed(l1Token, l2Token, amount, to); } }
// SPDX-License-Identifier: MIT pragma solidity >0.5.0 <0.9.0; /** * @title IL1ERC20Bridge */ interface IL1ERC20Bridge { /********** * Events * **********/ event ERC20DepositInitiated( address indexed _l1Token, address indexed _l2Token, address indexed _from, address _to, uint256 _amount, bytes _data ); event ERC20WithdrawalFinalized( address indexed _l1Token, address indexed _l2Token, address indexed _from, address _to, uint256 _amount, bytes _data ); /******************** * Public Functions * ********************/ /** * @dev get the address of the corresponding L2 bridge contract. * @return Address of the corresponding L2 bridge contract. */ function l2TokenBridge() external returns (address); /** * @dev deposit an amount of the ERC20 to the caller's balance on L2. * @param _l1Token Address of the L1 ERC20 we are depositing * @param _l2Token Address of the L1 respective L2 ERC20 * @param _amount Amount of the ERC20 to deposit * @param _l2Gas Gas limit required to complete the deposit on L2. * @param _data Optional data to forward to L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function depositERC20( address _l1Token, address _l2Token, uint256 _amount, uint32 _l2Gas, bytes calldata _data ) external; /** * @dev deposit an amount of ERC20 to a recipient's balance on L2. * @param _l1Token Address of the L1 ERC20 we are depositing * @param _l2Token Address of the L1 respective L2 ERC20 * @param _to L2 address to credit the withdrawal to. * @param _amount Amount of the ERC20 to deposit. * @param _l2Gas Gas limit required to complete the deposit on L2. * @param _data Optional data to forward to L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function depositERC20To( address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _l2Gas, bytes calldata _data ) external; /************************* * Cross-chain Functions * *************************/ /** * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the * L1 ERC20 token. * This call will fail if the initialized withdrawal from L2 has not been finalized. * * @param _l1Token Address of L1 token to finalizeWithdrawal for. * @param _l2Token Address of L2 token where withdrawal was initiated. * @param _from L2 address initiating the transfer. * @param _to L1 address to credit the withdrawal to. * @param _amount Amount of the ERC20 to deposit. * @param _data Data provided by the sender on L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function finalizeERC20Withdrawal( address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, bytes calldata _data ) external; }
// SPDX-License-Identifier: MIT pragma solidity >0.5.0 <0.9.0; import "./IL1ERC20Bridge.sol"; /** * @title IL1StandardBridge */ interface IL1StandardBridge is IL1ERC20Bridge { /********** * Events * **********/ event ETHDepositInitiated( address indexed _from, address indexed _to, uint256 _amount, bytes _data ); event ETHWithdrawalFinalized( address indexed _from, address indexed _to, uint256 _amount, bytes _data ); /******************** * Public Functions * ********************/ /** * @dev Deposit an amount of the ETH to the caller's balance on L2. * @param _l2Gas Gas limit required to complete the deposit on L2. * @param _data Optional data to forward to L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function depositETH(uint32 _l2Gas, bytes calldata _data) external payable; /** * @dev Deposit an amount of ETH to a recipient's balance on L2. * @param _to L2 address to credit the withdrawal to. * @param _l2Gas Gas limit required to complete the deposit on L2. * @param _data Optional data to forward to L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function depositETHTo( address _to, uint32 _l2Gas, bytes calldata _data ) external payable; /************************* * Cross-chain Functions * *************************/ /** * @dev Complete a withdrawal from L2 to L1, and credit funds to the recipient's balance of the * L1 ETH token. Since only the xDomainMessenger can call this function, it will never be called * before the withdrawal is finalized. * @param _from L2 address initiating the transfer. * @param _to L1 address to credit the withdrawal to. * @param _amount Amount of the ERC20 to deposit. * @param _data Optional data to forward to L2. This data is provided * solely as a convenience for external contracts. Aside from enforcing a maximum * length, these contracts provide no guarantees about its content. */ function finalizeETHWithdrawal( address _from, address _to, uint256 _amount, bytes calldata _data ) external; }
// SPDX-License-Identifier: MIT pragma solidity >0.5.0 <0.9.0; /** * @title ICrossDomainMessenger */ interface ICrossDomainMessenger { /********** * Events * **********/ event SentMessage( address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit ); event RelayedMessage(bytes32 indexed msgHash); event FailedRelayedMessage(bytes32 indexed msgHash); /************* * Variables * *************/ function xDomainMessageSender() external view returns (address); /******************** * Public Functions * ********************/ /** * Sends a cross domain message to the target messenger. * @param _target Target contract address. * @param _message Message to send to the target. * @param _gasLimit Gas limit for the provided message. */ function sendMessage( address _target, bytes calldata _message, uint32 _gasLimit ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 (last updated v4.9.0) (token/ERC20/extensions/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.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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: MIT pragma solidity ^0.8.0; /* Interface Imports */ import { ICrossDomainMessenger } from "@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol"; /** * @title CrossDomainEnabled * @dev Helper contract for contracts performing cross-domain communications between L1 and Optimism. * @dev This modifies the eth-optimism/CrossDomainEnabled contract only by changing state variables to be * immutable for use in contracts like the Optimism_Adapter which use delegateCall(). */ contract CrossDomainEnabled { // Messenger contract used to send and recieve messages from the other domain. address public immutable messenger; /** * @param _messenger Address of the CrossDomainMessenger on the current layer. */ constructor(address _messenger) { messenger = _messenger; } /** * Enforces that the modified function is only callable by a specific cross-domain account. * @param _sourceDomainAccount The only account on the originating domain which is * authenticated to call this function. */ modifier onlyFromCrossDomainAccount(address _sourceDomainAccount) { require(msg.sender == address(getCrossDomainMessenger()), "invalid cross domain messenger"); require( getCrossDomainMessenger().xDomainMessageSender() == _sourceDomainAccount, "invalid cross domain sender" ); _; } /** * Gets the messenger, usually from storage. This function is exposed in case a child contract * needs to override. * @return The address of the cross-domain messenger contract which should be used. */ function getCrossDomainMessenger() internal virtual returns (ICrossDomainMessenger) { return ICrossDomainMessenger(messenger); } /** * Sends a message to an account on another domain * @param _crossDomainTarget The intended recipient on the destination domain * @param _message The data to send to the target (usually calldata to a function with * onlyFromCrossDomainAccount()) * @param _gasLimit The gasLimit for the receipt of the message on the target domain. */ function sendCrossDomainMessage( address _crossDomainTarget, uint32 _gasLimit, bytes calldata _message ) internal { // slither-disable-next-line reentrancy-events, reentrancy-benign getCrossDomainMessenger().sendMessage(_crossDomainTarget, _message, _gasLimit); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; /** * @notice Sends cross chain messages and tokens to contracts on a specific L2 network. * This interface is implemented by an adapter contract that is deployed on L1. */ interface AdapterInterface { event MessageRelayed(address target, bytes message); event TokensRelayed(address l1Token, address l2Token, uint256 amount, address to); /** * @notice Send message to `target` on L2. * @dev This method is marked payable because relaying the message might require a fee * to be paid by the sender to forward the message to L2. However, it will not send msg.value * to the target contract on L2. * @param target L2 address to send message to. * @param message Message to send to `target`. */ function relayMessage(address target, bytes calldata message) external payable; /** * @notice Send `amount` of `l1Token` to `to` on L2. `l2Token` is the L2 address equivalent of `l1Token`. * @dev This method is marked payable because relaying the message might require a fee * to be paid by the sender to forward the message to L2. However, it will not send msg.value * to the target contract on L2. * @param l1Token L1 token to bridge. * @param l2Token L2 token to receive. * @param amount Amount of `l1Token` to bridge. * @param to Bridge recipient. */ function relayTokens( address l1Token, address l2Token, uint256 amount, address to ) external payable; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; /** * @notice Interface for the WETH9 contract. */ interface WETH9Interface { /** * @notice Burn Wrapped Ether and receive native Ether. * @param wad Amount of WETH to unwrap and send to caller. */ function withdraw(uint256 wad) external; /** * @notice Lock native Ether and mint Wrapped Ether ERC20 * @dev msg.value is amount of Wrapped Ether to mint/Ether to lock. */ function deposit() external payable; /** * @notice Get balance of WETH held by `guy`. * @param guy Address to get balance of. * @return wad Amount of WETH held by `guy`. */ function balanceOf(address guy) external view returns (uint256 wad); /** * @notice Transfer `wad` of WETH from caller to `guy`. * @param guy Address to send WETH to. * @param wad Amount of WETH to send. * @return ok True if transfer succeeded. */ function transfer(address guy, uint256 wad) external returns (bool); }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1000000 }, "remappings": [], "viaIR": true, "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 WETH9Interface","name":"_l1Weth","type":"address"},{"internalType":"address","name":"_crossDomainMessenger","type":"address"},{"internalType":"contract IL1StandardBridge","name":"_l1StandardBridge","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":"dai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daiOptimismBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1StandardBridge","outputs":[{"internalType":"contract IL1StandardBridge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Weth","outputs":[{"internalType":"contract WETH9Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2GasLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","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"},{"inputs":[],"name":"snx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snxOptimismBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101803461018f57601f61117238819003918201601f19168301916001600160401b038311848410176101945780849260609460405283398101031261018f578051906001600160a01b0390818316830361018f57602081015190828216820361018f5760400151918216820361018f5760805262030d4060a05261010091736b175474e89094c44da98b954eedeac495271d0f8352610120917310e6593cdda8c58a1d0f14c5164b376352a55f2f83526101409073c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f8252610160927339ea01a0298c315d149a490e34b59dbf2ec7e48f845260c05260e05260405192610fc794856101ab86396080518581816101f80152610c14015260a0518581816102720152818161034e01528181610528015261094b015260c0518581816104460152610cf2015260e0518581816104c2015281816105f40152610d6001525184818160d901526106170152518381816103bd0152610ba501525182818161014b0152818161064301526107ff015251818181610b7e0152610c830152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c908163078f29cf14610d1657508063146bf4b114610ca757806328f7c66b14610c385780633cb747bf14610bc957806352c8c75c146103e1578063b708886d14610372578063cf6e65b714610313578063e6eb8ade1461016f578063e7d27998146101005763f4b9fa751461008f57600080fd5b346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd576101a2610d84565b6024359067ffffffffffffffff9081831161030057366023840112156103005782600401359182116103005760248301926024833692010111610300578373ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001692833b1561030f5782906040519283917f3dbb202b00000000000000000000000000000000000000000000000000000000835216948560048301526060602483015281838161026b606482018b8d610dac565b63ffffffff7f000000000000000000000000000000000000000000000000000000000000000016604483015203925af18015610304576102ec575b50506102e67f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac4936040519384938452604060208501526040840191610dac565b0390a180f35b6102f590610deb565b6103005783386102a6565b8380fd5b6040513d84823e3d90fd5b8280fd5b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57610414610d84565b73ffffffffffffffffffffffffffffffffffffffff9060243582811681036103005782606435166064350361030057837f0000000000000000000000000000000000000000000000000000000000000000841683851681036105ef57803b156105e0576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152828160248183604435968760048401525af19081156105e45783916105cc575b5050847f000000000000000000000000000000000000000000000000000000000000000016803b1561030f5782906084604051809481937f9a2ac6d50000000000000000000000000000000000000000000000000000000083528a60643516600484015263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166024840152606060448401528560648401525af18015610304576105b4575b505090827fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b936080935b81604051941684521660208301526044356040830152606435166060820152a180f35b6105c090939293610deb565b61030057908338610567565b6105d590610deb565b6105e05781386104bd565b5080fd5b6040513d85823e3d90fd5b5050827f000000000000000000000000000000000000000000000000000000000000000016837f00000000000000000000000000000000000000000000000000000000000000001684841614610ba2575b837f00000000000000000000000000000000000000000000000000000000000000001684841614610b7b575b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015284821660248201526020816044818888165afa908115610b70578691610b3e575b506044358101809111610b11576040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff83166024820152604480820192909252908152610722606482610e2e565b6040519081604081011067ffffffffffffffff604084011117610ae45786809160408401604052602084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020850152602081519101828989165af13d15610ad7573d9067ffffffffffffffff8211610aaa57906107e49291604051916107d260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610e2e565b82523d89602084013e5b878716610e6f565b8051908115918215610a83575b5050156109ff5784908385167f00000000000000000000000000000000000000000000000000000000000000008616036108e6578481163b156105e0578160405180927fffaad6a500000000000000000000000000000000000000000000000000000000825281838982610890604435606435600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0393165af18015610304576108ce575b505090827fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b93608093610591565b6108da90939293610deb565b610300579083386108a0565b8481959495163b156105e0578360e4839260405194859384927f838b2520000000000000000000000000000000000000000000000000000000008452818b166004850152818916602485015281606435166044850152604435606485015263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016608485015260c060a48501528260c4850152165af180156109f4576109b8575b5091816080927fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b94610591565b91807fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9492956109e9608095610deb565b95929450925061098b565b6040513d87823e3d90fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b8192509060209181010312610aa657602001518015158103610aa65738806107f1565b8580fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b906107e4916060906107dc565b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b90506020813d602011610b68575b81610b5960209383610e2e565b81010312610aa65751386106b9565b3d9150610b4c565b6040513d88823e3d90fd5b507f000000000000000000000000000000000000000000000000000000000000000061066c565b507f0000000000000000000000000000000000000000000000000000000000000000610640565b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b9050346105e057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105e05760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610da757565b600080fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b67ffffffffffffffff8111610dff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610dff57604052565b91929015610eea5750815115610e83575090565b3b15610e8c5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015610efd5750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610f7a575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610f3956fea264697066735822122092f52c5f8b6c54603f9ea056d0d83ee39c311494c7716965d6b02a4954ca454c64736f6c63430008120033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000025ace71c97b33cc4729cf772ae268934f7ab5fa100000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be1
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c908163078f29cf14610d1657508063146bf4b114610ca757806328f7c66b14610c385780633cb747bf14610bc957806352c8c75c146103e1578063b708886d14610372578063cf6e65b714610313578063e6eb8ade1461016f578063e7d27998146101005763f4b9fa751461008f57600080fd5b346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f168152f35b80fd5b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f168152f35b5060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd576101a2610d84565b6024359067ffffffffffffffff9081831161030057366023840112156103005782600401359182116103005760248301926024833692010111610300578373ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000025ace71c97b33cc4729cf772ae268934f7ab5fa11692833b1561030f5782906040519283917f3dbb202b00000000000000000000000000000000000000000000000000000000835216948560048301526060602483015281838161026b606482018b8d610dac565b63ffffffff7f0000000000000000000000000000000000000000000000000000000000030d4016604483015203925af18015610304576102ec575b50506102e67f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac4936040519384938452604060208501526040840191610dac565b0390a180f35b6102f590610deb565b6103005783386102a6565b8380fd5b6040513d84823e3d90fd5b8280fd5b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000030d40168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000010e6593cdda8c58a1d0f14c5164b376352a55f2f168152f35b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57610414610d84565b73ffffffffffffffffffffffffffffffffffffffff9060243582811681036103005782606435166064350361030057837f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2841683851681036105ef57803b156105e0576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152828160248183604435968760048401525af19081156105e45783916105cc575b5050847f00000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be116803b1561030f5782906084604051809481937f9a2ac6d50000000000000000000000000000000000000000000000000000000083528a60643516600484015263ffffffff7f0000000000000000000000000000000000000000000000000000000000030d40166024840152606060448401528560648401525af18015610304576105b4575b505090827fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b936080935b81604051941684521660208301526044356040830152606435166060820152a180f35b6105c090939293610deb565b61030057908338610567565b6105d590610deb565b6105e05781386104bd565b5080fd5b6040513d85823e3d90fd5b5050827f00000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be116837f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f1684841614610ba2575b837f000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f1684841614610b7b575b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015284821660248201526020816044818888165afa908115610b70578691610b3e575b506044358101809111610b11576040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff83166024820152604480820192909252908152610722606482610e2e565b6040519081604081011067ffffffffffffffff604084011117610ae45786809160408401604052602084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020850152602081519101828989165af13d15610ad7573d9067ffffffffffffffff8211610aaa57906107e49291604051916107d260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610e2e565b82523d89602084013e5b878716610e6f565b8051908115918215610a83575b5050156109ff5784908385167f000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f8616036108e6578481163b156105e0578160405180927fffaad6a500000000000000000000000000000000000000000000000000000000825281838982610890604435606435600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0393165af18015610304576108ce575b505090827fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b93608093610591565b6108da90939293610deb565b610300579083386108a0565b8481959495163b156105e0578360e4839260405194859384927f838b2520000000000000000000000000000000000000000000000000000000008452818b166004850152818916602485015281606435166044850152604435606485015263ffffffff7f0000000000000000000000000000000000000000000000000000000000030d4016608485015260c060a48501528260c4850152165af180156109f4576109b8575b5091816080927fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b94610591565b91807fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9492956109e9608095610deb565b95929450925061098b565b6040513d87823e3d90fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b8192509060209181010312610aa657602001518015158103610aa65738806107f1565b8580fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b906107e4916060906107dc565b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b90506020813d602011610b68575b81610b5960209383610e2e565b81010312610aa65751386106b9565b3d9150610b4c565b6040513d88823e3d90fd5b507f00000000000000000000000039ea01a0298c315d149a490e34b59dbf2ec7e48f61066c565b507f00000000000000000000000010e6593cdda8c58a1d0f14c5164b376352a55f2f610640565b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000025ace71c97b33cc4729cf772ae268934f7ab5fa1168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000039ea01a0298c315d149a490e34b59dbf2ec7e48f168152f35b50346100fd57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100fd57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b9050346105e057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126105e05760209073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be1168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610da757565b600080fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b67ffffffffffffffff8111610dff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610dff57604052565b91929015610eea5750815115610e83575090565b3b15610e8c5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015610efd5750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610f7a575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610f3956fea264697066735822122092f52c5f8b6c54603f9ea056d0d83ee39c311494c7716965d6b02a4954ca454c64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000025ace71c97b33cc4729cf772ae268934f7ab5fa100000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be1
-----Decoded View---------------
Arg [0] : _l1Weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _crossDomainMessenger (address): 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1
Arg [2] : _l1StandardBridge (address): 0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 00000000000000000000000025ace71c97b33cc4729cf772ae268934f7ab5fa1
Arg [2] : 00000000000000000000000099c9fc46f92e8a1c0dec1b1747d010903e884be1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
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.