ETH Price: $2,721.23 (-1.59%)
Gas: 2.8 Gwei

Contract

0xfe8882EDd2B7BaD22D1968327Fa19E17608A1331
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040200849022024-06-13 19:11:5973 days ago1718305919IN
 Create: L1BaseSender
0 ETH0.011452110.12544246

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
L1BaseSender

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 14 : L1BaseSender.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ILayerZeroEndpoint} from "@layerzerolabs/lz-evm-sdk-v1-0.7/contracts/interfaces/ILayerZeroEndpoint.sol";

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import {IWstETH} from "../interfaces/tokens/IWstETH.sol";
import {IL1BaseSender, IERC165} from "../interfaces/L1/IL1BaseSender.sol";
import {IL1ERC20TokenBridge} from "../interfaces/bridges/IL1ERC20TokenBridge.sol";

contract L1BaseSender is IL1BaseSender, OwnableUpgradeable {
    address public unwrappedDepositToken;
    address public distribution;

    DepositTokenConfig public depositTokenConfig;
    RewardTokenConfig public rewardTokenConfig;

    modifier onlyDistribution() {
        require(_msgSender() == distribution, "L1S: invalid sender");
        _;
    }

    constructor() {
        _disableInitializers();
    }

    function L1BaseSender__init(
        address distribution_,
        RewardTokenConfig calldata rewardTokenConfig_,
        DepositTokenConfig calldata depositTokenConfig_
    ) external initializer {
        __Ownable_init();

        distribution = distribution_;
        rewardTokenConfig = rewardTokenConfig_;
        _setDepositTokenConfig(depositTokenConfig_);
    }

    function supportsInterface(bytes4 interfaceId_) external pure returns (bool) {
        return interfaceId_ == type(IL1BaseSender).interfaceId || interfaceId_ == type(IERC165).interfaceId;
    }

    function setRewardTokenLZParams(address zroPaymentAddress_, bytes calldata adapterParams_) external onlyOwner {
        rewardTokenConfig.zroPaymentAddress = zroPaymentAddress_;
        rewardTokenConfig.adapterParams = adapterParams_;
    }

    function _setDepositTokenConfig(DepositTokenConfig calldata newConfig_) private {
        require(newConfig_.receiver != address(0), "L1S: invalid receiver");

        _setDepositToken(newConfig_.l1Token);
        _setDepositTokenGateway(newConfig_.gateway, newConfig_.l1Token);

        depositTokenConfig = newConfig_;
    }

    function _setDepositToken(address newToken_) private {
        // Get stETH from wstETH
        address unwrappedToken_ = IWstETH(newToken_).stETH();
        // Increase allowance from stETH to wstETH. To exchange stETH for wstETH
        IERC20(unwrappedToken_).approve(newToken_, type(uint256).max);

        unwrappedDepositToken = unwrappedToken_;
    }

    function _setDepositTokenGateway(address newGateway_, address newToken_) private {
        IERC20(newToken_).approve(newGateway_, type(uint256).max);
    }

    function sendDepositToken(uint32 gasLimit_, bytes calldata data_) external onlyDistribution {
        DepositTokenConfig storage config = depositTokenConfig;

        // Get current stETH balance
        uint256 amountUnwrappedToken_ = IERC20(unwrappedDepositToken).balanceOf(address(this));
        // Wrap all stETH to wstETH
        uint256 amount_ = IWstETH(config.l1Token).wrap(amountUnwrappedToken_);

        IL1ERC20TokenBridge(config.gateway).depositERC20To(
            config.l1Token,
            config.l2Token,
            config.receiver,
            amount_,
            gasLimit_,
            data_
        );
    }

    function sendMintMessage(address user_, uint256 amount_, address refundTo_) external payable onlyDistribution {
        RewardTokenConfig storage config = rewardTokenConfig;

        bytes memory receiverAndSenderAddresses_ = abi.encodePacked(config.receiver, address(this));
        bytes memory payload_ = abi.encode(user_, amount_);

        ILayerZeroEndpoint(config.gateway).send{value: msg.value}(
            config.receiverChainId, // communicator LayerZero chainId
            receiverAndSenderAddresses_, // send to this address to the communicator
            payload_, // bytes payload
            payable(refundTo_), // refund address
            config.zroPaymentAddress, // future parameter
            config.adapterParams // adapterParams (see "Advanced Features")
        );
    }
}

File 2 of 14 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(
        uint16 _dstChainId,
        bytes calldata _destination,
        bytes calldata _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes calldata _adapterParams
    ) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        address _dstAddress,
        uint64 _nonce,
        uint _gasLimit,
        bytes calldata _payload
    ) external;

    // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(
        uint16 _dstChainId,
        address _userApplication,
        bytes calldata _payload,
        bool _payInZRO,
        bytes calldata _adapterParam
    ) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address _userApplication,
        uint _configType
    ) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 3 of 14 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 4 of 14 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 14 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 6 of 14 : AddressUpgradeable.sol
// 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 AddressUpgradeable {
    /**
     * @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);
        }
    }
}

File 7 of 14 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 8 of 14 : IERC20.sol
// 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);
}

File 9 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 10 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 11 of 14 : IL1ERC20TokenBridge.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IL1ERC20TokenBridge {
    function depositERC20(
        address l1Token_,
        address l2Token_,
        uint256 amount_,
        uint32 l2Gas_,
        bytes calldata data_
    ) external;

    function depositERC20To(
        address l1Token_,
        address l2Token_,
        address to_,
        uint256 amount_,
        uint32 l2Gas_,
        bytes calldata data_
    ) external;

    function finalizeERC20Withdrawal(
        address l1Token_,
        address l2Token_,
        address from_,
        address to_,
        uint256 amount_,
        bytes calldata data_
    ) external;
}

File 12 of 14 : IL1BaseSender.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";

import {IL1Sender} from "./IL1Sender.sol";

interface IL1BaseSender is IL1Sender {
    /**
     * The structure that stores the deposit token's data (stETH).
     * @param gateway The address of bridge gateway.
     * @param l1Token The address of wrapped deposit token on the L1.
     * @param l2Token The address of wrapped deposit token on the L2.
     * @param receiver The address of wrapped token's receiver on L2.
     */
    struct DepositTokenConfig {
        address gateway;
        address l1Token;
        address l2Token;
        address receiver;
    }

    /**
     * The function to initialize the contract.
     * @param distribution_ The address of the distribution contract.
     * @param rewardTokenConfig_ The reward token's config.
     * @param depositTokenConfig_ The deposit token's config.
     */
    function L1BaseSender__init(
        address distribution_,
        RewardTokenConfig calldata rewardTokenConfig_,
        DepositTokenConfig calldata depositTokenConfig_
    ) external;

    /**
     * The function to set the deposit token to the L2.
     * @param gasLimit_ The gas limit for the transaction on the L2.
     * @param data_ The additional data for the bridge.
     */
    function sendDepositToken(uint32 gasLimit_, bytes calldata data_) external;
}

File 13 of 14 : IL1Sender.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";

interface IL1Sender is IERC165 {
    /**
     * The structure that stores the reward token's data.
     * @param gateway The address of token's gateway.
     * @param receiver The address of token's receiver on L2.
     * @param receiverChainId The chain id of receiver.
     * @param zroPaymentAddress The address of ZKSync payment contract.
     * @param adapterParams The parameters for the adapter.
     */
    struct RewardTokenConfig {
        address gateway;
        address receiver;
        uint16 receiverChainId;
        address zroPaymentAddress;
        bytes adapterParams;
    }

    /**
     * The function to get the deposit token's address.
     */
    function unwrappedDepositToken() external view returns (address);

    /**
     * The function to send the message of mint of reward token to the L2.
     * @param user_ The user's address to mint reward tokens.
     * @param amount_ The amount of reward tokens to mint.
     * @param refundTo_ The address to refund the overpaid gas.
     */
    function sendMintMessage(address user_, uint256 amount_, address refundTo_) external payable;
}

File 14 of 14 : IWstETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWstETH is IERC20 {
    function stETH() external returns (address);

    function wrap(uint256 _stETHAmount) external returns (uint256);

    function unwrap(uint256 _wstETHAmount) external returns (uint256);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"distribution_","type":"address"},{"components":[{"internalType":"address","name":"gateway","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint16","name":"receiverChainId","type":"uint16"},{"internalType":"address","name":"zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"adapterParams","type":"bytes"}],"internalType":"struct IL1Sender.RewardTokenConfig","name":"rewardTokenConfig_","type":"tuple"},{"components":[{"internalType":"address","name":"gateway","type":"address"},{"internalType":"address","name":"l1Token","type":"address"},{"internalType":"address","name":"l2Token","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"internalType":"struct IL1BaseSender.DepositTokenConfig","name":"depositTokenConfig_","type":"tuple"}],"name":"L1BaseSender__init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositTokenConfig","outputs":[{"internalType":"address","name":"gateway","type":"address"},{"internalType":"address","name":"l1Token","type":"address"},{"internalType":"address","name":"l2Token","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardTokenConfig","outputs":[{"internalType":"address","name":"gateway","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint16","name":"receiverChainId","type":"uint16"},{"internalType":"address","name":"zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"adapterParams","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"gasLimit_","type":"uint32"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"sendDepositToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"address","name":"refundTo_","type":"address"}],"name":"sendMintMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"zroPaymentAddress_","type":"address"},{"internalType":"bytes","name":"adapterParams_","type":"bytes"}],"name":"setRewardTokenLZParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId_","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unwrappedDepositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061001961001e565b6100dd565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100db576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611303806100ec6000396000f3fe6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101da5780638da5cb5b146101ef57806394d896131461020d578063baeb71d11461022d578063d086aca11461024d578063f2fde38b1461026d57600080fd5b806301ffc9a7146100ac5780630cd0035a146100e1578063323ec5ac14610119578063389df65e1461013f5780634084134a146101a55780635ee58efc146101ba575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610bc5565b61028d565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b50606554610101906001600160a01b031681565b6040516001600160a01b0390911681526020016100d8565b34801561012557600080fd5b5061012e6102c4565b6040516100d8959493929190610c3c565b34801561014b57600080fd5b50606754606854606954606a54610172936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016100d8565b6101b86101b3366004610c9a565b610381565b005b3480156101c657600080fd5b50606654610101906001600160a01b031681565b3480156101e657600080fd5b506101b86104c5565b3480156101fb57600080fd5b506033546001600160a01b0316610101565b34801561021957600080fd5b506101b8610228366004610d25565b6104d9565b34801561023957600080fd5b506101b8610248366004610d83565b6106a4565b34801561025957600080fd5b506101b8610268366004610df4565b6107ec565b34801561027957600080fd5b506101b8610288366004610e14565b61081c565b60006001600160e01b03198216631719f3e160e11b14806102be57506001600160e01b031982166301ffc9a760e01b145b92915050565b606b8054606c54606d54606e80546001600160a01b039485169585851695600160a01b90950461ffff16949093169291906102fe90610e31565b80601f016020809104026020016040519081016040528092919081815260200182805461032a90610e31565b80156103775780601f1061034c57610100808354040283529160200191610377565b820191906000526020600020905b81548152906001019060200180831161035a57829003601f168201915b5050505050905085565b6066546001600160a01b0316336001600160a01b0316146103df5760405162461bcd60e51b81526020600482015260136024820152722618a99d1034b73b30b634b21039b2b73232b960691b60448201526064015b60405180910390fd5b606c54604080516bffffffffffffffffffffffff19606084811b8216602084015230901b166034820152815180820360280181526048820183526001600160a01b03878116606884015260888084018890528451808503909101815260a8840194859052606b8054606d5462c5803160e81b9097529096939591949083169363c580310093349361048b93600160a01b90930461ffff1692899289928d92911690606e9060ac01610e6b565b6000604051808303818588803b1580156104a457600080fd5b505af11580156104b8573d6000803e3d6000fd5b5050505050505050505050565b6104cd610895565b6104d760006108ef565b565b6066546001600160a01b0316336001600160a01b0316146105325760405162461bcd60e51b81526020600482015260136024820152722618a99d1034b73b30b634b21039b2b73232b960691b60448201526064016103d6565b6065546040516370a0823160e01b81523060048201526067916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610f41565b6001830154604051630ea598cb60e41b8152600481018390529192506000916001600160a01b039091169063ea598cb0906024016020604051808303816000875af11580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b9190610f41565b835460018501546002860154600387015460405163041c592960e51b81529495506001600160a01b039384169463838b25209461066a94811693811692169087908d908d908d90600401610f5a565b600060405180830381600087803b15801561068457600080fd5b505af1158015610698573d6000803e3d6000fd5b50505050505050505050565b600054610100900460ff16158080156106c45750600054600160ff909116105b806106de5750303b1580156106de575060005460ff166001145b6107415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d6565b6000805460ff191660011790558015610764576000805461ff0019166101001790555b61076c610941565b606680546001600160a01b0319166001600160a01b03861617905582606b6107948282611109565b9050506107a082610970565b80156107e6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6107f4610895565b606d80546001600160a01b0319166001600160a01b038516179055606e6107e6828483611048565b610824610895565b6001600160a01b0381166108895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103d6565b610892816108ef565b50565b6033546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103d6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166109685760405162461bcd60e51b81526004016103d6906111da565b6104d7610a1f565b60006109826080830160608401610e14565b6001600160a01b0316036109d05760405162461bcd60e51b81526020600482015260156024820152742618a99d1034b73b30b634b2103932b1b2b4bb32b960591b60448201526064016103d6565b6109e86109e36040830160208401610e14565b610a4f565b610a0d6109f86020830183610e14565b610a086040840160208501610e14565b610b51565b806067610a1a8282611225565b505050565b600054610100900460ff16610a465760405162461bcd60e51b81526004016103d6906111da565b6104d7336108ef565b6000816001600160a01b031663c1fe3e486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab5919061128e565b60405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529192509082169063095ea7b3906044016020604051808303816000875af1158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2d91906112ab565b50606580546001600160a01b0319166001600160a01b039290921691909117905550565b60405163095ea7b360e01b81526001600160a01b038381166004830152600019602483015282169063095ea7b3906044016020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a91906112ab565b600060208284031215610bd757600080fd5b81356001600160e01b031981168114610bef57600080fd5b9392505050565b6000815180845260005b81811015610c1c57602081850181015186830182015201610c00565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038681168252858116602083015261ffff851660408301528316606082015260a060808201819052600090610c7a90830184610bf6565b979650505050505050565b6001600160a01b038116811461089257600080fd5b600080600060608486031215610caf57600080fd5b8335610cba81610c85565b9250602084013591506040840135610cd181610c85565b809150509250925092565b60008083601f840112610cee57600080fd5b50813567ffffffffffffffff811115610d0657600080fd5b602083019150836020828501011115610d1e57600080fd5b9250929050565b600080600060408486031215610d3a57600080fd5b833563ffffffff81168114610d4e57600080fd5b9250602084013567ffffffffffffffff811115610d6a57600080fd5b610d7686828701610cdc565b9497909650939450505050565b600080600083850360c0811215610d9957600080fd5b8435610da481610c85565b9350602085013567ffffffffffffffff811115610dc057600080fd5b850160a08188031215610dd257600080fd5b92506080603f1982011215610de657600080fd5b506040840190509250925092565b600080600060408486031215610e0957600080fd5b8335610d4e81610c85565b600060208284031215610e2657600080fd5b8135610bef81610c85565b600181811c90821680610e4557607f821691505b602082108103610e6557634e487b7160e01b600052602260045260246000fd5b50919050565b61ffff871681526000602060c081840152610e8960c0840189610bf6565b8381036040850152610e9b8189610bf6565b6001600160a01b0388811660608701528716608086015284810360a08601528554909150600090610ecb81610e31565b80845260018281168015610ee65760018114610f0057610f2e565b60ff1984168688015282151560051b860187019450610f2e565b896000528660002060005b84811015610f265781548882018a0152908301908801610f0b565b870188019550505b50929d9c50505050505050505050505050565b600060208284031215610f5357600080fd5b5051919050565b6001600160a01b0388811682528781166020830152861660408201526060810185905263ffffffff8416608082015260c060a0820181905281018290526000828460e0840137600060e0848401015260e0601f19601f850116830101905098975050505050505050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b600052604160045260246000fd5b601f821115610a1a57600081815260208120601f850160051c810160208610156110215750805b601f850160051c820191505b818110156110405782815560010161102d565b505050505050565b67ffffffffffffffff83111561106057611060610fe4565b6110748361106e8354610e31565b83610ffa565b6000601f8411600181146110a857600085156110905750838201355b600019600387901b1c1916600186901b178355611102565b600083815260209020601f19861690835b828110156110d957868501358255602094850194600190920191016110b9565b50868210156110f65760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b813561111481610c85565b61111e8183610fc4565b5060018101602083013561113181610c85565b61113b8183610fc4565b50604083013561ffff8116811461115157600080fd5b815461ffff60a01b191660a09190911b61ffff60a01b16179055606082013561117981610c85565b6111868160028401610fc4565b506080820135601e1983360301811261119e57600080fd5b8201803567ffffffffffffffff8111156111b757600080fd5b6020820191508036038213156111cc57600080fd5b6107e6818360038601611048565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b813561123081610c85565b61123a8183610fc4565b50602082013561124981610c85565b6112568160018401610fc4565b50604082013561126581610c85565b6112728160028401610fc4565b50606082013561128181610c85565b610a1a8160038401610fc4565b6000602082840312156112a057600080fd5b8151610bef81610c85565b6000602082840312156112bd57600080fd5b81518015158114610bef57600080fdfea26469706673582212205d9da98b3e4df404afef23af869ec600b2b235960851749a50d934af5e10947164736f6c63430008140033

Deployed Bytecode

0x6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101da5780638da5cb5b146101ef57806394d896131461020d578063baeb71d11461022d578063d086aca11461024d578063f2fde38b1461026d57600080fd5b806301ffc9a7146100ac5780630cd0035a146100e1578063323ec5ac14610119578063389df65e1461013f5780634084134a146101a55780635ee58efc146101ba575b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610bc5565b61028d565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b50606554610101906001600160a01b031681565b6040516001600160a01b0390911681526020016100d8565b34801561012557600080fd5b5061012e6102c4565b6040516100d8959493929190610c3c565b34801561014b57600080fd5b50606754606854606954606a54610172936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016100d8565b6101b86101b3366004610c9a565b610381565b005b3480156101c657600080fd5b50606654610101906001600160a01b031681565b3480156101e657600080fd5b506101b86104c5565b3480156101fb57600080fd5b506033546001600160a01b0316610101565b34801561021957600080fd5b506101b8610228366004610d25565b6104d9565b34801561023957600080fd5b506101b8610248366004610d83565b6106a4565b34801561025957600080fd5b506101b8610268366004610df4565b6107ec565b34801561027957600080fd5b506101b8610288366004610e14565b61081c565b60006001600160e01b03198216631719f3e160e11b14806102be57506001600160e01b031982166301ffc9a760e01b145b92915050565b606b8054606c54606d54606e80546001600160a01b039485169585851695600160a01b90950461ffff16949093169291906102fe90610e31565b80601f016020809104026020016040519081016040528092919081815260200182805461032a90610e31565b80156103775780601f1061034c57610100808354040283529160200191610377565b820191906000526020600020905b81548152906001019060200180831161035a57829003601f168201915b5050505050905085565b6066546001600160a01b0316336001600160a01b0316146103df5760405162461bcd60e51b81526020600482015260136024820152722618a99d1034b73b30b634b21039b2b73232b960691b60448201526064015b60405180910390fd5b606c54604080516bffffffffffffffffffffffff19606084811b8216602084015230901b166034820152815180820360280181526048820183526001600160a01b03878116606884015260888084018890528451808503909101815260a8840194859052606b8054606d5462c5803160e81b9097529096939591949083169363c580310093349361048b93600160a01b90930461ffff1692899289928d92911690606e9060ac01610e6b565b6000604051808303818588803b1580156104a457600080fd5b505af11580156104b8573d6000803e3d6000fd5b5050505050505050505050565b6104cd610895565b6104d760006108ef565b565b6066546001600160a01b0316336001600160a01b0316146105325760405162461bcd60e51b81526020600482015260136024820152722618a99d1034b73b30b634b21039b2b73232b960691b60448201526064016103d6565b6065546040516370a0823160e01b81523060048201526067916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190610f41565b6001830154604051630ea598cb60e41b8152600481018390529192506000916001600160a01b039091169063ea598cb0906024016020604051808303816000875af11580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b9190610f41565b835460018501546002860154600387015460405163041c592960e51b81529495506001600160a01b039384169463838b25209461066a94811693811692169087908d908d908d90600401610f5a565b600060405180830381600087803b15801561068457600080fd5b505af1158015610698573d6000803e3d6000fd5b50505050505050505050565b600054610100900460ff16158080156106c45750600054600160ff909116105b806106de5750303b1580156106de575060005460ff166001145b6107415760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103d6565b6000805460ff191660011790558015610764576000805461ff0019166101001790555b61076c610941565b606680546001600160a01b0319166001600160a01b03861617905582606b6107948282611109565b9050506107a082610970565b80156107e6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6107f4610895565b606d80546001600160a01b0319166001600160a01b038516179055606e6107e6828483611048565b610824610895565b6001600160a01b0381166108895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103d6565b610892816108ef565b50565b6033546001600160a01b031633146104d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103d6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166109685760405162461bcd60e51b81526004016103d6906111da565b6104d7610a1f565b60006109826080830160608401610e14565b6001600160a01b0316036109d05760405162461bcd60e51b81526020600482015260156024820152742618a99d1034b73b30b634b2103932b1b2b4bb32b960591b60448201526064016103d6565b6109e86109e36040830160208401610e14565b610a4f565b610a0d6109f86020830183610e14565b610a086040840160208501610e14565b610b51565b806067610a1a8282611225565b505050565b600054610100900460ff16610a465760405162461bcd60e51b81526004016103d6906111da565b6104d7336108ef565b6000816001600160a01b031663c1fe3e486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab5919061128e565b60405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529192509082169063095ea7b3906044016020604051808303816000875af1158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2d91906112ab565b50606580546001600160a01b0319166001600160a01b039290921691909117905550565b60405163095ea7b360e01b81526001600160a01b038381166004830152600019602483015282169063095ea7b3906044016020604051808303816000875af1158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a91906112ab565b600060208284031215610bd757600080fd5b81356001600160e01b031981168114610bef57600080fd5b9392505050565b6000815180845260005b81811015610c1c57602081850181015186830182015201610c00565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038681168252858116602083015261ffff851660408301528316606082015260a060808201819052600090610c7a90830184610bf6565b979650505050505050565b6001600160a01b038116811461089257600080fd5b600080600060608486031215610caf57600080fd5b8335610cba81610c85565b9250602084013591506040840135610cd181610c85565b809150509250925092565b60008083601f840112610cee57600080fd5b50813567ffffffffffffffff811115610d0657600080fd5b602083019150836020828501011115610d1e57600080fd5b9250929050565b600080600060408486031215610d3a57600080fd5b833563ffffffff81168114610d4e57600080fd5b9250602084013567ffffffffffffffff811115610d6a57600080fd5b610d7686828701610cdc565b9497909650939450505050565b600080600083850360c0811215610d9957600080fd5b8435610da481610c85565b9350602085013567ffffffffffffffff811115610dc057600080fd5b850160a08188031215610dd257600080fd5b92506080603f1982011215610de657600080fd5b506040840190509250925092565b600080600060408486031215610e0957600080fd5b8335610d4e81610c85565b600060208284031215610e2657600080fd5b8135610bef81610c85565b600181811c90821680610e4557607f821691505b602082108103610e6557634e487b7160e01b600052602260045260246000fd5b50919050565b61ffff871681526000602060c081840152610e8960c0840189610bf6565b8381036040850152610e9b8189610bf6565b6001600160a01b0388811660608701528716608086015284810360a08601528554909150600090610ecb81610e31565b80845260018281168015610ee65760018114610f0057610f2e565b60ff1984168688015282151560051b860187019450610f2e565b896000528660002060005b84811015610f265781548882018a0152908301908801610f0b565b870188019550505b50929d9c50505050505050505050505050565b600060208284031215610f5357600080fd5b5051919050565b6001600160a01b0388811682528781166020830152861660408201526060810185905263ffffffff8416608082015260c060a0820181905281018290526000828460e0840137600060e0848401015260e0601f19601f850116830101905098975050505050505050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b634e487b7160e01b600052604160045260246000fd5b601f821115610a1a57600081815260208120601f850160051c810160208610156110215750805b601f850160051c820191505b818110156110405782815560010161102d565b505050505050565b67ffffffffffffffff83111561106057611060610fe4565b6110748361106e8354610e31565b83610ffa565b6000601f8411600181146110a857600085156110905750838201355b600019600387901b1c1916600186901b178355611102565b600083815260209020601f19861690835b828110156110d957868501358255602094850194600190920191016110b9565b50868210156110f65760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b813561111481610c85565b61111e8183610fc4565b5060018101602083013561113181610c85565b61113b8183610fc4565b50604083013561ffff8116811461115157600080fd5b815461ffff60a01b191660a09190911b61ffff60a01b16179055606082013561117981610c85565b6111868160028401610fc4565b506080820135601e1983360301811261119e57600080fd5b8201803567ffffffffffffffff8111156111b757600080fd5b6020820191508036038213156111cc57600080fd5b6107e6818360038601611048565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b813561123081610c85565b61123a8183610fc4565b50602082013561124981610c85565b6112568160018401610fc4565b50604082013561126581610c85565b6112728160028401610fc4565b50606082013561128181610c85565b610a1a8160038401610fc4565b6000602082840312156112a057600080fd5b8151610bef81610c85565b6000602082840312156112bd57600080fd5b81518015158114610bef57600080fdfea26469706673582212205d9da98b3e4df404afef23af869ec600b2b235960851749a50d934af5e10947164736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.