ETH Price: $3,701.07 (-1.69%)

Contract

0x0Bf7616889d0ae18382d9715eAc00a3302e9aB92

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw All BNB1291282662024-12-10 18:28:2915 hrs ago1733855309IN
0x0Bf76168...302e9aB92
0 ETH0.0000013974670.0010026
Withdraw All BNB1285197762024-11-26 16:25:2914 days ago1732638329IN
0x0Bf76168...302e9aB92
0 ETH0.0000029693780.00100046
Withdraw All BNB1283565452024-11-22 21:44:2718 days ago1732311867IN
0x0Bf76168...302e9aB92
0 ETH0.0000007628050.0010006
Withdraw All BNB1282997312024-11-21 14:10:3919 days ago1732198239IN
0x0Bf76168...302e9aB92
0 ETH0.0000009491390.00100977
Withdraw All BNB1280467002024-11-15 17:36:1725 days ago1731692177IN
0x0Bf76168...302e9aB92
0 ETH0.0000008144790.0010009
Withdraw All BNB1280429932024-11-15 15:32:4325 days ago1731684763IN
0x0Bf76168...302e9aB92
0 ETH0.000001200770.001001
Withdraw All BNB1272970962024-10-29 9:09:2943 days ago1730192969IN
0x0Bf76168...302e9aB92
0 ETH0.0000005896840.001004
Approve1269879422024-10-22 5:24:2150 days ago1729574661IN
0x0Bf76168...302e9aB92
0 ETH0.0000000656950.0010262
Approve1269871502024-10-22 4:57:5750 days ago1729573077IN
0x0Bf76168...302e9aB92
0 ETH0.0000000933380.0010256
Withdraw All BNB1268942422024-10-20 1:21:0152 days ago1729387261IN
0x0Bf76168...302e9aB92
0 ETH0.0000005358260.0010042
Withdraw All BNB1267763162024-10-17 7:50:0955 days ago1729151409IN
0x0Bf76168...302e9aB92
0 ETH0.0000011143190.00167597
Approve1237201522024-08-07 13:58:01125 days ago1723039081IN
0x0Bf76168...302e9aB92
0 ETH0.0000001114970.0016022
Withdraw All BNB1224545212024-07-09 6:50:19155 days ago1720507819IN
0x0Bf76168...302e9aB92
0 ETH0.000049083980.0618042
Withdraw All BNB1216306182024-06-20 5:06:53174 days ago1718860013IN
0x0Bf76168...302e9aB92
0 ETH0.0000480643480.06129053
Approve1216243792024-06-20 1:38:55174 days ago1718847535IN
0x0Bf76168...302e9aB92
0 ETH0.0000030795010.06596114
Withdraw All BNB1216224792024-06-20 0:35:35174 days ago1718843735IN
0x0Bf76168...302e9aB92
0 ETH0.0000483960280.06171404
Withdraw All BNB1206649592024-05-28 20:38:15196 days ago1716928695IN
0x0Bf76168...302e9aB92
0 ETH0.0000474077070.06098728
Withdraw All BNB1201797902024-05-17 15:05:57207 days ago1715958357IN
0x0Bf76168...302e9aB92
0 ETH0.0000046879980.0059946
Withdraw All BNB1179296322024-03-26 13:00:41259 days ago1711458041IN
0x0Bf76168...302e9aB92
0 ETH0.0000228766860.03038585
Withdraw All BNB1173643222024-03-13 10:57:01272 days ago1710327421IN
0x0Bf76168...302e9aB92
0 ETH0.0000926335950.00100025
Withdraw All BNB1171463082024-03-08 9:49:53278 days ago1709891393IN
0x0Bf76168...302e9aB92
0 ETH0.00006620810.0019088
Withdraw All BNB1170594312024-03-06 9:33:59280 days ago1709717639IN
0x0Bf76168...302e9aB92
0 ETH0.0000904419160.00115866
Approve1168259082024-02-29 23:49:53285 days ago1709250593IN
0x0Bf76168...302e9aB92
0 ETH0.0001075227610.00673646
Withdraw All BNB1168165332024-02-29 18:37:23285 days ago1709231843IN
0x0Bf76168...302e9aB92
0 ETH0.0001804609950.10293073
Withdraw All BNB1167143882024-02-27 9:52:33288 days ago1709027553IN
0x0Bf76168...302e9aB92
0 ETH0.0000482222750.0070732
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1291282662024-12-10 18:28:2915 hrs ago1733855309
0x0Bf76168...302e9aB92
0.006032595951905 ETH
1291282662024-12-10 18:28:2915 hrs ago1733855309
0x0Bf76168...302e9aB92
0.006032595951905 ETH
1285197762024-11-26 16:25:2914 days ago1732638329
0x0Bf76168...302e9aB92
0.005096975143065 ETH
1285197762024-11-26 16:25:2914 days ago1732638329
0x0Bf76168...302e9aB92
0.005096975143065 ETH
1283565452024-11-22 21:44:2718 days ago1732311867
0x0Bf76168...302e9aB92
0.001034149472231 ETH
1283565452024-11-22 21:44:2718 days ago1732311867
0x0Bf76168...302e9aB92
0.001034149472231 ETH
1282997312024-11-21 14:10:3919 days ago1732198239
0x0Bf76168...302e9aB92
0.081956988021483 ETH
1282997312024-11-21 14:10:3919 days ago1732198239
0x0Bf76168...302e9aB92
0.081956988021483 ETH
1280467002024-11-15 17:36:1725 days ago1731692177
0x0Bf76168...302e9aB92
0.007250806936578 ETH
1280467002024-11-15 17:36:1725 days ago1731692177
0x0Bf76168...302e9aB92
0.007250806936578 ETH
1280429932024-11-15 15:32:4325 days ago1731684763
0x0Bf76168...302e9aB92
0.002054365583486 ETH
1280429932024-11-15 15:32:4325 days ago1731684763
0x0Bf76168...302e9aB92
0.002054365583486 ETH
1272970962024-10-29 9:09:2943 days ago1730192969
0x0Bf76168...302e9aB92
4.53711910000575 ETH
1272970962024-10-29 9:09:2943 days ago1730192969
0x0Bf76168...302e9aB92
4.53711910000575 ETH
1269871562024-10-22 4:58:0950 days ago1729573089
0x0Bf76168...302e9aB92
0.000633957674182 ETH
1269871562024-10-22 4:58:0950 days ago1729573089
0x0Bf76168...302e9aB92
0.000633957674182 ETH
1268942422024-10-20 1:21:0152 days ago1729387261
0x0Bf76168...302e9aB92
0.000816140918828 ETH
1268942422024-10-20 1:21:0152 days ago1729387261
0x0Bf76168...302e9aB92
0.000816140918828 ETH
1267763162024-10-17 7:50:0955 days ago1729151409
0x0Bf76168...302e9aB92
0.001262898363343 ETH
1267763162024-10-17 7:50:0955 days ago1729151409
0x0Bf76168...302e9aB92
0.001262898363343 ETH
1224545212024-07-09 6:50:19155 days ago1720507819
0x0Bf76168...302e9aB92
0.01013714134721 ETH
1224545212024-07-09 6:50:19155 days ago1720507819
0x0Bf76168...302e9aB92
0.01013714134721 ETH
1216306182024-06-20 5:06:53174 days ago1718860013
0x0Bf76168...302e9aB92
0.001480454016722 ETH
1216306182024-06-20 5:06:53174 days ago1718860013
0x0Bf76168...302e9aB92
0.001480454016722 ETH
1216243922024-06-20 1:39:21174 days ago1718847561
0x0Bf76168...302e9aB92
0.001078679245476 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeefyVaultV7Native

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : BeefyVaultV7Native.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import "../interfaces/beefy/IStrategyV7.sol";
import "../interfaces/common/IWrappedNative.sol";

/**
 * @dev Implementation of a vault to deposit funds for yield optimizing.
 * This is the contract that receives funds and that users interface with.
 * The yield optimizing strategy itself is implemented in a separate 'Strategy.sol' contract.
 */
contract BeefyVaultV7Native is ERC20Upgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    struct StratCandidate {
        address implementation;
        uint proposedTime;
    }

    // The last proposed strategy to switch to.
    StratCandidate public stratCandidate;
    // The strategy currently in use by the vault.
    IStrategyV7 public strategy;
    // The minimum time it has to pass before a strat candidate can be approved.
    uint256 public approvalDelay;

    event NewStratCandidate(address implementation);
    event UpgradeStrat(address implementation);

    /**
     * @dev Sets the value of {token} to the token that the vault will
     * hold as underlying value. It initializes the vault's own 'moo' token.
     * This token is minted when someone does a deposit. It is burned in order
     * to withdraw the corresponding portion of the underlying assets.
     * @param _strategy the address of the strategy.
     * @param _name the name of the vault token.
     * @param _symbol the symbol of the vault token.
     * @param _approvalDelay the delay before a new strat can be approved.
     */
    function initialize(
        IStrategyV7 _strategy,
        string memory _name,
        string memory _symbol,
        uint256 _approvalDelay
    ) public initializer {
        __ERC20_init(_name, _symbol);
        __Ownable_init();
        __ReentrancyGuard_init();
        strategy = _strategy;
        approvalDelay = _approvalDelay;
    }

    function want() public view returns (IERC20Upgradeable) {
        return IERC20Upgradeable(strategy.want());
    }

    /**
     * @dev It calculates the total underlying value of {token} held by the system.
     * It takes into account the vault contract balance, the strategy contract balance
     *  and the balance deployed in other contracts as part of the strategy.
     */
    function balance() public view returns (uint) {
        return want().balanceOf(address(this)) + IStrategyV7(strategy).balanceOf();
    }

    /**
     * @dev Custom logic in here for how much the vault allows to be borrowed.
     * We return 100% of tokens for now. Under certain conditions we might
     * want to keep some of the system funds at hand in the vault, instead
     * of putting them to work.
     */
    function available() public view returns (uint256) {
        return want().balanceOf(address(this));
    }

    /**
     * @dev Function for various UIs to display the current value of one of our yield tokens.
     * Returns an uint256 with 18 decimals of how much underlying asset one vault share represents.
     */
    function getPricePerFullShare() public view returns (uint256) {
        return totalSupply() == 0 ? 1e18 : balance() * 1e18 / totalSupply();
    }

    /**
     * @dev A helper function to call deposit() with all the sender's funds.
     */
    function depositAll() external {
        deposit(want().balanceOf(msg.sender));
    }

    /**
     * @dev The entrypoint of funds into the system. People deposit with this function
     * into the vault. The vault is then in charge of sending funds into the strategy.
     */
    function deposit(uint _amount) public nonReentrant {
        strategy.beforeDeposit();

        uint256 _pool = balance();
        want().safeTransferFrom(msg.sender, address(this), _amount);
        earn();
        uint256 _after = balance();
        _amount = _after - _pool; // Additional check for deflationary tokens
        uint256 shares = 0;
        if (totalSupply() == 0) {
            shares = _amount;
        } else {
            shares = (_amount * totalSupply()) / _pool;
        }
        _mint(msg.sender, shares);
    }

    /**
     * @dev Alternative entry point into the strat. You can send native,
     * and the vault will wrap them before sending them into the strat.
     */
    function depositBNB() public payable nonReentrant {
        strategy.beforeDeposit();

        uint256 _pool = balance();
        uint256 _amount = msg.value;
        IWrappedNative(address(want())).deposit{value: _amount}();
        earn();
        uint256 _after = balance();
        _amount = _after - _pool; // Additional check for deflationary tokens
        uint256 shares = 0;
        if (totalSupply() == 0) {
            shares = _amount;
        } else {
            shares = (_amount * totalSupply()) / _pool;
        }
        _mint(msg.sender, shares);
    }

    /**
     * @dev Function to send funds into the strategy and put them to work. It's primarily called
     * by the vault's deposit() function.
     */
    function earn() public {
        uint _bal = available();
        want().safeTransfer(address(strategy), _bal);
        strategy.deposit();
    }

    /**
     * @dev A helper function to call withdraw() with all the sender's funds.
     */
    function withdrawAll() external {
        withdraw(balanceOf(msg.sender));
    }

    /**
     * @dev Alternative helper function to withdraw all funds in native form.
     */
    function withdrawAllBNB() external {
        withdrawBNB(balanceOf(msg.sender));
    }

    /**
     * @dev Function to exit the system. The vault will withdraw the required tokens
     * from the strategy and pay up the token holder. A proportional number of IOU
     * tokens are burned in the process.
     */
    function withdraw(uint256 _shares) public {
        uint256 r = (balance() * _shares) / totalSupply();
        _burn(msg.sender, _shares);

        uint b = want().balanceOf(address(this));
        if (b < r) {
            uint _withdraw = r - b;
            strategy.withdraw(_withdraw);
            uint _after = want().balanceOf(address(this));
            uint _diff = _after - b;
            if (_diff < _withdraw) {
                r = b + _diff;
            }
        }

        want().safeTransfer(msg.sender, r);
    }

    /**
     * @dev Alternative function to exit the system. Works just like 'withdraw(uint256)',
     * but the funds arrive in native.
     */
    function withdrawBNB(uint256 _shares) public {
        uint256 r = balance() * _shares / totalSupply();
        _burn(msg.sender, _shares);

        uint b = want().balanceOf(address(this));
        if (b < r) {
            uint _withdraw = r - b;
            strategy.withdraw(_withdraw);
            uint _after = want().balanceOf(address(this));
            uint _diff = _after - b;
            if (_diff < _withdraw) {
                r = b + _diff;
            }
        }

        IWrappedNative(address(want())).withdraw(r);
        payable(msg.sender).transfer(r);
    }

    /** 
     * @dev Sets the candidate for the new strat to use with this vault.
     * @param _implementation The address of the candidate strategy.  
     */
    function proposeStrat(address _implementation) public onlyOwner {
        require(address(this) == IStrategyV7(_implementation).vault(), "Proposal not valid for this Vault");
        require(want() == IStrategyV7(_implementation).want(), "Different want");
        stratCandidate = StratCandidate({
            implementation: _implementation,
            proposedTime: block.timestamp
         });

        emit NewStratCandidate(_implementation);
    }

    /** 
     * @dev It switches the active strat for the strat candidate. After upgrading, the 
     * candidate implementation is set to the 0x00 address, and proposedTime to a time 
     * happening in +100 years for safety. 
     */

    function upgradeStrat() public onlyOwner {
        require(stratCandidate.implementation != address(0), "There is no candidate");
        require(stratCandidate.proposedTime + approvalDelay < block.timestamp, "Delay has not passed");

        emit UpgradeStrat(stratCandidate.implementation);

        strategy.retireStrat();
        strategy = IStrategyV7(stratCandidate.implementation);
        stratCandidate.implementation = address(0);
        stratCandidate.proposedTime = 5000000000;

        earn();
    }

    /**
     * @dev Rescues random funds stuck that the strat can't handle.
     * @param _token address of the token to rescue.
     */
    function inCaseTokensGetStuck(address _token) external onlyOwner {
        require(_token != address(want()), "!token");

        uint256 amount = IERC20Upgradeable(_token).balanceOf(address(this));
        IERC20Upgradeable(_token).safeTransfer(msg.sender, amount);
    }

    receive () external payable {}
}

File 2 of 13 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 13 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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]
 * ```
 * 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. Equivalent to `reinitializer(1)`.
     */
    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.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so 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.
     *
     * 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.
     */
    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.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 4 of 13 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_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 5 of 13 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20Upgradeable.sol";
import "./extensions/IERC20MetadataUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

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

File 6 of 13 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 13 : IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 8 of 13 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 9 of 13 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 13 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 13 : 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 12 of 13 : IStrategyV7.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

interface IStrategyV7 {
    function vault() external view returns (address);
    function want() external view returns (IERC20Upgradeable);
    function beforeDeposit() external;
    function deposit() external;
    function withdraw(uint256) external;
    function balanceOf() external view returns (uint256);
    function balanceOfWant() external view returns (uint256);
    function balanceOfPool() external view returns (uint256);
    function harvest() external;
    function retireStrat() external;
    function panic() external;
    function pause() external;
    function unpause() external;
    function paused() external view returns (bool);
    function unirouter() external view returns (address);
}

File 13 of 13 : IWrappedNative.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface IWrappedNative {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"NewStratCandidate","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"UpgradeStrat","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositBNB","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStrategyV7","name":"_strategy","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_approvalDelay","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"name":"proposeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stratCandidate","outputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"proposedTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategyV7","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllBNB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdrawBNB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5061279e806100206000396000f3fe6080604052600436106101f25760003560e01c806376dfabb81161010d578063b69ef8a8116100a0578063de5f62681161006f578063de5f62681461056a578063def68a9c1461057f578063e2d1e75c1461059f578063e6685244146105b5578063f2fde38b146105ca57600080fd5b8063b69ef8a814610500578063b6b55f2514610515578063d389800f14610535578063dd62ed3e1461054a57600080fd5b806395d89b41116100dc57806395d89b411461048b578063a457c2d7146104a0578063a8c62e76146104c0578063a9059cbb146104e057600080fd5b806376dfabb81461040057806377c7b8fc14610443578063853828b6146104585780638da5cb5b1461046d57600080fd5b806339509351116101855780635af3adf9116101545780635af3adf9146103805780635b12ff9b1461039557806370a08231146103b5578063715018a6146103eb57600080fd5b8063395093511461032357806342220f341461034357806348a0d7541461034b5780634d12d4b61461036057600080fd5b80631f1fcd51116101c15780631f1fcd511461029a57806323b872dd146102c75780632e1a7d4d146102e7578063313ce5671461030757600080fd5b806306fdde03146101fe578063095ea7b314610229578063127f4b2e1461025957806318160ddd1461027b57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b506102136105ea565b6040516102209190612296565b60405180910390f35b34801561023557600080fd5b506102496102443660046122de565b61067c565b6040519015158152602001610220565b34801561026557600080fd5b5061027961027436600461230a565b610694565b005b34801561028757600080fd5b506035545b604051908152602001610220565b3480156102a657600080fd5b506102af6108e8565b6040516001600160a01b039091168152602001610220565b3480156102d357600080fd5b506102496102e2366004612323565b61095b565b3480156102f357600080fd5b5061027961030236600461230a565b610981565b34801561031357600080fd5b5060405160128152602001610220565b34801561032f57600080fd5b5061024961033e3660046122de565b610b5d565b610279610b7f565b34801561035757600080fd5b5061028c610d10565b34801561036c57600080fd5b5061027961037b366004612407565b610d84565b34801561038c57600080fd5b50610279610ecb565b3480156103a157600080fd5b506102796103b0366004612485565b610ee6565b3480156103c157600080fd5b5061028c6103d0366004612485565b6001600160a01b031660009081526033602052604090205490565b3480156103f757600080fd5b506102796110db565b34801561040c57600080fd5b5060c95460ca54610424916001600160a01b03169082565b604080516001600160a01b039093168352602083019190915201610220565b34801561044f57600080fd5b5061028c6110ed565b34801561046457600080fd5b50610279611131565b34801561047957600080fd5b506065546001600160a01b03166102af565b34801561049757600080fd5b5061021361114a565b3480156104ac57600080fd5b506102496104bb3660046122de565b611159565b3480156104cc57600080fd5b5060cb546102af906001600160a01b031681565b3480156104ec57600080fd5b506102496104fb3660046122de565b6111df565b34801561050c57600080fd5b5061028c6111ed565b34801561052157600080fd5b5061027961053036600461230a565b6112d7565b34801561054157600080fd5b50610279611404565b34801561055657600080fd5b5061028c6105653660046124a2565b61148e565b34801561057657600080fd5b506102796114b9565b34801561058b57600080fd5b5061027961059a366004612485565b61152e565b3480156105ab57600080fd5b5061028c60cc5481565b3480156105c157600080fd5b5061027961160c565b3480156105d657600080fd5b506102796105e5366004612485565b611797565b6060603680546105f9906124db565b80601f0160208091040260200160405190810160405280929190818152602001828054610625906124db565b80156106725780601f1061064757610100808354040283529160200191610672565b820191906000526020600020905b81548152906001019060200180831161065557829003601f168201915b5050505050905090565b60003361068a818585611810565b5060019392505050565b600061069f60355490565b826106a86111ed565b6106b2919061252b565b6106bc919061254a565b90506106c83383611934565b60006106d26108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610718573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073c919061256c565b90508181101561084e5760006107528284612585565b60cb54604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561079957600080fd5b505af11580156107ad573d6000803e3d6000fd5b5050505060006107bb6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610801573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610825919061256c565b905060006108338483612585565b90508281101561084a57610847818561259c565b94505b5050505b6108566108e8565b6001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040161088391815260200190565b600060405180830381600087803b15801561089d57600080fd5b505af11580156108b1573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156108e2573d6000803e3d6000fd5b50505050565b60cb5460408051631f1fcd5160e01b815290516000926001600160a01b031691631f1fcd519160048083019260209291908290030181865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095691906125b4565b905090565b600033610969858285611a82565b610974858585611af6565b60019150505b9392505050565b600061098c60355490565b826109956111ed565b61099f919061252b565b6109a9919061254a565b90506109b53383611934565b60006109bf6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a29919061256c565b905081811015610b3b576000610a3f8284612585565b60cb54604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610a8657600080fd5b505af1158015610a9a573d6000803e3d6000fd5b505050506000610aa86108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610aee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061256c565b90506000610b208483612585565b905082811015610b3757610b34818561259c565b94505b5050505b610b583383610b486108e8565b6001600160a01b03169190611cc4565b505050565b60003361068a818585610b70838361148e565b610b7a919061259c565b611810565b600260975403610bd65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260975560cb5460408051632b9ff78560e11b815290516001600160a01b039092169163573fef0a9160048082019260009290919082900301818387803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050506000610c436111ed565b905034610c4e6108e8565b6001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b5050505050610ca9611404565b6000610cb36111ed565b9050610cbf8382612585565b91506000610ccc60355490565b600003610cda575081610cfb565b83610ce460355490565b610cee908561252b565b610cf8919061254a565b90505b610d053382611d27565b505060016097555050565b6000610d1a6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610956919061256c565b600054610100900460ff1615808015610da45750600054600160ff909116105b80610dbe5750303b158015610dbe575060005460ff166001145b610e215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610bcd565b6000805460ff191660011790558015610e44576000805461ff0019166101001790555b610e4e8484611e06565b610e56611e37565b610e5e611e66565b60cb80546001600160a01b0319166001600160a01b03871617905560cc8290558015610ec4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b33600090815260336020526040902054610ee490610694565b565b610eee611e95565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5091906125b4565b6001600160a01b0316306001600160a01b031614610fba5760405162461bcd60e51b815260206004820152602160248201527f50726f706f73616c206e6f742076616c696420666f722074686973205661756c6044820152601d60fa1b6064820152608401610bcd565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101c91906125b4565b6001600160a01b031661102d6108e8565b6001600160a01b0316146110745760405162461bcd60e51b815260206004820152600e60248201526d111a5999995c995b9d081dd85b9d60921b6044820152606401610bcd565b6040805180820182526001600160a01b03831680825242602092830181905260c980546001600160a01b0319168317905560ca5591519182527f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df910160405180910390a150565b6110e3611e95565b610ee46000611eef565b60006110f860355490565b15611124576035546111086111ed565b61111a90670de0b6b3a764000061252b565b610956919061254a565b50670de0b6b3a764000090565b33600090815260336020526040902054610ee490610981565b6060603780546105f9906124db565b60003381611167828661148e565b9050838110156111c75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610bcd565b6111d48286868403611810565b506001949350505050565b60003361068a818585611af6565b60cb546040805163722713f760e01b815290516000926001600160a01b03169163722713f79160048083019260209291908290030181865afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b919061256c565b6112636108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156112a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cd919061256c565b610956919061259c565b6002609754036113295760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bcd565b600260975560cb5460408051632b9ff78560e11b815290516001600160a01b039092169163573fef0a9160048082019260009290919082900301818387803b15801561137457600080fd5b505af1158015611388573d6000803e3d6000fd5b5050505060006113966111ed565b90506113b73330846113a66108e8565b6001600160a01b0316929190611f41565b6113bf611404565b60006113c96111ed565b90506113d58282612585565b925060006113e260355490565b6000036113f0575082610cfb565b826113fa60355490565b610cee908661252b565b600061140e610d10565b60cb5490915061142a906001600160a01b031682610b486108e8565b60cb60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561147a57600080fd5b505af1158015610ec4573d6000803e3d6000fd5b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610ee46114c46108e8565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa15801561150a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610530919061256c565b611536611e95565b61153e6108e8565b6001600160a01b0316816001600160a01b0316036115875760405162461bcd60e51b815260206004820152600660248201526510ba37b5b2b760d11b6044820152606401610bcd565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156115ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f2919061256c565b90506116086001600160a01b0383163383611cc4565b5050565b611614611e95565b60c9546001600160a01b03166116645760405162461bcd60e51b81526020600482015260156024820152745468657265206973206e6f2063616e64696461746560581b6044820152606401610bcd565b60cc5460ca5442916116759161259c565b106116b95760405162461bcd60e51b815260206004820152601460248201527311195b185e481a185cc81b9bdd081c185cdcd95960621b6044820152606401610bcd565b60c9546040516001600160a01b0390911681527f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c9060200160405180910390a160cb60009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561174957600080fd5b505af115801561175d573d6000803e3d6000fd5b505060c9805460cb80546001600160a01b03199081166001600160a01b03841617909155169055505064012a05f20060ca55610ee4611404565b61179f611e95565b6001600160a01b0381166118045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bcd565b61180d81611eef565b50565b6001600160a01b0383166118725760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610bcd565b6001600160a01b0382166118d35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610bcd565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0382166119945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610bcd565b6001600160a01b03821660009081526033602052604090205481811015611a085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610bcd565b6001600160a01b0383166000908152603360205260408120838303905560358054849290611a37908490612585565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611a8e848461148e565b905060001981146108e25781811015611ae95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610bcd565b6108e28484848403611810565b6001600160a01b038316611b5a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610bcd565b6001600160a01b038216611bbc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610bcd565b6001600160a01b03831660009081526033602052604090205481811015611c345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610bcd565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611c6b90849061259c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611cb791815260200190565b60405180910390a36108e2565b6040516001600160a01b038316602482015260448101829052610b5890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611f79565b6001600160a01b038216611d7d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610bcd565b8060356000828254611d8f919061259c565b90915550506001600160a01b03821660009081526033602052604081208054839290611dbc90849061259c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff16611e2d5760405162461bcd60e51b8152600401610bcd906125d1565b611608828261204b565b600054610100900460ff16611e5e5760405162461bcd60e51b8152600401610bcd906125d1565b610ee461208b565b600054610100900460ff16611e8d5760405162461bcd60e51b8152600401610bcd906125d1565b610ee46120bb565b6065546001600160a01b03163314610ee45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bcd565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526108e29085906323b872dd60e01b90608401611cf0565b6000611fce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120e99092919063ffffffff16565b805190915015610b585780806020019051810190611fec919061261c565b610b585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610bcd565b600054610100900460ff166120725760405162461bcd60e51b8152600401610bcd906125d1565b603661207e838261268c565b506037610b58828261268c565b600054610100900460ff166120b25760405162461bcd60e51b8152600401610bcd906125d1565b610ee433611eef565b600054610100900460ff166120e25760405162461bcd60e51b8152600401610bcd906125d1565b6001609755565b60606120f88484600085612100565b949350505050565b6060824710156121615760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610bcd565b6001600160a01b0385163b6121b85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bcd565b600080866001600160a01b031685876040516121d4919061274c565b60006040518083038185875af1925050503d8060008114612211576040519150601f19603f3d011682016040523d82523d6000602084013e612216565b606091505b5091509150612226828286612231565b979650505050505050565b6060831561224057508161097a565b8251156122505782518084602001fd5b8160405162461bcd60e51b8152600401610bcd9190612296565b60005b8381101561228557818101518382015260200161226d565b838111156108e25750506000910152565b60208152600082518060208401526122b581604085016020870161226a565b601f01601f19169190910160400192915050565b6001600160a01b038116811461180d57600080fd5b600080604083850312156122f157600080fd5b82356122fc816122c9565b946020939093013593505050565b60006020828403121561231c57600080fd5b5035919050565b60008060006060848603121561233857600080fd5b8335612343816122c9565b92506020840135612353816122c9565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261238b57600080fd5b813567ffffffffffffffff808211156123a6576123a6612364565b604051601f8301601f19908116603f011681019082821181831017156123ce576123ce612364565b816040528381528660208588010111156123e757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561241d57600080fd5b8435612428816122c9565b9350602085013567ffffffffffffffff8082111561244557600080fd5b6124518883890161237a565b9450604087013591508082111561246757600080fd5b506124748782880161237a565b949793965093946060013593505050565b60006020828403121561249757600080fd5b813561097a816122c9565b600080604083850312156124b557600080fd5b82356124c0816122c9565b915060208301356124d0816122c9565b809150509250929050565b600181811c908216806124ef57607f821691505b60208210810361250f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561254557612545612515565b500290565b60008261256757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561257e57600080fd5b5051919050565b60008282101561259757612597612515565b500390565b600082198211156125af576125af612515565b500190565b6000602082840312156125c657600080fd5b815161097a816122c9565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561262e57600080fd5b8151801515811461097a57600080fd5b601f821115610b5857600081815260208120601f850160051c810160208610156126655750805b601f850160051c820191505b8181101561268457828155600101612671565b505050505050565b815167ffffffffffffffff8111156126a6576126a6612364565b6126ba816126b484546124db565b8461263e565b602080601f8311600181146126ef57600084156126d75750858301515b600019600386901b1c1916600185901b178555612684565b600085815260208120601f198616915b8281101561271e578886015182559484019460019091019084016126ff565b508582101561273c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825161275e81846020870161226a565b919091019291505056fea2646970667358221220cab04d927038f9eda1b3f7dce1856a31cda55e8ace9a46f58e939fa0e6b1ba5164736f6c634300080f0033

Deployed Bytecode

0x6080604052600436106101f25760003560e01c806376dfabb81161010d578063b69ef8a8116100a0578063de5f62681161006f578063de5f62681461056a578063def68a9c1461057f578063e2d1e75c1461059f578063e6685244146105b5578063f2fde38b146105ca57600080fd5b8063b69ef8a814610500578063b6b55f2514610515578063d389800f14610535578063dd62ed3e1461054a57600080fd5b806395d89b41116100dc57806395d89b411461048b578063a457c2d7146104a0578063a8c62e76146104c0578063a9059cbb146104e057600080fd5b806376dfabb81461040057806377c7b8fc14610443578063853828b6146104585780638da5cb5b1461046d57600080fd5b806339509351116101855780635af3adf9116101545780635af3adf9146103805780635b12ff9b1461039557806370a08231146103b5578063715018a6146103eb57600080fd5b8063395093511461032357806342220f341461034357806348a0d7541461034b5780634d12d4b61461036057600080fd5b80631f1fcd51116101c15780631f1fcd511461029a57806323b872dd146102c75780632e1a7d4d146102e7578063313ce5671461030757600080fd5b806306fdde03146101fe578063095ea7b314610229578063127f4b2e1461025957806318160ddd1461027b57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b506102136105ea565b6040516102209190612296565b60405180910390f35b34801561023557600080fd5b506102496102443660046122de565b61067c565b6040519015158152602001610220565b34801561026557600080fd5b5061027961027436600461230a565b610694565b005b34801561028757600080fd5b506035545b604051908152602001610220565b3480156102a657600080fd5b506102af6108e8565b6040516001600160a01b039091168152602001610220565b3480156102d357600080fd5b506102496102e2366004612323565b61095b565b3480156102f357600080fd5b5061027961030236600461230a565b610981565b34801561031357600080fd5b5060405160128152602001610220565b34801561032f57600080fd5b5061024961033e3660046122de565b610b5d565b610279610b7f565b34801561035757600080fd5b5061028c610d10565b34801561036c57600080fd5b5061027961037b366004612407565b610d84565b34801561038c57600080fd5b50610279610ecb565b3480156103a157600080fd5b506102796103b0366004612485565b610ee6565b3480156103c157600080fd5b5061028c6103d0366004612485565b6001600160a01b031660009081526033602052604090205490565b3480156103f757600080fd5b506102796110db565b34801561040c57600080fd5b5060c95460ca54610424916001600160a01b03169082565b604080516001600160a01b039093168352602083019190915201610220565b34801561044f57600080fd5b5061028c6110ed565b34801561046457600080fd5b50610279611131565b34801561047957600080fd5b506065546001600160a01b03166102af565b34801561049757600080fd5b5061021361114a565b3480156104ac57600080fd5b506102496104bb3660046122de565b611159565b3480156104cc57600080fd5b5060cb546102af906001600160a01b031681565b3480156104ec57600080fd5b506102496104fb3660046122de565b6111df565b34801561050c57600080fd5b5061028c6111ed565b34801561052157600080fd5b5061027961053036600461230a565b6112d7565b34801561054157600080fd5b50610279611404565b34801561055657600080fd5b5061028c6105653660046124a2565b61148e565b34801561057657600080fd5b506102796114b9565b34801561058b57600080fd5b5061027961059a366004612485565b61152e565b3480156105ab57600080fd5b5061028c60cc5481565b3480156105c157600080fd5b5061027961160c565b3480156105d657600080fd5b506102796105e5366004612485565b611797565b6060603680546105f9906124db565b80601f0160208091040260200160405190810160405280929190818152602001828054610625906124db565b80156106725780601f1061064757610100808354040283529160200191610672565b820191906000526020600020905b81548152906001019060200180831161065557829003601f168201915b5050505050905090565b60003361068a818585611810565b5060019392505050565b600061069f60355490565b826106a86111ed565b6106b2919061252b565b6106bc919061254a565b90506106c83383611934565b60006106d26108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610718573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073c919061256c565b90508181101561084e5760006107528284612585565b60cb54604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561079957600080fd5b505af11580156107ad573d6000803e3d6000fd5b5050505060006107bb6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610801573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610825919061256c565b905060006108338483612585565b90508281101561084a57610847818561259c565b94505b5050505b6108566108e8565b6001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040161088391815260200190565b600060405180830381600087803b15801561089d57600080fd5b505af11580156108b1573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f193505050501580156108e2573d6000803e3d6000fd5b50505050565b60cb5460408051631f1fcd5160e01b815290516000926001600160a01b031691631f1fcd519160048083019260209291908290030181865afa158015610932573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095691906125b4565b905090565b600033610969858285611a82565b610974858585611af6565b60019150505b9392505050565b600061098c60355490565b826109956111ed565b61099f919061252b565b6109a9919061254a565b90506109b53383611934565b60006109bf6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a29919061256c565b905081811015610b3b576000610a3f8284612585565b60cb54604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610a8657600080fd5b505af1158015610a9a573d6000803e3d6000fd5b505050506000610aa86108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610aee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061256c565b90506000610b208483612585565b905082811015610b3757610b34818561259c565b94505b5050505b610b583383610b486108e8565b6001600160a01b03169190611cc4565b505050565b60003361068a818585610b70838361148e565b610b7a919061259c565b611810565b600260975403610bd65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260975560cb5460408051632b9ff78560e11b815290516001600160a01b039092169163573fef0a9160048082019260009290919082900301818387803b158015610c2157600080fd5b505af1158015610c35573d6000803e3d6000fd5b505050506000610c436111ed565b905034610c4e6108e8565b6001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b5050505050610ca9611404565b6000610cb36111ed565b9050610cbf8382612585565b91506000610ccc60355490565b600003610cda575081610cfb565b83610ce460355490565b610cee908561252b565b610cf8919061254a565b90505b610d053382611d27565b505060016097555050565b6000610d1a6108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610956919061256c565b600054610100900460ff1615808015610da45750600054600160ff909116105b80610dbe5750303b158015610dbe575060005460ff166001145b610e215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610bcd565b6000805460ff191660011790558015610e44576000805461ff0019166101001790555b610e4e8484611e06565b610e56611e37565b610e5e611e66565b60cb80546001600160a01b0319166001600160a01b03871617905560cc8290558015610ec4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b33600090815260336020526040902054610ee490610694565b565b610eee611e95565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5091906125b4565b6001600160a01b0316306001600160a01b031614610fba5760405162461bcd60e51b815260206004820152602160248201527f50726f706f73616c206e6f742076616c696420666f722074686973205661756c6044820152601d60fa1b6064820152608401610bcd565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101c91906125b4565b6001600160a01b031661102d6108e8565b6001600160a01b0316146110745760405162461bcd60e51b815260206004820152600e60248201526d111a5999995c995b9d081dd85b9d60921b6044820152606401610bcd565b6040805180820182526001600160a01b03831680825242602092830181905260c980546001600160a01b0319168317905560ca5591519182527f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df910160405180910390a150565b6110e3611e95565b610ee46000611eef565b60006110f860355490565b15611124576035546111086111ed565b61111a90670de0b6b3a764000061252b565b610956919061254a565b50670de0b6b3a764000090565b33600090815260336020526040902054610ee490610981565b6060603780546105f9906124db565b60003381611167828661148e565b9050838110156111c75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610bcd565b6111d48286868403611810565b506001949350505050565b60003361068a818585611af6565b60cb546040805163722713f760e01b815290516000926001600160a01b03169163722713f79160048083019260209291908290030181865afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b919061256c565b6112636108e8565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156112a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cd919061256c565b610956919061259c565b6002609754036113295760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bcd565b600260975560cb5460408051632b9ff78560e11b815290516001600160a01b039092169163573fef0a9160048082019260009290919082900301818387803b15801561137457600080fd5b505af1158015611388573d6000803e3d6000fd5b5050505060006113966111ed565b90506113b73330846113a66108e8565b6001600160a01b0316929190611f41565b6113bf611404565b60006113c96111ed565b90506113d58282612585565b925060006113e260355490565b6000036113f0575082610cfb565b826113fa60355490565b610cee908661252b565b600061140e610d10565b60cb5490915061142a906001600160a01b031682610b486108e8565b60cb60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561147a57600080fd5b505af1158015610ec4573d6000803e3d6000fd5b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610ee46114c46108e8565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa15801561150a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610530919061256c565b611536611e95565b61153e6108e8565b6001600160a01b0316816001600160a01b0316036115875760405162461bcd60e51b815260206004820152600660248201526510ba37b5b2b760d11b6044820152606401610bcd565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156115ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f2919061256c565b90506116086001600160a01b0383163383611cc4565b5050565b611614611e95565b60c9546001600160a01b03166116645760405162461bcd60e51b81526020600482015260156024820152745468657265206973206e6f2063616e64696461746560581b6044820152606401610bcd565b60cc5460ca5442916116759161259c565b106116b95760405162461bcd60e51b815260206004820152601460248201527311195b185e481a185cc81b9bdd081c185cdcd95960621b6044820152606401610bcd565b60c9546040516001600160a01b0390911681527f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c9060200160405180910390a160cb60009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561174957600080fd5b505af115801561175d573d6000803e3d6000fd5b505060c9805460cb80546001600160a01b03199081166001600160a01b03841617909155169055505064012a05f20060ca55610ee4611404565b61179f611e95565b6001600160a01b0381166118045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bcd565b61180d81611eef565b50565b6001600160a01b0383166118725760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610bcd565b6001600160a01b0382166118d35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610bcd565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0382166119945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610bcd565b6001600160a01b03821660009081526033602052604090205481811015611a085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610bcd565b6001600160a01b0383166000908152603360205260408120838303905560358054849290611a37908490612585565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611a8e848461148e565b905060001981146108e25781811015611ae95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610bcd565b6108e28484848403611810565b6001600160a01b038316611b5a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610bcd565b6001600160a01b038216611bbc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610bcd565b6001600160a01b03831660009081526033602052604090205481811015611c345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610bcd565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611c6b90849061259c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611cb791815260200190565b60405180910390a36108e2565b6040516001600160a01b038316602482015260448101829052610b5890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611f79565b6001600160a01b038216611d7d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610bcd565b8060356000828254611d8f919061259c565b90915550506001600160a01b03821660009081526033602052604081208054839290611dbc90849061259c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff16611e2d5760405162461bcd60e51b8152600401610bcd906125d1565b611608828261204b565b600054610100900460ff16611e5e5760405162461bcd60e51b8152600401610bcd906125d1565b610ee461208b565b600054610100900460ff16611e8d5760405162461bcd60e51b8152600401610bcd906125d1565b610ee46120bb565b6065546001600160a01b03163314610ee45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bcd565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526108e29085906323b872dd60e01b90608401611cf0565b6000611fce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120e99092919063ffffffff16565b805190915015610b585780806020019051810190611fec919061261c565b610b585760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610bcd565b600054610100900460ff166120725760405162461bcd60e51b8152600401610bcd906125d1565b603661207e838261268c565b506037610b58828261268c565b600054610100900460ff166120b25760405162461bcd60e51b8152600401610bcd906125d1565b610ee433611eef565b600054610100900460ff166120e25760405162461bcd60e51b8152600401610bcd906125d1565b6001609755565b60606120f88484600085612100565b949350505050565b6060824710156121615760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610bcd565b6001600160a01b0385163b6121b85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bcd565b600080866001600160a01b031685876040516121d4919061274c565b60006040518083038185875af1925050503d8060008114612211576040519150601f19603f3d011682016040523d82523d6000602084013e612216565b606091505b5091509150612226828286612231565b979650505050505050565b6060831561224057508161097a565b8251156122505782518084602001fd5b8160405162461bcd60e51b8152600401610bcd9190612296565b60005b8381101561228557818101518382015260200161226d565b838111156108e25750506000910152565b60208152600082518060208401526122b581604085016020870161226a565b601f01601f19169190910160400192915050565b6001600160a01b038116811461180d57600080fd5b600080604083850312156122f157600080fd5b82356122fc816122c9565b946020939093013593505050565b60006020828403121561231c57600080fd5b5035919050565b60008060006060848603121561233857600080fd5b8335612343816122c9565b92506020840135612353816122c9565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261238b57600080fd5b813567ffffffffffffffff808211156123a6576123a6612364565b604051601f8301601f19908116603f011681019082821181831017156123ce576123ce612364565b816040528381528660208588010111156123e757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561241d57600080fd5b8435612428816122c9565b9350602085013567ffffffffffffffff8082111561244557600080fd5b6124518883890161237a565b9450604087013591508082111561246757600080fd5b506124748782880161237a565b949793965093946060013593505050565b60006020828403121561249757600080fd5b813561097a816122c9565b600080604083850312156124b557600080fd5b82356124c0816122c9565b915060208301356124d0816122c9565b809150509250929050565b600181811c908216806124ef57607f821691505b60208210810361250f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561254557612545612515565b500290565b60008261256757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561257e57600080fd5b5051919050565b60008282101561259757612597612515565b500390565b600082198211156125af576125af612515565b500190565b6000602082840312156125c657600080fd5b815161097a816122c9565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561262e57600080fd5b8151801515811461097a57600080fd5b601f821115610b5857600081815260208120601f850160051c810160208610156126655750805b601f850160051c820191505b8181101561268457828155600101612671565b505050505050565b815167ffffffffffffffff8111156126a6576126a6612364565b6126ba816126b484546124db565b8461263e565b602080601f8311600181146126ef57600084156126d75750858301515b600019600386901b1c1916600185901b178555612684565b600085815260208120601f198616915b8281101561271e578886015182559484019460019091019084016126ff565b508582101561273c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000825161275e81846020870161226a565b919091019291505056fea2646970667358221220cab04d927038f9eda1b3f7dce1856a31cda55e8ace9a46f58e939fa0e6b1ba5164736f6c634300080f0033

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
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.