Contract 0x7145319189629afcf31754d8ac459265fca4cf91 1

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x7d99243a6f67f41f3cdfdc1be3aa144778c5fb9c3036e3ad3403f2097d12a4a9Decomposition130421932021-11-29 5:15:099 hrs 21 mins ago0x3c44438ca119cb3f91dee8f514f435f2d88c338f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0x12672762d4a0d1cab6ab9cf13601bbb3f19481f16d8f3be697beed08e6fb3d89Unstake130343422021-11-28 22:09:0716 hrs 27 mins ago0x3f6a15587ebe00e3c093a22cd074f71aaf271c8f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000113435
0x267730e722ed5527c2028b8d39ffdaad4921b86cf3d2446639e50d22c84e15daUnstake130170372021-11-28 6:37:481 day 7 hrs ago0x3f6a15587ebe00e3c093a22cd074f71aaf271c8f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000113435
0xfb5921e47a97c6b0577429b7cc809d8637832a1ff2b137b0adab5be977aa7c7cUnstake130169672021-11-28 6:34:131 day 8 hrs ago0x3f6a15587ebe00e3c093a22cd074f71aaf271c8f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000113435
0x917722e37116825e755d538748b098dc240803a45e7d41ef2c182ee95b1ff631Unstake130168912021-11-28 6:30:241 day 8 hrs ago0x3f6a15587ebe00e3c093a22cd074f71aaf271c8f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000113435
0x9319f8431eee3fdba6fef7d9d3ef9e9ce3387a0309fe389cf849a8b67fd91177Unstake130168642021-11-28 6:28:541 day 8 hrs ago0x3f6a15587ebe00e3c093a22cd074f71aaf271c8f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000113435
0x7696b244804e0b8bf0f08453faee95a4ea7b2ccd15ac7378d17df1c64a8a8190Decomposition129987532021-11-27 14:20:492 days 15 mins ago0x3c44438ca119cb3f91dee8f514f435f2d88c338f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00045314
0x3829a37d89b282eb3576f9910e1749f1c73610167bb6989cce79b6aba704b1d2Decomposition129984182021-11-27 14:02:142 days 34 mins ago0x3c44438ca119cb3f91dee8f514f435f2d88c338f IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00044264
0xb69c051a88ed7cc1767970611194ac37e53eceea03c89a01fbcfba51577433deDecomposition129906242021-11-27 7:02:472 days 7 hrs ago0x770c1d3720d8a9e92bace9d4ea9c95559752ceb8 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00043214
0xcbc9513be92de8f4cc2ce7c1dbf84ba55fda2d28c46621be1dbfeb8df52b5d90Decomposition128604282021-11-22 11:01:277 days 3 hrs ago0x9e585f43fd177ca0a3c9b533d8db5007f9c5d27e IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000505968
0xe75565e88e55f8dbecc1631e3cc737d78c5409cdfc633b02a09f2d0fa7e69719Decomposition128603972021-11-22 10:59:547 days 3 hrs ago0x9e585f43fd177ca0a3c9b533d8db5007f9c5d27e IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000505968
0xf9a80237fdbea119349e9fbbe50b2fed7ea1b9eb057c73967f1f77d49a49c4b2Decomposition128603772021-11-22 10:58:527 days 3 hrs ago0x9e585f43fd177ca0a3c9b533d8db5007f9c5d27e IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000505968
0x5560ca617f239ca1425d23aa90062e1283879890a1eb7b99b73305d147db4fa7Decomposition128603712021-11-22 10:58:347 days 3 hrs ago0x9e585f43fd177ca0a3c9b533d8db5007f9c5d27e IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000505968
0x0054f5d49d4e22f2dc8c68a3444daac51015301f4bd87a1c2216ff9ddd7430a2Decomposition128603662021-11-22 10:58:197 days 3 hrs ago0x9e585f43fd177ca0a3c9b533d8db5007f9c5d27e IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.000505968
0x3955832eae318f0e8e7730ddbfdeaab409343efd43d5188e8f55fbf170be3355Decomposition128553672021-11-22 6:45:407 days 7 hrs ago0xa1dadd3ee2314f4bbd7fbb6de3213ce47192da39 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0xab6d5efd73f43ee5028710941b18e27b3b8341ee27c0ab9f289307f4bc35c113Decomposition128083452021-11-20 14:43:418 days 23 hrs ago0x13f37b6b9e48966736b3d6fae586f20f6b685472 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00043214
0xd32b04112acc981dce5db490c67e722084625b3a00d7e3c7c27c9d0065982ad3Decomposition127770902021-11-19 11:16:5410 days 3 hrs ago0x273251ca420b2b7724f54721644b47647469604d IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0x4acdd271cae1db4ac0ae7d2a7fc6f18d8e9fa730b1cc68415b6a4f17d2d5e9ceDecomposition127769392021-11-19 11:08:4510 days 3 hrs ago0x273251ca420b2b7724f54721644b47647469604d IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0xfcbee48675c0766d060abccc669e57104ea4b433cfe893460b84585fb7de3cb8Decomposition127186542021-11-17 8:28:5812 days 6 hrs ago0x35bc8426753c7bdbf0afde92bba798dbd2b249fd IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0x92d0dee5d88c34dfbf28fa0d7c80482d8429d60d3d1052c3c09e9b6680cff0f2Decomposition127166702021-11-17 6:39:1812 days 7 hrs ago0x7fa6b5e3e89d4755588399235085152e9199f2e6 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00043214
0xf0982729d71f6c51607263502868c82dbb7adf2e434b2c04a385001ade853a10Decomposition126166742021-11-13 14:57:5615 days 23 hrs ago0xba114d0008895034d53fbe9af6adcfbe16dffef7 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00042164
0xa23664428d410a90f3622639b95d1a2d62631dac02a83b9b177195d666778f7eDecomposition124960142021-11-09 7:08:4920 days 7 hrs ago0x58638c8dd50fb65a3077ae08c8e56a4e83110a35 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00043214
0x0354df4970fa9aa9e0e3ca6fa0a3e5643617ae56be2945d9a2ae096db81ccbc1Decomposition124960122021-11-09 7:08:4320 days 7 hrs ago0x58638c8dd50fb65a3077ae08c8e56a4e83110a35 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00045314
0x603d455de1802f1c65f84d12500360ddee19bb1dc69a4732d80fc48454d7c7e9Decomposition124960062021-11-09 7:08:2520 days 7 hrs ago0x58638c8dd50fb65a3077ae08c8e56a4e83110a35 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00044264
0x725d77e99d192af2feaa9ae641fb73b8dc637e21324e5e773c11da443851743dDecomposition124936152021-11-09 5:08:5220 days 9 hrs ago0xd75332fe1d599899f08377f72b4267d045609ed9 IN  0x7145319189629afcf31754d8ac459265fca4cf910 BNB0.00045914
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd1734f7ec38a24a61003a429b9c64400b3c8af39fe77604af909b85b5d9bfcdf54711622021-03-07 11:51:03267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xd1734f7ec38a24a61003a429b9c64400b3c8af39fe77604af909b85b5d9bfcdf54711622021-03-07 11:51:03267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xd1734f7ec38a24a61003a429b9c64400b3c8af39fe77604af909b85b5d9bfcdf54711622021-03-07 11:51:03267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xd1734f7ec38a24a61003a429b9c64400b3c8af39fe77604af909b85b5d9bfcdf54711622021-03-07 11:51:03267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xd1734f7ec38a24a61003a429b9c64400b3c8af39fe77604af909b85b5d9bfcdf54711622021-03-07 11:51:03267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x2d9540705601b5236f2336a66fd2e1342cedcdf311b719730db2cfb31a178d2954710682021-03-07 11:46:21267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0x2d9540705601b5236f2336a66fd2e1342cedcdf311b719730db2cfb31a178d2954710682021-03-07 11:46:21267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0x2d9540705601b5236f2336a66fd2e1342cedcdf311b719730db2cfb31a178d2954710682021-03-07 11:46:21267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x2d9540705601b5236f2336a66fd2e1342cedcdf311b719730db2cfb31a178d2954710682021-03-07 11:46:21267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x2d9540705601b5236f2336a66fd2e1342cedcdf311b719730db2cfb31a178d2954710682021-03-07 11:46:21267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xfa88459fc30649a45eb724ce1f26cebb0183b4f5a6bac0b86a93e95f3369ccad54710162021-03-07 11:43:45267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xfa88459fc30649a45eb724ce1f26cebb0183b4f5a6bac0b86a93e95f3369ccad54710162021-03-07 11:43:45267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xfa88459fc30649a45eb724ce1f26cebb0183b4f5a6bac0b86a93e95f3369ccad54710162021-03-07 11:43:45267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xfa88459fc30649a45eb724ce1f26cebb0183b4f5a6bac0b86a93e95f3369ccad54710162021-03-07 11:43:45267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xfa88459fc30649a45eb724ce1f26cebb0183b4f5a6bac0b86a93e95f3369ccad54710162021-03-07 11:43:45267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xbe9539c06293385e091bb7c564390129a5e1baf1ce5eb39d0186e17f3c9d740154709922021-03-07 11:42:33267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xbe9539c06293385e091bb7c564390129a5e1baf1ce5eb39d0186e17f3c9d740154709922021-03-07 11:42:33267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0xbe9539c06293385e091bb7c564390129a5e1baf1ce5eb39d0186e17f3c9d740154709922021-03-07 11:42:33267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xbe9539c06293385e091bb7c564390129a5e1baf1ce5eb39d0186e17f3c9d740154709922021-03-07 11:42:33267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0xbe9539c06293385e091bb7c564390129a5e1baf1ce5eb39d0186e17f3c9d740154709922021-03-07 11:42:33267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x38c61df1aba673ecd06d05996fd8b55d9ea596ad3addb91f9578f0fa774ca43c54709402021-03-07 11:39:57267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0x38c61df1aba673ecd06d05996fd8b55d9ea596ad3addb91f9578f0fa774ca43c54709402021-03-07 11:39:57267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 BakerySwap: BAKE Token0 BNB
0x38c61df1aba673ecd06d05996fd8b55d9ea596ad3addb91f9578f0fa774ca43c54709402021-03-07 11:39:57267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x38c61df1aba673ecd06d05996fd8b55d9ea596ad3addb91f9578f0fa774ca43c54709402021-03-07 11:39:57267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
0x38c61df1aba673ecd06d05996fd8b55d9ea596ad3addb91f9578f0fa774ca43c54709402021-03-07 11:39:57267 days 2 hrs ago 0x7145319189629afcf31754d8ac459265fca4cf91 0x20ec291bb8459b6145317e7126532ce7ece5056f0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DishMaster

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 999999 runs

Other Settings:
istanbul EvmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2020-09-29
*/

// File: @openzeppelin/contracts/math/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

// File: @openzeppelin/contracts/math/Math.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

// File: @openzeppelin/contracts/GSN/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

// File: @openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @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.
 */
contract Ownable is Context {
    address private _owner;

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

// File: @openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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 in 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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;




/**
 * @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: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data)
    external returns (bytes4);
}

// File: @openzeppelin/contracts/token/ERC721/ERC721Holder.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;


  /**
   * @dev Implementation of the {IERC721Receiver} interface.
   *
   * Accepts all token transfers. 
   * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
   */
contract ERC721Holder is IERC721Receiver {

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

// File: @openzeppelin/contracts/utils/Pausable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;


/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!_paused, "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(_paused, "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// File: @openzeppelin/contracts/utils/EnumerableSet.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @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.0.0, only sets of type `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];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

// File: @openzeppelin/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;




/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;





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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

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

// File: @openzeppelin/contracts/token/ERC20/ERC20Pausable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;



/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

// File: contracts/DishStakingPowerToken.sol

pragma solidity =0.6.6;





contract DishStakingPowerToken is ERC20Pausable, AccessControl, Ownable {
    bytes32 public constant PAUSED_ROLE = keccak256('PAUSED_ROLE');

    constructor() public ERC20('Dish Staking Power Token', 'DSPT') {
        _setupRole(PAUSED_ROLE, _msgSender());
    }

    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
    }

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(
            amount,
            'ERC20: burn amount exceeds allowance'
        );

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }

    function pause() public whenNotPaused {
        require(hasRole(PAUSED_ROLE, _msgSender()), 'Must have pause role');
        _pause();
    }

    function unpause() public whenPaused {
        require(hasRole(PAUSED_ROLE, _msgSender()), 'Must have pause role');
        _unpause();
    }
}

// File: @openzeppelin/contracts/introspection/IERC165.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// File: @openzeppelin/contracts/introspection/ERC165.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

// File: @openzeppelin/contracts/utils/EnumerableMap.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
 * supported.
 */
library EnumerableMap {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Map type with
    // bytes32 keys and values.
    // The Map implementation uses private functions, and user-facing
    // implementations (such as Uint256ToAddressMap) are just wrappers around
    // the underlying Map.
    // This means that we can only create new EnumerableMaps for types that fit
    // in bytes32.

    struct MapEntry {
        bytes32 _key;
        bytes32 _value;
    }

    struct Map {
        // Storage of map keys and values
        MapEntry[] _entries;

        // Position of the entry defined by a key in the `entries` array, plus 1
        // because index 0 means a key is not in the map.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
        // We read and store the key's index to prevent multiple reads from the same storage slot
        uint256 keyIndex = map._indexes[key];

        if (keyIndex == 0) { // Equivalent to !contains(map, key)
            map._entries.push(MapEntry({ _key: key, _value: value }));
            // The entry is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            map._indexes[key] = map._entries.length;
            return true;
        } else {
            map._entries[keyIndex - 1]._value = value;
            return false;
        }
    }

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

        if (keyIndex != 0) { // Equivalent to contains(map, key)
            // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one
            // in the array, and then remove the last entry (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = keyIndex - 1;
            uint256 lastIndex = map._entries.length - 1;

            // When the entry 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.

            MapEntry storage lastEntry = map._entries[lastIndex];

            // Move the last entry to the index where the entry to delete is
            map._entries[toDeleteIndex] = lastEntry;
            // Update the index for the moved entry
            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved entry was stored
            map._entries.pop();

            // Delete the index for the deleted slot
            delete map._indexes[key];

            return true;
        } else {
            return false;
        }
    }

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

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function _length(Map storage map) private view returns (uint256) {
        return map._entries.length;
    }

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

        MapEntry storage entry = map._entries[index];
        return (entry._key, entry._value);
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function _get(Map storage map, bytes32 key) private view returns (bytes32) {
        return _get(map, key, "EnumerableMap: nonexistent key");
    }

    /**
     * @dev Same as {_get}, with a custom error message when `key` is not in the map.
     */
    function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
        uint256 keyIndex = map._indexes[key];
        require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
        return map._entries[keyIndex - 1]._value; // All indexes are 1-based
    }

    // UintToAddressMap

    struct UintToAddressMap {
        Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
        return _set(map._inner, bytes32(key), bytes32(uint256(value)));
    }

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

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

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

   /**
    * @dev Returns the element 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(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
        (bytes32 key, bytes32 value) = _at(map._inner, index);
        return (uint256(key), address(uint256(value)));
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
        return address(uint256(_get(map._inner, bytes32(key))));
    }

    /**
     * @dev Same as {get}, with a custom error message when `key` is not in the map.
     */
    function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
        return address(uint256(_get(map._inner, bytes32(key), errorMessage)));
    }
}

// File: @openzeppelin/contracts/utils/Strings.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev String operations.
 */
library Strings {
    /**
     * @dev Converts a `uint256` to its ASCII `string` representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        uint256 index = digits - 1;
        temp = value;
        while (temp != 0) {
            buffer[index--] = byte(uint8(48 + temp % 10));
            temp /= 10;
        }
        return string(buffer);
    }
}

// File: @openzeppelin/contracts/token/ERC721/ERC721.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;












/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
    using SafeMath for uint256;
    using Address for address;
    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableMap for EnumerableMap.UintToAddressMap;
    using Strings for uint256;

    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

    // Mapping from holder address to their (enumerable) set of owned tokens
    mapping (address => EnumerableSet.UintSet) private _holderTokens;

    // Enumerable mapping from token ids to their owners
    EnumerableMap.UintToAddressMap private _tokenOwners;

    // Mapping from token ID to approved address
    mapping (uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping (address => mapping (address => bool)) private _operatorApprovals;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Optional mapping for token URIs
    mapping (uint256 => string) private _tokenURIs;

    // Base URI
    string private _baseURI;

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *     bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
     *
     *     => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;

        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
        _registerInterface(_INTERFACE_ID_ERC721_METADATA);
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");

        return _holderTokens[owner].length();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];

        // If there is no base URI, return the token URI.
        if (bytes(_baseURI).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(_baseURI, _tokenURI));
        }
        // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
        return string(abi.encodePacked(_baseURI, tokenId.toString()));
    }

    /**
    * @dev Returns the base URI set via {_setBaseURI}. This will be
    * automatically added as a prefix in {tokenURI} to each token's URI, or
    * to the token ID if no specific URI is set for that token ID.
    */
    function baseURI() public view returns (string memory) {
        return _baseURI;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
        return _holderTokens[owner].at(index);
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
        return _tokenOwners.length();
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view override returns (uint256) {
        (uint256 tokenId, ) = _tokenOwners.at(index);
        return tokenId;
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _tokenOwners.contains(tokenId);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     d*
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _holderTokens[to].add(tokenId);

        _tokenOwners.set(tokenId, to);

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        // Clear metadata (if any)
        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }

        _holderTokens[owner].remove(tokenId);

        _tokenOwners.remove(tokenId);

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _holderTokens[from].remove(tokenId);
        _holderTokens[to].add(tokenId);

        _tokenOwners.set(tokenId, to);

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Internal function to set the base URI for all token IDs. It is
     * automatically added as a prefix to the value returned in {tokenURI},
     * or to the token ID if {tokenURI} is empty.
     */
    function _setBaseURI(string memory baseURI_) internal virtual {
        _baseURI = baseURI_;
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        private returns (bool)
    {
        if (!to.isContract()) {
            return true;
        }
        bytes memory returndata = to.functionCall(abi.encodeWithSelector(
            IERC721Receiver(to).onERC721Received.selector,
            _msgSender(),
            from,
            tokenId,
            _data
        ), "ERC721: transfer to non ERC721Receiver implementer");
        bytes4 retval = abi.decode(returndata, (bytes4));
        return (retval == _ERC721_RECEIVED);
    }

    function _approve(address to, uint256 tokenId) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(ownerOf(tokenId), to, tokenId);
    }

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

// File: @openzeppelin/contracts/token/ERC721/ERC721Pausable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;



/**
 * @dev ERC721 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC721Pausable is ERC721, Pausable {
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        require(!paused(), "ERC721Pausable: token transfer while paused");
    }
}

// File: contracts/DishNFT.sol

pragma solidity =0.6.6;





contract DishNFT is ERC721Pausable, AccessControl, Ownable {
    bytes32 public constant UPDATE_TOKEN_URI_ROLE = keccak256('UPDATE_TOKEN_URI_ROLE');
    bytes32 public constant PAUSED_ROLE = keccak256('PAUSED_ROLE');

    constructor() public ERC721('Dish NFT', 'DNFT') {
        _setupRole(UPDATE_TOKEN_URI_ROLE, _msgSender());
        _setupRole(PAUSED_ROLE, _msgSender());
    }

    function mint(address to, uint256 tokenId) public onlyOwner {
        _mint(to, tokenId);
    }

    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     * openzeppelin/contracts/token/ERC721/ERC721Burnable.sol
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), 'caller is not owner nor approved');
        _burn(tokenId);
    }

    function setBaseURI(string memory baseURI) public {
        require(hasRole(UPDATE_TOKEN_URI_ROLE, _msgSender()), 'Must have update token uri role');
        _setBaseURI(baseURI);
    }

    function setTokenURI(uint256 tokenId, string memory tokenURI) public {
        require(hasRole(UPDATE_TOKEN_URI_ROLE, _msgSender()), 'Must have update token uri role');
        _setTokenURI(tokenId, tokenURI);
    }

    function pause() public whenNotPaused {
        require(hasRole(PAUSED_ROLE, _msgSender()), 'Must have pause role');
        _pause();
    }

    function unpause() public whenPaused {
        require(hasRole(PAUSED_ROLE, _msgSender()), 'Must have pause role');
        _unpause();
    }

    function approveBulk(address to, uint256[] memory tokenIds) public {
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            approve(to, tokenIds[i]);
        }
    }

    function getApprovedBulk(uint256[] memory tokenIds) public view returns (address[] memory) {
        address[] memory tokenApprovals = new address[](tokenIds.length);
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            tokenApprovals[i] = getApproved(tokenIds[i]);
        }
        return tokenApprovals;
    }
}

// File: contracts/libraries/QuickSortUtils.sol

pragma solidity >=0.5.0;

library QuickSortUtils {
    function sort(uint256[] memory data) internal pure returns (uint256[] memory) {
        if (data.length > 1) {
            quickSort(data, 0, data.length - 1);
        }
        return data;
    }

    function quickSort(
        uint256[] memory data,
        uint256 low,
        uint256 high
    ) internal pure {
        if (low < high) {
            uint256 pivotVal = data[(low + high) / 2];

            uint256 low1 = low;
            uint256 high1 = high;
            for (;;) {
                while (data[low1] < pivotVal) low1++;
                while (data[high1] > pivotVal) high1--;
                if (low1 >= high1) break;
                (data[low1], data[high1]) = (data[high1], data[low1]);
                low1++;
                high1--;
            }
            if (low < high1) quickSort(data, low, high1);
            high1++;
            if (high1 < high) quickSort(data, high1, high);
        }
    }
}

// File: contracts/libraries/RandomGenUtils.sol

pragma solidity >=0.5.0;

library RandomGenUtils {
    function randomGen(uint256 seed, uint256 max) internal view returns (uint256 randomNumber) {
        return (uint256(
            keccak256(abi.encodePacked(blockhash(block.number - 1), now, msg.sender, block.difficulty, seed))
        ) % max);
    }
}

// File: contracts/interfaces/IBakeryMaster.sol

pragma solidity >=0.6.2;

interface IBakeryMaster {
    function poolUserInfoMap(address, address) external view returns (uint256, uint256);

    function pendingBake(address _pair, address _user) external view returns (uint256);

    function deposit(address _pair, uint256 _amount) external;

    function withdraw(address _pair, uint256 _amount) external;

    function emergencyWithdraw(address _pair) external;
}

// File: contracts/DishMaster.sol

pragma solidity =0.6.6;
pragma experimental ABIEncoderV2;













contract DishMaster is ERC721Holder, Ownable, Pausable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using Address for address;
    using EnumerableSet for EnumerableSet.UintSet;

    // Info of each user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
    }

    struct DishInfo {
        uint256 level;
        uint256 stakingPowerMultiple;
        uint256 bakeAmount;
        uint256 stakingPowerAmount;
    }
    uint256 accBakePerShare; // Accumulated BAKEs per share, times 1e12. See below.
    uint256 public constant accBakePerShareMultiple = 1E12;
    uint256 public lastRewardBlock;
    // total has deposit to BakeryMaster stakingPower
    uint256 public totalStakingPower;
    // start from 1, not zero tokenId, zero for using harvest
    uint256 public mintNFTCount = 1;
    uint256 private _fee = 10;
    address public feeAddr; // fee address.
    address public bakeryToken;
    address public dishStakingPowerToken;
    DishNFT public dishNFT;
    IBakeryMaster public bakeryMaster;
    mapping(address => UserInfo) private _userInfoMap;
    mapping(address => EnumerableSet.UintSet) private _stakingTokens;
    mapping(uint256 => DishInfo) public dishInfoMap;
    mapping(uint256 => uint256[]) public dishItemsMap;

    event Synthesis(address indexed user, uint256 indexed tokenId, uint256 amount);
    event Decomposition(address indexed user, uint256 indexed tokenId, uint256 amount);
    event FeeAddressTransferred(address indexed previousOwner, address indexed newOwner);
    event Stake(address indexed user, uint256 indexed tokenId, uint256 amount);
    event Unstake(address indexed user, uint256 indexed tokenId, uint256 amount);
    event EmergencyUnstake(address indexed user, uint256 indexed tokenId, uint256 amount);
    event EmergencyUnstakeAll(address indexed user);
    event UpdateFee(address indexed user, uint256 indexed oldFee, uint256 newFee);

    constructor(
        address _dishStakingPowerToken,
        address _bakeryToken,
        address _dishNFT,
        address _bakeryMaster,
        address _feeAddr
    ) public {
        dishStakingPowerToken = _dishStakingPowerToken;
        bakeryToken = _bakeryToken;
        dishNFT = DishNFT(_dishNFT);
        bakeryMaster = IBakeryMaster(_bakeryMaster);
        feeAddr = _feeAddr;
        emit FeeAddressTransferred(address(0), feeAddr);
    }

    function approveBakeryMasterForSpendStakingPowerToken() public {
        IERC20(dishStakingPowerToken).approve(address(bakeryMaster), 2**256 - 1);
    }

    function nextSeed(uint256 seed) private pure returns (uint256) {
        return seed.sub(12345678901234);
    }

    function synthesis(uint256 _amount) public {
        require(_amount >= 1E22, 'DishMaster: synthesis, amount too small');
        uint256 feeAmount = _amount.mul(_fee).div(100);
        uint256 amount = _amount.sub(feeAmount);
        IERC20(bakeryToken).safeTransferFrom(address(msg.sender), feeAddr, feeAmount);
        IERC20(bakeryToken).safeTransferFrom(address(msg.sender), address(this), amount);

        uint256 currentSeed = _amount;
        uint256 level = 0;
        if (_amount >= 2E22 && _amount < 5E22) {
            level = 1;
        } else if (_amount >= 5E22 && _amount < 10E22) {
            level = 2;
        } else if (_amount >= 10E22) {
            level = 3;
        }
        uint256 maxItems = level + 3;
        uint256[] memory tempItems = new uint256[](maxItems);
        for (uint256 i = 0; i < maxItems; ++i) {
            tempItems[i] = RandomGenUtils.randomGen(currentSeed, 400000);
            currentSeed = nextSeed(currentSeed);
        }
        dishItemsMap[mintNFTCount] = tempItems;
        uint256 stakingPowerMultiple = QuickSortUtils.sort(tempItems)[maxItems - 3].add(100000);
        uint256 stakingPowerAmount = _amount.mul(stakingPowerMultiple).div(100000);
        dishInfoMap[mintNFTCount] = DishInfo({
            level: level,
            stakingPowerMultiple: stakingPowerMultiple,
            stakingPowerAmount: stakingPowerAmount,
            bakeAmount: amount
        });
        dishNFT.mint(address(msg.sender), mintNFTCount);
        DishStakingPowerToken(dishStakingPowerToken).mint(address(this), stakingPowerAmount);
        emit Synthesis(msg.sender, mintNFTCount, _amount);
        mintNFTCount++;
    }

    function decomposition(uint256 tokenId) public {
        require(dishNFT.ownerOf(tokenId) == msg.sender, 'DishMaster: decomposition, caller is not the owner');
        DishInfo storage dishInfo = dishInfoMap[tokenId];
        IERC20(bakeryToken).safeTransfer(address(msg.sender), dishInfo.bakeAmount);
        DishStakingPowerToken(dishStakingPowerToken).burn(dishInfo.stakingPowerAmount);
        dishNFT.burn(tokenId);
        emit Decomposition(msg.sender, tokenId, dishInfo.bakeAmount);
        delete dishInfoMap[tokenId];
    }

    // View function to see pending BAKEs on frontend.
    function pendingBake(address _user) external view returns (uint256) {
        UserInfo memory userInfo = _userInfoMap[_user];
        uint256 _accBakePerShare = accBakePerShare;
        if (totalStakingPower != 0) {
            uint256 totalPendingBake = bakeryMaster.pendingBake(dishStakingPowerToken, address(this));
            _accBakePerShare = _accBakePerShare.add(
                totalPendingBake.mul(accBakePerShareMultiple).div(totalStakingPower)
            );
        }
        return userInfo.amount.mul(_accBakePerShare).div(accBakePerShareMultiple).sub(userInfo.rewardDebt);
    }

    function updateStaking() public {
        if (block.number <= lastRewardBlock) {
            return;
        }
        if (totalStakingPower == 0) {
            lastRewardBlock = block.number;
            return;
        }
        (, uint256 lastRewardDebt) = bakeryMaster.poolUserInfoMap(dishStakingPowerToken, address(this));
        bakeryMaster.deposit(dishStakingPowerToken, 0);
        (, uint256 newRewardDebt) = bakeryMaster.poolUserInfoMap(dishStakingPowerToken, address(this));
        accBakePerShare = accBakePerShare.add(
            newRewardDebt.sub(lastRewardDebt).mul(accBakePerShareMultiple).div(totalStakingPower)
        );
        lastRewardBlock = block.number;
    }

    function stake(uint256 tokenId) public whenNotPaused {
        UserInfo storage userInfo = _userInfoMap[msg.sender];
        DishInfo memory dishInfo = dishInfoMap[tokenId];
        updateStaking();
        if (userInfo.amount != 0) {
            uint256 pending = userInfo.amount.mul(accBakePerShare).div(accBakePerShareMultiple).sub(
                userInfo.rewardDebt
            );
            if (pending != 0) {
                safeBakeTransfer(msg.sender, pending);
            }
        }
        if (tokenId != 0) {
            dishNFT.safeTransferFrom(address(msg.sender), address(this), tokenId);
            userInfo.amount = userInfo.amount.add(dishInfo.stakingPowerAmount);
            _stakingTokens[msg.sender].add(tokenId);
            bakeryMaster.deposit(dishStakingPowerToken, dishInfo.stakingPowerAmount);
            totalStakingPower = totalStakingPower.add(dishInfo.stakingPowerAmount);
        }
        userInfo.rewardDebt = userInfo.amount.mul(accBakePerShare).div(accBakePerShareMultiple);
        if (tokenId != 0) {
            emit Stake(msg.sender, tokenId, dishInfo.stakingPowerAmount);
        }
    }

    function unstake(uint256 tokenId) public {
        require(_stakingTokens[msg.sender].contains(tokenId), 'DishMaster: UNSTAKE FORBIDDEN');
        UserInfo storage userInfo = _userInfoMap[msg.sender];
        DishInfo memory dishInfo = dishInfoMap[tokenId];
        updateStaking();
        uint256 pending = userInfo.amount.mul(accBakePerShare).div(accBakePerShareMultiple).sub(userInfo.rewardDebt);
        if (pending != 0) {
            safeBakeTransfer(msg.sender, pending);
        }
        userInfo.amount = userInfo.amount.sub(dishInfo.stakingPowerAmount);
        _stakingTokens[msg.sender].remove(tokenId);
        dishNFT.safeTransferFrom(address(this), address(msg.sender), tokenId);
        bakeryMaster.withdraw(dishStakingPowerToken, dishInfo.stakingPowerAmount);
        totalStakingPower = totalStakingPower.sub(dishInfo.stakingPowerAmount);
        userInfo.rewardDebt = userInfo.amount.mul(accBakePerShare).div(accBakePerShareMultiple);
        emit Unstake(msg.sender, tokenId, dishInfo.stakingPowerAmount);
    }

    function unstakeAll() public {
        EnumerableSet.UintSet storage stakingTokens = _stakingTokens[msg.sender];
        uint256 length = stakingTokens.length();
        for (uint256 i = 0; i < length; ++i) {
            unstake(stakingTokens.at(0));
        }
    }

    function pauseStake() public onlyOwner whenNotPaused {
        _pause();
    }

    function unpauseStake() public onlyOwner whenPaused {
        _unpause();
    }

    function updateFee(uint256 fee) public onlyOwner {
        emit UpdateFee(msg.sender, _fee, fee);
        _fee = fee;
    }

    function emergencyUnstakeAll() public onlyOwner whenPaused {
        bakeryMaster.emergencyWithdraw(dishStakingPowerToken);
        emit EmergencyUnstakeAll(msg.sender);
    }

    function emergencyUnstake(uint256 tokenId) public {
        require(_stakingTokens[msg.sender].contains(tokenId), 'DishMaster: EMERGENCY UNSTAKE FORBIDDEN');
        UserInfo storage userInfo = _userInfoMap[msg.sender];
        DishInfo memory dishInfo = dishInfoMap[tokenId];
        userInfo.amount = userInfo.amount.sub(dishInfo.stakingPowerAmount);
        _stakingTokens[msg.sender].remove(tokenId);
        dishNFT.safeTransferFrom(address(this), address(msg.sender), tokenId);
        totalStakingPower = totalStakingPower.sub(dishInfo.stakingPowerAmount);
        userInfo.rewardDebt = userInfo.amount.mul(accBakePerShare).div(accBakePerShareMultiple);
        emit EmergencyUnstake(msg.sender, tokenId, dishInfo.stakingPowerAmount);
    }

    function safeBakeTransfer(address _to, uint256 _amount) internal {
        uint256 bakeBal = IERC20(bakeryToken).balanceOf(address(this));
        if (_amount > bakeBal) {
            IERC20(bakeryToken).transfer(_to, bakeBal);
        } else {
            IERC20(bakeryToken).transfer(_to, _amount);
        }
    }

    function setFeeAddr(address _feeAddr) external {
        require(msg.sender == feeAddr, 'DishMaster: FORBIDDEN');
        feeAddr = _feeAddr;
        emit FeeAddressTransferred(msg.sender, feeAddr);
    }

    function getUserInfo(address user)
        public
        view
        returns (
            uint256,
            uint256,
            uint256
        )
    {
        UserInfo memory userInfo = _userInfoMap[user];
        return (userInfo.amount, userInfo.rewardDebt, _stakingTokens[user].length());
    }

    function getDishInfo(uint256 tokenId) public view returns (DishInfo memory, uint256[] memory) {
        return (dishInfoMap[tokenId], dishItemsMap[tokenId]);
    }

    function tokenOfStakerByIndex(address staker, uint256 index) public view returns (uint256) {
        return _stakingTokens[staker].at(index);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_dishStakingPowerToken","type":"address"},{"internalType":"address","name":"_bakeryToken","type":"address"},{"internalType":"address","name":"_dishNFT","type":"address"},{"internalType":"address","name":"_bakeryMaster","type":"address"},{"internalType":"address","name":"_feeAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Decomposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyUnstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"EmergencyUnstakeAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"FeeAddressTransferred","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Synthesis","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"UpdateFee","type":"event"},{"inputs":[],"name":"accBakePerShareMultiple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveBakeryMasterForSpendStakingPowerToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bakeryMaster","outputs":[{"internalType":"contract IBakeryMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bakeryToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"decomposition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"dishInfoMap","outputs":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"stakingPowerMultiple","type":"uint256"},{"internalType":"uint256","name":"bakeAmount","type":"uint256"},{"internalType":"uint256","name":"stakingPowerAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dishItemsMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dishNFT","outputs":[{"internalType":"contract DishNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dishStakingPowerToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDishInfo","outputs":[{"components":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"stakingPowerMultiple","type":"uint256"},{"internalType":"uint256","name":"bakeAmount","type":"uint256"},{"internalType":"uint256","name":"stakingPowerAmount","type":"uint256"}],"internalType":"struct DishMaster.DishInfo","name":"","type":"tuple"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintNFTCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingBake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddr","type":"address"}],"name":"setFeeAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"synthesis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfStakerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakingPower","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":[],"name":"unpauseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateStaking","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526001600455600a6005553480156200001b57600080fd5b506040516200373a3803806200373a8339810160408190526200003e916200013a565b6000620000536001600160e01b036200013616565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19168155600880546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600980548216878416179055600a80548216868416179055600680549091168483161790819055604051911691907f1624470338902bc4f7d3d1e5fed6b70c92e686b853bfba7b65d0cef9cc6b5eea908290a35050505050620001d2565b3390565b600080600080600060a0868803121562000152578081fd5b85516200015f81620001b9565b60208701519095506200017281620001b9565b60408701519094506200018581620001b9565b60608701519093506200019881620001b9565b6080870151909250620001ab81620001b9565b809150509295509295909350565b6001600160a01b0381168114620001cf57600080fd5b50565b61355880620001e26000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80638da5cb5b1161012a578063b2855b4f116100bd578063d09bda7c1161008c578063e2bec6df11610071578063e2bec6df146103eb578063f2e75660146103f3578063f2fde38b146104165761020b565b8063d09bda7c146103d0578063d8dfe755146103d85761020b565b8063b2855b4f1461039a578063bb284511146103ad578063bca8b250146103b5578063c95745e5146103c85761020b565b8063a2edfe3c116100f9578063a2edfe3c14610364578063a694fc3a1461036c578063a9f8d1811461037f578063acc8cf71146103875761020b565b80638da5cb5b1461032e5780639012c4a81461033657806396bb038d146103495780639e64523e1461035c5761020b565b80633545a36f116101a25780635c975abb116101715780635c975abb146102e75780636386c1c7146102fc578063715018a61461031e57806380b9879e146103265761020b565b80633545a36f146102bc57806339e7fddc146102cf57806342810967146102d75780634c524dcf146102df5761020b565b806325bdb615116101de57806325bdb6151461026b5780632e17de781461028c578063340e1a4d1461029f57806335322f37146102b45761020b565b8063012ce5011461021057806301aae46914610225578063150b7a02146102435780631f04ff7b14610263575b600080fd5b61022361021e366004612e25565b610429565b005b61022d610629565b60405161023a9190612efd565b60405180910390f35b610256610251366004612cf4565b610645565b60405161023a9190612fa7565b61022d61066f565b61027e610279366004612e25565b61068b565b60405161023a92919061342f565b61022361029a366004612e25565b610732565b6102a7610a0b565b60405161023a919061349a565b610223610a11565b6102a76102ca366004612e55565b610a58565b61022d610a86565b610223610aa2565b610223610b5d565b6102ef610c15565b60405161023a9190612f9c565b61030f61030a366004612cbc565b610c37565b60405161023a939291906134a3565b610223610ca9565b61022d610d74565b61022d610d90565b610223610344366004612e25565b610dac565b6102a7610357366004612cbc565b610e5e565b61022d610fc0565b6102a7610fdc565b61022361037a366004612e25565b610fe5565b6102a76112c7565b610223610395366004612e25565b6112cd565b6102236103a8366004612cbc565b61158c565b6102a7611654565b6102236103c3366004612e25565b61165a565b610223611a6e565b610223611bd7565b6102a76103e6366004612dda565b611e33565b610223611e71565b610406610401366004612e25565b611f42565b60405161023a94939291906134b9565b610223610424366004612cbc565b611f69565b336000908152600c60205260409020610448908263ffffffff61209f16565b610487576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906133d2565b60405180910390fd5b336000908152600b6020526040902061049e612c1f565b506000828152600d60209081526040918290208251608081018452815481526001820154928101929092526002810154928201929092526003909101546060820181905282546104f39163ffffffff6120ab16565b8255336000908152600c60205260409020610514908463ffffffff6120ed16565b506009546040517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906342842e0e9061056f90309033908890600401612f45565b600060405180830381600087803b15801561058957600080fd5b505af115801561059d573d6000803e3d6000fd5b5050505060608101516003546105b2916120ab565b60035560015482546105e09164e8d4a51000916105d49163ffffffff6120f916565b9063ffffffff61214d16565b60018301556060810151604051849133917f4c363bde70ba6f3710164df779019cbdf717067dd1c615ccc164601c05168a369161061c9161349a565b60405180910390a3505050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b7f150b7a02000000000000000000000000000000000000000000000000000000005b949350505050565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b610693612c1f565b6000828152600d60209081526040808320600e835292819020815160808101835284548152600185015481850152600285015481840152600390940154606085810191909152815483518186028101860190945280845290949391929183919083018282801561072257602002820191906000526020600020905b81548152602001906001019080831161070e575b5050505050905091509150915091565b336000908152600c60205260409020610751908263ffffffff61209f16565b610787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e9061333e565b336000908152600b6020526040902061079e612c1f565b600d600084815260200190815260200160002060405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505090506107ee611bd7565b6000610826836001015461081a64e8d4a510006105d460015488600001546120f990919063ffffffff16565b9063ffffffff6120ab16565b9050801561083857610838338261218f565b6060820151835461084e9163ffffffff6120ab16565b8355336000908152600c6020526040902061086f908563ffffffff6120ed16565b506009546040517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906342842e0e906108ca90309033908990600401612f45565b600060405180830381600087803b1580156108e457600080fd5b505af11580156108f8573d6000803e3d6000fd5b5050600a5460085460608601516040517ff3fef3a300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416955063f3fef3a3945061095c9390921691600401612f76565b600060405180830381600087803b15801561097657600080fd5b505af115801561098a573d6000803e3d6000fd5b50505050606082015160035461099f916120ab565b60035560015483546109c19164e8d4a51000916105d49163ffffffff6120f916565b60018401556060820151604051859133917ff960dbf9e5d0682f7a298ed974e33a28b4464914b7a2bfac12ae419a9afeb280916109fd9161349a565b60405180910390a350505050565b60035481565b336000908152600c6020526040812090610a2a826123a0565b905060005b81811015610a5357610a4b61029a84600063ffffffff6123ab16565b600101610a2f565b505050565b600e6020528160005260406000208181548110610a7157fe5b90600052602060002001600091509150505481565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b610aaa6123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610afe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b60005474010000000000000000000000000000000000000000900460ff1615610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613207565b610b5b6123bb565b565b610b656123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610bb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b60005474010000000000000000000000000000000000000000900460ff16610c0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613082565b610b5b61248f565b60005474010000000000000000000000000000000000000000900460ff165b90565b6000806000610c44612c47565b5073ffffffffffffffffffffffffffffffffffffffff84166000818152600b60209081526040808320815180830183528154808252600190920154818501819052958552600c9093529220909290610c9b906123a0565b935093509350509193909250565b610cb16123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610d05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b610db46123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610e08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b6005543373ffffffffffffffffffffffffffffffffffffffff167fc9920255a27e7e0a5d647597e867ab827659000ae32276c878d8a04120efabb083604051610e51919061349a565b60405180910390a3600555565b6000610e68612c47565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020908152604091829020825180840190935280548352600190810154918301919091525460035415610f9857600a546008546040517f6cc75a0c00000000000000000000000000000000000000000000000000000000815260009273ffffffffffffffffffffffffffffffffffffffff90811692636cc75a0c92610f1492909116903090600401612f1e565b60206040518083038186803b158015610f2c57600080fd5b505afa158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f649190612e3d565b9050610f94610f876003546105d464e8d4a51000856120f990919063ffffffff16565b839063ffffffff61253416565b9150505b610667826020015161081a64e8d4a510006105d48587600001516120f990919063ffffffff16565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b64e8d4a5100081565b60005474010000000000000000000000000000000000000000900460ff161561103a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613207565b336000908152600b60205260409020611051612c1f565b600d600084815260200190815260200160002060405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505090506110a1611bd7565b8154156110e85760006110d4836001015461081a64e8d4a510006105d460015488600001546120f990919063ffffffff16565b905080156110e6576110e6338261218f565b505b8215611252576009546040517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906342842e0e9061114890339030908890600401612f45565b600060405180830381600087803b15801561116257600080fd5b505af1158015611176573d6000803e3d6000fd5b505050506060810151825461118a91612534565b8255336000908152600c602052604090206111ab908463ffffffff61257316565b50600a5460085460608301516040517f47e7ef2400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416936347e7ef249361120b93911691600401612f76565b600060405180830381600087803b15801561122557600080fd5b505af1158015611239573d6000803e3d6000fd5b50505050606081015160035461124e91612534565b6003555b60015482546112719164e8d4a51000916105d49163ffffffff6120f916565b60018301558215610a5357823373ffffffffffffffffffffffffffffffffffffffff167f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b6836060015160405161061c919061349a565b60025481565b6009546040517f6352211e000000000000000000000000000000000000000000000000000000008152339173ffffffffffffffffffffffffffffffffffffffff1690636352211e9061132390859060040161349a565b60206040518083038186803b15801561133b57600080fd5b505afa15801561134f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113739190612cd8565b73ffffffffffffffffffffffffffffffffffffffff16146113c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906130b9565b6000818152600d6020526040902060028101546007546114009173ffffffffffffffffffffffffffffffffffffffff90911690339063ffffffff61257f16565b60085460038201546040517f42966c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909216916342966c68916114599160040161349a565b600060405180830381600087803b15801561147357600080fd5b505af1158015611487573d6000803e3d6000fd5b50506009546040517f42966c6800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911692506342966c6891506114e190859060040161349a565b600060405180830381600087803b1580156114fb57600080fd5b505af115801561150f573d6000803e3d6000fd5b50505050813373ffffffffffffffffffffffffffffffffffffffff167fdff7f912ceb1ffa6762d7867e493162977347a0dec4011c59bbd098a0b98cf65836002015460405161155e919061349a565b60405180910390a3506000908152600d60205260408120818155600181018290556002810182905560030155565b60065473ffffffffffffffffffffffffffffffffffffffff1633146115dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e9061323e565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560405191169033907f1624470338902bc4f7d3d1e5fed6b70c92e686b853bfba7b65d0cef9cc6b5eea90600090a350565b60045481565b69021e19e0c9bab240000081101561169e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613116565b60006116ba60646105d4600554856120f990919063ffffffff16565b905060006116ce838363ffffffff6120ab16565b6006546007549192506117039173ffffffffffffffffffffffffffffffffffffffff908116913391168563ffffffff61262016565b60075461172e9073ffffffffffffffffffffffffffffffffffffffff1633308463ffffffff61262016565b82600069043c33c193756480000082108015906117545750690a968163f0a57b40000085105b15611761575060016117a6565b690a968163f0a57b4000008510158015611784575069152d02c7e14af680000085105b15611791575060026117a6565b69152d02c7e14af680000085106117a6575060035b6003810160608167ffffffffffffffff811180156117c357600080fd5b506040519080825280602002602001820160405280156117ed578160200160208202803683370190505b50905060005b82811015611833576118088562061a80612641565b82828151811061181457fe5b60200260200101818152505061182985612689565b94506001016117f3565b506004546000908152600e60209081526040909120825161185692840190612c61565b50600061188d620186a0611869846126a1565b600386038151811061187757fe5b602002602001015161253490919063ffffffff16565b905060006118a8620186a06105d48b8563ffffffff6120f916565b6040805160808101825287815260208082018681528284018c815260608401868152600480546000908152600d90955293869020945185559151600185015551600284015551600390920191909155600954815492517f40c10f1900000000000000000000000000000000000000000000000000000000815293945073ffffffffffffffffffffffffffffffffffffffff16926340c10f199261194d92339201612f76565b600060405180830381600087803b15801561196757600080fd5b505af115801561197b573d6000803e3d6000fd5b50506008546040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911692506340c10f1991506119d79030908590600401612f76565b600060405180830381600087803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b505050506004543373ffffffffffffffffffffffffffffffffffffffff167ffa16e5fd1b0805acb958820d1abb56f5dbf38abaf5a87eea104a9ab0aaf981068b604051611a52919061349a565b60405180910390a3505060048054600101905550505050505050565b611a766123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614611aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b60005474010000000000000000000000000000000000000000900460ff16611b1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613082565b600a546008546040517f6ff1c9bc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831692636ff1c9bc92611b7892911690600401612efd565b600060405180830381600087803b158015611b9257600080fd5b505af1158015611ba6573d6000803e3d6000fd5b50506040513392507f2dba58aba982cc12212d17dfaaf0a2713582d6c5b91f453f58f266de1d6a31e39150600090a2565b6002544311611be557610b5b565b600354611bf55743600255610b5b565b600a546008546040517f34ace41700000000000000000000000000000000000000000000000000000000815260009273ffffffffffffffffffffffffffffffffffffffff908116926334ace41792611c5592909116903090600401612f1e565b604080518083038186803b158015611c6c57600080fd5b505afa158015611c80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca49190612e76565b600a546008546040517f47e7ef2400000000000000000000000000000000000000000000000000000000815292945073ffffffffffffffffffffffffffffffffffffffff91821693506347e7ef2492611d069290911690600090600401612f76565b600060405180830381600087803b158015611d2057600080fd5b505af1158015611d34573d6000803e3d6000fd5b5050600a546008546040517f34ace4170000000000000000000000000000000000000000000000000000000081526000945073ffffffffffffffffffffffffffffffffffffffff92831693506334ace41792611d969216903090600401612f1e565b604080518083038186803b158015611dad57600080fd5b505afa158015611dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de59190612e76565b915050611e28611e196003546105d464e8d4a51000611e0d87876120ab90919063ffffffff16565b9063ffffffff6120f916565b6001549063ffffffff61253416565b600155505043600255565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c60205260408120611e68908363ffffffff6123ab16565b90505b92915050565b600854600a546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263095ea7b392611eed929116907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90600401612f76565b602060405180830381600087803b158015611f0757600080fd5b505af1158015611f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3f9190612e05565b50565b600d6020526000908152604090208054600182015460028301546003909301549192909184565b611f716123b7565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614611fc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906132d2565b73ffffffffffffffffffffffffffffffffffffffff8116612012576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613173565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000611e6883836126c1565b6000611e6883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506126d9565b6000611e68838361271f565b60008261210857506000611e6b565b8282028284828161211557fe5b0414611e68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613275565b6000611e6883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612803565b6007546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a08231906121e6903090600401612efd565b60206040518083038186803b1580156121fe57600080fd5b505afa158015612212573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122369190612e3d565b9050808211156122f0576007546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906122989086908590600401612f76565b602060405180830381600087803b1580156122b257600080fd5b505af11580156122c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ea9190612e05565b50610a53565b6007546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906123489086908690600401612f76565b602060405180830381600087803b15801561236257600080fd5b505af1158015612376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061239a9190612e05565b50505050565b6000611e6b82612854565b6000611e688383612858565b3390565b60005474010000000000000000000000000000000000000000900460ff1615612410576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613207565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124786123b7565b6040516124859190612efd565b60405180910390a1565b60005474010000000000000000000000000000000000000000900460ff166124e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613082565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6124786123b7565b600082820183811015611e68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e906131d0565b6000611e6883836128b7565b610a538363a9059cbb60e01b848460405160240161259e929190612f76565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612901565b61239a846323b872dd60e01b85858560405160240161259e93929190612f45565b600081600143034042334487604051602001612661959493929190612e99565b6040516020818303038152906040528051906020012060001c8161268157fe5b069392505050565b6000611e6b82650b3a73ce2ff263ffffffff6120ab16565b60606001825111156126bd576126bd82600060018551036129b7565b5090565b60009081526001919091016020526040902054151590565b60008184841115612717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e9190612fd4565b505050900390565b600081815260018301602052604081205480156127f95783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061277057fe5b906000526020600020015490508087600001848154811061278d57fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806127bd57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611e6b565b6000915050611e6b565b6000818361283e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e9190612fd4565b50600083858161284a57fe5b0495945050505050565b5490565b81546000908210612895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613025565b8260000182815481106128a457fe5b9060005260206000200154905092915050565b60006128c383836126c1565b6128f957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611e6b565b506000611e6b565b6060612963826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612b0a9092919063ffffffff16565b805190915015610a5357808060200190518101906129819190612e05565b610a53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613375565b80821015610a5357600083600284840104815181106129d257fe5b6020908102919091010151905082825b828683815181106129ef57fe5b60200260200101511015612a08576001909101906129e2565b82868281518110612a1557fe5b60200260200101511115612a4a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01612a08565b808210612a5657612ad9565b858181518110612a6257fe5b6020026020010151868381518110612a7657fe5b6020026020010151878481518110612a8a57fe5b60200260200101888481518110612a9d57fe5b6020908102919091010191909152526001909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016129e2565b80851015612aec57612aec8686836129b7565b60010183811015612b0257612b028682866129b7565b505050505050565b606061066784846000856060612b1f85612c19565b612b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e90613307565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612b7f9190612ee1565b60006040518083038185875af1925050503d8060008114612bbc576040519150601f19603f3d011682016040523d82523d6000602084013e612bc1565b606091505b50915091508115612bd55791506106679050565b805115612be55780518082602001fd5b836040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047e9190612fd4565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b828054828255906000526020600020908101928215612c9c579160200282015b82811115612c9c578251825591602001919060010190612c81565b506126bd92610c349250905b808211156126bd5760008155600101612ca8565b600060208284031215612ccd578081fd5b8135611e6881613500565b600060208284031215612ce9578081fd5b8151611e6881613500565b60008060008060808587031215612d09578283fd5b8435612d1481613500565b9350602085810135612d2581613500565b935060408601359250606086013567ffffffffffffffff80821115612d48578384fd5b81880189601f820112612d59578485fd5b8035925081831115612d69578485fd5b604051847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601168201018181108482111715612da6578687fd5b60405283815281840185018b1015612dbc578586fd5b83858301868301379283019093019390935294979396509194505050565b60008060408385031215612dec578182fd5b8235612df781613500565b946020939093013593505050565b600060208284031215612e16578081fd5b81518015158114611e68578182fd5b600060208284031215612e36578081fd5b5035919050565b600060208284031215612e4e578081fd5b5051919050565b60008060408385031215612e67578182fd5b50508035926020909101359150565b60008060408385031215612e88578182fd5b505080516020909101519092909150565b948552602085019390935260609190911b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660408401526054830152607482015260940190565b60008251612ef38184602087016134d4565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b6000602082528251806020840152612ff38160408501602087016134d4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60408201527f6473000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526032908201527f446973684d61737465723a206465636f6d706f736974696f6e2c2063616c6c6560408201527f72206973206e6f7420746865206f776e65720000000000000000000000000000606082015260800190565b60208082526027908201527f446973684d61737465723a2073796e7468657369732c20616d6f756e7420746f60408201527f6f20736d616c6c00000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b60208082526015908201527f446973684d61737465723a20464f5242494444454e0000000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601d908201527f446973684d61737465723a20554e5354414b4520464f5242494444454e000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f446973684d61737465723a20454d455247454e435920554e5354414b4520464f60408201527f5242494444454e00000000000000000000000000000000000000000000000000606082015260800190565b600060a082018451835260208086015181850152604086015160408501526060860151606085015260a0608085015281855180845260c0860191508287019350845b8181101561348d57845183529383019391830191600101613471565b5090979650505050505050565b90815260200190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b60005b838110156134ef5781810151838201526020016134d7565b8381111561239a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114611f3f57600080fdfea26469706673582212205d6c84d53c553a36b737cb4cb87d6e47eebfd36ed68820b41acb6bc22dfea60664736f6c6343000606003300000000000000000000000054f135a5fb523e467bcd6aa934939e1f25382275000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c5000000000000000000000000a7463c3163962b12aeb623147c2043bb5483496200000000000000000000000020ec291bb8459b6145317e7126532ce7ece5056f0000000000000000000000000986c92c58ed9d8a1b79744a9ec088748da5e8d0

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

00000000000000000000000054f135a5fb523e467bcd6aa934939e1f25382275000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c5000000000000000000000000a7463c3163962b12aeb623147c2043bb5483496200000000000000000000000020ec291bb8459b6145317e7126532ce7ece5056f0000000000000000000000000986c92c58ed9d8a1b79744a9ec088748da5e8d0

-----Decoded View---------------
Arg [0] : _dishStakingPowerToken (address): 0x54f135a5fb523e467bcd6aa934939e1f25382275
Arg [1] : _bakeryToken (address): 0xe02df9e3e622debdd69fb838bb799e3f168902c5
Arg [2] : _dishNFT (address): 0xa7463c3163962b12aeb623147c2043bb54834962
Arg [3] : _bakeryMaster (address): 0x20ec291bb8459b6145317e7126532ce7ece5056f
Arg [4] : _feeAddr (address): 0x0986c92c58ed9d8a1b79744a9ec088748da5e8d0

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000054f135a5fb523e467bcd6aa934939e1f25382275
Arg [1] : 000000000000000000000000e02df9e3e622debdd69fb838bb799e3f168902c5
Arg [2] : 000000000000000000000000a7463c3163962b12aeb623147c2043bb54834962
Arg [3] : 00000000000000000000000020ec291bb8459b6145317e7126532ce7ece5056f
Arg [4] : 0000000000000000000000000986c92c58ed9d8a1b79744a9ec088748da5e8d0


Deployed ByteCode Sourcemap

96374:11347:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;96374:11347:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;105760:757:0;;;;;;;;;:::i;:::-;;97348:36;;;:::i;:::-;;;;;;;;;;;;;;;;23843:164;;;;;;;;;:::i;:::-;;;;;;;;97391:22;;;:::i;107396:165::-;;;;;;;;;:::i;:::-;;;;;;;;;103925:1050;;;;;;;;;:::i;97098:32::-;;;:::i;:::-;;;;;;;;104983:272;;;:::i;97641:49::-;;;;;;;;;:::i;97270:22::-;;;:::i;105263:80::-;;;:::i;105351:81::-;;;:::i;25117:78::-;;;:::i;:::-;;;;;;;;107072:316;;;;;;;;;:::i;:::-;;;;;;;;;;9078:148;;;:::i;97420:33::-;;;:::i;8436:79::-;;;:::i;105440:126::-;;;;;;;;;:::i;101433:605::-;;;;;;;;;:::i;97315:26::-;;;:::i;96945:54::-;;;:::i;102758:1159::-;;;;;;;;;:::i;97006:30::-;;;:::i;100828:541::-;;;;;;;;;:::i;106856:208::-;;;;;;;;;:::i;97200:31::-;;;:::i;99116:1704::-;;;;;;;;;:::i;105574:178::-;;;:::i;102046:704::-;;;:::i;107569:149::-;;;;;;;;;:::i;98833:154::-;;;:::i;97587:47::-;;;;;;;;;:::i;:::-;;;;;;;;;;;9381:244;;;;;;;;;:::i;105760:757::-;105844:10;105829:26;;;;:14;:26;;;;;:44;;105865:7;105829:44;:35;:44;:::i;:::-;105821:96;;;;;;;;;;;;;;;;;;;;;;105969:10;105928:25;105956:24;;;:12;:24;;;;;105991;;:::i;:::-;-1:-1:-1;106018:20:0;;;;:11;:20;;;;;;;;;105991:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;106067:15;;:48;;;:19;:48;:::i;:::-;106049:66;;106141:10;106049:15;106126:26;;;:14;:26;;;;;:42;;106160:7;106126:42;:33;:42;:::i;:::-;-1:-1:-1;106179:7:0;;:69;;;;;:7;;;;;:24;;:69;;106212:4;;106227:10;;106240:7;;106179:69;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;106179:69:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;106301:27:0;;;;106279:17;;:50;;:21;:50::i;:::-;106259:17;:70;106382:15;;106362;;:65;;96995:4;;106362:36;;;:19;:36;:::i;:::-;:40;:65;:40;:65;:::i;:::-;106340:19;;;:87;106481:27;;;;106443:66;;106472:7;;106460:10;;106443:66;;;;;;;;;;;;;;105760:757;;;:::o;97348:36::-;;;;;;:::o;23843:164::-;23969:30;23843:164;;;;;;;:::o;97391:22::-;;;;;;:::o;107396:165::-;107455:15;;:::i;:::-;107509:20;;;;:11;:20;;;;;;;;107531:12;:21;;;;;;107501:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107472:16;107501:52;;;;;;;;;;;;;;;;;;;;;;;;107472:16;;107501:52;107531:21;;107501:52;107531:21;;107501:52;;;107531:21;107501:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107396:165;;;:::o;103925:1050::-;104000:10;103985:26;;;;:14;:26;;;;;:44;;104021:7;103985:44;:35;:44;:::i;:::-;103977:86;;;;;;;;;;;;;;104115:10;104074:25;104102:24;;;:12;:24;;;;;104137;;:::i;:::-;104164:11;:20;104176:7;104164:20;;;;;;;;;;;104137:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104195:15;:13;:15::i;:::-;104221;104239:90;104309:8;:19;;;104239:65;96995:4;104239:36;104259:15;;104239:8;:15;;;:19;;:36;;;;:::i;:65::-;:69;:90;:69;:90;:::i;:::-;104221:108;-1:-1:-1;104344:12:0;;104340:82;;104373:37;104390:10;104402:7;104373:16;:37::i;:::-;104470:27;;;;104450:15;;:48;;;:19;:48;:::i;:::-;104432:66;;104524:10;104432:15;104509:26;;;:14;:26;;;;;:42;;104543:7;104509:42;:33;:42;:::i;:::-;-1:-1:-1;104562:7:0;;:69;;;;;:7;;;;;:24;;:69;;104595:4;;104610:10;;104623:7;;104562:69;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;104562:69:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;104642:12:0;;104664:21;;104687:27;;;;104642:73;;;;;:12;;;;;-1:-1:-1;104642:21:0;;-1:-1:-1;104642:73:0;;104664:21;;;;104642:73;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;104642:73:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;104768:27:0;;;;104746:17;;:50;;:21;:50::i;:::-;104726:17;:70;104849:15;;104829;;:65;;96995:4;;104829:36;;;:19;:36;:::i;:65::-;104807:19;;;:87;104939:27;;;;104910:57;;104930:7;;104918:10;;104910:57;;;;;;;;;;;;;;103925:1050;;;;:::o;97098:32::-;;;;:::o;104983:272::-;105084:10;105023:43;105069:26;;;:14;:26;;;;;;105123:22;105069:26;105123:20;:22::i;:::-;105106:39;-1:-1:-1;105161:9:0;105156:92;105180:6;105176:1;:10;105156:92;;;105208:28;105216:19;:13;105233:1;105216:19;:16;:19;:::i;105208:28::-;105188:3;;105156:92;;;;104983:272;;:::o;97641:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;97270:22::-;;;;;;:::o;105263:80::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;25435:7:::1;::::0;;;::::1;;;25434:8;25426:37;;;;;;;;;;;;;;105327:8:::2;:6;:8::i;:::-;105263:80::o:0;105351:81::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;25711:7:::1;::::0;;;::::1;;;25703:40;;;;;;;;;;;;;;105414:10:::2;:8;:10::i;25117:78::-:0;25156:4;25180:7;;;;;;25117:78;;:::o;107072:316::-;107169:7;107191;107213;107248:24;;:::i;:::-;-1:-1:-1;107275:18:0;;;;;;;:12;:18;;;;;;;;107248:45;;;;;;;;;;;;;;;;;;;;;;;107350:20;;;:14;:20;;;;;107248:45;;;107350:29;;:27;:29::i;:::-;107304:76;;;;;;;107072:316;;;;;:::o;9078:148::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;9185:1:::1;9169:6:::0;;9148:40:::1;::::0;::::1;9169:6:::0;;::::1;::::0;9148:40:::1;::::0;9185:1;;9148:40:::1;9216:1;9199:19:::0;;;::::1;::::0;;9078:148::o;97420:33::-;;;;;;:::o;8436:79::-;8474:7;8501:6;;;8436:79;:::o;105440:126::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;105527:4:::1;;105515:10;105505:32;;;105533:3;105505:32;;;;;;;;;;;;;;;105548:4;:10:::0;105440:126::o;101433:605::-;101492:7;101512:24;;:::i;:::-;-1:-1:-1;101539:19:0;;;;;;;:12;:19;;;;;;;;;101512:46;;;;;;;;;;;;;;;;;;;;;;;;101596:15;101626:17;;:22;101622:300;;101692:12;;101717:21;;101692:62;;;;;101665:24;;101692:12;;;;;:24;;:62;;101717:21;;;;101748:4;;101692:62;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;101692:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;101692:62:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;101692:62:0;;;;;;;;;101665:89;;101788:122;101827:68;101877:17;;101827:45;96995:4;101827:16;:20;;:45;;;;:::i;:68::-;101788:16;;:122;:20;:122;:::i;:::-;101769:141;;101622:300;;101939:91;102010:8;:19;;;101939:66;96995:4;101939:37;101959:16;101939:8;:15;;;:19;;:37;;;;:::i;97315:26::-;;;;;;:::o;96945:54::-;96995:4;96945:54;:::o;102758:1159::-;25435:7;;;;;;;25434:8;25426:37;;;;;;;;;;;;;;102863:10:::1;102822:25;102850:24:::0;;;:12:::1;:24;::::0;;;;102885::::1;;:::i;:::-;102912:11;:20;102924:7;102912:20;;;;;;;;;;;102885:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;102943:15;:13;:15::i;:::-;102973::::0;;:20;102969:297:::1;;103010:15;103028:122;103116:8;:19;;;103028:65;96995:4;103028:36;103048:15;;103028:8;:15;;;:19;;:36;;;;:::i;:122::-;103010:140:::0;-1:-1:-1;103169:12:0;;103165:90:::1;;103202:37;103219:10;103231:7;103202:16;:37::i;:::-;102969:297;;103280:12:::0;;103276:421:::1;;103309:7;::::0;:69:::1;::::0;;;;:7:::1;::::0;;::::1;::::0;:24:::1;::::0;:69:::1;::::0;103342:10:::1;::::0;103363:4:::1;::::0;103370:7;;103309:69:::1;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;103309:69:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;-1:-1:::0;;;;103431:27:0::1;::::0;::::1;::::0;103411:15;;:48:::1;::::0;:19:::1;:48::i;:::-;103393:66:::0;;103489:10:::1;103393:15;103474:26:::0;;;:14:::1;:26;::::0;;;;:39:::1;::::0;103505:7;103474:39:::1;:30;:39;:::i;:::-;-1:-1:-1::0;103528:12:0::1;::::0;103549:21:::1;::::0;103572:27:::1;::::0;::::1;::::0;103528:72:::1;::::0;;;;:12:::1;::::0;;::::1;::::0;:20:::1;::::0;:72:::1;::::0;103549:21;::::1;::::0;103528:72:::1;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;103528:72:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;-1:-1:::0;;;;103657:27:0::1;::::0;::::1;::::0;103635:17:::1;::::0;:50:::1;::::0;:21:::1;:50::i;:::-;103615:17;:70:::0;103276:421:::1;103749:15;::::0;103729;;:65:::1;::::0;96995:4:::1;::::0;103729:36:::1;::::0;::::1;:19;:36;:::i;:65::-;103707:19;::::0;::::1;:87:::0;103809:12;;103805:105:::1;;103861:7;103849:10;103843:55;;;103870:8;:27;;;103843:55;;;;;;;97006:30:::0;;;;:::o;100828:541::-;100894:7;;:24;;;;;100922:10;;100894:38;:7;;:15;;:24;;100910:7;;100894:24;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;100894:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;100894:24:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;100894:24:0;;;;;;;;;:38;;;100886:101;;;;;;;;;;;;;;100998:25;101026:20;;;:11;:20;;;;;101111:19;;;;101064:11;;101057:74;;101064:11;;;;;101098:10;;101057:74;:32;:74;:::i;:::-;101164:21;;101192:27;;;;101142:78;;;;;101164:21;;;;;101142:49;;:78;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;101142:78:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;101231:7:0;;:21;;;;;:7;;;;;-1:-1:-1;101231:12:0;;-1:-1:-1;101231:21:0;;101244:7;;101231:21;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;101231:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;101231:21:0;;;;101294:7;101282:10;101268:55;;;101303:8;:19;;;101268:55;;;;;;;;;;;;;;;-1:-1:-1;101341:20:0;;;;:11;:20;;;;;101334:27;;;;;;;;;;;;;;;;;;100828:541::o;106856:208::-;106936:7;;;;106922:10;:21;106914:55;;;;;;;;;;;;;;106980:7;:18;;;;;;;;;;;;;;;;107014:42;;107048:7;;;107036:10;;107014:42;;-1:-1:-1;;107014:42:0;106856:208;:::o;97200:31::-;;;;:::o;99116:1704::-;99189:4;99178:7;:15;;99170:67;;;;;;;;;;;;;;99248:17;99268:26;99290:3;99268:17;99280:4;;99268:7;:11;;:17;;;;:::i;:26::-;99248:46;-1:-1:-1;99305:14:0;99322:22;:7;99248:46;99322:22;:11;:22;:::i;:::-;99413:7;;99362:11;;99305:39;;-1:-1:-1;99355:77:0;;99413:7;99362:11;;;;99400:10;;99413:7;99422:9;99355:77;:36;:77;:::i;:::-;99450:11;;99443:80;;99450:11;;99488:10;99509:4;99516:6;99443:80;:36;:80;:::i;:::-;99558:7;99536:19;99619:4;99608:15;;;;;:33;;;99637:4;99627:7;:14;99608:33;99604:221;;;-1:-1:-1;99666:1:0;99604:221;;;99700:4;99689:7;:15;;:34;;;;;99718:5;99708:7;:15;99689:34;99685:140;;;-1:-1:-1;99748:1:0;99685:140;;;99782:5;99771:7;:16;99767:58;;-1:-1:-1;99812:1:0;99767:58;99862:1;99854:9;;99874:26;99854:9;99903:23;;;2:2:-1;;;;27:1;24;17:12;2:2;99903:23:0;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;125:4;109:14;101:6;88:42;144:17;;-1:-1;99903:23:0;-1:-1:-1;99874:52:0;-1:-1:-1;99942:9:0;99937:176;99961:8;99957:1;:12;99937:176;;;100006:45;100031:11;100044:6;100006:24;:45::i;:::-;99991:9;100001:1;99991:12;;;;;;;;;;;;;:60;;;;;100080:21;100089:11;100080:8;:21::i;:::-;100066:35;-1:-1:-1;99971:3:0;;99937:176;;;-1:-1:-1;100136:12:0;;100123:26;;;;:12;:26;;;;;;;;:38;;;;;;;;:::i;:::-;;100172:28;100203:56;100252:6;100203:30;100223:9;100203:19;:30::i;:::-;100245:1;100234:8;:12;100203:44;;;;;;;;;;;;;;:48;;:56;;;;:::i;:::-;100172:87;-1:-1:-1;100270:26:0;100299:45;100337:6;100299:33;:7;100172:87;100299:33;:11;:33;:::i;:45::-;100383:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;100367:12;;;-1:-1:-1;100355:25:0;;;:11;:25;;;;;;;:219;;;;;;;;;;;;;;;;;;;;;;;;100585:7;;100619:12;;100585:47;;;;;100270:74;;-1:-1:-1;100585:7:0;;;:12;;:47;;100606:10;;100585:47;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;100585:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;100665:21:0;;100643:84;;;;;100665:21;;;;;-1:-1:-1;100643:49:0;;-1:-1:-1;100643:84:0;;100701:4;;100708:18;;100643:84;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;100643:84:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;100643:84:0;;;;100765:12;;100753:10;100743:44;;;100779:7;100743:44;;;;;;;;;;;;;;;-1:-1:-1;;100798:12:0;:14;;;;;;-1:-1:-1;;;;;;;99116:1704:0:o;105574:178::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;25711:7:::1;::::0;;;::::1;;;25703:40;;;;;;;;;;;;;;105644:12:::2;::::0;105675:21:::2;::::0;105644:53:::2;::::0;;;;:12:::2;::::0;;::::2;::::0;:30:::2;::::0;:53:::2;::::0;105675:21;::::2;::::0;105644:53:::2;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;105644:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;-1:-1:::0;;105713:31:0::2;::::0;105733:10:::2;::::0;-1:-1:-1;105713:31:0::2;::::0;-1:-1:-1;105713:31:0;;::::2;105574:178::o:0;102046:704::-;102109:15;;102093:12;:31;102089:70;;102141:7;;102089:70;102173:17;;102169:106;;102230:12;102212:15;:30;102257:7;;102169:106;102314:12;;102343:21;;102314:66;;;;;102288:22;;102314:12;;;;;:28;;:66;;102343:21;;;;102374:4;;102314:66;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;102314:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;102314:66:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;102314:66:0;;;;;;;;;102391:12;;102412:21;;102391:46;;;;;102285:95;;-1:-1:-1;102391:12:0;;;;;-1:-1:-1;102391:20:0;;:46;;102412:21;;;;102391:12;;:46;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;102391:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;102476:12:0;;102505:21;;102476:66;;;;;102451:21;;-1:-1:-1;102476:12:0;;;;;-1:-1:-1;102476:28:0;;:66;;102505:21;;102536:4;;102476:66;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;102476:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;102476:66:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;102476:66:0;;;;;;;;;102448:94;;;102571:130;102605:85;102672:17;;102605:62;96995:4;102605:33;102623:14;102605:13;:17;;:33;;;;:::i;:::-;:37;:62;:37;:62;:::i;:85::-;102571:15;;;:130;:19;:130;:::i;:::-;102553:15;:148;-1:-1:-1;;102730:12:0;102712:15;:30;102046:704::o;107569:149::-;107678:22;;;107651:7;107678:22;;;:14;:22;;;;;:32;;107704:5;107678:32;:25;:32;:::i;:::-;107671:39;;107569:149;;;;;:::o;98833:154::-;98914:21;;98953:12;;98907:72;;;;;98914:21;;;;;98907:37;;:72;;98953:12;;;98968:10;;98907:72;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;98907:72:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;98907:72:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;98907:72:0;;;;;;;;;;98833:154::o;97587:47::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;9381:244::-;8658:12;:10;:12::i;:::-;8648:6;;:22;:6;;;:22;;;8640:67;;;;;;;;;;;;;;9470:22:::1;::::0;::::1;9462:73;;;;;;;;;;;;;;9572:6;::::0;;9551:38:::1;::::0;::::1;::::0;;::::1;::::0;9572:6;::::1;::::0;9551:38:::1;::::0;::::1;9600:6;:17:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;9381:244::o;33551:146::-;33628:4;33652:37;33662:3;33682:5;33652:9;:37::i;1420:136::-;1478:7;1505:43;1509:1;1512;1505:43;;;;;;;;;;;;;;;;;:3;:43::i;33328:137::-;33398:4;33422:35;33430:3;33450:5;33422:7;:35::i;2310:471::-;2368:7;2613:6;2609:47;;-1:-1:-1;2643:1:0;2636:8;;2609:47;2680:5;;;2684:1;2680;:5;:1;2704:5;;;;;:10;2696:56;;;;;;;;;;;;;3257:132;3315:7;3342:39;3346:1;3349;3342:39;;;;;;;;;;;;;;;;;:3;:39::i;106525:323::-;106626:11;;106619:44;;;;;106601:15;;106626:11;;;106619:29;;:44;;106657:4;;106619:44;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;106619:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;106619:44:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;106619:44:0;;;;;;;;;106601:62;;106688:7;106678;:17;106674:167;;;106719:11;;106712:42;;;;;106719:11;;;;;106712:28;;:42;;106741:3;;106746:7;;106712:42;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;106712:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;106712:42:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;106712:42:0;;;;;;;;;;106674:167;;;106794:11;;106787:42;;;;;106794:11;;;;;106787:28;;:42;;106816:3;;106821:7;;106787:42;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;106787:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;106787:42:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;106787:42:0;;;;;;;;;;106525:323;;;:::o;33783:114::-;33843:7;33870:19;33878:3;33870:7;:19::i;34241:137::-;34312:7;34347:22;34351:3;34363:5;34347:3;:22::i;6957:106::-;7045:10;6957:106;:::o;25907:118::-;25435:7;;;;;;;25434:8;25426:37;;;;;;;;;;;;;;25967:7:::1;:14:::0;;;::::1;::::0;::::1;::::0;;25997:20:::1;26004:12;:10;:12::i;:::-;25997:20;;;;;;;;;;;;;;;25907:118::o:0;26166:120::-;25711:7;;;;;;;25703:40;;;;;;;;;;;;;;26235:5:::1;26225:15:::0;;;::::1;::::0;;26256:22:::1;26265:12;:10;:12::i;956:181::-:0;1014:7;1046:5;;;1070:6;;;;1062:46;;;;;;;;;;;;;33021:131;33088:4;33112:32;33117:3;33137:5;33112:4;:32::i;19233:177::-;19316:86;19336:5;19366:23;;;19391:2;19395:5;19343:58;;;;;;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;19343:58:0;;;49:4:-1;25:18;;61:17;;19343:58:0;182:15:-1;19343:58:0;;;;179:29:-1;;;;160:49;;;19316:19:0;:86::i;19418:205::-;19519:96;19539:5;19569:27;;;19598:4;19604:2;19608:5;19546:68;;;;;;;;;;;95505:255;95574:20;95748:3;95689:1;95674:12;:16;95664:27;95693:3;95698:10;95710:16;95728:4;95647:86;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;95647:86:0;;;95637:97;;;;;;95615:130;;:136;;;;;;;95505:255;-1:-1:-1;;;95505:255:0:o;98995:113::-;99049:7;99076:24;:4;99085:14;99076:24;:8;:24;:::i;94432:201::-;94492:16;94539:1;94525:4;:11;:15;94521:83;;;94557:35;94567:4;94573:1;94590;94576:4;:11;:15;94557:9;:35::i;:::-;-1:-1:-1;94621:4:0;94432:201::o;30237:129::-;30310:4;30334:19;;;:12;;;;;:19;;;;;;:24;;;30237:129::o;1859:192::-;1945:7;1981:12;1973:6;;;;1965:29;;;;;;;;;;;;;;;-1:-1:-1;;;2017:5:0;;;1859:192::o;28607:1544::-;28673:4;28812:19;;;:12;;;:19;;;;;;28848:15;;28844:1300;;29283:18;;29234:14;;;;;29283:22;;;;29210:21;;29283:3;;:22;;29570;;;;;;;;;;;;;;29550:42;;29716:9;29687:3;:11;;29699:13;29687:26;;;;;;;;;;;;;;;;;;;:38;;;;29793:23;;;29835:1;29793:12;;;:23;;;;;;29819:17;;;29793:43;;29945:17;;29793:3;;29945:17;;;;;;;;;;;;;;;;;;;;;;30040:3;:12;;:19;30053:5;30040:19;;;;;;;;;;;30033:26;;;30083:4;30076:11;;;;;;;;28844:1300;30127:5;30120:12;;;;;3885:278;3971:7;4006:12;3999:5;3991:28;;;;;;;;;;;;;;;;4030:9;4046:1;4042;:5;;;;;;;3885:278;-1:-1:-1;;;;;3885:278:0:o;30452:109::-;30535:18;;30452:109::o;30905:204::-;31000:18;;30972:7;;31000:26;-1:-1:-1;30992:73:0;;;;;;;;;;;;;;31083:3;:11;;31095:5;31083:18;;;;;;;;;;;;;;;;31076:25;;30905:204;;;;:::o;28017:414::-;28080:4;28102:21;28112:3;28117:5;28102:9;:21::i;:::-;28097:327;;-1:-1:-1;27:10;;39:1;23:18;;;45:23;;28140:11:0;:23;;;;;;;;;;;;;28323:18;;28301:19;;;:12;;;:19;;;;;;:40;;;;28356:11;;28097:327;-1:-1:-1;28407:5:0;28400:12;;21538:761;21962:23;21988:69;22016:4;21988:69;;;;;;;;;;;;;;;;;21996:5;21988:27;;;;:69;;;;;:::i;:::-;22072:17;;21962:95;;-1:-1:-1;22072:21:0;22068:224;;22214:10;22203:30;;;;;;;;;;;;;;22195:85;;;;;;;;;;;;;94641:748;94779:4;94773:3;:10;94769:613;;;94800:16;94819:4;94839:1;94825:10;;;94824:16;94819:22;;;;;;;;;;;;;;;;;;;-1:-1:-1;94873:3:0;94907:4;94926:303;94974:8;94961:4;94966;94961:10;;;;;;;;;;;;;;:21;94954:36;;;94984:6;;;;;94954:36;;;95030:8;95016:4;95021:5;95016:11;;;;;;;;;;;;;;:22;95009:38;;;95040:7;;95009:38;;;95078:5;95070:4;:13;95066:24;;95085:5;;95066:24;95138:4;95143:5;95138:11;;;;;;;;;;;;;;95151:4;95156;95151:10;;;;;;;;;;;;;;95110:4;95115;95110:10;;;;;;;;;;;;;95122:4;95127:5;95122:11;;;;;;;;;;;;;;;;;95109:53;;;;;95181:6;;;;;95206:7;;94926:303;;;95253:5;95247:3;:11;95243:44;;;95260:27;95270:4;95276:3;95281:5;95260:9;:27::i;:::-;95302:7;;95328:12;;;95324:46;;;95342:28;95352:4;95358:5;95365:4;95342:9;:28::i;:::-;94769:613;;;94641:748;;;:::o;16181:196::-;16284:12;16316:53;16339:6;16347:4;16353:1;16356:12;17688;17721:18;17732:6;17721:10;:18::i;:::-;17713:60;;;;;;;;;;;;;;17847:12;17861:23;17888:6;:11;;17908:8;17919:4;17888:36;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;17846:78:0;;;;17939:7;17935:595;;;17970:10;-1:-1:-1;17963:17:0;;-1:-1:-1;17963:17:0;17935:595;18084:17;;:21;18080:439;;18347:10;18341:17;18408:15;18395:10;18391:2;18387:19;18380:44;18295:148;18490:12;18483:20;;;;;;;;;;;;13263:422;13630:20;13669:8;;;13263:422::o;96374:11347::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;96374:11347:0;;;;-1:-1:-1;96374:11347:0;;;;;;;;;;;;;;;1145:241:-1;;1249:2;1237:9;1228:7;1224:23;1220:32;1217:2;;;-1:-1;;1255:12;1217:2;85:6;72:20;97:33;124:5;97:33;;1393:263;;1508:2;1496:9;1487:7;1483:23;1479:32;1476:2;;;-1:-1;;1514:12;1476:2;226:6;220:13;238:33;265:5;238:33;;1663:721;;;;;1827:3;1815:9;1806:7;1802:23;1798:33;1795:2;;;-1:-1;;1834:12;1795:2;85:6;72:20;97:33;124:5;97:33;;;1886:63;-1:-1;1986:2;2025:22;;;72:20;97:33;72:20;97:33;;;1994:63;-1:-1;2094:2;2133:22;;934:20;;-1:-1;2230:2;2215:18;;2202:32;2254:18;2243:30;;;2240:2;;;-1:-1;;2276:12;2240:2;2351:6;2340:9;2336:22;520:3;513:4;505:6;501:17;497:27;487:2;;-1:-1;;528:12;487:2;575:6;562:20;548:34;;2254:18;26669:6;26666:30;26663:2;;;-1:-1;;26699:12;26663:2;2094;26327:9;1986:2;26772:9;513:4;26757:6;26753:17;26749:33;26363:6;26359:17;;26470:6;26458:10;26455:22;2254:18;26422:10;26419:34;26416:62;26413:2;;;-1:-1;;26481:12;26413:2;2094;26500:22;667:21;;;767:16;;;;;764:25;-1:-1;761:2;;;-1:-1;;792:12;761:2;30165:6;1986:2;709:6;705:17;1986:2;743:5;739:16;30142:30;30203:16;;;;;;30196:27;;;;1789:595;;;;-1:-1;1789:595;;-1:-1;;;1789:595;2391:366;;;2512:2;2500:9;2491:7;2487:23;2483:32;2480:2;;;-1:-1;;2518:12;2480:2;85:6;72:20;97:33;124:5;97:33;;;2570:63;2670:2;2709:22;;;;934:20;;-1:-1;;;2474:283;2764:257;;2876:2;2864:9;2855:7;2851:23;2847:32;2844:2;;;-1:-1;;2882:12;2844:2;364:6;358:13;31294:5;28318:13;28311:21;31272:5;31269:32;31259:2;;-1:-1;;31305:12;3028:241;;3132:2;3120:9;3111:7;3107:23;3103:32;3100:2;;;-1:-1;;3138:12;3100:2;-1:-1;934:20;;3094:175;-1:-1;3094:175;3276:263;;3391:2;3379:9;3370:7;3366:23;3362:32;3359:2;;;-1:-1;;3397:12;3359:2;-1:-1;1082:13;;3353:186;-1:-1;3353:186;3546:366;;;3667:2;3655:9;3646:7;3642:23;3638:32;3635:2;;;-1:-1;;3673:12;3635:2;-1:-1;;934:20;;;3825:2;3864:22;;;934:20;;-1:-1;3629:283;3919:399;;;4051:2;4039:9;4030:7;4026:23;4022:32;4019:2;;;-1:-1;;4057:12;4019:2;-1:-1;;1082:13;;4220:2;4270:22;;;1082:13;;;;;-1:-1;4013:305;13910:832;5896:58;;;14254:2;14245:12;;5896:58;;;;31061:2;31057:14;;;;;;14356:12;;;4761:74;14483:12;;;5896:58;14594:12;;;5896:58;14705:12;;;14145:597;14749:262;;6243:5;27123:12;6354:52;6399:6;6394:3;6387:4;6380:5;6376:16;6354:52;;;6418:16;;;;;14874:137;-1:-1;;14874:137;15018:213;28647:42;28636:54;;;;4918:37;;15136:2;15121:18;;15107:124;15474:324;28647:42;28636:54;;;4918:37;;28636:54;;15784:2;15769:18;;4918:37;15620:2;15605:18;;15591:207;15805:435;28647:42;28636:54;;;4918:37;;28636:54;;;;16143:2;16128:18;;4918:37;16226:2;16211:18;;5896:58;;;;15979:2;15964:18;;15950:290;16247:340;28647:42;28636:54;;;;4918:37;;16573:2;16558:18;;6867:58;16401:2;16386:18;;16372:215;17426:201;28318:13;;28311:21;5761:34;;17538:2;17523:18;;17509:118;17634:209;28495:66;28484:78;;;;6035:36;;17750:2;17735:18;;17721:122;18366:301;;18504:2;18525:17;18518:47;7385:5;27123:12;27667:6;18504:2;18493:9;18489:18;27655:19;7479:52;7524:6;27695:14;18493:9;27695:14;18504:2;7505:5;7501:16;7479:52;;;30970:2;30950:14;30966:7;30946:28;7543:39;;;;27695:14;7543:39;;18475:192;-1:-1;;18475:192;18674:407;18865:2;18879:47;;;7819:2;18850:18;;;27655:19;7855:34;27695:14;;;7835:55;7924:4;7910:12;;;7903:26;7948:12;;;18836:245;19088:407;19279:2;19293:47;;;8199:2;19264:18;;;27655:19;8235:22;27695:14;;;8215:43;8277:12;;;19250:245;19502:407;19693:2;19707:47;;;8528:2;19678:18;;;27655:19;8564:34;27695:14;;;8544:55;8633:20;8619:12;;;8612:42;8673:12;;;19664:245;19916:407;20107:2;20121:47;;;8924:2;20092:18;;;27655:19;8960:34;27695:14;;;8940:55;9029:9;9015:12;;;9008:31;9058:12;;;20078:245;20330:407;20521:2;20535:47;;;9309:2;20506:18;;;27655:19;9345:34;27695:14;;;9325:55;9414:8;9400:12;;;9393:30;9442:12;;;20492:245;20744:407;20935:2;20949:47;;;9693:2;20920:18;;;27655:19;9729:29;27695:14;;;9709:50;9778:12;;;20906:245;21158:407;21349:2;21363:47;;;10029:2;21334:18;;;27655:19;10065:18;27695:14;;;10045:39;10103:12;;;21320:245;21572:407;21763:2;21777:47;;;10354:2;21748:18;;;27655:19;10390:23;27695:14;;;10370:44;10433:12;;;21734:245;21986:407;22177:2;22191:47;;;10684:2;22162:18;;;27655:19;10720:34;27695:14;;;10700:55;10789:3;10775:12;;;10768:25;10812:12;;;22148:245;22400:407;22591:2;22605:47;;;22576:18;;;27655:19;11099:34;27695:14;;;11079:55;11153:12;;;22562:245;22814:407;23005:2;23019:47;;;11404:2;22990:18;;;27655:19;11440:31;27695:14;;;11420:52;11491:12;;;22976:245;23228:407;23419:2;23433:47;;;11742:2;23404:18;;;27655:19;11778:31;27695:14;;;11758:52;11829:12;;;23390:245;23642:407;23833:2;23847:47;;;12080:2;23818:18;;;27655:19;12116:34;27695:14;;;12096:55;12185:12;12171;;;12164:34;12217:12;;;23804:245;24056:407;24247:2;24261:47;;;12468:2;24232:18;;;27655:19;12504:34;27695:14;;;12484:55;12573:9;12559:12;;;12552:31;12602:12;;;24218:245;24470:578;;24718:3;24707:9;24703:19;12909:16;12903:23;5903:3;5896:58;13090:4;;13083:5;13079:16;13073:23;13090:4;13154:3;13150:14;5896:58;13250:4;13243:5;13239:16;13233:23;13250:4;13314:3;13310:14;5896:58;13418:4;13411:5;13407:16;13401:23;13418:4;13482:3;13478:14;5896:58;24718:3;24889;24878:9;24874:19;24867:49;24930:108;5191:5;27123:12;27667:6;27662:3;27655:19;27695:14;24707:9;27695:14;5203:93;;13090:4;5367:5;26977:14;5379:21;;-1:-1;5406:260;5431:6;5428:1;5425:13;5406:260;;;5492:13;;5896:58;;27510:14;;;;4479;;;;5453:1;5446:9;5406:260;;;-1:-1;24922:116;;24689:359;-1:-1;;;;;;;24689:359;25055:213;5896:58;;;25173:2;25158:18;;25144:124;25275:435;5896:58;;;25613:2;25598:18;;5896:58;;;;25696:2;25681:18;;5896:58;25449:2;25434:18;;25420:290;25717:547;5896:58;;;26084:2;26069:18;;5896:58;;;;26167:2;26152:18;;5896:58;26250:2;26235:18;;5896:58;25919:3;25904:19;;25890:374;30238:268;30303:1;30310:101;30324:6;30321:1;30318:13;30310:101;;;30391:11;;;30385:18;30372:11;;;30365:39;30346:2;30339:10;30310:101;;;30426:6;30423:1;30420:13;30417:2;;;-1:-1;;30303:1;30473:16;;30466:27;30287:219;31089:117;28647:42;31176:5;28636:54;31151:5;31148:35;31138:2;;31197:1;;31187:12

Swarm Source

ipfs://5d6c84d53c553a36b737cb4cb87d6e47eebfd36ed68820b41acb6bc22dfea606
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.