MATIC Price: $0.530283 (+2.42%)
Gas: 30.9 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
0x60806040160161372021-06-22 12:20:331124 days ago1624364433IN
 Create: PolygonBunnyDistributor
0 MATIC0.0385532620

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PolygonBunnyDistributor

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : PolygonBunnyDistributor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import "./interfaces/IPancakeRouter02.sol";
import "./interfaces/IPancakeFactory.sol";
import "./IBunnyLauncher.sol";
import "./IPolyBunnyDistributor.sol";
import "./interfaces/IStakingRewards.sol";
import "./interfaces/IStrategy.sol";

contract PolygonBunnyDistributor is IPolyBunnyDistributor, OwnableUpgradeable {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    address public constant WETH = 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619;
    IPancakeRouter02 private constant router = IPancakeRouter02(0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff);
    IPancakeFactory private constant factory = IPancakeFactory(0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32);

    /* ========== STATE VARIABLES ========== */

    address public rocket;
    address public token;

    address public bunnyETHPool;  // our BUNNY-WETH Pool
    address public stakingRewards;

    uint public totalBalance;
    uint public totalFlipBalance;
    uint public totalETHBalance;

    mapping (address => uint) private balance;   // user's swap token balance
    address[] public users;

    modifier onlyRocket {
        require(msg.sender == rocket, "Not rocket");
        _;
    }

    /* ========== INITIALIZER ========== */

    function initialize(address _rocket) external initializer {
        rocket = _rocket;
        __Ownable_init();
    }

    /* ========== VIEW FUNCTIONS ========== */

    function balanceOf(address account) view external returns(uint) {
        return balance[account];
    }

    function flipToken() view public returns(address) {
        return factory.getPair(token, WETH);
    }

    /* ========== EXTERNAL ========== */

    function notifyCreate(uint256, address _token) override external onlyRocket {
        token = _token;
    }

    function notifyEngage(uint256 auctionId, address user, uint256 amount) override external onlyRocket {
        users.push(user);
        amount = IBunnyLauncher(rocket).swapTokenAmount(auctionId, amount);
        balance[user] = balance[user].add(amount);
        totalBalance = totalBalance.add(amount);
    }

    // addLiquidity of [_token - ETH] LP
    // set total Flip balance
    // 150% mint -> 50% LP user staking, 50% LP BunnyPool rewards, 50% BUNNY user staking
    // 15% mint -> deployer staking
    function notifyArchive(uint256, address _token, uint256 amount) override external onlyRocket {
        require(IERC20(_token).balanceOf(address(this)) >= totalBalance, "less token");
        require(IERC20(WETH).balanceOf(address(this)) >= amount, "less balance");

        uint tokenAmount = totalBalance.div(2);
        IERC20(_token).safeApprove(address(router), 0);
        IERC20(_token).safeApprove(address(router), tokenAmount);

        totalETHBalance = amount;
        uint amountETH = amount.div(2);
        IERC20(WETH).safeApprove(address(router), 0);
        IERC20(WETH).safeApprove(address(router), amountETH);

        router.addLiquidity(_token, WETH, tokenAmount, amountETH, 0, 0, address(this), block.timestamp);

        address lp = flipToken();
        totalFlipBalance = IERC20(lp).balanceOf(address(this));
    }

    function notifyClaim(uint256 auctionId, address user, uint256 amount) override external onlyRocket {

    }

    function setBunnyETHPool(address _masterChef) external onlyOwner {
        bunnyETHPool = _masterChef;
    }

    function setStakingRewards(address _rewards) external onlyOwner {
        stakingRewards = _rewards;
    }

    function distributeTokens(uint index, uint length) external onlyOwner {
        address lpToken = flipToken();
        require(lpToken != address(0), 'not set Flip');
        require(bunnyETHPool != address(0), 'not set bunnyETHPool');
        require(stakingRewards != address(0), 'not set stakingRewards');

        IERC20(lpToken).safeApprove(bunnyETHPool, 0);
        IERC20(lpToken).safeApprove(bunnyETHPool, totalFlipBalance);

        IERC20(token).safeApprove(stakingRewards, 0);
        IERC20(token).safeApprove(stakingRewards, totalBalance.div(2));

        for (uint i=index; i<length; i++) {
            address user = users[i];
            uint share = shareOf(user);

            _distributeFlip(user, share);
            _distributeToken(user, share);

            delete balance[user];
        }
    }

    // TODO LP to BUNNY Pool rewards

    function sendToRewards() external onlyOwner {
        uint tokenAmount = totalBalance.div(2);
        uint ethAmount = totalETHBalance.div(2);

        IERC20(token).safeApprove(address(router), 0);
        IERC20(token).safeApprove(address(router), tokenAmount);
        IERC20(WETH).safeApprove(address(router), 0);
        IERC20(WETH).safeApprove(address(router), ethAmount);

        uint prevLpBalance = IERC20(flipToken()).balanceOf(address(this));
        router.addLiquidity(token, WETH, tokenAmount, ethAmount, 0, 0, address(this), block.timestamp);

        uint lpBalance = IERC20(flipToken()).balanceOf(address(this)).sub(prevLpBalance);
        IERC20(flipToken()).safeTransfer(stakingRewards, lpBalance);
        IStakingRewards(stakingRewards).notifyRewardAmount(lpBalance);
    }


    function finalize() external onlyOwner {
        IERC20(WETH).safeTransfer(owner(), IERC20(WETH).balanceOf(address(this)));

        uint tokenBalance = IERC20(token).balanceOf(address(this));
        if (tokenBalance > 0) {
            IERC20(token).safeTransfer(owner(), tokenBalance);
        }

        uint lpBalance = IERC20(flipToken()).balanceOf(address(this));
        if (lpBalance > 0) {
            IERC20(flipToken()).safeTransfer(owner(), lpBalance);
        }
    }

    /* ========== PRIVATE ========== */

    function _distributeFlip(address user, uint share) private {
        uint remaining = IERC20(flipToken()).balanceOf(address(this));
        uint amount = totalFlipBalance.mul(share).div(1e18);
        if (amount == 0) return;

        if (remaining < amount) {
            amount = remaining;
        }

        IStrategy(bunnyETHPool).stakeTo(amount, user);
    }

    function _distributeToken(address user, uint share) private {
        uint remaining = IERC20(token).balanceOf(address(this));
        uint amount = totalBalance.div(2).mul(share).div(1e18);
        if (amount == 0) return;

        if (remaining < amount) {
            amount = remaining;
        }
        IStakingRewards(stakingRewards).stakeTo(amount, user);
    }

    function shareOf(address _user) view private returns(uint) {
        return balance[_user].mul(1e18).div(totalBalance);
    }
}

File 2 of 20 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.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 guidelines: functions revert instead
 * of 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 ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual 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 {_setupDecimals} is
     * called.
     *
     * 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 returns (uint8) {
        return _decimals;
    }

    /**
     * @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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, 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:
     *
     * - `to` 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 = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(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);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(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 Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @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 to 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 { }
}

File 3 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

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

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

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

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

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

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

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

File 4 of 20 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/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 initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
    uint256[49] private __gap;
}

File 5 of 20 : IPancakeRouter02.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;

import './IPancakeRouter01.sol';

interface IPancakeRouter02 is IPancakeRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 6 of 20 : IPancakeFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

interface IPancakeFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 7 of 20 : IBunnyLauncher.sol
/*
  ___                      _   _
 | _ )_  _ _ _  _ _ _  _  | | | |
 | _ \ || | ' \| ' \ || | |_| |_|
 |___/\_,_|_||_|_||_\_, | (_) (_)
                    |__/

*
* MIT License
* ===========
*
* Copyright (c) 2020 BunnyFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;


interface IBunnyLauncher {

    // Swap for simple auction and Callback for delegate contract
    enum AuctionOpts {
        Swap, Callback
    }

    struct AuctionInfo {
        string name;                    // auction name
        uint deadline;                  // auction deadline
        uint swapRatio;                 // swap ratio [1-100000000]
        uint allocation;                // allocation per wallet
        uint tokenSupply;               // amount of the token
        uint tokenRemain;               // remain of the token
        uint capacity;                  // total value of token in ETH or BNB (calculated by BunnyLauncher)
        uint engaged;                   // total raised fund value ()
        address token;                  // address of the token
        address payable beneficiary;    // auction host (use contract address for AuctionOpts.Callback)
        bool archived;                  // flag to determine archived
        AuctionOpts option;             // options [Swap, Callback]
    }

    struct UserInfo {
        uint engaged;
        bool claim;
    }

    function getAuction(uint id) external view returns (AuctionInfo memory);

    /**
     * @dev User's amount and boolean flag for claim
     * @param id Auction ID
     * @param user User's address
     * @return True for already claimed
     */
    function getUserInfo(uint id, address user) external view returns (UserInfo memory);

    /**
     * @dev Calculate the amount of tokens for the funds raised.
     * @param id Auction ID
     * @param amount Raised amount (ETH/BNB)
     * @return The amount of tokens swapped
     */
    function swapTokenAmount(uint id, uint amount) external view returns (uint);
}

File 8 of 20 : IPolyBunnyDistributor.sol
/*
  ___                      _   _
 | _ )_  _ _ _  _ _ _  _  | | | |
 | _ \ || | ' \| ' \ || | |_| |_|
 |___/\_,_|_||_|_||_\_, | (_) (_)
                    |__/

*
* MIT License
* ===========
*
* Copyright (c) 2020 BunnyFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;


interface IPolyBunnyDistributor {
    /**
     * @dev Executed when the auction is created.
     * @param auctionId Index of auctions array
     * @param token The address of token registered for auction
     */
    function notifyCreate(uint256 auctionId, address token) external;

    /**
     * @notice Keep user data as you like.
     * @dev Executed whenever a participant invokes an engage.
     * @param auctionId Index of auctions array
     * @param user The address of the user invoked the engage
     * @param amount The amount the user participated in the auction (ETH/BNB)
     */
    function notifyEngage(uint256 auctionId, address user, uint256 amount) external;

    /**
     * @notice Token and funds raised will be transferred before the call.
     * @dev Executed when the auction is archived.
     * @param auctionId Index of auctions array
     * @param token The address of token registered for auction
     * @param amount The amount raised in auction (ETH/BNB)
     */
    function notifyArchive(uint256 auctionId, address token, uint256 amount) external;

    /**
     * @notice You are responsible for distributing rewards to users.
     * @dev Executed whenever a participant invokes a claim.
     * @param auctionId Index of auctions array
     * @param user The address of the user invoked the claim
     * @param amount The amount the user participated in the auction (ETH/BNB)
     */
    function notifyClaim(uint256 auctionId, address user, uint256 amount) external;
}

File 9 of 20 : IStakingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

interface IStakingRewards {
    function stakeTo(uint256 amount, address _to) external;
    function notifyRewardAmount(uint256 reward) external;
}

File 10 of 20 : IStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/*
  ___                      _   _
 | _ )_  _ _ _  _ _ _  _  | | | |
 | _ \ || | ' \| ' \ || | |_| |_|
 |___/\_,_|_||_|_||_\_, | (_) (_)
                    |__/

*
* MIT License
* ===========
*
* Copyright (c) 2020 BunnyFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

import "../library/PoolConstant.sol";
import "./IVaultController.sol";

interface IStrategy is IVaultController {
    function deposit(uint _amount) external;
    function depositAll() external;
    function withdraw(uint _amount) external;    // BUNNY STAKING POOL ONLY
    function withdrawAll() external;
    function getReward() external;                  // BUNNY STAKING POOL ONLY
    function harvest() external;
    function stakeTo(uint amount, address account) external;

    function totalSupply() external view returns (uint);
    function balance() external view returns (uint);
    function balanceOf(address account) external view returns (uint);
    function sharesOf(address account) external view returns (uint);
    function principalOf(address account) external view returns (uint);
    function earned(address account) external view returns (uint);
    function withdrawableBalanceOf(address account) external view returns (uint);   // BUNNY STAKING POOL ONLY
    function priceShare() external view returns (uint);

    /* ========== Strategy Information ========== */

    function pid() external view returns (uint);
    function poolType() external view returns (PoolConstant.PoolTypes);
    function depositedAt(address account) external view returns (uint);
    function rewardsToken() external view returns (address);

    event Deposited(address indexed user, uint amount);
    event Withdrawn(address indexed user, uint amount, uint withdrawalFee);
    event ProfitPaid(address indexed user, uint profit, uint performanceFee);
    event BunnyPaid(address indexed user, uint profit, uint performanceFee);
    event Harvested(uint profit);
}

File 11 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @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 GSN 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 Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 12 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 14 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 20 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/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 GSN 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 initializer {
        __Context_init_unchained();
    }

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
    uint256[50] private __gap;
}

File 16 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

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 a proxied contract can't have 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.
 *
 * 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 {UpgradeableProxy-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.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 17 of 20 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 18 of 20 : IPancakeRouter01.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

interface IPancakeRouter01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 19 of 20 : PoolConstant.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

/*
  ___                      _   _
 | _ )_  _ _ _  _ _ _  _  | | | |
 | _ \ || | ' \| ' \ || | |_| |_|
 |___/\_,_|_||_|_||_\_, | (_) (_)
                    |__/

*
* MIT License
* ===========
*
* Copyright (c) 2020 BunnyFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/


library PoolConstant {

    enum PoolTypes {
        BunnyStake, // no perf fee
        BunnyFlip_deprecated, // deprecated
        CakeStake, FlipToFlip, FlipToCake,
        Bunny, // no perf fee
        BunnyBNB,
        Venus,
        Collateral
    }

    struct PoolInfo {
        address pool;
        uint balance;
        uint principal;
        uint available;
        uint tvl;
        uint utilized;
        uint liquidity;
        uint pBASE;
        uint pBUNNY;
        uint depositedAt;
        uint feeDuration;
        uint feePercentage;
        uint portfolio;
    }

    struct RelayInfo {
        address pool;
        uint balanceInUSD;
        uint debtInUSD;
        uint earnedInUSD;
    }
}

File 20 of 20 : IVaultController.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

/*
  ___                      _   _
 | _ )_  _ _ _  _ _ _  _  | | | |
 | _ \ || | ' \| ' \ || | |_| |_|
 |___/\_,_|_||_|_||_\_, | (_) (_)
                    |__/

*
* MIT License
* ===========
*
* Copyright (c) 2020 BunnyFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

interface IVaultController {
    function minter() external view returns (address);
    function bunnyChef() external view returns (address);
    function stakingToken() external view returns (address);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"bunnyETHPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"distributeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rocket","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyArchive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"notifyCreate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyEngage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rocket","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sendToRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_masterChef","type":"address"}],"name":"setBunnyETHPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewards","type":"address"}],"name":"setStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalETHBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFlipBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"users","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506121e7806100206000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063a8c8f125116100c3578063d958927e1161007c578063d958927e14610275578063dab22e4c1461027d578063f2fde38b14610290578063f74a2aa7146102a3578063fc0c546a146102ab578063fef2acae146102b357610158565b8063a8c8f12514610219578063ad5c46481461022c578063ad7a672f14610234578063c4d66de81461023c578063c6e5546c1461024f578063d6c945991461026257610158565b80636fb83a57116101155780636fb83a57146101c857806370a08231146101db578063715018a6146101ee5780638145bd04146101f65780638383ff68146101fe5780638da5cb5b1461021157610158565b806334fc45fc1461015d578063365b98b2146101725780634bb278f31461019b5780635945365e146101a357806364b87a70146101ab57806369d7697e146101b3575b600080fd5b61017061016b366004611bf1565b6102bb565b005b610185610180366004611bc1565b610311565b6040516101929190611cc1565b60405180910390f35b610170610338565b610185610581565b610185610633565b6101bb610642565b6040516101929190612142565b6101706101d6366004611b69565b610648565b6101bb6101e9366004611b69565b6106a9565b6101706106c4565b61018561074d565b61017061020c366004611c20565b61075c565b610185610aeb565b610170610227366004611c20565b610afa565b610185610c41565b6101bb610c59565b61017061024a366004611b69565b610c5f565b61017061025d366004611c57565b610d05565b610170610270366004611b69565b610ec4565b610170610f25565b61017061028b366004611c20565b6112a6565b61017061029e366004611b69565b6112d5565b610185611396565b6101856113a5565b6101bb6113b4565b6065546001600160a01b031633146102ee5760405162461bcd60e51b81526004016102e590611daa565b60405180910390fd5b606680546001600160a01b0319166001600160a01b039290921691909117905550565b606d818154811061031e57fe5b6000918252602090912001546001600160a01b0316905081565b6103406113ba565b6001600160a01b0316610351610aeb565b6001600160a01b0316146103775760405162461bcd60e51b81526004016102e590612006565b610425610382610aeb565b6040516370a0823160e01b8152737ceb23fd6bc0add59e62ac25578270cff1b9f619906370a08231906103b9903090600401611cc1565b60206040518083038186803b1580156103d157600080fd5b505afa1580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104099190611bd9565b737ceb23fd6bc0add59e62ac25578270cff1b9f61991906113be565b6066546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610456903090600401611cc1565b60206040518083038186803b15801561046e57600080fd5b505afa158015610482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a69190611bd9565b905080156104cc576104cc6104b9610aeb565b6066546001600160a01b031690836113be565b60006104d6610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016105019190611cc1565b60206040518083038186803b15801561051957600080fd5b505afa15801561052d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105519190611bd9565b9050801561057d5761057d610564610aeb565b8261056d610581565b6001600160a01b031691906113be565b5050565b60665460405163e6a4390560e01b8152600091735757371414417b8c6caad45baef941abc7d3ab329163e6a43905916105de916001600160a01b0390911690737ceb23fd6bc0add59e62ac25578270cff1b9f61990600401611cd5565b60206040518083038186803b1580156105f657600080fd5b505afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611b85565b905090565b6068546001600160a01b031681565b606a5481565b6106506113ba565b6001600160a01b0316610661610aeb565b6001600160a01b0316146106875760405162461bcd60e51b81526004016102e590612006565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03166000908152606c602052604090205490565b6106cc6113ba565b6001600160a01b03166106dd610aeb565b6001600160a01b0316146107035760405162461bcd60e51b81526004016102e590612006565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6065546001600160a01b031681565b6065546001600160a01b031633146107865760405162461bcd60e51b81526004016102e590611daa565b6069546040516370a0823160e01b81526001600160a01b038416906370a08231906107b5903090600401611cc1565b60206040518083038186803b1580156107cd57600080fd5b505afa1580156107e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108059190611bd9565b10156108235760405162461bcd60e51b81526004016102e590611e71565b6040516370a0823160e01b81528190737ceb23fd6bc0add59e62ac25578270cff1b9f619906370a082319061085c903090600401611cc1565b60206040518083038186803b15801561087457600080fd5b505afa158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190611bd9565b10156108ca5760405162461bcd60e51b81526004016102e590611d84565b6069546000906108db906002611414565b90506109066001600160a01b03841673a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b61092e6001600160a01b03841673a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b606b8290556000610940836002611414565b9050610976737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b6109a9737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b60405162e8e33760e81b815273a5e0829caced8ffdd4de3c43696c57f7d7a678ff9063e8e3370090610a02908790737ceb23fd6bc0add59e62ac25578270cff1b9f6199087908790600090819030904290600401611cef565b606060405180830381600087803b158015610a1c57600080fd5b505af1158015610a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a549190611c78565b5050506000610a61610581565b6040516370a0823160e01b81529091506001600160a01b038216906370a0823190610a90903090600401611cc1565b60206040518083038186803b158015610aa857600080fd5b505afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190611bd9565b606a55505050505050565b6033546001600160a01b031690565b6065546001600160a01b03163314610b245760405162461bcd60e51b81526004016102e590611daa565b606d80546001810182556000919091527f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d80180546001600160a01b0319166001600160a01b0384811691909117909155606554604051633b907c2f60e21b815291169063ee41f0bc90610b9d9086908590600401612162565b60206040518083038186803b158015610bb557600080fd5b505afa158015610bc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bed9190611bd9565b6001600160a01b0383166000908152606c6020526040902054909150610c13908261150b565b6001600160a01b0383166000908152606c6020526040902055606954610c39908261150b565b606955505050565b737ceb23fd6bc0add59e62ac25578270cff1b9f61981565b60695481565b600054610100900460ff1680610c785750610c78611537565b80610c86575060005460ff16155b610ca25760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff16158015610ccd576000805460ff1961ff0019909116610100171660011790555b606580546001600160a01b0319166001600160a01b038416179055610cf0611548565b801561057d576000805461ff00191690555050565b610d0d6113ba565b6001600160a01b0316610d1e610aeb565b6001600160a01b031614610d445760405162461bcd60e51b81526004016102e590612006565b6000610d4e610581565b90506001600160a01b038116610d765760405162461bcd60e51b81526004016102e590611e4b565b6067546001600160a01b0316610d9e5760405162461bcd60e51b81526004016102e590611f97565b6068546001600160a01b0316610dc65760405162461bcd60e51b81526004016102e590612072565b606754610de1906001600160a01b0383811691166000611448565b606754606a54610dff916001600160a01b0384811692911690611448565b606854606654610e1d916001600160a01b0391821691166000611448565b606854606954610e4f916001600160a01b031690610e3c906002611414565b6066546001600160a01b03169190611448565b825b82811015610ebe576000606d8281548110610e6857fe5b60009182526020822001546001600160a01b03169150610e87826115db565b9050610e938282611615565b610e9d828261170a565b506001600160a01b03166000908152606c6020526040812055600101610e51565b50505050565b610ecc6113ba565b6001600160a01b0316610edd610aeb565b6001600160a01b031614610f035760405162461bcd60e51b81526004016102e590612006565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b610f2d6113ba565b6001600160a01b0316610f3e610aeb565b6001600160a01b031614610f645760405162461bcd60e51b81526004016102e590612006565b606954600090610f75906002611414565b90506000610f8f6002606b5461141490919063ffffffff16565b606654909150610fbe906001600160a01b031673a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b606654610fe9906001600160a01b031673a5e0829caced8ffdd4de3c43696c57f7d7a678ff84611448565b61101d737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b611050737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b600061105a610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016110859190611cc1565b60206040518083038186803b15801561109d57600080fd5b505afa1580156110b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d59190611bd9565b60665460405162e8e33760e81b815291925073a5e0829caced8ffdd4de3c43696c57f7d7a678ff9163e8e337009161113e916001600160a01b0390911690737ceb23fd6bc0add59e62ac25578270cff1b9f6199088908890600090819030904290600401611cef565b606060405180830381600087803b15801561115857600080fd5b505af115801561116c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111909190611c78565b5050506000611222826111a1610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016111cc9190611cc1565b60206040518083038186803b1580156111e457600080fd5b505afa1580156111f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121c9190611bd9565b90611806565b60685490915061123e906001600160a01b03168261056d610581565b606854604051633c6b16ab60e01b81526001600160a01b0390911690633c6b16ab9061126e908490600401612142565b600060405180830381600087803b15801561128857600080fd5b505af115801561129c573d6000803e3d6000fd5b5050505050505050565b6065546001600160a01b031633146112d05760405162461bcd60e51b81526004016102e590611daa565b505050565b6112dd6113ba565b6001600160a01b03166112ee610aeb565b6001600160a01b0316146113145760405162461bcd60e51b81526004016102e590612006565b6001600160a01b03811661133a5760405162461bcd60e51b81526004016102e590611dce565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6067546001600160a01b031681565b6066546001600160a01b031681565b606b5481565b3390565b6112d08363a9059cbb60e01b84846040516024016113dd929190611d38565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261182e565b60008082116114355760405162461bcd60e51b81526004016102e590611f12565b81838161143e57fe5b0490505b92915050565b8015806114d05750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e9061147e9030908690600401611cd5565b60206040518083038186803b15801561149657600080fd5b505afa1580156114aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ce9190611bd9565b155b6114ec5760405162461bcd60e51b81526004016102e5906120ec565b6112d08363095ea7b360e01b84846040516024016113dd929190611d38565b6000828201838110156115305760405162461bcd60e51b81526004016102e590611e14565b9392505050565b6000611542306118bd565b15905090565b600054610100900460ff16806115615750611561611537565b8061156f575060005460ff16155b61158b5760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156115b6576000805460ff1961ff0019909116610100171660011790555b6115be6118c3565b6115c6611944565b80156115d8576000805461ff00191690555b50565b6069546001600160a01b0382166000908152606c602052604081205490916114429161160f90670de0b6b3a7640000611a1e565b90611414565b600061161f610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161164a9190611cc1565b60206040518083038186803b15801561166257600080fd5b505afa158015611676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169a9190611bd9565b905060006116bf670de0b6b3a764000061160f85606a54611a1e90919063ffffffff16565b9050806116cd57505061057d565b808210156116d85750805b606754604051631534e6cd60e21b81526001600160a01b03909116906354d39b349061126e908490889060040161214b565b6066546040516370a0823160e01b81526000916001600160a01b0316906370a082319061173b903090600401611cc1565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178b9190611bd9565b905060006117bb670de0b6b3a764000061160f856117b5600260695461141490919063ffffffff16565b90611a1e565b9050806117c957505061057d565b808210156117d45750805b606854604051631534e6cd60e21b81526001600160a01b03909116906354d39b349061126e908490889060040161214b565b6000828211156118285760405162461bcd60e51b81526004016102e590611e95565b50900390565b6060611883826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a589092919063ffffffff16565b8051909150156112d057808060200190518101906118a19190611ba1565b6112d05760405162461bcd60e51b81526004016102e5906120a2565b3b151590565b600054610100900460ff16806118dc57506118dc611537565b806118ea575060005460ff16155b6119065760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156115c6576000805460ff1961ff00199091166101001716600117905580156115d8576000805461ff001916905550565b600054610100900460ff168061195d575061195d611537565b8061196b575060005460ff16155b6119875760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156119b2576000805460ff1961ff0019909116610100171660011790555b60006119bc6113ba565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156115d8576000805461ff001916905550565b600082611a2d57506000611442565b82820282848281611a3a57fe5b04146115305760405162461bcd60e51b81526004016102e590611fc5565b6060611a678484600085611a6f565b949350505050565b606082471015611a915760405162461bcd60e51b81526004016102e590611ecc565b611a9a856118bd565b611ab65760405162461bcd60e51b81526004016102e59061203b565b60006060866001600160a01b03168587604051611ad39190611ca5565b60006040518083038185875af1925050503d8060008114611b10576040519150601f19603f3d011682016040523d82523d6000602084013e611b15565b606091505b5091509150611b25828286611b30565b979650505050505050565b60608315611b3f575081611530565b825115611b4f5782518084602001fd5b8160405162461bcd60e51b81526004016102e59190611d51565b600060208284031215611b7a578081fd5b81356115308161219c565b600060208284031215611b96578081fd5b81516115308161219c565b600060208284031215611bb2578081fd5b81518015158114611530578182fd5b600060208284031215611bd2578081fd5b5035919050565b600060208284031215611bea578081fd5b5051919050565b60008060408385031215611c03578081fd5b823591506020830135611c158161219c565b809150509250929050565b600080600060608486031215611c34578081fd5b833592506020840135611c468161219c565b929592945050506040919091013590565b60008060408385031215611c69578182fd5b50508035926020909101359150565b600080600060608486031215611c8c578283fd5b8351925060208401519150604084015190509250925092565b60008251611cb7818460208701612170565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152611d70816040850160208701612170565b601f01601f19169190910160400192915050565b6020808252600c908201526b6c6573732062616c616e636560a01b604082015260600190565b6020808252600a9082015269139bdd081c9bd8dad95d60b21b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600c908201526b06e6f742073657420466c69760a41b604082015260600190565b6020808252600a90820152693632b9b9903a37b5b2b760b11b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601490820152731b9bdd081cd95d08189d5b9b9e515512141bdbdb60621b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601690820152756e6f7420736574207374616b696e675265776172647360501b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60005b8381101561218b578181015183820152602001612173565b83811115610ebe5750506000910152565b6001600160a01b03811681146115d857600080fdfea2646970667358221220434d7a93bc0194f32fb18794c046ac7989cb6452a6e45a4a04b8d900c8262bd464736f6c634300060c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063a8c8f125116100c3578063d958927e1161007c578063d958927e14610275578063dab22e4c1461027d578063f2fde38b14610290578063f74a2aa7146102a3578063fc0c546a146102ab578063fef2acae146102b357610158565b8063a8c8f12514610219578063ad5c46481461022c578063ad7a672f14610234578063c4d66de81461023c578063c6e5546c1461024f578063d6c945991461026257610158565b80636fb83a57116101155780636fb83a57146101c857806370a08231146101db578063715018a6146101ee5780638145bd04146101f65780638383ff68146101fe5780638da5cb5b1461021157610158565b806334fc45fc1461015d578063365b98b2146101725780634bb278f31461019b5780635945365e146101a357806364b87a70146101ab57806369d7697e146101b3575b600080fd5b61017061016b366004611bf1565b6102bb565b005b610185610180366004611bc1565b610311565b6040516101929190611cc1565b60405180910390f35b610170610338565b610185610581565b610185610633565b6101bb610642565b6040516101929190612142565b6101706101d6366004611b69565b610648565b6101bb6101e9366004611b69565b6106a9565b6101706106c4565b61018561074d565b61017061020c366004611c20565b61075c565b610185610aeb565b610170610227366004611c20565b610afa565b610185610c41565b6101bb610c59565b61017061024a366004611b69565b610c5f565b61017061025d366004611c57565b610d05565b610170610270366004611b69565b610ec4565b610170610f25565b61017061028b366004611c20565b6112a6565b61017061029e366004611b69565b6112d5565b610185611396565b6101856113a5565b6101bb6113b4565b6065546001600160a01b031633146102ee5760405162461bcd60e51b81526004016102e590611daa565b60405180910390fd5b606680546001600160a01b0319166001600160a01b039290921691909117905550565b606d818154811061031e57fe5b6000918252602090912001546001600160a01b0316905081565b6103406113ba565b6001600160a01b0316610351610aeb565b6001600160a01b0316146103775760405162461bcd60e51b81526004016102e590612006565b610425610382610aeb565b6040516370a0823160e01b8152737ceb23fd6bc0add59e62ac25578270cff1b9f619906370a08231906103b9903090600401611cc1565b60206040518083038186803b1580156103d157600080fd5b505afa1580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104099190611bd9565b737ceb23fd6bc0add59e62ac25578270cff1b9f61991906113be565b6066546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610456903090600401611cc1565b60206040518083038186803b15801561046e57600080fd5b505afa158015610482573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a69190611bd9565b905080156104cc576104cc6104b9610aeb565b6066546001600160a01b031690836113be565b60006104d6610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016105019190611cc1565b60206040518083038186803b15801561051957600080fd5b505afa15801561052d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105519190611bd9565b9050801561057d5761057d610564610aeb565b8261056d610581565b6001600160a01b031691906113be565b5050565b60665460405163e6a4390560e01b8152600091735757371414417b8c6caad45baef941abc7d3ab329163e6a43905916105de916001600160a01b0390911690737ceb23fd6bc0add59e62ac25578270cff1b9f61990600401611cd5565b60206040518083038186803b1580156105f657600080fd5b505afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611b85565b905090565b6068546001600160a01b031681565b606a5481565b6106506113ba565b6001600160a01b0316610661610aeb565b6001600160a01b0316146106875760405162461bcd60e51b81526004016102e590612006565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03166000908152606c602052604090205490565b6106cc6113ba565b6001600160a01b03166106dd610aeb565b6001600160a01b0316146107035760405162461bcd60e51b81526004016102e590612006565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6065546001600160a01b031681565b6065546001600160a01b031633146107865760405162461bcd60e51b81526004016102e590611daa565b6069546040516370a0823160e01b81526001600160a01b038416906370a08231906107b5903090600401611cc1565b60206040518083038186803b1580156107cd57600080fd5b505afa1580156107e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108059190611bd9565b10156108235760405162461bcd60e51b81526004016102e590611e71565b6040516370a0823160e01b81528190737ceb23fd6bc0add59e62ac25578270cff1b9f619906370a082319061085c903090600401611cc1565b60206040518083038186803b15801561087457600080fd5b505afa158015610888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ac9190611bd9565b10156108ca5760405162461bcd60e51b81526004016102e590611d84565b6069546000906108db906002611414565b90506109066001600160a01b03841673a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b61092e6001600160a01b03841673a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b606b8290556000610940836002611414565b9050610976737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b6109a9737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b60405162e8e33760e81b815273a5e0829caced8ffdd4de3c43696c57f7d7a678ff9063e8e3370090610a02908790737ceb23fd6bc0add59e62ac25578270cff1b9f6199087908790600090819030904290600401611cef565b606060405180830381600087803b158015610a1c57600080fd5b505af1158015610a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a549190611c78565b5050506000610a61610581565b6040516370a0823160e01b81529091506001600160a01b038216906370a0823190610a90903090600401611cc1565b60206040518083038186803b158015610aa857600080fd5b505afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190611bd9565b606a55505050505050565b6033546001600160a01b031690565b6065546001600160a01b03163314610b245760405162461bcd60e51b81526004016102e590611daa565b606d80546001810182556000919091527f5006b838207c6a9ae9b84d68f467dd4bb5c305fbfb6b04eab8faaabeec1e18d80180546001600160a01b0319166001600160a01b0384811691909117909155606554604051633b907c2f60e21b815291169063ee41f0bc90610b9d9086908590600401612162565b60206040518083038186803b158015610bb557600080fd5b505afa158015610bc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bed9190611bd9565b6001600160a01b0383166000908152606c6020526040902054909150610c13908261150b565b6001600160a01b0383166000908152606c6020526040902055606954610c39908261150b565b606955505050565b737ceb23fd6bc0add59e62ac25578270cff1b9f61981565b60695481565b600054610100900460ff1680610c785750610c78611537565b80610c86575060005460ff16155b610ca25760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff16158015610ccd576000805460ff1961ff0019909116610100171660011790555b606580546001600160a01b0319166001600160a01b038416179055610cf0611548565b801561057d576000805461ff00191690555050565b610d0d6113ba565b6001600160a01b0316610d1e610aeb565b6001600160a01b031614610d445760405162461bcd60e51b81526004016102e590612006565b6000610d4e610581565b90506001600160a01b038116610d765760405162461bcd60e51b81526004016102e590611e4b565b6067546001600160a01b0316610d9e5760405162461bcd60e51b81526004016102e590611f97565b6068546001600160a01b0316610dc65760405162461bcd60e51b81526004016102e590612072565b606754610de1906001600160a01b0383811691166000611448565b606754606a54610dff916001600160a01b0384811692911690611448565b606854606654610e1d916001600160a01b0391821691166000611448565b606854606954610e4f916001600160a01b031690610e3c906002611414565b6066546001600160a01b03169190611448565b825b82811015610ebe576000606d8281548110610e6857fe5b60009182526020822001546001600160a01b03169150610e87826115db565b9050610e938282611615565b610e9d828261170a565b506001600160a01b03166000908152606c6020526040812055600101610e51565b50505050565b610ecc6113ba565b6001600160a01b0316610edd610aeb565b6001600160a01b031614610f035760405162461bcd60e51b81526004016102e590612006565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b610f2d6113ba565b6001600160a01b0316610f3e610aeb565b6001600160a01b031614610f645760405162461bcd60e51b81526004016102e590612006565b606954600090610f75906002611414565b90506000610f8f6002606b5461141490919063ffffffff16565b606654909150610fbe906001600160a01b031673a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b606654610fe9906001600160a01b031673a5e0829caced8ffdd4de3c43696c57f7d7a678ff84611448565b61101d737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff6000611448565b611050737ceb23fd6bc0add59e62ac25578270cff1b9f61973a5e0829caced8ffdd4de3c43696c57f7d7a678ff83611448565b600061105a610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016110859190611cc1565b60206040518083038186803b15801561109d57600080fd5b505afa1580156110b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d59190611bd9565b60665460405162e8e33760e81b815291925073a5e0829caced8ffdd4de3c43696c57f7d7a678ff9163e8e337009161113e916001600160a01b0390911690737ceb23fd6bc0add59e62ac25578270cff1b9f6199088908890600090819030904290600401611cef565b606060405180830381600087803b15801561115857600080fd5b505af115801561116c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111909190611c78565b5050506000611222826111a1610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016111cc9190611cc1565b60206040518083038186803b1580156111e457600080fd5b505afa1580156111f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121c9190611bd9565b90611806565b60685490915061123e906001600160a01b03168261056d610581565b606854604051633c6b16ab60e01b81526001600160a01b0390911690633c6b16ab9061126e908490600401612142565b600060405180830381600087803b15801561128857600080fd5b505af115801561129c573d6000803e3d6000fd5b5050505050505050565b6065546001600160a01b031633146112d05760405162461bcd60e51b81526004016102e590611daa565b505050565b6112dd6113ba565b6001600160a01b03166112ee610aeb565b6001600160a01b0316146113145760405162461bcd60e51b81526004016102e590612006565b6001600160a01b03811661133a5760405162461bcd60e51b81526004016102e590611dce565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6067546001600160a01b031681565b6066546001600160a01b031681565b606b5481565b3390565b6112d08363a9059cbb60e01b84846040516024016113dd929190611d38565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261182e565b60008082116114355760405162461bcd60e51b81526004016102e590611f12565b81838161143e57fe5b0490505b92915050565b8015806114d05750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e9061147e9030908690600401611cd5565b60206040518083038186803b15801561149657600080fd5b505afa1580156114aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ce9190611bd9565b155b6114ec5760405162461bcd60e51b81526004016102e5906120ec565b6112d08363095ea7b360e01b84846040516024016113dd929190611d38565b6000828201838110156115305760405162461bcd60e51b81526004016102e590611e14565b9392505050565b6000611542306118bd565b15905090565b600054610100900460ff16806115615750611561611537565b8061156f575060005460ff16155b61158b5760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156115b6576000805460ff1961ff0019909116610100171660011790555b6115be6118c3565b6115c6611944565b80156115d8576000805461ff00191690555b50565b6069546001600160a01b0382166000908152606c602052604081205490916114429161160f90670de0b6b3a7640000611a1e565b90611414565b600061161f610581565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161164a9190611cc1565b60206040518083038186803b15801561166257600080fd5b505afa158015611676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169a9190611bd9565b905060006116bf670de0b6b3a764000061160f85606a54611a1e90919063ffffffff16565b9050806116cd57505061057d565b808210156116d85750805b606754604051631534e6cd60e21b81526001600160a01b03909116906354d39b349061126e908490889060040161214b565b6066546040516370a0823160e01b81526000916001600160a01b0316906370a082319061173b903090600401611cc1565b60206040518083038186803b15801561175357600080fd5b505afa158015611767573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178b9190611bd9565b905060006117bb670de0b6b3a764000061160f856117b5600260695461141490919063ffffffff16565b90611a1e565b9050806117c957505061057d565b808210156117d45750805b606854604051631534e6cd60e21b81526001600160a01b03909116906354d39b349061126e908490889060040161214b565b6000828211156118285760405162461bcd60e51b81526004016102e590611e95565b50900390565b6060611883826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a589092919063ffffffff16565b8051909150156112d057808060200190518101906118a19190611ba1565b6112d05760405162461bcd60e51b81526004016102e5906120a2565b3b151590565b600054610100900460ff16806118dc57506118dc611537565b806118ea575060005460ff16155b6119065760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156115c6576000805460ff1961ff00199091166101001716600117905580156115d8576000805461ff001916905550565b600054610100900460ff168061195d575061195d611537565b8061196b575060005460ff16155b6119875760405162461bcd60e51b81526004016102e590611f49565b600054610100900460ff161580156119b2576000805460ff1961ff0019909116610100171660011790555b60006119bc6113ba565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156115d8576000805461ff001916905550565b600082611a2d57506000611442565b82820282848281611a3a57fe5b04146115305760405162461bcd60e51b81526004016102e590611fc5565b6060611a678484600085611a6f565b949350505050565b606082471015611a915760405162461bcd60e51b81526004016102e590611ecc565b611a9a856118bd565b611ab65760405162461bcd60e51b81526004016102e59061203b565b60006060866001600160a01b03168587604051611ad39190611ca5565b60006040518083038185875af1925050503d8060008114611b10576040519150601f19603f3d011682016040523d82523d6000602084013e611b15565b606091505b5091509150611b25828286611b30565b979650505050505050565b60608315611b3f575081611530565b825115611b4f5782518084602001fd5b8160405162461bcd60e51b81526004016102e59190611d51565b600060208284031215611b7a578081fd5b81356115308161219c565b600060208284031215611b96578081fd5b81516115308161219c565b600060208284031215611bb2578081fd5b81518015158114611530578182fd5b600060208284031215611bd2578081fd5b5035919050565b600060208284031215611bea578081fd5b5051919050565b60008060408385031215611c03578081fd5b823591506020830135611c158161219c565b809150509250929050565b600080600060608486031215611c34578081fd5b833592506020840135611c468161219c565b929592945050506040919091013590565b60008060408385031215611c69578182fd5b50508035926020909101359150565b600080600060608486031215611c8c578283fd5b8351925060208401519150604084015190509250925092565b60008251611cb7818460208701612170565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152611d70816040850160208701612170565b601f01601f19169190910160400192915050565b6020808252600c908201526b6c6573732062616c616e636560a01b604082015260600190565b6020808252600a9082015269139bdd081c9bd8dad95d60b21b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600c908201526b06e6f742073657420466c69760a41b604082015260600190565b6020808252600a90820152693632b9b9903a37b5b2b760b11b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601490820152731b9bdd081cd95d08189d5b9b9e515512141bdbdb60621b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601690820152756e6f7420736574207374616b696e675265776172647360501b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60005b8381101561218b578181015183820152602001612173565b83811115610ebe5750506000910152565b6001600160a01b03811681146115d857600080fdfea2646970667358221220434d7a93bc0194f32fb18794c046ac7989cb6452a6e45a4a04b8d900c8262bd464736f6c634300060c0033

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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