ETH Price: $2,614.40 (-6.12%)

Contract

0x74aFfFC16032b10708cc0195d9223E7cEB03eE35
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EnderBondLiquidityDeposit

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : EnderBondLiquidityDeposit.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "contracts/interfaces/ISTETH.sol";

contract EnderBondLiquidityDeposit is 
    Initializable, 
    EIP712Upgradeable,
    OwnableUpgradeable, 
    ReentrancyGuardUpgradeable {

    string private constant SIGNING_DOMAIN = "depositContract";
    string private constant SIGNATURE_VERSION = "1";

    address public stEth; // address of stEth
    address public lido; // address of lido
    address public signer; // address of signer
    address public admin; // address of admin
    address public enderBond; // address of enderBond
    uint256 public index; // undex is used to track user info
    uint256 public minDepositAmount; // minimum deposit amount for EnderBondLiquidityDeposit
    uint256 public rewardShareIndex; // overall reward share index for users
    bool public depositEnable; // Used for go live on a particular time
    // @notice A mapping that indicates whether a token is bondable.
    mapping(address => bool) public bondableTokens; // To allow a particular token to deposit 
    mapping(uint256 => uint256) public rewardSharePerUserIndexStEth; // reward share index of a user at the time of deposit
    mapping(uint256 => uint256) public totalRewardOfUser;
    // mapping(address => bool) public isWhitelisted;
    mapping(uint256 => Bond) public bonds; // user info struct mapping with index
    
    // user info 
    struct Bond {
        address user;
        uint256 principalAmount;
        uint256 totalAmount;
        uint256 bondFees;
        uint256 maturity;
    }

    struct signData{
        address user;
        string key;
        bytes signature;
    }
    error InvalidAmount();
    error InvalidMaturity();
    error InvalidBondFee();
    error ZeroAddress();
    error NotAllowed();
    error NotBondableToken();
    error addressNotWhitelisted();
    event newSigner(address _signer);
    event depositEnableSet(bool depositEnable);
    event MinDepAmountSet(uint256 indexed newAmount);
    event BondableTokensSet(address indexed token, bool indexed isEnabled);
    event WhitelistChanged(address indexed whitelistingAddress, bool indexed action);
    event Deposit(address indexed sender, uint256 index, uint256 bondFees, uint256 principal, uint256 maturity, address token);
    event userInfo(address indexed user, uint256 index, uint256 principal, uint256 totalAmount, uint256 bondFees, uint256 maturity);

    function initialize(address _stEth, address _lido, address _signer, address _admin) public initializer {
        __Ownable_init();
        __ReentrancyGuard_init();
        // _disableInitializers();
        __EIP712_init(SIGNING_DOMAIN, SIGNATURE_VERSION);
        stEth = _stEth;
        lido = _lido;
        signer = _signer;
        admin = _admin;
        depositEnable = true; // @note for testing purpose
        _transferOwnership(admin);
        bondableTokens[_stEth] = true;
        minDepositAmount = 100000000000000; 
    }

    modifier depositEnabled() {
        if (depositEnable != true) revert NotAllowed();
        _;
    }

    modifier onlyBond() {
        if (msg.sender != enderBond) revert NotAllowed();
        _;
    }

    function setsigner(address _signer) external onlyOwner{
        require(_signer != address(0), "Address can't be zero");
        signer = _signer;
        emit newSigner(signer);
    }

    /**
     * @notice Updates the bondable status for a list of tokens.
     * @dev Sets the bondable status of a list of tokens. Only callable by the contract owner.
     * @param tokens The addresses of the tokens to be updated.
     * @param enabled Boolean value representing whether each token is bondable.
     */
    function setBondableTokens(address[] calldata tokens, bool enabled) external onlyOwner {
        uint256 length = tokens.length;
        for (uint256 i; i < length; ++i) {
            bondableTokens[tokens[i]] = enabled;
        emit BondableTokensSet(tokens[i], enabled);
        }
    }

    /**
     * @notice Updates the minimum deposit amount.
     * @dev Sets the minimum deposit amount. Only callable by the contract owner.
     * @param _amt The amount to be updated.
     */
    function setMinDepAmount(uint256 _amt) public onlyOwner {
        minDepositAmount = _amt;
        emit MinDepAmountSet(_amt);
    }

    /**
     * @notice Updates whether deposit is enabled or not.
     * @dev Sets whether deposit is enabled or not. Only callable by the contract owner.
     * @param _depositEnable true if enabled otherwise false.
     */
    function setDepositEnable(bool _depositEnable) public onlyOwner{
        depositEnable = _depositEnable;
        emit depositEnableSet(depositEnable);
    }

    /**
     * @notice Updates contract addresses.
     * @dev Sets contract addresses. Only callable by the contract owner.
     * @param _addr The address of the token or contracts to be updated.
     * @param _type 1 ==> stETH address, 2 ==> lido adrress, 3 ==> ender bond address.
     */
    function setAddress(address _addr, uint256 _type) public onlyOwner {
        if (_addr == address(0)) revert ZeroAddress();

        if (_type == 1) stEth = _addr;
        else if (_type == 2) lido = _addr;
        else if (_type == 3) enderBond = _addr;
    }

    /**
     * @notice Allows a user to deposit a specified token into a bond
     * @param principal The principal amount of the bond
     * @param maturity The maturity date of the bond (lock time)
     * @param bondFee Self-set bond fee
     * @param token The address of the token (if token is zero address, then depositing ETH)
     * @param userSign To verify user details for whitelisting
     */
    function deposit(
        uint256 principal,
        uint256 maturity,
        uint256 bondFee,
        address token,
        signData memory userSign
    ) external payable nonReentrant depositEnabled {
        if (principal < minDepositAmount) revert InvalidAmount();
        if (maturity < 7 || maturity > 365 ) revert InvalidMaturity();
        if (token != address(0) && !bondableTokens[token]) revert NotBondableToken();
        if (bondFee <= 0 || bondFee >= 10000) revert InvalidBondFee();  
        address signAddress = _verify(userSign);
        require(signAddress == signer && userSign.user == msg.sender, "user is not whitelisted");
        // token transfer
        if (token == address(0)) {
            if (msg.value != principal) revert InvalidAmount(); 
            (bool suc, ) = payable(lido).call{value: msg.value}(abi.encodeWithSignature("submit(address)", address(this)));     
            require(suc, "lido eth deposit failed");                                    
        } else {           
            // send directly to the deposit contract      
            IERC20(token).transferFrom(msg.sender, address(this), principal);  
        }         
        index ++;
        rewardSharePerUserIndexStEth[index] = rewardShareIndex;
        bonds[index] = Bond(
            msg.sender,
            IStEth(stEth).getSharesByPooledEth(principal),
            IStEth(stEth).getSharesByPooledEth(principal),
            bondFee,
            maturity
        );

        emit Deposit(msg.sender, index, bondFee, principal, maturity, token);
    }

    /** 
    * @notice This function is return 1e6 
     */

    function expandTo6Decimal() internal pure returns(uint256){
        return 1e6;
    }

    /**
    * @notice This function is call by ender bond contract when ender bond contract go live
    * @param _index this is used to get user info of a particular user
     */
    function depositedIntoBond(uint256 _index) external onlyBond returns(address user, uint256 principal, uint256 bondFees, uint256 maturity){
        principal = IStEth(stEth).getPooledEthByShares(bonds[_index].principalAmount);
        emit userInfo(bonds[_index].user, index,bonds[_index].principalAmount, principal, bonds[_index].bondFees, bonds[_index].maturity);
        return (bonds[_index].user, principal, bonds[_index].bondFees, bonds[_index].maturity);
    }


    /**
    * @notice This function is call by Admin address when ender bond contract go live for approval of stEth
    * @param _bond The address of ender bond
    * @param _amount this input is used for approval
     */
    function approvalForBond(address _bond, uint256 _amount) external onlyOwner{
        require(_bond != address(0), "Address can't be zero");
        IERC20(stEth).approve(_bond, _amount);
    }

    function _hash(signData memory userSign)
        internal
        view
        returns (bytes32)
    {
        return
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        keccak256(
                            "userSign(address user,string key)"
                        ),
                        userSign.user,
                        keccak256(bytes(userSign.key))
                    )
                )
            );
    }

    /**
    * @notice verifying the owner signature to check whether the user is whitelisted or not
     */
    function _verify(signData memory userSign)
        internal
        view
        returns (address)
    {
        bytes32 digest = _hash(userSign);
        return ECDSAUpgradeable.recover(digest, userSign.signature);
    }

    function withdraw(address _receiver) external onlyOwner {
            require(_receiver != address(0), "Address can't be zero");
            IERC20(stEth).approve(_receiver, IERC20(stEth).balanceOf(address(this)));
            IERC20(stEth).transferFrom(address(this), msg.sender, IERC20(stEth).balanceOf(address(this)));
    }
}

File 2 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 3 of 14 : IERC5267Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.0;

interface IERC5267Upgradeable {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 4 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 5 of 14 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

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

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }

    /**
     * @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 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 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../StringsUpgradeable.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSAUpgradeable {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 9 of 14 : EIP712Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSAUpgradeable.sol";
import "../../interfaces/IERC5267Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:storage-size 52
 */
abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {
    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    /// @custom:oz-renamed-from _HASHED_NAME
    bytes32 private _hashedName;
    /// @custom:oz-renamed-from _HASHED_VERSION
    bytes32 private _hashedVersion;

    string private _name;
    string private _version;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {
        __EIP712_init_unchained(name, version);
    }

    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {
        _name = name;
        _version = version;

        // Reset prior values in storage if upgrading
        _hashedName = 0;
        _hashedVersion = 0;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        return _buildDomainSeparator();
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized
        // and the EIP712 domain is not reliable, as it will be missing name and version.
        require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized");

        return (
            hex"0f", // 01111
            _EIP712Name(),
            _EIP712Version(),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /**
     * @dev The name parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712Name() internal virtual view returns (string memory) {
        return _name;
    }

    /**
     * @dev The version parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712Version() internal virtual view returns (string memory) {
        return _version;
    }

    /**
     * @dev The hash of the name parameter for the EIP712 domain.
     *
     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.
     */
    function _EIP712NameHash() internal view returns (bytes32) {
        string memory name = _EIP712Name();
        if (bytes(name).length > 0) {
            return keccak256(bytes(name));
        } else {
            // If the name is empty, the contract may have been upgraded without initializing the new storage.
            // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.
            bytes32 hashedName = _hashedName;
            if (hashedName != 0) {
                return hashedName;
            } else {
                return keccak256("");
            }
        }
    }

    /**
     * @dev The hash of the version parameter for the EIP712 domain.
     *
     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.
     */
    function _EIP712VersionHash() internal view returns (bytes32) {
        string memory version = _EIP712Version();
        if (bytes(version).length > 0) {
            return keccak256(bytes(version));
        } else {
            // If the version is empty, the contract may have been upgraded without initializing the new storage.
            // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.
            bytes32 hashedVersion = _hashedVersion;
            if (hashedVersion != 0) {
                return hashedVersion;
            } else {
                return keccak256("");
            }
        }
    }

    /**
     * @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[48] private __gap;
}

File 10 of 14 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 11 of 14 : SignedMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMathUpgradeable {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 12 of 14 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";
import "./math/SignedMathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = MathUpgradeable.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, MathUpgradeable.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 13 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 14 of 14 : ISTETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


interface IStEth is IERC20 {
    function getPooledEthByShares(uint256 _sharesAmount) external returns(uint256);
    function getSharesByPooledEth(uint256 _ethAmount) external returns(uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidBondFee","type":"error"},{"inputs":[],"name":"InvalidMaturity","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotBondableToken","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"addressNotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"BondableTokensSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bondFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maturity","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"MinDepAmountSet","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"whitelistingAddress","type":"address"},{"indexed":true,"internalType":"bool","name":"action","type":"bool"}],"name":"WhitelistChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"depositEnable","type":"bool"}],"name":"depositEnableSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"newSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bondFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maturity","type":"uint256"}],"name":"userInfo","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bond","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approvalForBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bondableTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bonds","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"principalAmount","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"bondFees","type":"uint256"},{"internalType":"uint256","name":"maturity","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"maturity","type":"uint256"},{"internalType":"uint256","name":"bondFee","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"string","name":"key","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct EnderBondLiquidityDeposit.signData","name":"userSign","type":"tuple"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"depositedIntoBond","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"bondFees","type":"uint256"},{"internalType":"uint256","name":"maturity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enderBond","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stEth","type":"address"},{"internalType":"address","name":"_lido","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lido","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"rewardShareIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardSharePerUserIndexStEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"setAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setBondableTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_depositEnable","type":"bool"}],"name":"setDepositEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"setMinDepAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setsigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stEth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRewardOfUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612282806100206000396000f3fe60806040526004361061019c5760003560e01c8063645006ca116100ec57806399940ece1161008a578063f2fde38b11610064578063f2fde38b1461054f578063f851a4401461056f578063f8c8765e1461058f578063fa09e4a1146105af57600080fd5b806399940ece146104f9578063ccfe07f114610519578063d3fd67d91461052f57600080fd5b80637935707a116100c65780637935707a146104665780637b88dca21461048657806384b0196e146104b35780638da5cb5b146104db57600080fd5b8063645006ca1461041b57806370db690214610431578063715018a61461045157600080fd5b80633864297311610159578063498d81aa11610133578063498d81aa14610325578063516be0f81461035557806351cff8d9146103755780635f1c17c01461039557600080fd5b806338642973146102c35780633b66f353146102e5578063426697cf1461030557600080fd5b80631faf4fe1146101a15780632242b9de146101f057806323509a2d1461022b578063238ac933146102635780632986c0e5146102835780632eb5c76014610299575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611bce565b6105c2565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390f35b3480156101fc57600080fd5b5061021d61020b366004611bce565b60d66020526000908152604090205481565b6040519081526020016101e7565b34801561023757600080fd5b5060cc5461024b906001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b34801561026f57600080fd5b5060cd5461024b906001600160a01b031681565b34801561028f57600080fd5b5061021d60d05481565b3480156102a557600080fd5b5060d3546102b39060ff1681565b60405190151581526020016101e7565b3480156102cf57600080fd5b506102e36102de366004611c03565b61072d565b005b3480156102f157600080fd5b506102e3610300366004611c1e565b6107b9565b34801561031157600080fd5b5060cf5461024b906001600160a01b031681565b34801561033157600080fd5b506102b3610340366004611c03565b60d46020526000908152604090205460ff1681565b34801561036157600080fd5b506102e3610370366004611c56565b610863565b34801561038157600080fd5b506102e3610390366004611c03565b6108b2565b3480156103a157600080fd5b506103e96103b0366004611bce565b60d760205260009081526040902080546001820154600283015460038401546004909401546001600160a01b0390931693919290919085565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016101e7565b34801561042757600080fd5b5061021d60d15481565b34801561043d57600080fd5b506102e361044c366004611c1e565b610aba565b34801561045d57600080fd5b506102e3610b64565b34801561047257600080fd5b506102e3610481366004611bce565b610b78565b34801561049257600080fd5b5061021d6104a1366004611bce565b60d56020526000908152604090205481565b3480156104bf57600080fd5b506104c8610bb3565b6040516101e79796959493929190611cc3565b3480156104e757600080fd5b506067546001600160a01b031661024b565b34801561050557600080fd5b5060cb5461024b906001600160a01b031681565b34801561052557600080fd5b5061021d60d25481565b34801561053b57600080fd5b506102e361054a366004611d59565b610c51565b34801561055b57600080fd5b506102e361056a366004611c03565b610d2f565b34801561057b57600080fd5b5060ce5461024b906001600160a01b031681565b34801561059b57600080fd5b506102e36105aa366004611ddf565b610da8565b6102e36105bd366004611ee8565b610f99565b60cf546000908190819081906001600160a01b031633146105f657604051631eb49d6d60e11b815260040160405180910390fd5b60cb54600086815260d7602052604090819020600101549051630f451f7160e31b81526001600160a01b0390921691637a28fb889161063b9160040190815260200190565b6020604051808303816000875af115801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190611fe5565b600086815260d76020908152604091829020805460d054600183015460038401546004909401548651928352948201528085018690526060810192909252608082019290925291519295506001600160a01b0316917fc3bbf6b9e10fad05843097a5efb0f9c177d491d7fa9b10e51e65ea27c6676d9f9181900360a00190a25050600092835260d76020526040909220805460038201546004909201546001600160a01b039091169491925090565b610735611494565b6001600160a01b0381166107645760405162461bcd60e51b815260040161075b90611ffe565b60405180910390fd5b60cd80546001600160a01b0319166001600160a01b0383169081179091556040519081527f3dc2a8437aef0e8d2839b5e75d0d93e6c7f43b3acf5d2ef2db79beb54cb47b3d906020015b60405180910390a150565b6107c1611494565b6001600160a01b0382166107e75760405162461bcd60e51b815260040161075b90611ffe565b60cb5460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303816000875af115801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e919061202d565b505050565b61086b611494565b60d3805460ff191682151590811790915560405160ff909116151581527fd73bb71bc27cef03d6ee2916c27379137cd9df2244b2db7e09f48108a93606be906020016107ae565b6108ba611494565b6001600160a01b0381166108e05760405162461bcd60e51b815260040161075b90611ffe565b60cb546040516370a0823160e01b81523060048201526001600160a01b039091169063095ea7b390839083906370a0823190602401602060405180830381865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109569190611fe5565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c5919061202d565b5060cb546040516370a0823160e01b815230600482018190526001600160a01b03909216916323b872dd91339084906370a0823190602401602060405180830381865afa158015610a1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3e9190611fe5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061202d565b5050565b610ac2611494565b6001600160a01b038216610ae95760405163d92e233d60e01b815260040160405180910390fd5b80600103610b125760cb80546001600160a01b0384166001600160a01b03199091161790555050565b80600203610b3b5760cc80546001600160a01b0384166001600160a01b03199091161790555050565b80600303610ab65760cf80546001600160a01b0384166001600160a01b03199091161790555050565b610b6c611494565b610b7660006114ee565b565b610b80611494565b60d181905560405181907f05625a0f1171b5e8585c9019c420fefb294d1f26ee3db33c7d243b3cdf12c37b90600090a250565b6000606080600080600060606001546000801b148015610bd35750600254155b610c175760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161075b565b610c1f611540565b610c276115d2565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b610c59611494565b8160005b81811015610d28578260d46000878785818110610c7c57610c7c61204a565b9050602002016020810190610c919190611c03565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055821515858583818110610cce57610cce61204a565b9050602002016020810190610ce39190611c03565b6001600160a01b03167f8152f2b5c649b38f5ba259a7fd9c4145e82bfb846f01794f2ed60493ecf00cc260405160405180910390a3610d2181612060565b9050610c5d565b5050505050565b610d37611494565b6001600160a01b038116610d9c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161075b565b610da5816114ee565b50565b600054610100900460ff1615808015610dc85750600054600160ff909116105b80610de25750303b158015610de2575060005460ff166001145b610e455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161075b565b6000805460ff191660011790558015610e68576000805461ff0019166101001790555b610e706115e1565b610e78611610565b610ec26040518060400160405280600f81526020016e19195c1bdcda5d10dbdb9d1c9858dd608a1b815250604051806040016040528060018152602001603160f81b81525061163f565b60cb80546001600160a01b038088166001600160a01b03199283161790925560cc805487841690831617905560cd805486841690831617905560ce8054928516929091168217905560d3805460ff19166001179055610f20906114ee565b6001600160a01b038516600090815260d460205260409020805460ff19166001179055655af3107a400060d1558015610d28576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b610fa1611670565b60d35460ff161515600114610fc957604051631eb49d6d60e11b815260040160405180910390fd5b60d154851015610fec5760405163162908e360e11b815260040160405180910390fd5b6007841080610ffc575061016d84115b1561101a576040516318f4d05960e31b815260040160405180910390fd5b6001600160a01b0382161580159061104b57506001600160a01b038216600090815260d4602052604090205460ff16155b156110695760405163014cb61f60e51b815260040160405180910390fd5b82158061107857506127108310155b1561109657604051631c97324360e21b815260040160405180910390fd5b60006110a1826116c9565b60cd549091506001600160a01b0380831691161480156110ca575081516001600160a01b031633145b6111165760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c6973746564000000000000000000604482015260640161075b565b6001600160a01b038316611230578534146111445760405163162908e360e11b815260040160405180910390fd5b60cc546040513060248201526000916001600160a01b031690349060440160408051601f198184030181529181526020820180516001600160e01b031663a1903eab60e01b179052516111979190612087565b60006040518083038185875af1925050503d80600081146111d4576040519150601f19603f3d011682016040523d82523d6000602084013e6111d9565b606091505b505090508061122a5760405162461bcd60e51b815260206004820152601760248201527f6c69646f20657468206465706f736974206661696c6564000000000000000000604482015260640161075b565b506112a9565b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038416906323b872dd906064016020604051808303816000875af1158015611283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a7919061202d565b505b60d080549060006112b983612060565b909155505060d25460d054600090815260d5602090815260409182902092909255805160a08101825233815260cb549151631920845160e01b8152600481018a905290928301916001600160a01b0316906319208451906024016020604051808303816000875af1158015611332573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190611fe5565b815260cb54604051631920845160e01b8152600481018a90526020909201916001600160a01b03909116906319208451906024016020604051808303816000875af11580156113a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cd9190611fe5565b81526020808201879052604091820188905260d08054600090815260d78352839020845181546001600160a01b0319166001600160a01b039182161782558584015160018301558585015160028301556060808701516003840155608096870151600490930192909255915484519081529283018990529282018a90529181018890529085169181019190915233907fd2d20e69c4772a959fae177f20d86f2d40cd940cf11e356d0306670ea7df42279060a00160405180910390a250610d286001609955565b6067546001600160a01b03163314610b765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075b565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606003805461154f906120a3565b80601f016020809104026020016040519081016040528092919081815260200182805461157b906120a3565b80156115c85780601f1061159d576101008083540402835291602001916115c8565b820191906000526020600020905b8154815290600101906020018083116115ab57829003601f168201915b5050505050905090565b60606004805461154f906120a3565b600054610100900460ff166116085760405162461bcd60e51b815260040161075b906120dd565b610b766116f3565b600054610100900460ff166116375760405162461bcd60e51b815260040161075b906120dd565b610b76611723565b600054610100900460ff166116665760405162461bcd60e51b815260040161075b906120dd565b610ab6828261174a565b6002609954036116c25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161075b565b6002609955565b6000806116d583611799565b90506116e581846040015161181d565b9392505050565b6001609955565b600054610100900460ff1661171a5760405162461bcd60e51b815260040161075b906120dd565b610b76336114ee565b600054610100900460ff166116ec5760405162461bcd60e51b815260040161075b906120dd565b600054610100900460ff166117715760405162461bcd60e51b815260040161075b906120dd565b600361177d8382612176565b50600461178a8282612176565b50506000600181905560025550565b60006118177f76bb474a7a9de6f07f692a2e39e53c610f28bd5be9be96837a6a274de347167083600001518460200151805190602001206040516020016117fc939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120611841565b92915050565b600080600061182c858561186e565b91509150611839816118b3565b509392505050565b600061181761184e6119fd565b8360405161190160f01b8152600281019290925260228201526042902090565b60008082516041036118a45760208301516040840151606085015160001a61189887828585611a0c565b945094505050506118ac565b506000905060025b9250929050565b60008160048111156118c7576118c7612236565b036118cf5750565b60018160048111156118e3576118e3612236565b036119305760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161075b565b600281600481111561194457611944612236565b036119915760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161075b565b60038160048111156119a5576119a5612236565b03610da55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161075b565b6000611a07611ad0565b905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a435750600090506003611ac7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611a97573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ac057600060019250925050611ac7565b9150600090505b94509492505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611afb611b44565b611b03611b9d565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080611b4f611540565b805190915015611b66578051602090910120919050565b6001548015611b755792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611ba86115d2565b805190915015611bbf578051602090910120919050565b6002548015611b755792915050565b600060208284031215611be057600080fd5b5035919050565b80356001600160a01b0381168114611bfe57600080fd5b919050565b600060208284031215611c1557600080fd5b6116e582611be7565b60008060408385031215611c3157600080fd5b611c3a83611be7565b946020939093013593505050565b8015158114610da557600080fd5b600060208284031215611c6857600080fd5b81356116e581611c48565b60005b83811015611c8e578181015183820152602001611c76565b50506000910152565b60008151808452611caf816020860160208601611c73565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e081840152611ce360e084018a611c97565b8381036040850152611cf5818a611c97565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611d4757835183529284019291840191600101611d2b565b50909c9b505050505050505050505050565b600080600060408486031215611d6e57600080fd5b833567ffffffffffffffff80821115611d8657600080fd5b818601915086601f830112611d9a57600080fd5b813581811115611da957600080fd5b8760208260051b8501011115611dbe57600080fd5b60209283019550935050840135611dd481611c48565b809150509250925092565b60008060008060808587031215611df557600080fd5b611dfe85611be7565b9350611e0c60208601611be7565b9250611e1a60408601611be7565b9150611e2860608601611be7565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611e6c57611e6c611e33565b60405290565b600067ffffffffffffffff80841115611e8d57611e8d611e33565b604051601f8501601f19908116603f01168101908282118183101715611eb557611eb5611e33565b81604052809350858152868686011115611ece57600080fd5b858560208301376000602087830101525050509392505050565b600080600080600060a08688031215611f0057600080fd5b853594506020860135935060408601359250611f1e60608701611be7565b9150608086013567ffffffffffffffff80821115611f3b57600080fd5b908701906060828a031215611f4f57600080fd5b611f57611e49565b611f6083611be7565b8152602083013582811115611f7457600080fd5b8301601f81018b13611f8557600080fd5b611f948b823560208401611e72565b602083015250604083013582811115611fac57600080fd5b80840193505089601f840112611fc157600080fd5b611fd08a843560208601611e72565b60408201528093505050509295509295909350565b600060208284031215611ff757600080fd5b5051919050565b602080825260159082015274416464726573732063616e2774206265207a65726f60581b604082015260600190565b60006020828403121561203f57600080fd5b81516116e581611c48565b634e487b7160e01b600052603260045260246000fd5b60006001820161208057634e487b7160e01b600052601160045260246000fd5b5060010190565b60008251612099818460208701611c73565b9190910192915050565b600181811c908216806120b757607f821691505b6020821081036120d757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f82111561085e57600081815260208120601f850160051c8101602086101561214f5750805b601f850160051c820191505b8181101561216e5782815560010161215b565b505050505050565b815167ffffffffffffffff81111561219057612190611e33565b6121a48161219e84546120a3565b84612128565b602080601f8311600181146121d957600084156121c15750858301515b600019600386901b1c1916600185901b17855561216e565b600085815260208120601f198616915b82811015612208578886015182559484019460019091019084016121e9565b50858210156122265787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c72bbf83733b4c332f188a9af911d4824cdad8400a487d06a9339e0179302ad464736f6c63430008120033

Deployed Bytecode

0x60806040526004361061019c5760003560e01c8063645006ca116100ec57806399940ece1161008a578063f2fde38b11610064578063f2fde38b1461054f578063f851a4401461056f578063f8c8765e1461058f578063fa09e4a1146105af57600080fd5b806399940ece146104f9578063ccfe07f114610519578063d3fd67d91461052f57600080fd5b80637935707a116100c65780637935707a146104665780637b88dca21461048657806384b0196e146104b35780638da5cb5b146104db57600080fd5b8063645006ca1461041b57806370db690214610431578063715018a61461045157600080fd5b80633864297311610159578063498d81aa11610133578063498d81aa14610325578063516be0f81461035557806351cff8d9146103755780635f1c17c01461039557600080fd5b806338642973146102c35780633b66f353146102e5578063426697cf1461030557600080fd5b80631faf4fe1146101a15780632242b9de146101f057806323509a2d1461022b578063238ac933146102635780632986c0e5146102835780632eb5c76014610299575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611bce565b6105c2565b604080516001600160a01b03909516855260208501939093529183015260608201526080015b60405180910390f35b3480156101fc57600080fd5b5061021d61020b366004611bce565b60d66020526000908152604090205481565b6040519081526020016101e7565b34801561023757600080fd5b5060cc5461024b906001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b34801561026f57600080fd5b5060cd5461024b906001600160a01b031681565b34801561028f57600080fd5b5061021d60d05481565b3480156102a557600080fd5b5060d3546102b39060ff1681565b60405190151581526020016101e7565b3480156102cf57600080fd5b506102e36102de366004611c03565b61072d565b005b3480156102f157600080fd5b506102e3610300366004611c1e565b6107b9565b34801561031157600080fd5b5060cf5461024b906001600160a01b031681565b34801561033157600080fd5b506102b3610340366004611c03565b60d46020526000908152604090205460ff1681565b34801561036157600080fd5b506102e3610370366004611c56565b610863565b34801561038157600080fd5b506102e3610390366004611c03565b6108b2565b3480156103a157600080fd5b506103e96103b0366004611bce565b60d760205260009081526040902080546001820154600283015460038401546004909401546001600160a01b0390931693919290919085565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016101e7565b34801561042757600080fd5b5061021d60d15481565b34801561043d57600080fd5b506102e361044c366004611c1e565b610aba565b34801561045d57600080fd5b506102e3610b64565b34801561047257600080fd5b506102e3610481366004611bce565b610b78565b34801561049257600080fd5b5061021d6104a1366004611bce565b60d56020526000908152604090205481565b3480156104bf57600080fd5b506104c8610bb3565b6040516101e79796959493929190611cc3565b3480156104e757600080fd5b506067546001600160a01b031661024b565b34801561050557600080fd5b5060cb5461024b906001600160a01b031681565b34801561052557600080fd5b5061021d60d25481565b34801561053b57600080fd5b506102e361054a366004611d59565b610c51565b34801561055b57600080fd5b506102e361056a366004611c03565b610d2f565b34801561057b57600080fd5b5060ce5461024b906001600160a01b031681565b34801561059b57600080fd5b506102e36105aa366004611ddf565b610da8565b6102e36105bd366004611ee8565b610f99565b60cf546000908190819081906001600160a01b031633146105f657604051631eb49d6d60e11b815260040160405180910390fd5b60cb54600086815260d7602052604090819020600101549051630f451f7160e31b81526001600160a01b0390921691637a28fb889161063b9160040190815260200190565b6020604051808303816000875af115801561065a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067e9190611fe5565b600086815260d76020908152604091829020805460d054600183015460038401546004909401548651928352948201528085018690526060810192909252608082019290925291519295506001600160a01b0316917fc3bbf6b9e10fad05843097a5efb0f9c177d491d7fa9b10e51e65ea27c6676d9f9181900360a00190a25050600092835260d76020526040909220805460038201546004909201546001600160a01b039091169491925090565b610735611494565b6001600160a01b0381166107645760405162461bcd60e51b815260040161075b90611ffe565b60405180910390fd5b60cd80546001600160a01b0319166001600160a01b0383169081179091556040519081527f3dc2a8437aef0e8d2839b5e75d0d93e6c7f43b3acf5d2ef2db79beb54cb47b3d906020015b60405180910390a150565b6107c1611494565b6001600160a01b0382166107e75760405162461bcd60e51b815260040161075b90611ffe565b60cb5460405163095ea7b360e01b81526001600160a01b038481166004830152602482018490529091169063095ea7b3906044016020604051808303816000875af115801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e919061202d565b505050565b61086b611494565b60d3805460ff191682151590811790915560405160ff909116151581527fd73bb71bc27cef03d6ee2916c27379137cd9df2244b2db7e09f48108a93606be906020016107ae565b6108ba611494565b6001600160a01b0381166108e05760405162461bcd60e51b815260040161075b90611ffe565b60cb546040516370a0823160e01b81523060048201526001600160a01b039091169063095ea7b390839083906370a0823190602401602060405180830381865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109569190611fe5565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c5919061202d565b5060cb546040516370a0823160e01b815230600482018190526001600160a01b03909216916323b872dd91339084906370a0823190602401602060405180830381865afa158015610a1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3e9190611fe5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061202d565b5050565b610ac2611494565b6001600160a01b038216610ae95760405163d92e233d60e01b815260040160405180910390fd5b80600103610b125760cb80546001600160a01b0384166001600160a01b03199091161790555050565b80600203610b3b5760cc80546001600160a01b0384166001600160a01b03199091161790555050565b80600303610ab65760cf80546001600160a01b0384166001600160a01b03199091161790555050565b610b6c611494565b610b7660006114ee565b565b610b80611494565b60d181905560405181907f05625a0f1171b5e8585c9019c420fefb294d1f26ee3db33c7d243b3cdf12c37b90600090a250565b6000606080600080600060606001546000801b148015610bd35750600254155b610c175760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b604482015260640161075b565b610c1f611540565b610c276115d2565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b610c59611494565b8160005b81811015610d28578260d46000878785818110610c7c57610c7c61204a565b9050602002016020810190610c919190611c03565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055821515858583818110610cce57610cce61204a565b9050602002016020810190610ce39190611c03565b6001600160a01b03167f8152f2b5c649b38f5ba259a7fd9c4145e82bfb846f01794f2ed60493ecf00cc260405160405180910390a3610d2181612060565b9050610c5d565b5050505050565b610d37611494565b6001600160a01b038116610d9c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161075b565b610da5816114ee565b50565b600054610100900460ff1615808015610dc85750600054600160ff909116105b80610de25750303b158015610de2575060005460ff166001145b610e455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161075b565b6000805460ff191660011790558015610e68576000805461ff0019166101001790555b610e706115e1565b610e78611610565b610ec26040518060400160405280600f81526020016e19195c1bdcda5d10dbdb9d1c9858dd608a1b815250604051806040016040528060018152602001603160f81b81525061163f565b60cb80546001600160a01b038088166001600160a01b03199283161790925560cc805487841690831617905560cd805486841690831617905560ce8054928516929091168217905560d3805460ff19166001179055610f20906114ee565b6001600160a01b038516600090815260d460205260409020805460ff19166001179055655af3107a400060d1558015610d28576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050505050565b610fa1611670565b60d35460ff161515600114610fc957604051631eb49d6d60e11b815260040160405180910390fd5b60d154851015610fec5760405163162908e360e11b815260040160405180910390fd5b6007841080610ffc575061016d84115b1561101a576040516318f4d05960e31b815260040160405180910390fd5b6001600160a01b0382161580159061104b57506001600160a01b038216600090815260d4602052604090205460ff16155b156110695760405163014cb61f60e51b815260040160405180910390fd5b82158061107857506127108310155b1561109657604051631c97324360e21b815260040160405180910390fd5b60006110a1826116c9565b60cd549091506001600160a01b0380831691161480156110ca575081516001600160a01b031633145b6111165760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c6973746564000000000000000000604482015260640161075b565b6001600160a01b038316611230578534146111445760405163162908e360e11b815260040160405180910390fd5b60cc546040513060248201526000916001600160a01b031690349060440160408051601f198184030181529181526020820180516001600160e01b031663a1903eab60e01b179052516111979190612087565b60006040518083038185875af1925050503d80600081146111d4576040519150601f19603f3d011682016040523d82523d6000602084013e6111d9565b606091505b505090508061122a5760405162461bcd60e51b815260206004820152601760248201527f6c69646f20657468206465706f736974206661696c6564000000000000000000604482015260640161075b565b506112a9565b6040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038416906323b872dd906064016020604051808303816000875af1158015611283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a7919061202d565b505b60d080549060006112b983612060565b909155505060d25460d054600090815260d5602090815260409182902092909255805160a08101825233815260cb549151631920845160e01b8152600481018a905290928301916001600160a01b0316906319208451906024016020604051808303816000875af1158015611332573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113569190611fe5565b815260cb54604051631920845160e01b8152600481018a90526020909201916001600160a01b03909116906319208451906024016020604051808303816000875af11580156113a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cd9190611fe5565b81526020808201879052604091820188905260d08054600090815260d78352839020845181546001600160a01b0319166001600160a01b039182161782558584015160018301558585015160028301556060808701516003840155608096870151600490930192909255915484519081529283018990529282018a90529181018890529085169181019190915233907fd2d20e69c4772a959fae177f20d86f2d40cd940cf11e356d0306670ea7df42279060a00160405180910390a250610d286001609955565b6067546001600160a01b03163314610b765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075b565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606003805461154f906120a3565b80601f016020809104026020016040519081016040528092919081815260200182805461157b906120a3565b80156115c85780601f1061159d576101008083540402835291602001916115c8565b820191906000526020600020905b8154815290600101906020018083116115ab57829003601f168201915b5050505050905090565b60606004805461154f906120a3565b600054610100900460ff166116085760405162461bcd60e51b815260040161075b906120dd565b610b766116f3565b600054610100900460ff166116375760405162461bcd60e51b815260040161075b906120dd565b610b76611723565b600054610100900460ff166116665760405162461bcd60e51b815260040161075b906120dd565b610ab6828261174a565b6002609954036116c25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161075b565b6002609955565b6000806116d583611799565b90506116e581846040015161181d565b9392505050565b6001609955565b600054610100900460ff1661171a5760405162461bcd60e51b815260040161075b906120dd565b610b76336114ee565b600054610100900460ff166116ec5760405162461bcd60e51b815260040161075b906120dd565b600054610100900460ff166117715760405162461bcd60e51b815260040161075b906120dd565b600361177d8382612176565b50600461178a8282612176565b50506000600181905560025550565b60006118177f76bb474a7a9de6f07f692a2e39e53c610f28bd5be9be96837a6a274de347167083600001518460200151805190602001206040516020016117fc939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120611841565b92915050565b600080600061182c858561186e565b91509150611839816118b3565b509392505050565b600061181761184e6119fd565b8360405161190160f01b8152600281019290925260228201526042902090565b60008082516041036118a45760208301516040840151606085015160001a61189887828585611a0c565b945094505050506118ac565b506000905060025b9250929050565b60008160048111156118c7576118c7612236565b036118cf5750565b60018160048111156118e3576118e3612236565b036119305760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161075b565b600281600481111561194457611944612236565b036119915760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161075b565b60038160048111156119a5576119a5612236565b03610da55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161075b565b6000611a07611ad0565b905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611a435750600090506003611ac7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611a97573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ac057600060019250925050611ac7565b9150600090505b94509492505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611afb611b44565b611b03611b9d565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080611b4f611540565b805190915015611b66578051602090910120919050565b6001548015611b755792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611ba86115d2565b805190915015611bbf578051602090910120919050565b6002548015611b755792915050565b600060208284031215611be057600080fd5b5035919050565b80356001600160a01b0381168114611bfe57600080fd5b919050565b600060208284031215611c1557600080fd5b6116e582611be7565b60008060408385031215611c3157600080fd5b611c3a83611be7565b946020939093013593505050565b8015158114610da557600080fd5b600060208284031215611c6857600080fd5b81356116e581611c48565b60005b83811015611c8e578181015183820152602001611c76565b50506000910152565b60008151808452611caf816020860160208601611c73565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e081840152611ce360e084018a611c97565b8381036040850152611cf5818a611c97565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611d4757835183529284019291840191600101611d2b565b50909c9b505050505050505050505050565b600080600060408486031215611d6e57600080fd5b833567ffffffffffffffff80821115611d8657600080fd5b818601915086601f830112611d9a57600080fd5b813581811115611da957600080fd5b8760208260051b8501011115611dbe57600080fd5b60209283019550935050840135611dd481611c48565b809150509250925092565b60008060008060808587031215611df557600080fd5b611dfe85611be7565b9350611e0c60208601611be7565b9250611e1a60408601611be7565b9150611e2860608601611be7565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611e6c57611e6c611e33565b60405290565b600067ffffffffffffffff80841115611e8d57611e8d611e33565b604051601f8501601f19908116603f01168101908282118183101715611eb557611eb5611e33565b81604052809350858152868686011115611ece57600080fd5b858560208301376000602087830101525050509392505050565b600080600080600060a08688031215611f0057600080fd5b853594506020860135935060408601359250611f1e60608701611be7565b9150608086013567ffffffffffffffff80821115611f3b57600080fd5b908701906060828a031215611f4f57600080fd5b611f57611e49565b611f6083611be7565b8152602083013582811115611f7457600080fd5b8301601f81018b13611f8557600080fd5b611f948b823560208401611e72565b602083015250604083013582811115611fac57600080fd5b80840193505089601f840112611fc157600080fd5b611fd08a843560208601611e72565b60408201528093505050509295509295909350565b600060208284031215611ff757600080fd5b5051919050565b602080825260159082015274416464726573732063616e2774206265207a65726f60581b604082015260600190565b60006020828403121561203f57600080fd5b81516116e581611c48565b634e487b7160e01b600052603260045260246000fd5b60006001820161208057634e487b7160e01b600052601160045260246000fd5b5060010190565b60008251612099818460208701611c73565b9190910192915050565b600181811c908216806120b757607f821691505b6020821081036120d757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f82111561085e57600081815260208120601f850160051c8101602086101561214f5750805b601f850160051c820191505b8181101561216e5782815560010161215b565b505050505050565b815167ffffffffffffffff81111561219057612190611e33565b6121a48161219e84546120a3565b84612128565b602080601f8311600181146121d957600084156121c15750858301515b600019600386901b1c1916600185901b17855561216e565b600085815260208120601f198616915b82811015612208578886015182559484019460019091019084016121e9565b50858210156122265787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c72bbf83733b4c332f188a9af911d4824cdad8400a487d06a9339e0179302ad464736f6c63430008120033

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

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.