Contract 0x2a435ecb3fcc0e316492dc1cdd62d0f189be5640

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xfeeaa6fb1a9db855f63b2b7f633ca7ca2b9e52f93d391afd27e1f78443e3d26b84565512021-06-20 8:42:409 hrs 48 mins ago0x589f24cc3bba5bf077009c22c25bf6829a588e53 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x265999207dc7df1e437dc0d072e5acca074780a630624eb086ee3270f1234afd84385182021-06-19 17:40:181 day 50 mins ago0x94b5cc439593fa2cfc76e5a2916ea501cea0079e IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220005
0x066ce4c5fc9de1b8fa57dd7bf3dc511d151ff34780845cce8826d6f79db0b34c84311152021-06-19 11:22:431 day 7 hrs ago0x41f4cba42c41f217424821be2ff845be34503299 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0xf7dbfb626f9361aa6b5d3e15116460f9a85339c3f12d2558cd9fdaca8fbf1ec484310912021-06-19 11:21:311 day 7 hrs ago0xd19e280c4ce5442a407f8b7159295b3b7b393725 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x59c78738089e2f995ba720a18d92224b40df961f663afdc5b875b89200eba29684243782021-06-19 5:44:201 day 12 hrs ago0x19124ee4114b0444535ee57b30118cbd1ca11eda IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000101255
0xafedd0c486d6d3d805e1e3bbb79fb76aafa7164143df33d96d327e15076d54be84224132021-06-19 4:05:251 day 14 hrs ago0xd300c4d11702f5e726590857250bcab5b927c7b7 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x280f072ec5804bad8f9d60494700af18db951b58ca6e7bee244ae284305073c484090742021-06-18 16:51:382 days 1 hr ago0x9ec2cb75023ff885ced6ffe4c6aa0439d729a032 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000101255
0x34e306bb5bdcecd7d1194a2b17f8d87db7fd84241655f5f442831698021675c284090722021-06-18 16:51:322 days 1 hr ago0x9ec2cb75023ff885ced6ffe4c6aa0439d729a032 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000101255
0x1f14793d35616cb287c3a79cf8639febe4e8046d78d0b3f042498faf701fb9d084075102021-06-18 15:32:462 days 2 hrs ago0x442205df6821e5fba901c612180cc77e219f4e09 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220185
0x09df969db7e00035a8329375975e2886d4f1dc94a1916160d447753a714a435b84065432021-06-18 14:44:252 days 3 hrs ago0x41cdb7f81e261a14baabe12560f50680fa69c9aa IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0xae5a47425c172dd26a862fbd5bb68c6eb1f273c639ba290018e4de45391215e084046262021-06-18 13:07:182 days 5 hrs ago0xc649887e763fc30213144eb78463891886e5c8d9 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x466ce973552a95f68848e0fea3aa9ce7baede3b13882e87c83d818e070ce95b384043382021-06-18 12:52:542 days 5 hrs ago0x70134d406cb230a5e8aa7c2dfa929097c6e237d3 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x36043a5b5c58c48057aee4a9eac555396254d8a2a6087ae0ad7bf1c4ec901fe084005442021-06-18 9:42:052 days 8 hrs ago0x804604f55fe79ad0237696465c57d3de997c14c1 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220125
0xe9ff34556d3e16fdc85f9fcd0acc817a005fc52e75422475afb731904742c8a883979762021-06-18 7:32:002 days 10 hrs ago0xe278cd673828ccb68b3a5d7e7fa2c3c12bc9ae68 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220185
0xd238e03e96913ad5fa832280accdeb800c8bfd1deac17874865b7fd603c9909583976282021-06-18 7:14:362 days 11 hrs ago0x4ee98b27eef58844e460922ec9da7c05d32f284a IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0xdea78ac7bbcb3c6c82f13a29e73a861a587dff7fe268cf2df0bf8ceccd12bf7b83975522021-06-18 7:10:482 days 11 hrs ago0xc82fbfae1d4792f724475240ae35aebe43c17d95 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000242298
0x801a4f96a38334355460448a3f8346bc7cdf5de959123a455d1515531f4017ff83889502021-06-17 23:56:162 days 18 hrs ago0x6be0de667e735cec962d1462b5a66b6c2f296610 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0xfd1da69a245e29176663624cb408171628997af92cb4886698f3b44939da764c83872042021-06-17 22:27:322 days 20 hrs ago0xf62cd4477655912a75a00dccdf0d5791e30937d1 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220185
0x70dfc9792160a422f6f08894056c101c664ad6a4ee9df2ebc6ac64c19f91f4f683814912021-06-17 17:40:363 days 50 mins ago0x1ed74056e3aeea6d8d6ff718119413de84edc440 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x391ee0ffa31f8c66ba113b080f1798b22680c2aab014bcdaab81b7e10174675d83801382021-06-17 16:32:273 days 1 hr ago0x1b5f1330fe9571224bfa156d94da917d999cdb78 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0xd9a4c7bc77616d6f399d2b45a05ed8dc3e85ea1171b472a705f9b44f75264e7983772162021-06-17 14:05:393 days 4 hrs ago0x9ec2cb75023ff885ced6ffe4c6aa0439d729a032 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
0x0551112294633a36cccb616f933ce4f32749fcb721170c5fc48a84a15dab879583668342021-06-17 5:19:163 days 13 hrs ago0xd76b7da8e0fd2008fcc8991b54aa95b230ea6f32 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000072325
0xccd5d62d6641bae3444ab71dd3af06d449d98903d952581221ac6ae944df95d983170012021-06-15 11:26:175 days 7 hrs ago0xdd14642472a99a12865174c2834920dbaa1655f1 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220185
0x30e9d4b37837518b93f53d37ff454c422ac5e15435996eb3e2685d8f59cb359283092092021-06-15 4:48:505 days 13 hrs ago0x7def41b92e89ed22b07ddbeb6c2cb6058c05b516 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000220125
0xada1b020e2f4989b7b7ada5e740c472a757445b504065eb7c58f5612aed5957583040412021-06-15 0:27:465 days 18 hrs ago0xeca571de74e7f277f45ab6c44647c08d65eabf84 IN  0x2a435ecb3fcc0e316492dc1cdd62d0f189be56400 BNB0.000221565
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x373410A99B64B089DFE16F1088526D399252dacE

Contract Name:
RewardsToken

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2021-04-05
*/

// SPDX-License-Identifier: NONE

pragma solidity 0.7.6;



// Part: OpenZeppelin/[email protected]/Address

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

// Part: OpenZeppelin/[email protected]/Context

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

// Part: OpenZeppelin/[email protected]/IERC20

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

// Part: OpenZeppelin/[email protected]/Math

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

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

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

// Part: OpenZeppelin/[email protected]/ReentrancyGuard

/**
 * @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 () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// Part: OpenZeppelin/[email protected]/SafeMath

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

// Part: OpenZeppelin/[email protected]/Ownable

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// Part: OpenZeppelin/[email protected]/SafeERC20

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

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

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

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

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

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

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

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

// File: RewardsToken.sol

// LP Token with rewards capability for http://ellipsis.finance/
// ERC20 that represents a deposit into an Ellipsis pool and allows 3rd-party incentives for token holders
// Based on SNX MultiRewards by iamdefinitelyahuman - https://github.com/iamdefinitelyahuman/multi-rewards
contract RewardsToken is ReentrancyGuard, Ownable {

    using SafeMath for uint256;
    using SafeERC20 for IERC20;

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

    string public symbol;
    string public name;
    uint256 public constant decimals = 18;
    uint256 public totalSupply;

    address public lpStaker;
    address public minter;

    struct Reward {
        address rewardsDistributor;
        uint256 rewardsDuration;
        uint256 periodFinish;
        uint256 rewardRate;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
    }
    mapping(address => Reward) public rewardData;
    address[] public rewardTokens;

    // user -> reward token -> amount
    mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public rewards;

    mapping(address => uint256) public balanceOf;
    mapping(address => uint256) public depositedBalanceOf;

    // owner -> spender -> amount
    mapping(address => mapping(address => uint256)) public allowance;

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
    event RewardsDurationUpdated(address token, uint256 newDuration);
    event Recovered(address token, uint256 amount);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /* ========== CONSTRUCTOR ========== */

    constructor(
        string memory _name,
        string memory _symbol,
        address _lpStaker
    )
        public Ownable()
    {
        name = _name;
        symbol = _symbol;
        lpStaker = _lpStaker;
        emit Transfer(address(0), msg.sender, 0);
    }

    /* ========== ADMIN FUNCTIONS ========== */

    function addReward(
        address _rewardsToken,
        address _rewardsDistributor,
        uint256 _rewardsDuration
    )
        public
        onlyOwner
    {
        require(rewardData[_rewardsToken].rewardsDuration == 0);
        rewardTokens.push(_rewardsToken);
        rewardData[_rewardsToken].rewardsDistributor = _rewardsDistributor;
        rewardData[_rewardsToken].rewardsDuration = _rewardsDuration;
    }

    function setRewardsDistributor(address _rewardsToken, address _rewardsDistributor) external onlyOwner {
        rewardData[_rewardsToken].rewardsDistributor = _rewardsDistributor;
    }

    function setMinter(address _minter) external {
        require(minter == address(0));
        minter = _minter;
    }

    /* ========== MODIFIERS ========== */

    modifier updateReward(address payable[2] memory accounts) {
        address _lpStaker = lpStaker;
        for (uint i; i < rewardTokens.length; i++) {
            address token = rewardTokens[i];
            rewardData[token].rewardPerTokenStored = rewardPerToken(token);
            rewardData[token].lastUpdateTime = lastTimeRewardApplicable(token);
            for (uint x = 0; x < accounts.length; x++) {
                address account = accounts[x];
                if (account == address(0)) break;
                if (account == _lpStaker) continue;
                rewards[account][token] = earned(account, token);
                userRewardPerTokenPaid[account][token] = rewardData[token].rewardPerTokenStored;
            }
        }
        _;
    }

    /* ========== VIEWS ========== */

    function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
        return Math.min(block.timestamp, rewardData[_rewardsToken].periodFinish);
    }

    function rewardPerToken(address _rewardsToken) public view returns (uint256) {
        Reward storage reward = rewardData[_rewardsToken];
        if (totalSupply == 0) {
            return reward.rewardPerTokenStored;
        }
        uint256 last = lastTimeRewardApplicable(_rewardsToken);
        return reward.rewardPerTokenStored.add(
            last.sub(reward.lastUpdateTime).mul(reward.rewardRate).mul(1e18).div(totalSupply)
        );
    }

    function earned(address account, address _rewardsToken) public view returns (uint256) {
        if (account == lpStaker) return 0;
        uint256 balance = balanceOf[account].add(depositedBalanceOf[account]);
        uint256 perToken = rewardPerToken(_rewardsToken).sub(userRewardPerTokenPaid[account][_rewardsToken]);
        return balance.mul(perToken).div(1e18).add(rewards[account][_rewardsToken]);
    }

    function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
        return rewardData[_rewardsToken].rewardRate.mul(rewardData[_rewardsToken].rewardsDuration);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function approve(address _spender, uint256 _value) public returns (bool) {
        allowance[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /** shared logic for transfer and transferFrom */
    function _transfer(
        address payable _from,
        address payable _to,
        uint256 _value
    )
        internal
        updateReward([_from, _to])
    {
        require(balanceOf[_from] >= _value, "Insufficient balance");
        balanceOf[_from] = balanceOf[_from].sub(_value);
        balanceOf[_to] = balanceOf[_to].add(_value);

        // for transfers into or out of LpTokenStaker, modify depositedBalance
        if (_to == lpStaker) {
            depositedBalanceOf[_from] = depositedBalanceOf[_from].add(_value);
        } else if (_from == lpStaker) {
            depositedBalanceOf[_to] = depositedBalanceOf[_to].sub(_value);
        }
        emit Transfer(_from, _to, _value);
    }

    function transfer(address payable _to, uint256 _value) public returns (bool) {
        _transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(
        address payable _from,
        address payable _to,
        uint256 _value
    )
        public
        returns (bool)
    {
        uint256 allowed = allowance[_from][msg.sender];
        require(allowed >= _value, "Insufficient allowance");
        if (allowed != uint256(-1)) {
            allowance[_from][msg.sender] = allowed.sub(_value);
        }
        _transfer(_from, _to, _value);
        return true;
    }

    function getReward() public nonReentrant updateReward([msg.sender, address(0)]) {
        for (uint i; i < rewardTokens.length; i++) {
            address _rewardsToken = rewardTokens[i];
            uint256 reward = rewards[msg.sender][_rewardsToken];
            if (reward > 0) {
                rewards[msg.sender][_rewardsToken] = 0;
                IERC20(_rewardsToken).safeTransfer(msg.sender, reward);
                emit RewardPaid(msg.sender, _rewardsToken, reward);
            }
        }
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function notifyRewardAmount(
        address _rewardsToken,
        uint256 reward
    )
        external
        updateReward([address(0), address(0)])
    {
        require(rewardData[_rewardsToken].rewardsDistributor == msg.sender);
        // handle the transfer of reward tokens via `transferFrom` to reduce the number
        // of transactions required and ensure correctness of the reward amount
        IERC20(_rewardsToken).safeTransferFrom(msg.sender, address(this), reward);

        if (block.timestamp >= rewardData[_rewardsToken].periodFinish) {
            rewardData[_rewardsToken].rewardRate = reward.div(rewardData[_rewardsToken].rewardsDuration);
        } else {
            uint256 remaining = rewardData[_rewardsToken].periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardData[_rewardsToken].rewardRate);
            rewardData[_rewardsToken].rewardRate = reward.add(leftover).div(rewardData[_rewardsToken].rewardsDuration);
        }

        rewardData[_rewardsToken].lastUpdateTime = block.timestamp;
        rewardData[_rewardsToken].periodFinish = block.timestamp.add(rewardData[_rewardsToken].rewardsDuration);
        emit RewardAdded(reward);
    }

    // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(rewardData[tokenAddress].lastUpdateTime == 0, "Cannot withdraw reward token");
        IERC20(tokenAddress).safeTransfer(owner(), tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    function setRewardsDuration(address _rewardsToken, uint256 _rewardsDuration) external {
        require(
            block.timestamp > rewardData[_rewardsToken].periodFinish,
            "Reward period still active"
        );
        require(rewardData[_rewardsToken].rewardsDistributor == msg.sender);
        require(_rewardsDuration > 0, "Reward duration must be non-zero");
        rewardData[_rewardsToken].rewardsDuration = _rewardsDuration;
        emit RewardsDurationUpdated(_rewardsToken, rewardData[_rewardsToken].rewardsDuration);
    }

    function mint(
        address payable _to,
        uint256 _value
    )
        external
        updateReward([_to, address(0)])
        returns (bool)
    {
        require(msg.sender == minter);
        balanceOf[_to] = balanceOf[_to].add(_value);
        totalSupply = totalSupply.add(_value);
        emit Transfer(address(0), _to, _value);
        return true;
    }

    function burnFrom(
        address payable _to,
        uint256 _value
    )
        external
        updateReward([_to, address(0)])
        returns (bool)
    {
        require(msg.sender == minter);
        balanceOf[_to] = balanceOf[_to].sub(_value);
        totalSupply = totalSupply.sub(_value);
        emit Transfer(_to, address(0), _value);
        return true;
    }
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_lpStaker","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"rewardsToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_rewardsDistributor","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burnFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositedBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpStaker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardData","outputs":[{"internalType":"address","name":"rewardsDistributor","type":"address"},{"internalType":"uint256","name":"rewardsDuration","type":"uint256"},{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_rewardsDistributor","type":"address"}],"name":"setRewardsDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_from","type":"address"},{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620027d6380380620027d6833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200151600160009081559092509050620001b66200028f565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35082516200021990600390602086019062000293565b5081516200022f90600290602085019062000293565b50600580546001600160a01b0383166001600160a01b031990911617905560408051600080825291513392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050506200033f565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002cb576000855562000316565b82601f10620002e657805160ff191683800117855562000316565b8280016001018555821562000316579182015b8281111562000316578251825591602001919060010190620002f9565b506200032492915062000328565b5090565b5b8082111562000324576000815560010162000329565b612487806200034f6000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806370a082311161010f578063b66503cf116100a2578063e70b9e2711610071578063e70b9e2714610666578063f122977714610694578063f2fde38b146106ba578063fca3b5aa146106e0576101f0565b8063b66503cf146105b0578063bcd11014146105dc578063d0ed26ae14610602578063dd62ed3e14610638576101f0565b80638980f11f116100de5780638980f11f146105485780638da5cb5b1461057457806395d89b411461057c578063a9059cbb14610584576101f0565b806370a08231146104d1578063715018a6146104f757806379cc6790146104ff5780637bb7bed11461052b576101f0565b8063313ce5671161018757806348e5d9f81161015657806348e5d9f8146103f4578063638634ee1461045757806368b482541461047d5780637035ab98146104a3576101f0565b8063313ce5671461038a5780633d18b912146103925780633f695b451461039a57806340c10f19146103c8576101f0565b8063211dc32d116101c3578063211dc32d146102f05780632378bea61461031e57806323b872dd1461034c5780632dd5228814610382576101f0565b806306fdde03146101f55780630754617214610272578063095ea7b31461029657806318160ddd146102d6575b600080fd5b6101fd610706565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023757818101518382015260200161021f565b50505050905090810190601f1680156102645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027a610794565b604080516001600160a01b039092168252519081900360200190f35b6102c2600480360360408110156102ac57600080fd5b506001600160a01b0381351690602001356107a3565b604080519115158252519081900360200190f35b6102de61080a565b60408051918252519081900360200190f35b6102de6004803603604081101561030657600080fd5b506001600160a01b0381358116916020013516610810565b61034a6004803603604081101561033457600080fd5b506001600160a01b0381351690602001356108f5565b005b6102c26004803603606081101561036257600080fd5b506001600160a01b03813581169160208101359091169060400135610a3b565b61027a610afd565b6102de610b0c565b61034a610b11565b61034a600480360360408110156103b057600080fd5b506001600160a01b0381358116916020013516610da9565b6102c2600480360360408110156103de57600080fd5b506001600160a01b038135169060200135610e39565b61041a6004803603602081101561040a57600080fd5b50356001600160a01b031661104a565b604080516001600160a01b0390971687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b6102de6004803603602081101561046d57600080fd5b50356001600160a01b0316611089565b6102de6004803603602081101561049357600080fd5b50356001600160a01b03166110b8565b6102de600480360360408110156104b957600080fd5b506001600160a01b03813581169160200135166110ca565b6102de600480360360208110156104e757600080fd5b50356001600160a01b03166110e7565b61034a6110f9565b6102c26004803603604081101561051557600080fd5b506001600160a01b0381351690602001356111a5565b61027a6004803603602081101561054157600080fd5b50356113b6565b61034a6004803603604081101561055e57600080fd5b506001600160a01b0381351690602001356113e0565b61027a611514565b6101fd611523565b6102c26004803603604081101561059a57600080fd5b506001600160a01b03813516906020013561157b565b61034a600480360360408110156105c657600080fd5b506001600160a01b038135169060200135611591565b6102de600480360360208110156105f257600080fd5b50356001600160a01b03166118bb565b61034a6004803603606081101561061857600080fd5b506001600160a01b038135811691602081013590911690604001356118e7565b6102de6004803603604081101561064e57600080fd5b506001600160a01b03813581169160200135166119dd565b6102de6004803603604081101561067c57600080fd5b506001600160a01b03813581169160200135166119fa565b6102de600480360360208110156106aa57600080fd5b50356001600160a01b0316611a17565b61034a600480360360208110156106d057600080fd5b50356001600160a01b0316611a9b565b61034a600480360360208110156106f657600080fd5b50356001600160a01b0316611b9e565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561078c5780601f106107615761010080835404028352916020019161078c565b820191906000526020600020905b81548152906001019060200180831161076f57829003601f168201915b505050505081565b6006546001600160a01b031681565b336000818152600d602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60045481565b6005546000906001600160a01b038481169116141561083157506000610804565b6001600160a01b0383166000908152600c6020908152604080832054600b90925282205461085e91611bd6565b6001600160a01b0380861660009081526009602090815260408083209388168352929052908120549192509061089d9061089786611a17565b90611c30565b6001600160a01b038087166000908152600a60209081526040808320938916835292905220549091506108ec906108e6670de0b6b3a76400006108e08686611c8d565b90611ce6565b90611bd6565b95945050505050565b6001600160a01b0382166000908152600760205260409020600201544211610964576040805162461bcd60e51b815260206004820152601a60248201527f52657761726420706572696f64207374696c6c20616374697665000000000000604482015290519081900360640190fd5b6001600160a01b0382811660009081526007602052604090205416331461098a57600080fd5b600081116109df576040805162461bcd60e51b815260206004820181905260248201527f526577617264206475726174696f6e206d757374206265206e6f6e2d7a65726f604482015290519081900360640190fd5b6001600160a01b0382166000818152600760209081526040918290206001018490558151928352820183905280517fad2f86b01ed93b4b3a150d448c61a4f5d8d38075d3c0c64cc0a26fd6e1f495459281900390910190a15050565b6001600160a01b0383166000908152600d6020908152604080832033845290915281205482811015610aad576040805162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420616c6c6f77616e636560501b604482015290519081900360640190fd5b6000198114610ae557610ac08184611c30565b6001600160a01b0386166000908152600d602090815260408083203384529091529020555b610af0858585611d4d565b60019150505b9392505050565b6005546001600160a01b031681565b601281565b60026000541415610b69576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000908155604080518082019091523381526020810182905260055490916001600160a01b03909116905b600854811015610cce57600060088281548110610baf57fe5b6000918252602090912001546001600160a01b03169050610bcf81611a17565b6001600160a01b038216600090815260076020526040902060050155610bf481611089565b6001600160a01b0382166000908152600760205260408120600401919091555b6002811015610cc4576000858260028110610c2b57fe5b602002015190506001600160a01b038116610c465750610cc4565b846001600160a01b0316816001600160a01b03161415610c665750610cbc565b610c708184610810565b6001600160a01b039182166000818152600a6020908152604080832095881680845295825280832094909455600781528382206005015492825260098152838220948252939093529120555b600101610c14565b5050600101610b96565b5060005b600854811015610d9f57600060088281548110610ceb57fe5b6000918252602080832090910154338352600a825260408084206001600160a01b03909216808552919092529120549091508015610d9557336000818152600a602090815260408083206001600160a01b0387168085529252822091909155610d54918361206f565b6040805182815290516001600160a01b0384169133917f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9181900360200190a35b5050600101610cd2565b5050600160005550565b610db16120c6565b6001600160a01b0316610dc2611514565b6001600160a01b031614610e0b576040805162461bcd60e51b81526020600482018190526024820152600080516020612408833981519152604482015290519081900360640190fd5b6001600160a01b03918216600090815260076020526040902080546001600160a01b03191691909216179055565b604080518082019091526001600160a01b03808416825260006020830181905260055490929116825b600854811015610f9a57600060088281548110610e7b57fe5b6000918252602090912001546001600160a01b03169050610e9b81611a17565b6001600160a01b038216600090815260076020526040902060050155610ec081611089565b6001600160a01b0382166000908152600760205260408120600401919091555b6002811015610f90576000858260028110610ef757fe5b602002015190506001600160a01b038116610f125750610f90565b846001600160a01b0316816001600160a01b03161415610f325750610f88565b610f3c8184610810565b6001600160a01b039182166000818152600a6020908152604080832095881680845295825280832094909455600781528382206005015492825260098152838220948252939093529120555b600101610ee0565b5050600101610e62565b506006546001600160a01b03163314610fb257600080fd5b6001600160a01b0385166000908152600b6020526040902054610fd59085611bd6565b6001600160a01b0386166000908152600b6020526040902055600454610ffb9085611bd6565b6004556040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001949350505050565b6007602052600090815260409020805460018201546002830154600384015460048501546005909501546001600160a01b039094169492939192909186565b6001600160a01b0381166000908152600760205260408120600201546110b09042906120ca565b90505b919050565b600c6020526000908152604090205481565b600960209081526000928352604080842090915290825290205481565b600b6020526000908152604090205481565b6111016120c6565b6001600160a01b0316611112611514565b6001600160a01b03161461115b576040805162461bcd60e51b81526020600482018190526024820152600080516020612408833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b604080518082019091526001600160a01b03808416825260006020830181905260055490929116825b600854811015611306576000600882815481106111e757fe5b6000918252602090912001546001600160a01b0316905061120781611a17565b6001600160a01b03821660009081526007602052604090206005015561122c81611089565b6001600160a01b0382166000908152600760205260408120600401919091555b60028110156112fc57600085826002811061126357fe5b602002015190506001600160a01b03811661127e57506112fc565b846001600160a01b0316816001600160a01b0316141561129e57506112f4565b6112a88184610810565b6001600160a01b039182166000818152600a6020908152604080832095881680845295825280832094909455600781528382206005015492825260098152838220948252939093529120555b60010161124c565b50506001016111ce565b506006546001600160a01b0316331461131e57600080fd5b6001600160a01b0385166000908152600b60205260409020546113419085611c30565b6001600160a01b0386166000908152600b60205260409020556004546113679085611c30565b6004556040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001949350505050565b600881815481106113c657600080fd5b6000918252602090912001546001600160a01b0316905081565b6113e86120c6565b6001600160a01b03166113f9611514565b6001600160a01b031614611442576040805162461bcd60e51b81526020600482018190526024820152600080516020612408833981519152604482015290519081900360640190fd5b6001600160a01b038216600090815260076020526040902060040154156114b0576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742077697468647261772072657761726420746f6b656e00000000604482015290519081900360640190fd5b6114cc6114bb611514565b6001600160a01b038416908361206f565b604080516001600160a01b03841681526020810183905281517f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28929181900390910190a15050565b6001546001600160a01b031690565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561078c5780601f106107615761010080835404028352916020019161078c565b6000611588338484611d4d565b50600192915050565b604080518082019091526000808252602082018190526005546001600160a01b0316905b6008548110156116ed576000600882815481106115ce57fe5b6000918252602090912001546001600160a01b031690506115ee81611a17565b6001600160a01b03821660009081526007602052604090206005015561161381611089565b6001600160a01b0382166000908152600760205260408120600401919091555b60028110156116e357600085826002811061164a57fe5b602002015190506001600160a01b03811661166557506116e3565b846001600160a01b0316816001600160a01b0316141561168557506116db565b61168f8184610810565b6001600160a01b039182166000818152600a6020908152604080832095881680845295825280832094909455600781528382206005015492825260098152838220948252939093529120555b600101611633565b50506001016115b5565b506001600160a01b0384811660009081526007602052604090205416331461171457600080fd5b6117296001600160a01b0385163330866120e0565b6001600160a01b0384166000908152600760205260409020600201544210611793576001600160a01b038416600090815260076020526040902060010154611772908490611ce6565b6001600160a01b038516600090815260076020526040902060030155611830565b6001600160a01b0384166000908152600760205260408120600201546117b99042611c30565b6001600160a01b038616600090815260076020526040812060030154919250906117e4908390611c8d565b6001600160a01b038716600090815260076020526040902060010154909150611811906108e08784611bd6565b6001600160a01b03871660009081526007602052604090206003015550505b6001600160a01b038416600090815260076020526040902042600482018190556001909101546118609190611bd6565b6001600160a01b03851660009081526007602090815260409182902060020192909255805185815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d929181900390910190a150505050565b6001600160a01b038116600090815260076020526040812060018101546003909101546110b091611c8d565b6118ef6120c6565b6001600160a01b0316611900611514565b6001600160a01b031614611949576040805162461bcd60e51b81526020600482018190526024820152600080516020612408833981519152604482015290519081900360640190fd5b6001600160a01b0383166000908152600760205260409020600101541561196f57600080fd5b6008805460018181019092557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b039586166001600160a01b031991821681179092556000918252600760205260409091208054949095169316929092178355910155565b600d60209081526000928352604080842090915290825290205481565b600a60209081526000928352604080842090915290825290205481565b6001600160a01b0381166000908152600760205260408120600454611a41576005015490506110b3565b6000611a4c84611089565b9050611a93611a886004546108e0670de0b6b3a7640000611a828760030154611a82896004015489611c3090919063ffffffff16565b90611c8d565b600584015490611bd6565b949350505050565b611aa36120c6565b6001600160a01b0316611ab4611514565b6001600160a01b031614611afd576040805162461bcd60e51b81526020600482018190526024820152600080516020612408833981519152604482015290519081900360640190fd5b6001600160a01b038116611b425760405162461bcd60e51b81526004018080602001828103825260268152602001806123c16026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031615611bb457600080fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015610af6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115611c87576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082611c9c57506000610804565b82820282848281611ca957fe5b0414610af65760405162461bcd60e51b81526004018080602001828103825260218152602001806123e76021913960400191505060405180910390fd5b6000808211611d3c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d4557fe5b049392505050565b604080518082019091526001600160a01b03808516825283811660208301526005541660005b600854811015611eab57600060088281548110611d8c57fe5b6000918252602090912001546001600160a01b03169050611dac81611a17565b6001600160a01b038216600090815260076020526040902060050155611dd181611089565b6001600160a01b0382166000908152600760205260408120600401919091555b6002811015611ea1576000858260028110611e0857fe5b602002015190506001600160a01b038116611e235750611ea1565b846001600160a01b0316816001600160a01b03161415611e435750611e99565b611e4d8184610810565b6001600160a01b039182166000818152600a6020908152604080832095881680845295825280832094909455600781528382206005015492825260098152838220948252939093529120555b600101611df1565b5050600101611d73565b506001600160a01b0385166000908152600b6020526040902054831115611f10576040805162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b604482015290519081900360640190fd5b6001600160a01b0385166000908152600b6020526040902054611f339084611c30565b6001600160a01b038087166000908152600b60205260408082209390935590861681522054611f629084611bd6565b6001600160a01b038086166000818152600b6020526040902092909255600554161415611fca576001600160a01b0385166000908152600c6020526040902054611fac9084611bd6565b6001600160a01b0386166000908152600c602052604090205561201d565b6005546001600160a01b038681169116141561201d576001600160a01b0384166000908152600c60205260409020546120039084611c30565b6001600160a01b0385166000908152600c60205260409020555b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526120c1908490612140565b505050565b3390565b60008183106120d95781610af6565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261213a908590612140565b50505050565b6000612195826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121f19092919063ffffffff16565b8051909150156120c1578080602001905160208110156121b457600080fd5b50516120c15760405162461bcd60e51b815260040180806020018281038252602a815260200180612428602a913960400191505060405180910390fd5b6060611a9384846000858561220585612316565b612256576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106122945780518252601f199092019160209182019101612275565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146122f6576040519150601f19603f3d011682016040523d82523d6000602084013e6122fb565b606091505b509150915061230b82828661231c565b979650505050505050565b3b151590565b6060831561232b575081610af6565b82511561233b5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561238557818101518382015260200161236d565b50505050905090810190601f1680156123b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a58e8428b6f9d9a57e7e7c7d638eae358ad8c3eae7f67d6854d358bb9cdcb05b64736f6c63430007060033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000cce949de564fe60e7f96c85e55177f8b9e4cf61b000000000000000000000000000000000000000000000000000000000000001b456c6c69707369732e66696e616e63652066555344542f33455053000000000000000000000000000000000000000000000000000000000000000000000000096675736474334550530000000000000000000000000000000000000000000000

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