Contract 0x77286f5257e090b1bedbc6df6726d53cbf8573a6 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x10e67c4da2f1fb866ecbc00231b6767668101e8dc5a8fbb5d05465c3a86af78dDeposit13235112022-06-27 16:08:0617 hrs 43 mins ago0xf4adc8369e83d6a599e51438d44b5e53a412f807 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0288507
0x4eb61bb22d27b68d959279168ecfbb066b174ae8bebeaf583fa85a1e35ff03e0Deposit13118992022-06-25 22:33:542 days 11 hrs ago0xa3ce122c6dd28db3b2ffffa7b4eba084049be467 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272587
0xe89aff0fc3f97ac1b12341218b8c9c99fe1954dee6252430db13222074c8d449Deposit12946552022-06-23 8:47:065 days 1 hr ago0x29ac23948df7ba0ff99c08ce29a848d019d254f9 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0336276
0xeaafc16e900dc2e8c7d69fccd8dc3f674a1eb65b345b2733432fe018080865d3Deposit12906612022-06-22 18:32:425 days 15 hrs ago0xe8111f6e1dea577136fc223fe1528805a59f1a1c IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0237129
0xe35b9479d1552f1a989979ce31beba6c5522d75470e974c6a0283d8ae446114cDeposit12767922022-06-20 16:48:187 days 17 hrs ago0x05592660cf7c458a5292e9f6a902445d0705010d IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0187128
0x7fb11203411f1d24832980a3acc13fc60e5122c9b3b63233c16b407e7e7325ebDeposit12613182022-06-18 9:04:3610 days 47 mins ago0x378bd61bb8e10b6c0c7452fda9e753dbadb44cf5 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0203048
0xabf936cefb7376580aa4573a48ad6ade1b2e96f539290d755336df1a6ff5545eDeposit12495122022-06-16 14:22:3611 days 19 hrs ago0x9729d3061161068dcab98e796ace8c89b8565f56 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0203048
0xc6c82ad0a0d1feac4e268a38f97e7a607c417cb930f2d257514c605f531ab5c3Deposit12392402022-06-15 1:22:5413 days 8 hrs ago0x5da68351bd082abda73e42ac981db51d9364fe69 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0256657
0xb721aded2c05a810c22fd916dbea5aad47d3f4c707e26d6c98ffd0cf63eae479Withdraw12165162022-06-11 15:23:0616 days 18 hrs ago0x05592660cf7c458a5292e9f6a902445d0705010d IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0201595
0xc9fb292a8734727f6c67f978e67c04c586f82e620b989dfb60015d1be3721d35Withdraw12165132022-06-11 15:22:3016 days 18 hrs ago0x05592660cf7c458a5292e9f6a902445d0705010d IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0181671
0xba8dda68e16ddfd0df7bf9b86b384d62ba09393499b21d81b8dd3147c9b0936fWithdraw12155192022-06-11 11:54:4216 days 21 hrs ago0x5da68351bd082abda73e42ac981db51d9364fe69 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0244837
0x09eafa615a4196deec9ab9993622d03f0b01de8f14052573dd985d1157d0484eWithdraw12061832022-06-10 2:34:0618 days 7 hrs ago0xd6ce43ea34826c5831e3e815e6af30e2913fa0ee IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0244849
0x3765acdfd9824e9cde98e660324dcf33517e13746bbeb7ed4aae83e55de599ecDeposit11958542022-06-08 13:47:0619 days 20 hrs ago0x5da68351bd082abda73e42ac981db51d9364fe69 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.036252741
0x0ebafb8f008d4146d8263ebd3f26f7e1e3b5001a285d39e521cc37883bfe9eaaDeposit11909012022-06-07 20:11:1820 days 13 hrs ago0x35d8df734de6d1dcf5ffbb17672b768d90690139 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0237129
0xab17bb01d35f3e0686777d464528fb86b91bd86eb0b4eafd49deb1299879959dDeposit11633512022-06-03 18:16:1224 days 15 hrs ago0x05592660cf7c458a5292e9f6a902445d0705010d IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272558
0xb66ea3b916be9b442cc0a415015bbeacd7a307f83bc6224b2e2272f88208c76cDeposit11633302022-06-03 18:11:4224 days 15 hrs ago0x05592660cf7c458a5292e9f6a902445d0705010d IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272577
0xaec372161fe3b26a76431bd154734cb79c0f62de467cb44034de445d32fb9d6eWithdraw11386392022-05-31 3:23:2428 days 6 hrs ago0x4c76e8042ae2a32130eab84617a1a63bc90b5338 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0264701
0x0bcd512099ac970e12fbddde4f44880b51e462749b24978a06af77e11e0856d2Deposit10989042022-05-25 8:23:1234 days 1 hr ago0xf662bd348766349ade94bbbfd523ceccc6049145 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272577
0xbcc03249ede48e2452ecf3cabc6e575fd1a37003fab9f0c8c5234bf61791829aDeposit10879572022-05-23 18:12:4235 days 15 hrs ago0x5f457092aef6b659e13035e913028d6363027ed0 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272577
0x449fb9f961850208cd492b33a968b5712d3fbcb59fa57f45c7829cf5a881f630Deposit10853462022-05-23 9:02:3036 days 49 mins ago0x7b7055bd69bd92edd623a72f2c2025899a50fada IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272577
0x7438acf0c4d48d234d13ce1d2989b4c0bfd9ebde8eaefeb2a2211900db075bdaWithdraw10834152022-05-23 2:23:0636 days 7 hrs ago0x0a8f3d9364ffd3478ec107472286e13a34a9d0fb IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0244813
0x2bbc7d19ac8f84ebe9a8346b92da235ad1154f68b3c7d3624f0ba3cd818b31deDeposit10659262022-05-20 13:44:4838 days 20 hrs ago0x4c76e8042ae2a32130eab84617a1a63bc90b5338 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272558
0xe840515c9cbf9e2ed9b330348bf606885f79bc2b1bc80a916bbed4c248102bf4Deposit10649932022-05-20 10:32:0038 days 23 hrs ago0x0a8f3d9364ffd3478ec107472286e13a34a9d0fb IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0272558
0x3dbe9dc5b9f6283b893df3c4d14b3bb0141a12d4e57cb94ce8040875b9da2349Deposit10649882022-05-20 10:31:0038 days 23 hrs ago0x0a8f3d9364ffd3478ec107472286e13a34a9d0fb IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0340709
0xe40ad632ecbc64cd417cbfddbfccd72b1f4482e2899bbfaf6cd41943cd00d3b0Deposit10648652022-05-20 10:04:4838 days 23 hrs ago0xe25465199f77014a3e20ef4443c4cfc27da60a80 IN  0x77286f5257e090b1bedbc6df6726d53cbf8573a60 GLMR0.0237139
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AutoFarmV2_CrossChain

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at moonbeam.moonscan.io on 2022-03-15
*/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
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;
    }
}

library SafeMath {
    /**
     * @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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

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
    );
}

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 returns (string memory) {
        return _name;
    }

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

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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 {
        _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 {}
}

// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/SafeERC20.sol";
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.3._
     */
    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.3._
     */
    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);
            }
        }
    }
}

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"
            );
        }
    }
}

// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/EnumerableSet.sol";
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value)
        private
        view
        returns (bool)
    {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index)
        private
        view
        returns (bytes32)
    {
        require(
            set._values.length > index,
            "EnumerableSet: index out of bounds"
        );
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value)
        internal
        returns (bool)
    {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value)
        internal
        returns (bool)
    {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value)
        internal
        view
        returns (bool)
    {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index)
        internal
        view
        returns (bytes32)
    {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value)
        internal
        returns (bool)
    {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value)
        internal
        returns (bool)
    {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value)
        internal
        view
        returns (bool)
    {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index)
        internal
        view
        returns (address)
    {
        return address(uint256(_at(set._inner, index)));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value)
        internal
        returns (bool)
    {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value)
        internal
        view
        returns (bool)
    {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index)
        internal
        view
        returns (uint256)
    {
        return uint256(_at(set._inner, index));
    }
}

// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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;
    }
}

// "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol";
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor() internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

// For interacting with our own strategy
interface IStrategy {
    // Total want tokens managed by stratfegy
    function wantLockedTotal() external view returns (uint256);

    // Sum of all shares of users to wantLockedTotal
    function sharesTotal() external view returns (uint256);

    // Main want token compounding function
    function earn() external;

    // Transfer want tokens autoFarm -> strategy
    function deposit(address _userAddress, uint256 _wantAmt)
        external
        returns (uint256);

    // Transfer want tokens strategy -> autoFarm
    function withdraw(address _userAddress, uint256 _wantAmt)
        external
        returns (uint256);

    function inCaseTokensGetStuck(
        address _token,
        uint256 _amount,
        address _to
    ) external;
}

contract AutoFarmV2_CrossChain is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 shares; // How many LP tokens the user has provided.
    }

    struct PoolInfo {
        IERC20 want; // Address of the want token.
        uint256 allocPoint; // How many allocation points assigned to this pool. AUTO to distribute per block.
        uint256 lastRewardBlock; // Last block number that AUTO distribution occurs.
        uint256 accAUTOPerShare; // Accumulated AUTO per share, times 1e12. See below.
        address strat; // Strategy address that will auto compound want tokens
    }

    PoolInfo[] public poolInfo; // Info of each pool.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Info of each user that stakes LP tokens.
    uint256 public totalAllocPoint = 1; // Total allocation points. Must be the sum of all allocation points in all pools.

    event Add(
        uint256 _allocPoint,
        IERC20 _want,
        bool _withUpdate,
        address _strat
    );
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. (Only if want tokens are stored here.)

    function add(
        uint256 _allocPoint,
        IERC20 _want,
        bool _withUpdate,
        address _strat
    ) public onlyOwner {
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                want: _want,
                allocPoint: _allocPoint,
                lastRewardBlock: 0,
                accAUTOPerShare: 0,
                strat: _strat
            })
        );

        emit Add(_allocPoint, _want, _withUpdate, _strat);
    }

    // Update the given pool's AUTO allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyOwner {
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // View function to see staked Want tokens on frontend.
    function stakedWantTokens(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();
        uint256 wantLockedTotal =
            IStrategy(poolInfo[_pid].strat).wantLockedTotal();
        if (sharesTotal == 0) {
            return 0;
        }
        return user.shares.mul(wantLockedTotal).div(sharesTotal);
    }

    // Want tokens moved from user -> AUTOFarm (AUTO allocation) -> Strat (compounding)
    function deposit(uint256 _pid, uint256 _wantAmt) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        if (_wantAmt > 0) {
            pool.want.safeTransferFrom(
                address(msg.sender),
                address(this),
                _wantAmt
            );

            pool.want.safeIncreaseAllowance(pool.strat, _wantAmt);
            uint256 sharesAdded =
                IStrategy(poolInfo[_pid].strat).deposit(msg.sender, _wantAmt);
            user.shares = user.shares.add(sharesAdded);
        }

        emit Deposit(msg.sender, _pid, _wantAmt);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _wantAmt) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        uint256 wantLockedTotal =
            IStrategy(poolInfo[_pid].strat).wantLockedTotal();
        uint256 sharesTotal = IStrategy(poolInfo[_pid].strat).sharesTotal();

        require(user.shares > 0, "user.shares is 0");
        require(sharesTotal > 0, "sharesTotal is 0");

        // Withdraw want tokens
        uint256 amount = user.shares.mul(wantLockedTotal).div(sharesTotal);
        if (_wantAmt > amount) {
            _wantAmt = amount;
        }
        if (_wantAmt > 0) {
            uint256 sharesRemoved =
                IStrategy(poolInfo[_pid].strat).withdraw(msg.sender, _wantAmt);

            if (sharesRemoved > user.shares) {
                user.shares = 0;
            } else {
                user.shares = user.shares.sub(sharesRemoved);
            }

            uint256 wantBal = IERC20(pool.want).balanceOf(address(this));
            if (wantBal < _wantAmt) {
                _wantAmt = wantBal;
            }
            pool.want.safeTransfer(address(msg.sender), _wantAmt);
        }
        emit Withdraw(msg.sender, _pid, _wantAmt);
    }

    function inCaseTokensGetStuck(address _token, uint256 _amount)
        public
        onlyOwner
    {
        IERC20(_token).safeTransfer(msg.sender, _amount);
    }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"_want","type":"address"},{"indexed":false,"internalType":"bool","name":"_withUpdate","type":"bool"},{"indexed":false,"internalType":"address","name":"_strat","type":"address"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_want","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"address","name":"_strat","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"want","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accAUTOPerShare","type":"uint256"},{"internalType":"address","name":"strat","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"stakedWantTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600160045534801561001557600080fd5b5060006100266100d060201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600180819055506100d8565b600033905090565b6123b9806100e76000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c57806393f1a40b1161006657806393f1a40b14610330578063c6d758cb14610392578063e2bbb158146103e0578063f2fde38b14610418576100cf565b8063715018a6146102905780637b84daec1461029a5780638da5cb5b146102fc576100cf565b8063081e3eda146100d45780631526fe27146100f257806317caf6f11461017c578063441a3e701461019a5780635f70edcf146101d257806364482f791461024c575b600080fd5b6100dc61045c565b6040518082815260200191505060405180910390f35b61011e6004803603602081101561010857600080fd5b8101908080359060200190929190505050610469565b604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b6101846104ec565b6040518082815260200191505060405180910390f35b6101d0600480360360408110156101b057600080fd5b8101908080359060200190929190803590602001909291905050506104f2565b005b61024a600480360360808110156101e857600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4e565b005b61028e6004803603606081101561026257600080fd5b810190808035906020019092919080359060200190929190803515159060200190929190505050610de2565b005b610298610f1d565b005b6102e6600480360360408110156102b057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110a3565b6040518082815260200191505060405180910390f35b6103046112cf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61037c6004803603604081101561034657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f8565b6040518082815260200191505060405180910390f35b6103de600480360360408110156103a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611323565b005b610416600480360360408110156103f657600080fd5b81019080803590602001909291908035906020019092919050505061141a565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611746565b005b6000600280549050905090565b6002818154811061047657fe5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905085565b60045481565b6002600154141561056b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260018190555060006002838154811061058257fe5b9060005260206000209060050201905060006003600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600285815481106105f557fe5b906000526020600020906005020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b15801561066c57600080fd5b505afa158015610680573d6000803e3d6000fd5b505050506040513d602081101561069657600080fd5b810190808051906020019092919050505090506000600286815481106106b857fe5b906000526020600020906005020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561072f57600080fd5b505afa158015610743573d6000803e3d6000fd5b505050506040513d602081101561075957600080fd5b8101908080519060200190929190505050905060008360000154116107e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f757365722e73686172657320697320300000000000000000000000000000000081525060200191505060405180910390fd5b6000811161085c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f736861726573546f74616c20697320300000000000000000000000000000000081525060200191505060405180910390fd5b60006108878261087985876000015461195190919063ffffffff16565b6119d790919063ffffffff16565b905080861115610895578095505b6000861115610aef576000600288815481106108ad57fe5b906000526020600020906005020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f3fef3a333896040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561094f57600080fd5b505af1158015610963573d6000803e3d6000fd5b505050506040513d602081101561097957600080fd5b8101908080519060200190929190505050905084600001548111156109a757600085600001819055506109c7565b6109be818660000154611a2190919063ffffffff16565b85600001819055505b60008660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a5457600080fd5b505afa158015610a68573d6000803e3d6000fd5b505050506040513d6020811015610a7e57600080fd5b8101908080519060200190929190505050905087811015610a9d578097505b610aec33898960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611a6b9092919063ffffffff16565b50505b863373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568886040518082815260200191505060405180910390a35050505050600180819055505050565b610b56611b0d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610c2b84600454611b1590919063ffffffff16565b60048190555060026040518060a001604052808573ffffffffffffffffffffffffffffffffffffffff16815260200186815260200160008152602001600081526020018373ffffffffffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050507f7ac3b3d636ea03a286c25edba9e75801c02c65437a5fc04d2160a9693f7d31b384848484604051808581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183151581526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a150505050565b610dea611b0d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eaa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610eef82610ee160028681548110610ebe57fe5b906000526020600020906005020160010154600454611a2190919063ffffffff16565b611b1590919063ffffffff16565b6004819055508160028481548110610f0357fe5b906000526020600020906005020160010181905550505050565b610f25611b0d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fe5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600284815481106110b357fe5b9060005260206000209060050201905060006003600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118357600080fd5b505afa158015611197573d6000803e3d6000fd5b505050506040513d60208110156111ad57600080fd5b810190808051906020019092919050505090506000600287815481106111cf57fe5b906000526020600020906005020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b15801561124657600080fd5b505afa15801561125a573d6000803e3d6000fd5b505050506040513d602081101561127057600080fd5b8101908080519060200190929190505050905060008214156112995760009450505050506112c9565b6112c2826112b483866000015461195190919063ffffffff16565b6119d790919063ffffffff16565b9450505050505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6003602052816000526040600020602052806000526040600020600091509150508060000154905081565b61132b611b0d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61141633828473ffffffffffffffffffffffffffffffffffffffff16611a6b9092919063ffffffff16565b5050565b60026001541415611493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026001819055506000600283815481106114aa57fe5b9060005260206000209060050201905060006003600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008311156116ea576115683330858560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b9d909392919063ffffffff16565b6115db8260040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c5e9092919063ffffffff16565b6000600285815481106115ea57fe5b906000526020600020906005020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166347e7ef2433866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561168c57600080fd5b505af11580156116a0573d6000803e3d6000fd5b505050506040513d60208110156116b657600080fd5b810190808051906020019092919050505090506116e0818360000154611b1590919063ffffffff16565b8260000181905550505b833373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15856040518082815260200191505060405180910390a35050600180819055505050565b61174e611b0d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461180e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611894576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122ed6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008083141561196457600090506119d1565b600082840290508284828161197557fe5b04146119cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806123396021913960400191505060405180910390fd5b809150505b92915050565b6000611a1983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611dd7565b905092915050565b6000611a6383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e9d565b905092915050565b611b088363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611f5d565b505050565b600033905090565b600080828401905083811015611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611c58846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611f5d565b50505050565b6000611d32828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611ce957600080fd5b505afa158015611cfd573d6000803e3d6000fd5b505050506040513d6020811015611d1357600080fd5b8101908080519060200190929190505050611b1590919063ffffffff16565b9050611dd18463095ea7b360e01b8584604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611f5d565b50505050565b60008083118290611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e48578082015181840152602081019050611e2d565b50505050905090810190601f168015611e755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611e8f57fe5b049050809150509392505050565b6000838311158290611f4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f0f578082015181840152602081019050611ef4565b50505050905090810190601f168015611f3c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6060611fbf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661204c9092919063ffffffff16565b905060008151111561204757808060200190516020811015611fe057600080fd5b8101908080519060200190929190505050612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061235a602a913960400191505060405180910390fd5b5b505050565b606061205b8484600085612064565b90509392505050565b6060824710156120bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806123136026913960400191505060405180910390fd5b6120c88561220d565b61213a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061218a5780518252602082019150602081019050602083039250612167565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146121ec576040519150601f19603f3d011682016040523d82523d6000602084013e6121f1565b606091505b5091509150612201828286612220565b92505050949350505050565b600080823b905060008111915050919050565b60608315612230578290506122e5565b6000835111156122435782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156122aa57808201518184015260208101905061228f565b50505050905090810190601f1680156122d75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f7e65baec5b65773149a2404bf6ca94a6f9085374dfeed751a57067e168aeb6c64736f6c634300060c0033

Deployed ByteCode Sourcemap

45132:5548:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46553:95;;;:::i;:::-;;;;;;;;;;;;;;;;;;;45845:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46015:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;;49201:1298;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;46858:526;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;47480:291;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;41768:148;;;:::i;:::-;;47840:535;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;41126:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;45900:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;50507:170;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;48472:677;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;42071:281;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;46553:95;46598:7;46625:8;:15;;;;46618:22;;46553:95;:::o;45845:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;46015:34::-;;;;:::o;49201:1298::-;43353:1;43958:7;;:19;;43950:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43353:1;44091:7;:18;;;;49282:21:::1;49306:8;49315:4;49306:14;;;;;;;;;;;;;;;;;;49282:38;;49331:21;49355:8;:14;49364:4;49355:14;;;;;;;;;;;:26;49370:10;49355:26;;;;;;;;;;;;;;;49331:50;;49394:23;49443:8;49452:4;49443:14;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;49433:47;;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;49394:88;;49493:19;49525:8;49534:4;49525:14;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;49515:43;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;49493:67;;49595:1;49581:4;:11;;;:15;49573:44;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;49650:1;49636:11;:15;49628:44;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;49718:14;49735:49;49772:11;49735:32;49751:15;49735:4;:11;;;:15;;:32;;;;:::i;:::-;:36;;:49;;;;:::i;:::-;49718:66;;49810:6;49799:8;:17;49795:67;;;49844:6;49833:17;;49795:67;49887:1;49876:8;:12;49872:568;;;49905:21;49956:8;49965:4;49956:14;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;49946:40;;;49987:10;49999:8;49946:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;49905:103;;50045:4;:11;;;50029:13;:27;50025:168;;;50091:1;50077:4;:11;;:15;;;;50025:168;;;50147:30;50163:13;50147:4;:11;;;:15;;:30;;;;:::i;:::-;50133:4;:11;;:44;;;;50025:168;50209:15;50234:4;:9;;;;;;;;;;;;50227:27;;;50263:4;50227:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;50209:60;;50298:8;50288:7;:18;50284:77;;;50338:7;50327:18;;50284:77;50375:53;50406:10;50419:8;50375:4;:9;;;;;;;;;;;;:22;;;;:53;;;;;:::i;:::-;49872:568;;;50476:4;50464:10;50455:36;;;50482:8;50455:36;;;;;;;;;;;;;;;;;;44122:1;;;;;43309::::0;44270:7;:22;;;;49201:1298;;:::o;46858:526::-;41348:12;:10;:12::i;:::-;41338:22;;:6;;;;;;;;;;:22;;;41330:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47029:32:::1;47049:11;47029:15;;:19;;:32;;;;:::i;:::-;47011:15;:50;;;;47072:8;47100:203;;;;;;;;47134:5;47100:203;;;;;;47170:11;47100:203;;;;47217:1;47100:203;;;;47254:1;47100:203;;;;47281:6;47100:203;;;;::::0;47072:242:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47332:44;47336:11;47349:5;47356:11;47369:6;47332:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46858:526:::0;;;;:::o;47480:291::-;41348:12;:10;:12::i;:::-;41338:22;;:6;;;;;;;;;;:22;;;41330:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47626:87:::1;47691:11;47626:46;47646:8;47655:4;47646:14;;;;;;;;;;;;;;;;;;:25;;;47626:15;;:19;;:46;;;;:::i;:::-;:50;;:87;;;;:::i;:::-;47608:15;:105;;;;47752:11;47724:8;47733:4;47724:14;;;;;;;;;;;;;;;;;;:25;;:39;;;;47480:291:::0;;;:::o;41768:148::-;41348:12;:10;:12::i;:::-;41338:22;;:6;;;;;;;;;;:22;;;41330:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41875:1:::1;41838:40;;41859:6;::::0;::::1;;;;;;;;41838:40;;;;;;;;;;;;41906:1;41889:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;41768:148::o:0;47840:535::-;47945:7;47970:21;47994:8;48003:4;47994:14;;;;;;;;;;;;;;;;;;47970:38;;48019:21;48043:8;:14;48052:4;48043:14;;;;;;;;;;;:21;48058:5;48043:21;;;;;;;;;;;;;;;48019:45;;48077:19;48109:4;:10;;;;;;;;;;;;48099:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48077:57;;48145:23;48194:8;48203:4;48194:14;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;48184:47;;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48145:88;;48263:1;48248:11;:16;48244:57;;;48288:1;48281:8;;;;;;;;48244:57;48318:49;48355:11;48318:32;48334:15;48318:4;:11;;;:15;;:32;;;;:::i;:::-;:36;;:49;;;;:::i;:::-;48311:56;;;;;;47840:535;;;;;:::o;41126:79::-;41164:7;41191:6;;;;;;;;;;;41184:13;;41126:79;:::o;45900:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;50507:170::-;41348:12;:10;:12::i;:::-;41338:22;;:6;;;;;;;;;;:22;;;41330:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50621:48:::1;50649:10;50661:7;50628:6;50621:27;;;;:48;;;;;:::i;:::-;50507:170:::0;;:::o;48472:677::-;43353:1;43958:7;;:19;;43950:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43353:1;44091:7;:18;;;;48552:21:::1;48576:8;48585:4;48576:14;;;;;;;;;;;;;;;;;;48552:38;;48601:21;48625:8;:14;48634:4;48625:14;;;;;;;;;;;:26;48640:10;48625:26;;;;;;;;;;;;;;;48601:50;;48679:1;48668:8;:12;48664:425;;;48697:138;48750:10;48788:4;48812:8;48697:4;:9;;;;;;;;;;;;:26;;;;:138;;;;;;:::i;:::-;48852:53;48884:4;:10;;;;;;;;;;;;48896:8;48852:4;:9;;;;;;;;;;;;:31;;;;:53;;;;;:::i;:::-;48920:19;48969:8;48978:4;48969:14;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;48959:39;;;48999:10;49011:8;48959:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;48920:100;;49049:28;49065:11;49049:4;:11;;;:15;;:28;;;;:::i;:::-;49035:4;:11;;:42;;;;48664:425;;49126:4;49114:10;49106:35;;;49132:8;49106:35;;;;;;;;;;;;;;;;;;44122:1;;43309::::0;44270:7;:22;;;;48472:677;;:::o;42071:281::-;41348:12;:10;:12::i;:::-;41338:22;;:6;;;;;;;;;;:22;;;41330:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42194:1:::1;42174:22;;:8;:22;;;;42152:110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42307:8;42278:38;;42299:6;::::0;::::1;;;;;;;;42278:38;;;;;;;;;;;;42336:8;42327:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;42071:281:::0;:::o;2213:471::-;2271:7;2521:1;2516;:6;2512:47;;;2546:1;2539:8;;;;2512:47;2571:9;2587:1;2583;:5;2571:17;;2616:1;2611;2607;:5;;;;;;:10;2599:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2675:1;2668:8;;;2213:471;;;;;:::o;3160:132::-;3218:7;3245:39;3249:1;3252;3245:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3238:46;;3160:132;;;;:::o;1289:136::-;1347:7;1374:43;1378:1;1381;1374:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1367:50;;1289:136;;;;:::o;27259:248::-;27376:123;27410:5;27453:23;;;27478:2;27482:5;27430:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27376:19;:123::i;:::-;27259:248;;;:::o;208:106::-;261:15;296:10;289:17;;208:106;:::o;825:181::-;883:7;903:9;919:1;915;:5;903:17;;944:1;939;:6;;931:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;997:1;990:8;;;825:181;;;;:::o;27515:285::-;27659:133;27693:5;27736:27;;;27765:4;27771:2;27775:5;27713:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27659:19;:133::i;:::-;27515:285;;;;:::o;28784:436::-;28915:20;28951:50;28995:5;28951;:15;;;28975:4;28982:7;28951:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:43;;:50;;;;:::i;:::-;28915:86;;29012:200;29046:5;29107:22;;;29148:7;29174:12;29066:135;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29012:19;:200::i;:::-;28784:436;;;;:::o;3788:312::-;3908:7;3940:1;3936;:5;3943:12;3928:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3967:9;3983:1;3979;:5;;;;;;3967:17;;4091:1;4084:8;;;3788:312;;;;;:::o;1728:226::-;1848:7;1881:1;1876;:6;;1884:12;1868:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1908:9;1924:1;1920;:5;1908:17;;1945:1;1938:8;;;1728:226;;;;;:::o;30149:885::-;30573:23;30612:118;30658:4;30612:118;;;;;;;;;;;;;;;;;30620:5;30612:27;;;;:118;;;;;:::i;:::-;30573:157;;30765:1;30745:10;:17;:21;30741:286;;;30918:10;30907:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30881:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30741:286;30149:885;;;:::o;22255:229::-;22392:12;22424:52;22446:6;22454:4;22460:1;22463:12;22424:21;:52::i;:::-;22417:59;;22255:229;;;;;:::o;23471:621::-;23641:12;23713:5;23688:21;:30;;23666:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23803:18;23814:6;23803:10;:18::i;:::-;23795:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23929:12;23943:23;23983:6;:11;;24002:5;24009:4;23983:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23928:86;;;;24032:52;24050:7;24059:10;24071:12;24032:17;:52::i;:::-;24025:59;;;;23471:621;;;;;;:::o;19218:444::-;19278:4;19486:12;19610:7;19598:20;19590:28;;19653:1;19646:4;:8;19639:15;;;19218:444;;;:::o;26383:777::-;26533:12;26562:7;26558:595;;;26593:10;26586:17;;;;26558:595;26727:1;26707:10;:17;:21;26703:439;;;26970:10;26964:17;27031:15;27018:10;27014:2;27010:19;27003:44;26918:148;27113:12;27106:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26383:777;;;;;;:::o

Swarm Source

ipfs://f7e65baec5b65773149a2404bf6ca94a6f9085374dfeed751a57067e168aeb6c
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.