Contract 0xd003a09719d45db83c07872e18bc3e1a69b4824a

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x26d5fde7a82dbabc1e87c84e6094989920072376af0b0220dfc4bdf419070db1Deposit187063992022-08-16 5:51:4844 mins ago0x7356eb43c0144127945c2f879d15ffac1898c4fa IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029286675 27.‍5
0xd3bf5738efc7de3d24190d0709b90a0022dd7a7cfbf01fb93d5eaac52055967eDeposit187061222022-08-16 5:42:2954 mins ago0xd02b6c859015d41c5f96ba4660a8c975f337db93 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003624445 27.‍5
0xec97bf636a93aceeb1abb649897a69c09b96585041478edca4b0c98ff5369331Deposit187057952022-08-16 5:31:301 hr 5 mins ago0x997aa3a651b90878eccefcb6f4d85af0237428da IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029283375 27.‍5
0xa534ae36b6e776a21b65d41ca573684ca743efde93d37d96e82d5d98d0e23a06Withdraw187057742022-08-16 5:30:481 hr 5 mins ago0x997aa3a651b90878eccefcb6f4d85af0237428da IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍002400805 27.‍5
0x831a40f7483099ae13c56977b26c4f10ccf017d1921a9c733928541d0b20781aDeposit187057322022-08-16 5:29:241 hr 7 mins ago0xe353fd6f40889b08684f9bc553dd95e668be02a2 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029283375 27.‍5
0x50cfd8546738932883065ddab9ea8258f504e96c3e1613f048eb805eaa97c23dDeposit187047622022-08-16 4:56:561 hr 39 mins ago0xf2956378723dc43085a1e4cf34a67f4d31dce6ee IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029286675 27.‍5
0x734c33d51f802d7259020b11bcd9397035073b845a5ed12d531014fdd694d539Withdraw187047082022-08-16 4:55:071 hr 41 mins ago0xf2956378723dc43085a1e4cf34a67f4d31dce6ee IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍00265089 27.‍5
0xe0f8d9a305e7cc0abaeef391802e1c8bd2d256e093acd157c4d23d35ae349585Deposit187045272022-08-16 4:49:001 hr 47 mins ago0x716f6828b336d863e843c32714977a40e683a44a IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003624445 27.‍5
0x577aa469cc70dd7a6e2695f843c7bf41b20d70cd00eacccafb93fd11473088feWithdraw187044872022-08-16 4:47:401 hr 48 mins ago0xd97e6de29bb4a3d6dbcd3741a79334556831cece IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0025206225 27.‍5
0xfadcc814d54c46b328ac9a1f30b1149e42707ae0a1de1f48df63fb8082faf085Withdraw187043542022-08-16 4:43:131 hr 53 mins ago0x731e032d4ff962a4a84993c7e0ea948b0bc22281 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003419075 27.‍5
0xc74549135d45577dcaf4d27ac5ca4af2255ff336f80d12990dcec408864e62a7Deposit187038812022-08-16 4:27:172 hrs 9 mins ago0x1dc8e1fbeb709186dcde31694a98c45123e8040f IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003623785 27.‍5
0x2bed52d194dd09f37e219e57de5959f6f96b62cb76c4b59489d66e6019267315Deposit187038122022-08-16 4:24:592 hrs 11 mins ago0x554d9fda5df38ce610804764a8763f3da4181606 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029286675 27.‍5
0x264460984aff9e5c170e45b4e03f269246c59a5cdfbe30aee6cf47c1983c3ce7Withdraw187037162022-08-16 4:21:462 hrs 14 mins ago0x554d9fda5df38ce610804764a8763f3da4181606 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍00265056 27.‍5
0xa7de65e6a2268b3ac36cdf789ad59fa8fa878bf985baac8c55607f2b73e1f371Deposit187035432022-08-16 4:15:502 hrs 20 mins ago0x06b6b8f5a6c5ffb06391e24cabc4e84abac97549 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003555145 27.‍5
0x44250c12c32c5c297c3b2214c4c28f1f9892fe8bb1dbc5c0883ff8ff8b825671Withdraw187034792022-08-16 4:13:392 hrs 22 mins ago0x06b6b8f5a6c5ffb06391e24cabc4e84abac97549 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029908725 27.‍5
0xa4394cdd9883fb6f496ca39b52d939a533e470ea2fa3932604cb5158dca10c9dWithdraw187034402022-08-16 4:12:212 hrs 24 mins ago0x5a6a3e1a2e9dd43bc189eb3f79af47500798704b IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍002646985 27.‍5
0x082f21d672aae97c654d1df3c388bcd5705a77c652d709dec434ea773456934fDeposit187034312022-08-16 4:12:032 hrs 24 mins ago0x17310439bd83e4c4a18b9ab5b2e7f3d61b81341b IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003554815 27.‍5
0xbeb14d23033f87024cf64802d8558e456c7760a324251a597ef38a4c83b55a72Withdraw187034132022-08-16 4:11:272 hrs 25 mins ago0x5a6a3e1a2e9dd43bc189eb3f79af47500798704b IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍002400805 27.‍5
0xdac1f1306ff2045dcc8e19c1afea14f459f3fba4b5bd7cda7ad05fb96bf87d4cDeposit187033212022-08-16 4:08:212 hrs 28 mins ago0xfdbd5e0ecb8a4343e325874a1bc69cf25881bbac IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029289975 27.‍5
0x0d1cb7c91dcd34733e9b18222c526ae4290e232fae0820561411560690a258a9Deposit187031722022-08-16 4:03:232 hrs 33 mins ago0x3fc1184ad25839c81fa21f6ec1cca0fb5f655583 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍003624445 27.‍5
0xfd4ac5b7750a9eddca8023a543f2cf47c1da900f03f3562176c390ccec36d55bDeposit187031042022-08-16 4:01:052 hrs 35 mins ago0x3fc1184ad25839c81fa21f6ec1cca0fb5f655583 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍001821875 27.‍5
0xf20a819e2d5ef3b34d891df54fe090577b7f434f2f3ed45dde3a88d9d80d9cb9Withdraw187028392022-08-16 3:52:122 hrs 44 mins ago0x17310439bd83e4c4a18b9ab5b2e7f3d61b81341b IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0025206225 27.‍5
0x8cdfbfcf52c842728779a572bed9b2e607b5756580d6281d40477c1331df47ecWithdraw187025232022-08-16 3:41:362 hrs 54 mins ago0x56183a8c63cd775c7cd20fdeba4273d54d154744 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0025206225 27.‍5
0xe9a8153b6806e3a7083c690791bef44d9170f00780cfeb2a7be1522a1f62bbc2Deposit187024302022-08-16 3:38:292 hrs 58 mins ago0xc830ebb06093b1ce9dfcc8384162db19436cce9f IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0033379225 27.‍5
0x69f74f82507897a2c0261b7bfbaa6ccaf27fb3ee3be37956a55cc5168f85f894Deposit187023392022-08-16 3:35:273 hrs 1 min ago0xd3dde6beef3a813e462ed5ad920b77e676181b99 IN  0xd003a09719d45db83c07872e18bc3e1a69b4824a0 AVAX0.‍0029286675 27.‍5
[ Download CSV Export 
Latest 6 internal transactions
Parent Txn Hash Block From To Value
0x1f4456e3f86affe6aa19bc77e8b2cc9e34bbe3fdeb6cc6b9ddfe15014d46be17178635402022-07-27 9:54:0719 days 20 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍23 AVAX
0xe7f50487e52dda96732dff247d97190b6f9ce4b208b855089184c4a27ccc166f178623032022-07-27 9:10:1919 days 21 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍10581426 AVAX
0x92d4f361cf1b6ea31231eab1f369d76ebfec9480dd38f17cb8ed993b9be382e1149782692022-05-21 8:00:1786 days 22 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍02 AVAX
0xcbae91b7a228b9c2ad2f6e6f9c11dc64dcebedc2fafbb0e4259aaa68de1a1b6c106481652022-02-08 11:34:14188 days 19 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍58126017 AVAX
0x9fb9b0387127261333378daf7eb9d0235bd7249aa8fc3e63e82555982c40cdec103677862022-02-02 2:04:38195 days 4 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍005 AVAX
0xd62fbc000b891dd36eb06a32f550ccff2efe77ada349bb504b9ae16130f4ba89102269192022-01-29 20:57:19198 days 9 hrs ago 0xd003a09719d45db83c07872e18bc3e1a69b4824a0x4876d518c121351359987f0ecb6ffdbe21098c340.‍5 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Asgard

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at snowtrace.io on 2022-04-03
*/

pragma solidity >=0.6.0 <0.8.11;

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

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

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

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

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
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(uint160(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(uint160(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(uint160(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(uint160(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));
    }
}

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

pragma experimental ABIEncoderV2;

// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;

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

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor() public {
        owner = msg.sender;
    }

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

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        require(newOwner != address(0));
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
abstract contract ERC20Basic {
    function totalSupply() public view virtual returns (uint256);

    function balanceOf(address who) public view virtual returns (uint256);

    function transfer(address to, uint256 value) public virtual returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract 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() {
        _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;
    }
}

/// @title Staking contract for farming THOR rewards in return for staking a whitelisted token(s)
/// @dev Only the owner can add new pools
contract Asgard is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /// @dev Details about each user in a pool
    struct UserInfo {
        uint256 amount; // How many tokens the user has provided to a pool
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of THORs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accTHORPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws ERC20 tokens to a pool. Here's what happens:
        //   1. The pool's `accTHORPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    /// @dev Info of each pool.
    struct PoolInfo {
        IERC20 erc20Token; // Address of token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool; this is a weighting for rewards.
        uint256 lastRewardBlock; // Last block number that THOR distribution has occurred up to endBlock.
        uint256 accumulatedTHORPerShare; // Per LP token staked, how much THOR earned in pool that users will get
        uint256 maxStakingAmountPerUser; // Max. amount of tokens that can be staked per account/user
    }

    /// @notice The reward token aka $THOR
    IERC20 public THOR;

    /// @notice Number of THOR tokens distributed per block, across all pools.
    uint256 public THORPerBlock;

    /// @notice The total amount of reward token available for farming across all pools between start and end block.
    uint256 public maxTHORAvailableForFarming;

    /// @notice List of pools that users can stake into
    PoolInfo[] public poolInfo;

    /// @notice Per pool, info of each user that stakes ERC20 tokens.
    /// @notice Pool ID => User Address => User Info
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    /// @notice Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    /// @notice The block number when THOR rewards starts across all pools.
    uint256 public startBlock;

    /// @notice The block number when rewards ends.
    uint256 public endBlock;

    /// @notice Tracks ERC20 tokens added by owner
    mapping(address => bool) isErc20TokenWhitelisted;

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


    constructor(
        IERC20 _THOR,
        uint256 _maxTHORAvailableForFarming,
        uint256 blocksPerDay,
        uint256 numberOfDays
    ) public {
        require(
            address(_THOR) != address(0),
            "constructor: _THOR must not be zero address"
        );
        require(
            _maxTHORAvailableForFarming > 0,
            "constructor: _maxTHORAvailableForFarming must be greater than zero"
        );

        THOR = _THOR;
        maxTHORAvailableForFarming = _maxTHORAvailableForFarming;
        startBlock = block.number + uint256(4687);
        endBlock = startBlock.add(blocksPerDay.mul(numberOfDays));

        uint256 numberOfBlocksForFarming = endBlock.sub(startBlock);
        THORPerBlock = maxTHORAvailableForFarming.div(numberOfBlocksForFarming);
    }

    function blockNumber() external view returns (uint256) {
        return block.number;
    }

    /// @notice Returns the number of pools that have been added by the owner
    /// @return Number of pools
    function numberOfPools() external view returns (uint256) {
        return poolInfo.length;
    }

    /// @notice Create a new THOR pool by whitelisting a new ERC20 token.
    /// @dev Can only be called by the contract owner
    /// @param _allocPoint Governs what percentage of the total THOR rewards this pool and other pools will get
    /// @param _erc20Token Address of the staking token being whitelisted
    /// @param _maxStakingAmountPerUser For this pool, maximum amount per user that can be staked
    /// @param _withUpdate Set to true for updating all pools before adding this one
    function add(
        uint256 _allocPoint,
        IERC20 _erc20Token,
        uint256 _maxStakingAmountPerUser,
        bool _withUpdate
    ) public onlyOwner {
        require(block.number < endBlock, "add: must be before end");
        address erc20TokenAddress = address(_erc20Token);
        require(
            erc20TokenAddress != address(0),
            "add: _erc20Token must not be zero address"
        );
        require(
            isErc20TokenWhitelisted[erc20TokenAddress] == false,
            "add: already whitelisted"
        );
        require(
            _maxStakingAmountPerUser > 0,
            "add: _maxStakingAmountPerUser must be greater than zero"
        );

        if (_withUpdate) {
            massUpdatePools();
        }

        uint256 lastRewardBlock = block.number > startBlock
            ? block.number
            : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                erc20Token: _erc20Token,
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accumulatedTHORPerShare: 0,
                maxStakingAmountPerUser: _maxStakingAmountPerUser
            })
        );

        isErc20TokenWhitelisted[erc20TokenAddress] = true;
    }

    /// @notice Update a pool's allocation point to increase or decrease its share of contract-level rewards
    /// @notice Can also update the max amount that can be staked per user
    /// @dev Can only be called by the owner
    /// @param _pid ID of the pool being updated
    /// @param _allocPoint New allocation point
    /// @param _maxStakingAmountPerUser Maximum amount that a user can deposit into the farm
    /// @param _withUpdate Set to true if you want to update all pools before making this change - it will checkpoint those rewards
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        uint256 _maxStakingAmountPerUser,
        bool _withUpdate
    ) public onlyOwner {
        require(block.number < endBlock, "set: must be before end");
        require(_pid < poolInfo.length, "set: invalid _pid");
        require(
            _maxStakingAmountPerUser > 0,
            "set: _maxStakingAmountPerUser must be greater than zero"
        );

        if (_withUpdate) {
            massUpdatePools();
        }

        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );

        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].maxStakingAmountPerUser = _maxStakingAmountPerUser;
    }

    /// @notice View function to see pending and unclaimed THORs for a given user
    /// @param _pid ID of the pool where a user has a stake
    /// @param _user Account being queried
    /// @return Amount of THOR tokens due to a user
    function pendingTHOR(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        require(_pid < poolInfo.length, "pendingTHOR: invalid _pid");

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        uint256 accTHORPerShare = pool.accumulatedTHORPerShare;
        uint256 lpSupply = pool.erc20Token.balanceOf(address(this));

        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 maxEndBlock = block.number <= endBlock
                ? block.number
                : endBlock;
            uint256 multiplier = getMultiplier(
                pool.lastRewardBlock,
                maxEndBlock
            );
            uint256 THORReward = multiplier
                .mul(THORPerBlock)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
            accTHORPerShare = accTHORPerShare.add(
                THORReward.mul(1e18).div(lpSupply)
            );
        }

        return user.amount.mul(accTHORPerShare).div(1e18).sub(user.rewardDebt);
    }

    /// @notice Cycles through the pools to update all of the rewards accrued
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    /// @notice Updates a specific pool to track all of the rewards accrued up to the TX block
    /// @param _pid ID of the pool
    function updatePool(uint256 _pid) public {
        require(_pid < poolInfo.length, "updatePool: invalid _pid");

        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }

        uint256 erc20Supply = pool.erc20Token.balanceOf(address(this));
        if (erc20Supply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }

        uint256 maxEndBlock = block.number <= endBlock
            ? block.number
            : endBlock;
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, maxEndBlock);

        // No point in doing any more logic as the rewards have ended
        if (multiplier == 0) {
            return;
        }

        uint256 THORReward = multiplier
            .mul(THORPerBlock)
            .mul(pool.allocPoint)
            .div(totalAllocPoint);

        pool.accumulatedTHORPerShare = pool.accumulatedTHORPerShare.add(
            THORReward.mul(1e18).div(erc20Supply)
        );
        pool.lastRewardBlock = maxEndBlock;
    }

    /// @notice Where any user can stake their ERC20 tokens into a pool in order to farm $THOR
    /// @param _pid ID of the pool
    /// @param _amount Amount of ERC20 being staked
    function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        require(
            user.amount.add(_amount) <= pool.maxStakingAmountPerUser,
            "deposit: can not exceed max staking amount per user"
        );

        updatePool(_pid);

        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accumulatedTHORPerShare)
                .div(1e18)
                .sub(user.rewardDebt);
            if (pending > 0) {
                safeTHORTransfer(msg.sender, pending);
            }
        }

        if (_amount > 0) {
            pool.erc20Token.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
            user.amount = user.amount.add(_amount);
        }

        user.rewardDebt = user.amount.mul(pool.accumulatedTHORPerShare).div(
            1e18
        );
        emit Deposit(msg.sender, _pid, _amount);
    }

    /// @notice Allows a user to withdraw any ERC20 tokens staked in a pool
    /// @dev Partial withdrawals permitted
    /// @param _pid Pool ID
    /// @param _amount Being withdrawn
    function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        require(user.amount >= _amount, "withdraw: _amount not good");

        updatePool(_pid);

        uint256 pending = user
            .amount
            .mul(pool.accumulatedTHORPerShare)
            .div(1e18)
            .sub(user.rewardDebt);
        if (pending > 0) {
            safeTHORTransfer(msg.sender, pending);
        }

        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.erc20Token.safeTransfer(address(msg.sender), _amount);
        }

        user.rewardDebt = user.amount.mul(pool.accumulatedTHORPerShare).div(
            1e18
        );
        emit Withdraw(msg.sender, _pid, _amount);
    }

    /// @notice Emergency only. Should the rewards issuance mechanism fail, people can still withdraw their stake
    /// @param _pid Pool ID
    function emergencyWithdraw(uint256 _pid) external nonReentrant {
        require(_pid < poolInfo.length, "updatePool: invalid _pid");

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;

        pool.erc20Token.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    ////////////
    // Private /
    ////////////

    /// @dev Safe THOR transfer function, just in case if rounding error causes pool to not have enough THORs.
    /// @param _to Whom to send THOR into
    /// @param _amount of THOR to send
    function safeTHORTransfer(address _to, uint256 _amount) private {
        uint256 THORBal = THOR.balanceOf(address(this));
        if (_amount > THORBal) {
            THOR.transfer(_to, THORBal);
        } else {
            THOR.transfer(_to, _amount);
        }
    }

    /// @notice Return reward multiplier over the given _from to _to block.
    /// @param _from Block number
    /// @param _to Block number
    /// @return Number of blocks that have passed
    function getMultiplier(uint256 _from, uint256 _to)
        private
        view
        returns (uint256)
    {
        return _to.sub(_from);
    }

    /**
     * @notice Update reward per block and the end block
     * @param newRewardPerBlock the new reward per block
     * @param newEndBlock the new end block
     */
    function updateRewardPerBlockAndEndBlock(uint256 newRewardPerBlock, uint256 newEndBlock) external onlyOwner {
        if (block.number >= startBlock) {
            massUpdatePools();
        }
        require(newEndBlock > block.number, "Owner: New endBlock must be after current block");
        require(newEndBlock > startBlock, "Owner: New endBlock must be after start block");

        endBlock = newEndBlock;
        THORPerBlock = newRewardPerBlock;
    }

    // safe fallback for recovery
    fallback() external payable {
        payable(owner).transfer(msg.value);
    }

    /**
     * @notice Withdraw rewards (for admin)
     * @param amount amount to withdraw (in THOR)
     * @dev Only callable by owner.
     */
    function adminRewardWithdraw(uint256 amount) external onlyOwner {
        THOR.safeTransfer(msg.sender, amount);
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_THOR","type":"address"},{"internalType":"uint256","name":"_maxTHORAvailableForFarming","type":"uint256"},{"internalType":"uint256","name":"blocksPerDay","type":"uint256"},{"internalType":"uint256","name":"numberOfDays","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"THOR","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"THORPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_erc20Token","type":"address"},{"internalType":"uint256","name":"_maxStakingAmountPerUser","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTHORAvailableForFarming","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingTHOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"erc20Token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accumulatedTHORPerShare","type":"uint256"},{"internalType":"uint256","name":"maxStakingAmountPerUser","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_maxStakingAmountPerUser","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","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":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"newEndBlock","type":"uint256"}],"name":"updateRewardPerBlockAndEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620020f9380380620020f98339810160408190526200003491620003a6565b600080546001600160a01b03191633179055600180556001600160a01b038416620000ba5760405162461bcd60e51b815260206004820152602b60248201527f636f6e7374727563746f723a205f54484f52206d757374206e6f74206265207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b600083116200013d5760405162461bcd60e51b815260206004820152604260248201527f636f6e7374727563746f723a205f6d617854484f52417661696c61626c65466f60448201527f724661726d696e67206d7573742062652067726561746572207468616e207a65606482015261726f60f01b608482015260a401620000b1565b600280546001600160a01b0319166001600160a01b03861617905560048390556200016b61124f43620003f3565b600855620001a16200018a8383620001f4602090811b6200138817901c565b6008546200028460201b6200140e1790919060201c565b6009819055506000620001c7600854600954620002e760201b6200146d1790919060201c565b9050620001e5816004546200034760201b620014c91790919060201c565b60035550620004839350505050565b60008262000205575060006200027e565b600062000213838562000431565b9050826200022285836200040e565b146200027b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401620000b1565b90505b92915050565b600080620002938385620003f3565b9050838110156200027b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401620000b1565b6000828211156200033b5760405162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006044820152606401620000b1565b6200027b828462000453565b60008082116200039a5760405162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f0000000000006044820152606401620000b1565b6200027b82846200040e565b60008060008060808587031215620003bd57600080fd5b84516001600160a01b0381168114620003d557600080fd5b60208601516040870151606090970151919890975090945092505050565b600082198211156200040957620004096200046d565b500190565b6000826200042c57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200044e576200044e6200046d565b500290565b6000828210156200046857620004686200046d565b500390565b634e487b7160e01b600052601160045260246000fd5b611c6680620004936000396000f3fe6080604052600436106101355760003560e01c8063602a2088116100ab5780638da5cb5b1161006f5780638da5cb5b1461037c57806393f1a40b1461039c578063988d7a60146103f0578063dead81b314610410578063e2bbb15814610430578063f2fde38b1461045057610135565b8063602a2088146102fc578063630b5ba1146103125780636f682a53146103275780638060bf0c1461033c5780638862445a1461035c57610135565b806348f853ba116100fd57806348f853ba1461023b57806351eb05a6146102735780635312ea8e1461029357806356823fb5146102b357806357e871e7146102c957806359f04058146102dc57610135565b8063083c6323146101725780631526fe271461019b57806317caf6f1146101ed578063441a3e701461020357806348cd4cb114610225575b600080546040516001600160a01b03909116913480156108fc02929091818181858888f1935050505015801561016f573d6000803e3d6000fd5b50005b34801561017e57600080fd5b5061018860095481565b6040519081526020015b60405180910390f35b3480156101a757600080fd5b506101bb6101b63660046119a0565b610470565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a001610192565b3480156101f957600080fd5b5061018860075481565b34801561020f57600080fd5b5061022361021e366004611a4c565b6104bb565b005b34801561023157600080fd5b5061018860085481565b34801561024757600080fd5b5060025461025b906001600160a01b031681565b6040516001600160a01b039091168152602001610192565b34801561027f57600080fd5b5061022361028e3660046119a0565b610664565b34801561029f57600080fd5b506102236102ae3660046119a0565b61080c565b3480156102bf57600080fd5b5061018860035481565b3480156102d557600080fd5b5043610188565b3480156102e857600080fd5b506101886102f73660046119d2565b610927565b34801561030857600080fd5b5061018860045481565b34801561031e57600080fd5b50610223610b06565b34801561033357600080fd5b50600554610188565b34801561034857600080fd5b506102236103573660046119a0565b610b31565b34801561036857600080fd5b50610223610377366004611a6e565b610b62565b34801561038857600080fd5b5060005461025b906001600160a01b031681565b3480156103a857600080fd5b506103db6103b73660046119d2565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610192565b3480156103fc57600080fd5b5061022361040b366004611a02565b610d2e565b34801561041c57600080fd5b5061022361042b366004611a4c565b611047565b34801561043c57600080fd5b5061022361044b366004611a4c565b611145565b34801561045c57600080fd5b5061022361046b366004611966565b611303565b6005818154811061048057600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b600260015414156104e75760405162461bcd60e51b81526004016104de90611af3565b60405180910390fd5b600260018190555060006005838154811061050457610504611bf7565b60009182526020808320868452600682526040808520338652909252922080546005909202909201925083111561057d5760405162461bcd60e51b815260206004820152601a60248201527f77697468647261773a205f616d6f756e74206e6f7420676f6f6400000000000060448201526064016104de565b61058684610664565b60006105c382600101546105bd670de0b6b3a76400006105b78760030154876000015461138890919063ffffffff16565b906114c9565b9061146d565b905080156105d5576105d53382611524565b83156105ff5781546105e7908561146d565b825582546105ff906001600160a01b03163386611675565b6003830154825461061d91670de0b6b3a7640000916105b791611388565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b60055481106106b05760405162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b60448201526064016104de565b6000600582815481106106c5576106c5611bf7565b90600052602060002090600502019050806002015443116106e4575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561072757600080fd5b505afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f91906119b9565b90508061077157504360029091015550565b600060095443111561078557600954610787565b435b905060006107998460020154836116d8565b9050806107a7575050505050565b60006107d26007546105b787600101546107cc6003548761138890919063ffffffff16565b90611388565b90506107f86107ed856105b784670de0b6b3a7640000611388565b60038701549061140e565b600386015550506002909201919091555050565b6002600154141561082f5760405162461bcd60e51b81526004016104de90611af3565b600260015560055481106108805760405162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b60448201526064016104de565b60006005828154811061089557610895611bf7565b6000918252602080832085845260068252604080852033808752935284208054858255600182019590955560059093020180549094509192916108e5916001600160a01b03919091169083611675565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b600554600090831061097b5760405162461bcd60e51b815260206004820152601960248201527f70656e64696e6754484f523a20696e76616c6964205f7069640000000000000060448201526064016104de565b60006005848154811061099057610990611bf7565b600091825260208083208784526006825260408085206001600160a01b03898116875293528085206005949094029091016003810154815492516370a0823160e01b815230600482015291965093949291909116906370a082319060240160206040518083038186803b158015610a0657600080fd5b505afa158015610a1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3e91906119b9565b9050836002015443118015610a5257508015155b15610ace576000600954431115610a6b57600954610a6d565b435b90506000610a7f8660020154836116d8565b90506000610aa66007546105b789600101546107cc6003548761138890919063ffffffff16565b9050610ac8610ac1856105b784670de0b6b3a7640000611388565b869061140e565b94505050505b610af983600101546105bd670de0b6b3a76400006105b786886000015461138890919063ffffffff16565b9450505050505b92915050565b60055460005b81811015610b2d57610b1d81610664565b610b2681611bc6565b9050610b0c565b5050565b6000546001600160a01b03163314610b4857600080fd5b600254610b5f906001600160a01b03163383611675565b50565b6000546001600160a01b03163314610b7957600080fd5b6009544310610bca5760405162461bcd60e51b815260206004820152601760248201527f7365743a206d757374206265206265666f726520656e6400000000000000000060448201526064016104de565b6005548410610c0f5760405162461bcd60e51b81526020600482015260116024820152701cd95d0e881a5b9d985b1a590817dc1a59607a1b60448201526064016104de565b60008211610c7f5760405162461bcd60e51b815260206004820152603760248201527f7365743a205f6d61785374616b696e67416d6f756e7450657255736572206d7560448201527673742062652067726561746572207468616e207a65726f60481b60648201526084016104de565b8015610c8d57610c8d610b06565b610cd083610cca60058781548110610ca757610ca7611bf7565b90600052602060002090600502016001015460075461146d90919063ffffffff16565b9061140e565b6007819055508260058581548110610cea57610cea611bf7565b9060005260206000209060050201600101819055508160058581548110610d1357610d13611bf7565b90600052602060002090600502016004018190555050505050565b6000546001600160a01b03163314610d4557600080fd5b6009544310610d965760405162461bcd60e51b815260206004820152601760248201527f6164643a206d757374206265206265666f726520656e6400000000000000000060448201526064016104de565b826001600160a01b038116610dff5760405162461bcd60e51b815260206004820152602960248201527f6164643a205f6572633230546f6b656e206d757374206e6f74206265207a65726044820152686f206164647265737360b81b60648201526084016104de565b6001600160a01b0381166000908152600a602052604090205460ff1615610e685760405162461bcd60e51b815260206004820152601860248201527f6164643a20616c72656164792077686974656c6973746564000000000000000060448201526064016104de565b60008311610ed85760405162461bcd60e51b815260206004820152603760248201527f6164643a205f6d61785374616b696e67416d6f756e7450657255736572206d7560448201527673742062652067726561746572207468616e207a65726f60481b60648201526084016104de565b8115610ee657610ee6610b06565b60006008544311610ef957600854610efb565b435b600754909150610f0b908761140e565b6007556040805160a0810182526001600160a01b0396871681526020808201988952818301938452600060608301818152608084019889526005805460018181018355828552955191027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081018054928d166001600160a01b0319909316929092179091559a517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db18c015594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db28b015593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db38a015595517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db490980197909755919094168452600a909252509020805460ff19169091179055565b6000546001600160a01b0316331461105e57600080fd5b600854431061106f5761106f610b06565b4381116110d65760405162461bcd60e51b815260206004820152602f60248201527f4f776e65723a204e657720656e64426c6f636b206d757374206265206166746560448201526e722063757272656e7420626c6f636b60881b60648201526084016104de565b600854811161113d5760405162461bcd60e51b815260206004820152602d60248201527f4f776e65723a204e657720656e64426c6f636b206d757374206265206166746560448201526c7220737461727420626c6f636b60981b60648201526084016104de565b600955600355565b600260015414156111685760405162461bcd60e51b81526004016104de90611af3565b600260018190555060006005838154811061118557611185611bf7565b60009182526020808320868452600682526040808520338652909252922060046005909202909201908101548254919350906111c1908561140e565b111561122b5760405162461bcd60e51b815260206004820152603360248201527f6465706f7369743a2063616e206e6f7420657863656564206d6178207374616b60448201527234b7339030b6b7bab73a103832b9103ab9b2b960691b60648201526084016104de565b61123484610664565b80541561128057600061126c82600101546105bd670de0b6b3a76400006105b78760030154876000015461138890919063ffffffff16565b9050801561127e5761127e3382611524565b505b82156112ac57815461129d906001600160a01b03163330866116e4565b80546112a9908461140e565b81555b600382015481546112ca91670de0b6b3a7640000916105b791611388565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610915565b6000546001600160a01b0316331461131a57600080fd5b6001600160a01b03811661132d57600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008261139757506000610b00565b60006113a38385611b64565b9050826113b08583611b42565b146114075760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104de565b9392505050565b60008061141b8385611b2a565b9050838110156114075760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104de565b6000828211156114bf5760405162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f77000060448201526064016104de565b6114078284611b83565b600080821161151a5760405162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f00000000000060448201526064016104de565b6114078284611b42565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561156857600080fd5b505afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a091906119b9565b9050808211156116375760025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018490529091169063a9059cbb906044015b602060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116319190611983565b50505050565b60025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb906044016115df565b505050565b6040516001600160a01b03831660248201526044810182905261167090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261171c565b6000611407828461146d565b6040516001600160a01b03808516602483015283166044820152606481018290526116319085906323b872dd60e01b906084016116a1565b6000611771826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117ee9092919063ffffffff16565b805190915015611670578080602001905181019061178f9190611983565b6116705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104de565b60606117fd8484600085611805565b949350505050565b6060824710156118665760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104de565b843b6118b45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104de565b600080866001600160a01b031685876040516118d09190611aa4565b60006040518083038185875af1925050503d806000811461190d576040519150601f19603f3d011682016040523d82523d6000602084013e611912565b606091505b509150915061192282828661192d565b979650505050505050565b6060831561193c575081611407565b82511561194c5782518084602001fd5b8160405162461bcd60e51b81526004016104de9190611ac0565b60006020828403121561197857600080fd5b813561140781611c0d565b60006020828403121561199557600080fd5b815161140781611c22565b6000602082840312156119b257600080fd5b5035919050565b6000602082840312156119cb57600080fd5b5051919050565b600080604083850312156119e557600080fd5b8235915060208301356119f781611c0d565b809150509250929050565b60008060008060808587031215611a1857600080fd5b843593506020850135611a2a81611c0d565b9250604085013591506060850135611a4181611c22565b939692955090935050565b60008060408385031215611a5f57600080fd5b50508035926020909101359150565b60008060008060808587031215611a8457600080fd5b8435935060208501359250604085013591506060850135611a4181611c22565b60008251611ab6818460208701611b9a565b9190910192915050565b6020815260008251806020840152611adf816040850160208701611b9a565b601f01601f19169190910160400192915050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611b3d57611b3d611be1565b500190565b600082611b5f57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611b7e57611b7e611be1565b500290565b600082821015611b9557611b95611be1565b500390565b60005b83811015611bb5578181015183820152602001611b9d565b838111156116315750506000910152565b6000600019821415611bda57611bda611be1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610b5f57600080fd5b8015158114610b5f57600080fdfea264697066735822122007aa8d36419f591e41a01b70bf6481adfa5d2e5e93e51640f1806b98cc9d9ab764736f6c634300080700330000000000000000000000008f47416cae600bccf9530e9f3aeaa06bdd1caa7900000000000000000000000000000000000000000000065a4da25d3016c00000000000000000000000000000000000000000000000000000000000000000afc8000000000000000000000000000000000000000000000000000000000000001e

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000008f47416cae600bccf9530e9f3aeaa06bdd1caa7900000000000000000000000000000000000000000000065a4da25d3016c00000000000000000000000000000000000000000000000000000000000000000afc8000000000000000000000000000000000000000000000000000000000000001e

-----Decoded View---------------
Arg [0] : _THOR (address): 0x8f47416cae600bccf9530e9f3aeaa06bdd1caa79
Arg [1] : _maxTHORAvailableForFarming (uint256): 30000000000000000000000
Arg [2] : blocksPerDay (uint256): 45000
Arg [3] : numberOfDays (uint256): 30

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000008f47416cae600bccf9530e9f3aeaa06bdd1caa79
Arg [1] : 00000000000000000000000000000000000000000000065a4da25d3016c00000
Arg [2] : 000000000000000000000000000000000000000000000000000000000000afc8
Arg [3] : 000000000000000000000000000000000000000000000000000000000000001e


Deployed ByteCode Sourcemap

40277:15120:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55081:5;;;55073:34;;-1:-1:-1;;;;;55081:5:0;;;;55097:9;55073:34;;;;;55097:9;;55073:34;55081:5;55073:34;55097:9;55081:5;55073:34;;;;;;;;;;;;;;;;;;;;;40277:15120;42760:23;;;;;;;;;;;;;;;;;;;12840:25:1;;;12828:2;12813:18;42760:23:0;;;;;;;;42227:26;;;;;;;;;;-1:-1:-1;42227:26:0;;;;;:::i;:::-;;:::i;:::-;;;;-1:-1:-1;;;;;4108:32:1;;;4090:51;;4172:2;4157:18;;4150:34;;;;4200:18;;;4193:34;;;;4258:2;4243:18;;4236:34;4301:3;4286:19;;4279:35;4077:3;4062:19;42227:26:0;3818:502:1;42557:30:0;;;;;;;;;;;;;;;;51935:874;;;;;;;;;;-1:-1:-1;51935:874:0;;;;;:::i;:::-;;:::i;:::-;;42673:25;;;;;;;;;;;;;;;;41859:18;;;;;;;;;;-1:-1:-1;41859:18:0;;;;-1:-1:-1;;;;;41859:18:0;;;;;;-1:-1:-1;;;;;2894:32:1;;;2876:51;;2864:2;2849:18;41859::0;2730:203:1;49313:1103:0;;;;;;;;;;-1:-1:-1;49313:1103:0;;;;;:::i;:::-;;:::i;52961:479::-;;;;;;;;;;-1:-1:-1;52961:479:0;;;;;:::i;:::-;;:::i;41966:27::-;;;;;;;;;;;;;;;;44016:93;;;;;;;;;;-1:-1:-1;44089:12:0;44016:93;;47770:1136;;;;;;;;;;-1:-1:-1;47770:1136:0;;;;;:::i;:::-;;:::i;42120:41::-;;;;;;;;;;;;;;;;48993:180;;;;;;;;;;;;;:::i;44229:98::-;;;;;;;;;;-1:-1:-1;44304:8:0;:15;44229:98;;55274:120;;;;;;;;;;-1:-1:-1;55274:120:0;;;;;:::i;:::-;;:::i;46757:764::-;;;;;;;;;;-1:-1:-1;46757:764:0;;;;;:::i;:::-;;:::i;36180:20::-;;;;;;;;;;-1:-1:-1;36180:20:0;;;;-1:-1:-1;;;;;36180:20:0;;;42387:64;;;;;;;;;;-1:-1:-1;42387:64:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13050:25:1;;;13106:2;13091:18;;13084:34;;;;13023:18;42387:64:0;12876:248:1;44838:1353:0;;;;;;;;;;-1:-1:-1;44838:1353:0;;;;;:::i;:::-;;:::i;54521:470::-;;;;;;;;;;-1:-1:-1;54521:470:0;;;;;:::i;:::-;;:::i;50609:1128::-;;;;;;;;;;-1:-1:-1;50609:1128:0;;;;;:::i;:::-;;:::i;36862:192::-;;;;;;;;;;-1:-1:-1;36862:192:0;;;;;:::i;:::-;;:::i;42227:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;42227:26:0;;;;-1:-1:-1;42227:26:0;;;;;:::o;51935:874::-;39190:1;39786:7;;:19;;39778:63;;;;-1:-1:-1;;;39778:63:0;;;;;;;:::i;:::-;;;;;;;;;39190:1;39919:7;:18;;;;52017:21:::1;52041:8;52050:4;52041:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;52090;;;:8:::1;:14:::0;;;;;;52105:10:::1;52090:26:::0;;;;;;;52137:11;;52041:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;52137:22:0;-1:-1:-1;52137:22:0::1;52129:61;;;::::0;-1:-1:-1;;;52129:61:0;;6040:2:1;52129:61:0::1;::::0;::::1;6022:21:1::0;6079:2;6059:18;;;6052:30;6118:28;6098:18;;;6091:56;6164:18;;52129:61:0::1;5838:350:1::0;52129:61:0::1;52203:16;52214:4;52203:10;:16::i;:::-;52232:15;52250:132;52366:4;:15;;;52250:97;52342:4;52250:73;52294:4;:28;;;52250:4;:25;;;:43;;:73;;;;:::i;:::-;:91:::0;::::1;:97::i;:::-;:115:::0;::::1;:132::i;:::-;52232:150:::0;-1:-1:-1;52397:11:0;;52393:81:::1;;52425:37;52442:10;52454:7;52425:16;:37::i;:::-;52490:11:::0;;52486:155:::1;;52532:11:::0;;:24:::1;::::0;52548:7;52532:15:::1;:24::i;:::-;52518:38:::0;;52571:15;;:58:::1;::::0;-1:-1:-1;;;;;52571:15:0::1;52608:10;52621:7:::0;52571:28:::1;:58::i;:::-;52687:28;::::0;::::1;::::0;52671:11;;:79:::1;::::0;52735:4:::1;::::0;52671:45:::1;::::0;:15:::1;:45::i;:79::-;52653:15;::::0;::::1;:97:::0;52766:35:::1;::::0;12840:25:1;;;52787:4:0;;52775:10:::1;::::0;52766:35:::1;::::0;12828:2:1;12813:18;52766:35:0::1;;;;;;;-1:-1:-1::0;;39146:1:0;40098:22;;-1:-1:-1;;;51935:874:0:o;49313:1103::-;49380:8;:15;49373:22;;49365:59;;;;-1:-1:-1;;;49365:59:0;;8292:2:1;49365:59:0;;;8274:21:1;8331:2;8311:18;;;8304:30;-1:-1:-1;;;8350:18:1;;;8343:54;8414:18;;49365:59:0;8090:348:1;49365:59:0;49437:21;49461:8;49470:4;49461:14;;;;;;;;:::i;:::-;;;;;;;;;;;49437:38;;49506:4;:20;;;49490:12;:36;49486:75;;49543:7;49313:1103;:::o;49486:75::-;49595:15;;:40;;-1:-1:-1;;;49595:40:0;;49629:4;49595:40;;;2876:51:1;49573:19:0;;-1:-1:-1;;;;;49595:15:0;;:25;;2849:18:1;;49595:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;49573:62;-1:-1:-1;49650:16:0;49646:105;;-1:-1:-1;49706:12:0;49683:20;;;;:35;-1:-1:-1;49313:1103:0:o;49646:105::-;49763:19;49801:8;;49785:12;:24;;:76;;49853:8;;49785:76;;;49825:12;49785:76;49763:98;;49872:18;49893:48;49907:4;:20;;;49929:11;49893:13;:48::i;:::-;49872:69;-1:-1:-1;50029:15:0;50025:54;;50061:7;;;;49313:1103;:::o;50025:54::-;50091:18;50112:112;50208:15;;50112:77;50173:4;:15;;;50112:42;50141:12;;50112:10;:28;;:42;;;;:::i;:::-;:60;;:77::i;:112::-;50091:133;-1:-1:-1;50268:95:0;50315:37;50340:11;50315:20;50091:133;50330:4;50315:14;:20::i;:37::-;50268:28;;;;;:32;:95::i;:::-;50237:28;;;:126;-1:-1:-1;;50374:20:0;;;;:34;;;;-1:-1:-1;;49313:1103:0:o;52961:479::-;39190:1;39786:7;;:19;;39778:63;;;;-1:-1:-1;;;39778:63:0;;;;;;;:::i;:::-;39190:1;39919:7;:18;53050:8:::1;:15:::0;53043:22;::::1;53035:59;;;::::0;-1:-1:-1;;;53035:59:0;;8292:2:1;53035:59:0::1;::::0;::::1;8274:21:1::0;8331:2;8311:18;;;8304:30;-1:-1:-1;;;8350:18:1;;;8343:54;8414:18;;53035:59:0::1;8090:348:1::0;53035:59:0::1;53107:21;53131:8;53140:4;53131:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;53180;;;:8:::1;:14:::0;;;;;;53195:10:::1;53180:26:::0;;;;;;;53236:11;;53258:15;;;-1:-1:-1;53284:15:0;::::1;:19:::0;;;;53131:14:::1;::::0;;::::1;;53316:15:::0;;53131:14;;-1:-1:-1;53180:26:0;;53236:11;53316:57:::1;::::0;-1:-1:-1;;;;;53316:15:0;;;::::1;::::0;53236:11;53316:28:::1;:57::i;:::-;53389:43;::::0;12840:25:1;;;53419:4:0;;53407:10:::1;::::0;53389:43:::1;::::0;12828:2:1;12813:18;53389:43:0::1;;;;;;;;-1:-1:-1::0;;39146:1:0;40098:22;;-1:-1:-1;;52961:479:0:o;47770:1136::-;47910:8;:15;47870:7;;47903:22;;47895:60;;;;-1:-1:-1;;;47895:60:0;;9819:2:1;47895:60:0;;;9801:21:1;9858:2;9838:18;;;9831:30;9897:27;9877:18;;;9870:55;9942:18;;47895:60:0;9617:349:1;47895:60:0;47968:21;47992:8;48001:4;47992:14;;;;;;;;:::i;:::-;;;;;;;;;48041;;;:8;:14;;;;;;-1:-1:-1;;;;;48041:21:0;;;;;;;;;;47992:14;;;;;;;;48101:28;;;;48159:15;;:40;;-1:-1:-1;;;48159:40:0;;48193:4;48159:40;;;2876:51:1;47992:14:0;;-1:-1:-1;48041:21:0;;47992:14;48159:15;;;;;:25;;2849:18:1;;48159:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;48140:59;;48231:4;:20;;;48216:12;:35;:52;;;;-1:-1:-1;48255:13:0;;;48216:52;48212:604;;;48285:19;48323:8;;48307:12;:24;;:84;;48383:8;;48307:84;;;48351:12;48307:84;48285:106;;48406:18;48427:97;48459:4;:20;;;48498:11;48427:13;:97::i;:::-;48406:118;;48539:18;48560:124;48668:15;;48560:85;48629:4;:15;;;48560:46;48593:12;;48560:10;:32;;:46;;;;:::i;:124::-;48539:145;-1:-1:-1;48717:87:0;48755:34;48780:8;48755:20;48539:145;48770:4;48755:14;:20::i;:34::-;48717:15;;:19;:87::i;:::-;48699:105;;48270:546;;;48212:604;48835:63;48882:4;:15;;;48835:42;48872:4;48835:32;48851:15;48835:4;:11;;;:15;;:32;;;;:::i;:63::-;48828:70;;;;;;47770:1136;;;;;:::o;48993:180::-;49055:8;:15;49038:14;49081:85;49109:6;49103:3;:12;49081:85;;;49139:15;49150:3;49139:10;:15::i;:::-;49117:5;;;:::i;:::-;;;49081:85;;;;49027:146;48993:180::o;55274:120::-;36659:5;;-1:-1:-1;;;;;36659:5:0;36645:10;:19;36637:28;;;;;;55349:4:::1;::::0;:37:::1;::::0;-1:-1:-1;;;;;55349:4:0::1;55367:10;55379:6:::0;55349:17:::1;:37::i;:::-;55274:120:::0;:::o;46757:764::-;36659:5;;-1:-1:-1;;;;;36659:5:0;36645:10;:19;36637:28;;;;;;46951:8:::1;;46936:12;:23;46928:59;;;::::0;-1:-1:-1;;;46928:59:0;;7940:2:1;46928:59:0::1;::::0;::::1;7922:21:1::0;7979:2;7959:18;;;7952:30;8018:25;7998:18;;;7991:53;8061:18;;46928:59:0::1;7738:347:1::0;46928:59:0::1;47013:8;:15:::0;47006:22;::::1;46998:52;;;::::0;-1:-1:-1;;;46998:52:0;;11366:2:1;46998:52:0::1;::::0;::::1;11348:21:1::0;11405:2;11385:18;;;11378:30;-1:-1:-1;;;11424:18:1;;;11417:47;11481:18;;46998:52:0::1;11164:341:1::0;46998:52:0::1;47110:1;47083:24;:28;47061:133;;;::::0;-1:-1:-1;;;47061:133:0;;7516:2:1;47061:133:0::1;::::0;::::1;7498:21:1::0;7555:2;7535:18;;;7528:30;7594:34;7574:18;;;7567:62;-1:-1:-1;;;7645:18:1;;;7638:53;7708:19;;47061:133:0::1;7314:419:1::0;47061:133:0::1;47211:11;47207:61;;;47239:17;:15;:17::i;:::-;47298:87;47363:11;47298:46;47318:8;47327:4;47318:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;;47298:15;;:19;;:46;;;;:::i;:::-;:50:::0;::::1;:87::i;:::-;47280:15;:105;;;;47426:11;47398:8;47407:4;47398:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;:39;;;;47489:24;47448:8;47457:4;47448:14;;;;;;;;:::i;:::-;;;;;;;;;;;:38;;:65;;;;46757:764:::0;;;;:::o;44838:1353::-;36659:5;;-1:-1:-1;;;;;36659:5:0;36645:10;:19;36637:28;;;;;;45038:8:::1;;45023:12;:23;45015:59;;;::::0;-1:-1:-1;;;45015:59:0;;9047:2:1;45015:59:0::1;::::0;::::1;9029:21:1::0;9086:2;9066:18;;;9059:30;9125:25;9105:18;;;9098:53;9168:18;;45015:59:0::1;8845:347:1::0;45015:59:0::1;45121:11:::0;-1:-1:-1;;;;;45166:31:0;::::1;45144:122;;;::::0;-1:-1:-1;;;45144:122:0;;12486:2:1;45144:122:0::1;::::0;::::1;12468:21:1::0;12525:2;12505:18;;;12498:30;12564:34;12544:18;;;12537:62;-1:-1:-1;;;12615:18:1;;;12608:39;12664:19;;45144:122:0::1;12284:405:1::0;45144:122:0::1;-1:-1:-1::0;;;;;45299:42:0;::::1;;::::0;;;:23:::1;:42;::::0;;;;;::::1;;:51;45277:125;;;::::0;-1:-1:-1;;;45277:125:0;;5271:2:1;45277:125:0::1;::::0;::::1;5253:21:1::0;5310:2;5290:18;;;5283:30;5349:26;5329:18;;;5322:54;5393:18;;45277:125:0::1;5069:348:1::0;45277:125:0::1;45462:1;45435:24;:28;45413:133;;;::::0;-1:-1:-1;;;45413:133:0;;10173:2:1;45413:133:0::1;::::0;::::1;10155:21:1::0;10212:2;10192:18;;;10185:30;10251:34;10231:18;;;10224:62;-1:-1:-1;;;10302:18:1;;;10295:53;10365:19;;45413:133:0::1;9971:419:1::0;45413:133:0::1;45563:11;45559:61;;;45591:17;:15;:17::i;:::-;45632:23;45673:10;;45658:12;:25;:79;;45727:10;;45658:79;;;45699:12;45658:79;45766:15;::::0;45632:105;;-1:-1:-1;45766:32:0::1;::::0;45786:11;45766:19:::1;:32::i;:::-;45748:15;:50:::0;45837:273:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;45837:273:0;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;45837:273:0;;;;;;;;;;;;45809:8:::1;:312:::0;;::::1;::::0;;::::1;::::0;;;;;;;;::::1;::::0;;::::1;::::0;;;;::::1;-1:-1:-1::0;;;;;;45809:312:0;;::::1;::::0;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46134:42;;;::::1;::::0;;:23:::1;:42:::0;;;-1:-1:-1;46134:42:0;;:49;;-1:-1:-1;;46134:49:0::1;::::0;;::::1;::::0;;44838:1353::o;54521:470::-;36659:5;;-1:-1:-1;;;;;36659:5:0;36645:10;:19;36637:28;;;;;;54660:10:::1;;54644:12;:26;54640:76;;54687:17;:15;:17::i;:::-;54748:12;54734:11;:26;54726:86;;;::::0;-1:-1:-1;;;54726:86:0;;5624:2:1;54726:86:0::1;::::0;::::1;5606:21:1::0;5663:2;5643:18;;;5636:30;5702:34;5682:18;;;5675:62;-1:-1:-1;;;5753:18:1;;;5746:45;5808:19;;54726:86:0::1;5422:411:1::0;54726:86:0::1;54845:10;;54831:11;:24;54823:82;;;::::0;-1:-1:-1;;;54823:82:0;;12072:2:1;54823:82:0::1;::::0;::::1;12054:21:1::0;12111:2;12091:18;;;12084:30;12150:34;12130:18;;;12123:62;-1:-1:-1;;;12201:18:1;;;12194:43;12254:19;;54823:82:0::1;11870:409:1::0;54823:82:0::1;54918:8;:22:::0;54951:12:::1;:32:::0;54521:470::o;50609:1128::-;39190:1;39786:7;;:19;;39778:63;;;;-1:-1:-1;;;39778:63:0;;;;;;;:::i;:::-;39190:1;39919:7;:18;;;;50690:21:::1;50714:8;50723:4;50714:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;50763;;;:8:::1;:14:::0;;;;;;50778:10:::1;50763:26:::0;;;;;;;50852:28:::1;50714:14;::::0;;::::1;::::0;;::::1;50852:28:::0;;::::1;::::0;50824:11;;50714:14;;-1:-1:-1;50852:28:0;50824:24:::1;::::0;50840:7;50824:15:::1;:24::i;:::-;:56;;50802:157;;;::::0;-1:-1:-1;;;50802:157:0;;9399:2:1;50802:157:0::1;::::0;::::1;9381:21:1::0;9438:2;9418:18;;;9411:30;9477:34;9457:18;;;9450:62;-1:-1:-1;;;9528:18:1;;;9521:49;9587:19;;50802:157:0::1;9197:415:1::0;50802:157:0::1;50972:16;50983:4;50972:10;:16::i;:::-;51005:11:::0;;:15;51001:317:::1;;51037:15;51055:148;51187:4;:15;;;51055:109;51159:4;51055:81;51107:4;:28;;;51055:4;:29;;;:51;;:81;;;;:::i;:148::-;51037:166:::0;-1:-1:-1;51222:11:0;;51218:89:::1;;51254:37;51271:10;51283:7;51254:16;:37::i;:::-;51022:296;51001:317;51334:11:::0;;51330:240:::1;;51362:15:::0;;:143:::1;::::0;-1:-1:-1;;;;;51362:15:0::1;51421:10;51459:4;51483:7:::0;51362:32:::1;:143::i;:::-;51534:11:::0;;:24:::1;::::0;51550:7;51534:15:::1;:24::i;:::-;51520:38:::0;;51330:240:::1;51616:28;::::0;::::1;::::0;51600:11;;:79:::1;::::0;51664:4:::1;::::0;51600:45:::1;::::0;:15:::1;:45::i;:79::-;51582:15;::::0;::::1;:97:::0;51695:34:::1;::::0;12840:25:1;;;51715:4:0;;51703:10:::1;::::0;51695:34:::1;::::0;12828:2:1;12813:18;51695:34:0::1;12694:177:1::0;36862:192:0;36659:5;;-1:-1:-1;;;;;36659:5:0;36645:10;:19;36637:28;;;;;;-1:-1:-1;;;;;36943:22:0;::::1;36935:31;;;::::0;::::1;;37003:5;::::0;;36982:37:::1;::::0;-1:-1:-1;;;;;36982:37:0;;::::1;::::0;37003:5;::::1;::::0;36982:37:::1;::::0;::::1;37030:5;:16:::0;;-1:-1:-1;;;;;;37030:16:0::1;-1:-1:-1::0;;;;;37030:16:0;;;::::1;::::0;;;::::1;::::0;;36862:192::o;6605:220::-;6663:7;6687:6;6683:20;;-1:-1:-1;6702:1:0;6695:8;;6683:20;6714:9;6726:5;6730:1;6726;:5;:::i;:::-;6714:17;-1:-1:-1;6759:1:0;6750:5;6754:1;6714:17;6750:5;:::i;:::-;:10;6742:56;;;;-1:-1:-1;;;6742:56:0;;8645:2:1;6742:56:0;;;8627:21:1;8684:2;8664:18;;;8657:30;8723:34;8703:18;;;8696:62;-1:-1:-1;;;8774:18:1;;;8767:31;8815:19;;6742:56:0;8443:397:1;6742:56:0;6816:1;6605:220;-1:-1:-1;;;6605:220:0:o;5726:179::-;5784:7;;5816:5;5820:1;5816;:5;:::i;:::-;5804:17;;5845:1;5840;:6;;5832:46;;;;-1:-1:-1;;;5832:46:0;;4915:2:1;5832:46:0;;;4897:21:1;4954:2;4934:18;;;4927:30;4993:29;4973:18;;;4966:57;5040:18;;5832:46:0;4713:351:1;6188:158:0;6246:7;6279:1;6274;:6;;6266:49;;;;-1:-1:-1;;;6266:49:0;;6395:2:1;6266:49:0;;;6377:21:1;6434:2;6414:18;;;6407:30;6473:32;6453:18;;;6446:60;6523:18;;6266:49:0;6193:354:1;6266:49:0;6333:5;6337:1;6333;:5;:::i;7303:153::-;7361:7;7393:1;7389;:5;7381:44;;;;-1:-1:-1;;;7381:44:0;;7161:2:1;7381:44:0;;;7143:21:1;7200:2;7180:18;;;7173:30;7239:28;7219:18;;;7212:56;7285:18;;7381:44:0;6959:350:1;7381:44:0;7443:5;7447:1;7443;:5;:::i;53699:277::-;53792:4;;:29;;-1:-1:-1;;;53792:29:0;;53815:4;53792:29;;;2876:51:1;53774:15:0;;-1:-1:-1;;;;;53792:4:0;;:14;;2849:18:1;;53792:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53774:47;;53846:7;53836;:17;53832:137;;;53870:4;;:27;;-1:-1:-1;;;53870:27:0;;-1:-1:-1;;;;;3510:32:1;;;53870:27:0;;;3492:51:1;3559:18;;;3552:34;;;53870:4:0;;;;:13;;3465:18:1;;53870:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;53763:213;53699:277;;:::o;53832:137::-;53930:4;;:27;;-1:-1:-1;;;53930:27:0;;-1:-1:-1;;;;;3510:32:1;;;53930:27:0;;;3492:51:1;3559:18;;;3552:34;;;53930:4:0;;;;:13;;3465:18:1;;53930:27:0;3318:274:1;53832:137:0;53763:213;53699:277;;:::o;19695:248::-;19866:58;;-1:-1:-1;;;;;3510:32:1;;19866:58:0;;;3492:51:1;3559:18;;;3552:34;;;19812:123:0;;19846:5;;-1:-1:-1;;;19889:23:0;3465:18:1;;19866:58:0;;;;-1:-1:-1;;19866:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;19866:58:0;-1:-1:-1;;;;;;19866:58:0;;;;;;;;;;19812:19;:123::i;54180:154::-;54280:7;54312:14;:3;54320:5;54312:7;:14::i;19951:285::-;20149:68;;-1:-1:-1;;;;;3196:15:1;;;20149:68:0;;;3178:34:1;3248:15;;3228:18;;;3221:43;3280:18;;;3273:34;;;20095:133:0;;20129:5;;-1:-1:-1;;;20172:27:0;3113:18:1;;20149:68:0;2938:375:1;22571:860:0;22995:23;23021:106;23063:4;23021:106;;;;;;;;;;;;;;;;;23029:5;-1:-1:-1;;;;;23021:27:0;;;:106;;;;;:::i;:::-;23142:17;;22995:132;;-1:-1:-1;23142:21:0;23138:286;;23315:10;23304:30;;;;;;;;;;;;:::i;:::-;23278:134;;;;-1:-1:-1;;;23278:134:0;;10955:2:1;23278:134:0;;;10937:21:1;10994:2;10974:18;;;10967:30;11033:34;11013:18;;;11006:62;-1:-1:-1;;;11084:18:1;;;11077:40;11134:19;;23278:134:0;10753:406:1;14213:229:0;14350:12;14382:52;14404:6;14412:4;14418:1;14421:12;14382:21;:52::i;:::-;14375:59;14213:229;-1:-1:-1;;;;14213:229:0:o;15429:632::-;15599:12;15671:5;15646:21;:30;;15624:118;;;;-1:-1:-1;;;15624:118:0;;6754:2:1;15624:118:0;;;6736:21:1;6793:2;6773:18;;;6766:30;6832:34;6812:18;;;6805:62;-1:-1:-1;;;6883:18:1;;;6876:36;6929:19;;15624:118:0;6552:402:1;15624:118:0;11556:20;;15753:60;;;;-1:-1:-1;;;15753:60:0;;10597:2:1;15753:60:0;;;10579:21:1;10636:2;10616:18;;;10609:30;10675:31;10655:18;;;10648:59;10724:18;;15753:60:0;10395:353:1;15753:60:0;15887:12;15901:23;15928:6;-1:-1:-1;;;;;15928:11:0;15947:5;15968:4;15928:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15886:97;;;;16001:52;16019:7;16028:10;16040:12;16001:17;:52::i;:::-;15994:59;15429:632;-1:-1:-1;;;;;;;15429:632:0:o;18352:777::-;18502:12;18531:7;18527:595;;;-1:-1:-1;18562:10:0;18555:17;;18527:595;18676:17;;:21;18672:439;;18939:10;18933:17;19000:15;18987:10;18983:2;18979:19;18972:44;18672:439;19082:12;19075:20;;-1:-1:-1;;;19075:20:0;;;;;;;;:::i;14:247:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;181:9;168:23;200:31;225:5;200:31;:::i;266:245::-;333:6;386:2;374:9;365:7;361:23;357:32;354:52;;;402:1;399;392:12;354:52;434:9;428:16;453:28;475:5;453:28;:::i;516:180::-;575:6;628:2;616:9;607:7;603:23;599:32;596:52;;;644:1;641;634:12;596:52;-1:-1:-1;667:23:1;;516:180;-1:-1:-1;516:180:1:o;701:184::-;771:6;824:2;812:9;803:7;799:23;795:32;792:52;;;840:1;837;830:12;792:52;-1:-1:-1;863:16:1;;701:184;-1:-1:-1;701:184:1:o;890:315::-;958:6;966;1019:2;1007:9;998:7;994:23;990:32;987:52;;;1035:1;1032;1025:12;987:52;1071:9;1058:23;1048:33;;1131:2;1120:9;1116:18;1103:32;1144:31;1169:5;1144:31;:::i;:::-;1194:5;1184:15;;;890:315;;;;;:::o;1210:532::-;1306:6;1314;1322;1330;1383:3;1371:9;1362:7;1358:23;1354:33;1351:53;;;1400:1;1397;1390:12;1351:53;1436:9;1423:23;1413:33;;1496:2;1485:9;1481:18;1468:32;1509:31;1534:5;1509:31;:::i;:::-;1559:5;-1:-1:-1;1611:2:1;1596:18;;1583:32;;-1:-1:-1;1667:2:1;1652:18;;1639:32;1680:30;1639:32;1680:30;:::i;:::-;1210:532;;;;-1:-1:-1;1210:532:1;;-1:-1:-1;;1210:532:1:o;1747:248::-;1815:6;1823;1876:2;1864:9;1855:7;1851:23;1847:32;1844:52;;;1892:1;1889;1882:12;1844:52;-1:-1:-1;;1915:23:1;;;1985:2;1970:18;;;1957:32;;-1:-1:-1;1747:248:1:o;2000:446::-;2083:6;2091;2099;2107;2160:3;2148:9;2139:7;2135:23;2131:33;2128:53;;;2177:1;2174;2167:12;2128:53;2213:9;2200:23;2190:33;;2270:2;2259:9;2255:18;2242:32;2232:42;;2321:2;2310:9;2306:18;2293:32;2283:42;;2375:2;2364:9;2360:18;2347:32;2388:28;2410:5;2388:28;:::i;2451:274::-;2580:3;2618:6;2612:13;2634:53;2680:6;2675:3;2668:4;2660:6;2656:17;2634:53;:::i;:::-;2703:16;;;;;2451:274;-1:-1:-1;;2451:274:1:o;4325:383::-;4474:2;4463:9;4456:21;4437:4;4506:6;4500:13;4549:6;4544:2;4533:9;4529:18;4522:34;4565:66;4624:6;4619:2;4608:9;4604:18;4599:2;4591:6;4587:15;4565:66;:::i;:::-;4692:2;4671:15;-1:-1:-1;;4667:29:1;4652:45;;;;4699:2;4648:54;;4325:383;-1:-1:-1;;4325:383:1:o;11510:355::-;11712:2;11694:21;;;11751:2;11731:18;;;11724:30;11790:33;11785:2;11770:18;;11763:61;11856:2;11841:18;;11510:355::o;13129:128::-;13169:3;13200:1;13196:6;13193:1;13190:13;13187:39;;;13206:18;;:::i;:::-;-1:-1:-1;13242:9:1;;13129:128::o;13262:217::-;13302:1;13328;13318:132;;13372:10;13367:3;13363:20;13360:1;13353:31;13407:4;13404:1;13397:15;13435:4;13432:1;13425:15;13318:132;-1:-1:-1;13464:9:1;;13262:217::o;13484:168::-;13524:7;13590:1;13586;13582:6;13578:14;13575:1;13572:21;13567:1;13560:9;13553:17;13549:45;13546:71;;;13597:18;;:::i;:::-;-1:-1:-1;13637:9:1;;13484:168::o;13657:125::-;13697:4;13725:1;13722;13719:8;13716:34;;;13730:18;;:::i;:::-;-1:-1:-1;13767:9:1;;13657:125::o;13787:258::-;13859:1;13869:113;13883:6;13880:1;13877:13;13869:113;;;13959:11;;;13953:18;13940:11;;;13933:39;13905:2;13898:10;13869:113;;;14000:6;13997:1;13994:13;13991:48;;;-1:-1:-1;;14035:1:1;14017:16;;14010:27;13787:258::o;14050:135::-;14089:3;-1:-1:-1;;14110:17:1;;14107:43;;;14130:18;;:::i;:::-;-1:-1:-1;14177:1:1;14166:13;;14050:135::o;14190:127::-;14251:10;14246:3;14242:20;14239:1;14232:31;14282:4;14279:1;14272:15;14306:4;14303:1;14296:15;14322:127;14383:10;14378:3;14374:20;14371:1;14364:31;14414:4;14411:1;14404:15;14438:4;14435:1;14428:15;14454:131;-1:-1:-1;;;;;14529:31:1;;14519:42;;14509:70;;14575:1;14572;14565:12;14590:118;14676:5;14669:13;14662:21;14655:5;14652:32;14642:60;;14698:1;14695;14688:12

Swarm Source

ipfs://07aa8d36419f591e41a01b70bf6481adfa5d2e5e93e51640f1806b98cc9d9ab7
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.