Contract 0xDF13a4470524668EDE2B10B110280A585EEa2057

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc084efcea8b78fe84d76e9886ad9fb3bfcf4601d2369a24d4f30a5ef4649cea4Create Nft264686992022-03-28 17:34:4694 days 1 hr ago0x673bc26306706b3221f62dd439b4744b9246bad1 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02281377 30
0xd1237043c81b944e90a102492cc791d0e92ae49c009892522475c36b0487be47Create Nft253972572022-02-27 20:31:38122 days 22 hrs ago0x035ddd682c9668c6a3a350a569fa5b629a749faf IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.023583603526 33.255734647
0xc09532e2fa9a819112a47dbd6bba0cb5ef757481103c2a0397bfb5259141e319Create Nft253932222022-02-27 17:42:41123 days 1 hr ago0x035ddd682c9668c6a3a350a569fa5b629a749faf IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.027189602394 35.75419897
0x0ccfd84968ec152ffaafacffc1f14e0d782cc85eceefd007f6b5d16269596bb5Create Nft242198212022-01-27 9:00:57154 days 9 hrs ago0x0bf1167490eafddeaf22d8ab79479fbbd4e87e4f IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.00083650491.1
0x99d5dc73276c83b43a36101efb37602518750d040703ff7d0533aeb90cbbedd3Create Nft241645412022-01-25 23:42:46155 days 19 hrs ago0x055acb1b90797996b4fa1f7605e74b84887e3821 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02402700573 31.595399266
0xb00c3b956bce49858146dedb7520958ef7d90244c35992fc4ea0e0ffd7928247Create Nft237954162022-01-16 17:48:26165 days 1 hr ago0xc589eb880748a2b7eed6d1fd4cd894515d97c2d8 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007091591
0x865a64ec09bf0c29d39c9f4d688b9cd0a55b67642122fe98ee62ee1e18e7035bCreate Nft236861972022-01-13 22:05:30167 days 20 hrs ago0xc589eb880748a2b7eed6d1fd4cd894515d97c2d8 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007091711
0x8d2a7cd0b48b3f09abfb34cc0cd95d09cee317c303ff8bcbcbed0b3afc665da5Create Nft232354072022-01-01 20:53:22179 days 21 hrs ago0x4356693fc2a947601957f16f8058f6c0e4efad23 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0076045910
0x037fa5e9e6bc11feb3bb83f73fe2d181c046adb05f128198e301382c7c9b6224Set Price230425932021-12-28 0:15:24184 days 18 hrs ago0x3615f40695f79baa90c99ab92fde1571663c220c IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000046161
0x3c2a0206950c5db5bca62cd689f2d7aee1ef3caf8e0c930b8364d96b14f8b979Create Nft228156652021-12-22 4:56:31190 days 13 hrs ago0xc589eb880748a2b7eed6d1fd4cd894515d97c2d8 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007091591
0x0357763c46e28461a0908d2c9d6d8273436d8e48c542b0faa3e7126abd5b64c3Create Nft228055562021-12-21 22:39:09190 days 20 hrs ago0xc589eb880748a2b7eed6d1fd4cd894515d97c2d8 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000844109491.11
0xb742b863eaaff6945eb93f886ab8ce9b321c42c60a0f24186132c3f8133b8cf7Create Nft227595862021-12-20 18:52:02191 days 23 hrs ago0x7a0ae73d18cd03e87bbab7f6d5b5c5610c4afffa IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007604591
0x485ecc2570474df462d533c42072cb0481c823e570bbe314ba736adb5d1cc929Set Price223736732021-12-10 22:32:41201 days 20 hrs ago0x150c0471cc3f9da9c0742789b9fe65d1d0574d69 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000048961
0x264fd646d39c71fb07fb8ace9d221935b215694e860c326a8667b73b8af3202fSet Price223736722021-12-10 22:32:39201 days 20 hrs ago0x150c0471cc3f9da9c0742789b9fe65d1d0574d69 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000083161
0x017496380dc6d3e418ac002efedc037ff3eca066c1af1ec538dc84a3ddd0e30aCreate Nft223704872021-12-10 20:34:37201 days 22 hrs ago0x150c0471cc3f9da9c0742789b9fe65d1d0574d69 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007604591
0x31e7c243a0ed7d9820920c503db7cfe8f1f518708f59139f21c1cf59f6daa8c2Create Nft223672752021-12-10 18:37:32202 days 12 mins ago0xeb2c9a15a655605575d912d96e2e368c884da0c2 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0000268991
0xfd5b6ed7fdbdaace21297fd23200df809fc7f4905d3f5b238604c81f12f15ed6Create Nft223672742021-12-10 18:37:30202 days 12 mins ago0xeb2c9a15a655605575d912d96e2e368c884da0c2 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007604591
0xec92097637782d271c3f645ec1476648a210cbddfc4055515eabb3820efc15ffCreate Nft223304662021-12-09 20:30:12202 days 22 hrs ago0xe917355ca1bfd45291a4ba15a97df12156e3256c IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007604591
0x44e2dbe63742af07dd6364f2e12788418e5f2726a4b836537c6e78564f6c2517Create Nft219032992021-11-28 15:18:56214 days 3 hrs ago0xb75ea127484009d9124048e22b51b9b22a731d20 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02509514733
0x78dfb1d126907e2d7cde4cbb5a705db33e161781f96005145e41ac61381f834cSet Price218290992021-11-26 17:19:01216 days 1 hr ago0x3615f40695f79baa90c99ab92fde1571663c220c IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000046161
0x08b02553e0b436782407a729a13e77251a5ab78038c05595d23839a565aa889dSet Price218117722021-11-26 6:11:16216 days 12 hrs ago0x3615f40695f79baa90c99ab92fde1571663c220c IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.000048961
0xe7e666698d3df2bb59d70a796d55b00c9baee5c163dbb3b18975da28747d2707Create Nft213888972021-11-15 6:26:40227 days 12 hrs ago0x55aecc65e5fa3916a6bf28b149a6cfce580b048b IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02661606535
0xb5306683815b49e0f2ac3d34cd6de1ea540be13205017b61fb26170554556b8aCreate Nft209926802021-11-05 1:13:56237 days 17 hrs ago0x3cf3977a0573c7cadad0bf6b21693422385381ad IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.0007604591
0x526faa0f3237e74129f9f4d0894778814cd01130d60348755c0bb9fb80b93b27Create Nft209596082021-11-04 4:54:51238 days 13 hrs ago0x7299e47d200b6080f29f777303cd96e0f6ab75bb IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02357422931
0x0d90d70b8e477ad763fcb3594e3d3b6d51f3a0cab676b14cd84b5ce9f8534472Create Nft209392972021-11-03 15:52:23239 days 2 hrs ago0x559683ac3f1f182544ebd98c187221b3b66ae291 IN  0xdf13a4470524668ede2b10b110280a585eea20570 MATIC0.02340264333
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NiftyYard

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-30
*/

// Sources flattened with hardhat v2.1.2 https://hardhat.org

// File @openzeppelin/contracts/math/[email protected]

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

// File @openzeppelin/contracts/utils/[email protected]

pragma solidity >=0.6.0 <0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

// File @openzeppelin/contracts/utils/[email protected]

pragma solidity >=0.6.0 <0.8.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.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

            bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

// File @openzeppelin/contracts/utils/[email protected]

pragma solidity >=0.6.0 <0.8.0;

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

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

// File @openzeppelin/contracts/access/[email protected]

pragma solidity >=0.6.0 <0.8.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.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

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

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

// File @openzeppelin/contracts/cryptography/[email protected]

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature)
        internal
        pure
        returns (address)
    {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(
            uint256(s) <=
                0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "ECDSA: invalid signature 's' value"
        );
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash)
        internal
        pure
        returns (bytes32)
    {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
            );
    }
}

// File @openzeppelin/contracts/utils/[email protected]

pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(
            address(this).balance >= amount,
            "Address: insufficient balance"
        );

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        require(isContract(target), "Address: call to non-contract");

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// File contracts/IERC1271.sol

pragma solidity >=0.5.0 <0.7.0;

/**
 * @notice ERC-1271: Standard Signature Validation Method for Contracts
 */
interface IERC1271 {
    //    bytes4 internal constant _ERC1271MAGICVALUE = 0x1626ba7e;
    //    bytes4 internal constant _ERC1271FAILVALUE = 0xffffffff;

    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param _hash hash of the data signed//Arbitrary length data signed on the behalf of address(this)
     * @param _signature Signature byte array associated with _data
     *
     * @return magicValue either 0x1626ba7e on success or 0xffffffff failure
     */
    function isValidSignature(
        bytes32 _hash, //bytes memory _data,
        bytes calldata _signature
    ) external view returns (bytes4 magicValue);
}

// File contracts/SignatureChecker.sol

pragma solidity >=0.6.0 <0.7.0;

contract SignatureChecker is Ownable {
    using ECDSA for bytes32;
    using Address for address;
    bool public checkSignatureFlag;

    bytes4 internal constant _INTERFACE_ID_ERC1271 = 0x1626ba7e;
    bytes4 internal constant _ERC1271FAILVALUE = 0xffffffff;

    function setCheckSignatureFlag(bool newFlag) public onlyOwner {
        checkSignatureFlag = newFlag;
    }

    function getSigner(bytes32 signedHash, bytes memory signature)
        public
        pure
        returns (address)
    {
        return signedHash.toEthSignedMessageHash().recover(signature);
    }

    function checkSignature(
        bytes32 signedHash,
        bytes memory signature,
        address checkAddress
    ) public view returns (bool) {
        if (checkAddress.isContract()) {
            return
                IERC1271(checkAddress).isValidSignature(
                    signedHash,
                    signature
                ) == _INTERFACE_ID_ERC1271;
        } else {
            return getSigner(signedHash, signature) == checkAddress;
        }
    }
}

// File contracts/INiftyYardToken.sol

pragma solidity >=0.6.0 <0.7.0;

interface INiftyYardToken {
    function nftTokenCount(string calldata) external view returns (uint256);

    function firstMint(
        address,
        string calldata,
        string calldata
    ) external returns (uint256);

    function mint(address, string calldata) external returns (uint256);

    function buyNft(string calldata) external payable returns (uint256);

    function buyToken(uint256) external payable;

    function transferOwnership(
        address from,
        address to,
        uint256 tokenId
    ) external;

    function lock(uint256) external;

    function unlock(uint256, address) external;

    function ownerOf(uint256) external view returns (address);

    function tokenNft(uint256) external view returns (string memory);
}

// File contracts/INiftyYardRegistry.sol

pragma solidity ^0.6.6;

interface INiftyYardRegistry {
    function nftAddress() external view returns (address);

    function tokenAddress() external view returns (address);

    function bridgeMediatorAddress() external view returns (address);

    function trustedForwarder() external view returns (address);
}

// File contracts/common/Initializable.sol

pragma solidity >=0.6.0 <0.7.0;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

// File contracts/common/EIP712Base.sol

pragma solidity >=0.6.0 <0.7.0;

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string public constant ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
        keccak256(
            bytes(
                "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
            )
        );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contractsa that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(string memory name) internal initializer {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public pure returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

// File contracts/common/NativeMetaTransaction.sol

pragma solidity >=0.6.0 <0.7.0;

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH =
        keccak256(
            bytes(
                "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
            )
        );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx =
            MetaTransaction({
                nonce: nonces[userAddress],
                from: userAddress,
                functionSignature: functionSignature
            });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            msg.sender,
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) =
            address(this).call(
                abi.encodePacked(functionSignature, userAddress)
            );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}

// File contracts/common/ContextMixin.sol

pragma solidity >=0.6.0 <0.7.0;

abstract contract ContextMixin {
    function msgSender() internal view returns (address payable sender) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = msg.sender;
        }
        return sender;
    }
}

// File contracts/NiftyYard.sol

pragma solidity >=0.6.0 <0.7.0;

contract NiftyYard is
    Ownable,
    SignatureChecker,
    NativeMetaTransaction,
    ContextMixin
{
    constructor() public {
        setCheckSignatureFlag(true);
        setCreatorTake(1);
    }

    using Counters for Counters.Counter;
    using EnumerableSet for EnumerableSet.UintSet;

    Counters.Counter public totalNfts;

    uint256 public creatorTake;

    function setCreatorTake(uint256 _take) public onlyOwner {
        require(_take < 100, "take is more than 99 percent");
        creatorTake = _take;
    }

    address public niftyRegistry;

    function setNiftyRegistry(address _address) public onlyOwner {
        niftyRegistry = _address;
    }

    function niftyToken() private view returns (INiftyYardToken) {
        return
            INiftyYardToken(INiftyYardRegistry(niftyRegistry).tokenAddress());
    }

    event newFile(
        uint256 id,
        address indexed creator,
        string fileUrl,
        string jsonUrl,
        uint256 limit
    );
    event newFilePrice(string fileUrl, uint256 price);

    event ownershipChange(
        string fileUrl,
        address indexed creator,
        address indexed newCreator
    );

    struct File {
        uint256 id;
        address payable creator;
        string jsonUrl;
        string fileUrl;
        uint256 limit;
        bytes signature;
        uint256 price;
        Counters.Counter priceNonce;
    }

    mapping(string => uint256) public nftIdByNftUrl;
    mapping(uint256 => File) private _nftById;
    mapping(address => EnumerableSet.UintSet) private _creatorNfts;

    function _createNft(
        string memory fileUrl,
        string memory jsonUrl,
        uint256 limit,
        address payable creator
    ) internal returns (uint256) {
        totalNfts.increment();
        uint256 _nftId = totalNfts.current();

        File storage _nft = _nftById[_nftId];

        _nft.id = _nftId;
        _nft.creator = creator;
        _nft.fileUrl = fileUrl;
        _nft.jsonUrl = jsonUrl;
        _nft.limit = limit;

        nftIdByNftUrl[fileUrl] = _nftId;
        _creatorNfts[creator].add(_nftId);

        emit newFile(
            _nft.id,
            _nft.creator,
            _nft.fileUrl,
            _nft.jsonUrl,
            _nft.limit
        );

        return _nft.id;
    }

    function createNft(
        string memory fileUrl,
        string memory jsonUrl,
        uint256 limit
    ) public returns (uint256) {
        require(!(nftIdByNftUrl[fileUrl] > 0), "this nft already exists!");

        uint256 nftId = _createNft(fileUrl, jsonUrl, limit, _msgSender());

        niftyToken().firstMint(_msgSender(), fileUrl, jsonUrl);

        return nftId;
    }

    function createNftFromSignature(
        string memory fileUrl,
        string memory jsonUrl,
        uint256 limit,
        address payable creator,
        bytes memory signature
    ) public returns (uint256) {
        require(!(nftIdByNftUrl[fileUrl] > 0), "this nft already exists!");

        require(creator != address(0), "Creator must be specified.");
        bytes32 messageHash =
            keccak256(
                abi.encodePacked(
                    bytes1(0x19),
                    bytes1(0),
                    address(this),
                    creator,
                    fileUrl,
                    jsonUrl,
                    limit
                )
            );
        bool isCreatorSignature =
            checkSignature(messageHash, signature, creator);
        require(
            isCreatorSignature || !checkSignatureFlag,
            "Creator did not sign this nft"
        );

        uint256 nftId = _createNft(fileUrl, jsonUrl, limit, creator);

        _nftById[nftId].signature = signature;

        niftyToken().firstMint(creator, fileUrl, jsonUrl);

        return nftId;
    }

    function _setPrice(uint256 _nftId, uint256 price)
        private
        returns (uint256)
    {
        _nftById[_nftId].price = price;
        _nftById[_nftId].priceNonce.increment();
        emit newFilePrice(_nftById[_nftId].fileUrl, price);
        return price;
    }

    function setPrice(string memory fileUrl, uint256 price)
        public
        returns (uint256)
    {
        uint256 _nftId = nftIdByNftUrl[fileUrl];
        require(_nftId > 0, "this nft does not exist!");
        File storage _nft = _nftById[_nftId];
        require(
            _nft.creator == _msgSender(),
            "only the creator can set the price!"
        );

        return _setPrice(_nft.id, price);
    }

    function setPriceFromSignature(
        string memory fileUrl,
        uint256 price,
        bytes memory signature
    ) public returns (uint256) {
        uint256 _nftId = nftIdByNftUrl[fileUrl];
        require(_nftId > 0, "this nft does not exist!");
        File storage _nft = _nftById[_nftId];
        bytes32 messageHash =
            keccak256(
                abi.encodePacked(
                    bytes1(0x19),
                    bytes1(0),
                    address(this),
                    fileUrl,
                    price,
                    _nft.priceNonce.current()
                )
            );
        bool isCreatorSignature =
            checkSignature(messageHash, signature, _nft.creator);
        require(
            isCreatorSignature || !checkSignatureFlag,
            "Creator did not sign this price"
        );

        return _setPrice(_nft.id, price);
    }

    function transferOwnership(
        string memory fileUrl,
        address creator,
        address payable newCreator,
        bytes memory signature
    ) public {
        uint256 _nftId = nftIdByNftUrl[fileUrl];
        require(_nftId > 0, "this nft does not exist!");
        bytes32 messageHash =
            keccak256(
                abi.encodePacked(
                    bytes1(0x19),
                    bytes1(0),
                    address(this),
                    creator,
                    fileUrl
                )
            );
        bool isCreatorSignature =
            checkSignature(messageHash, signature, creator);
        require(
            isCreatorSignature || !checkSignatureFlag,
            "Creator did not sign this nft"
        );
        File storage _file = _nftById[_nftId];
        _file.creator = newCreator;
        emit ownershipChange(fileUrl, creator, newCreator);
    }

    function nftInfoById(uint256 id)
        public
        view
        returns (
            uint256,
            address,
            string memory,
            bytes memory,
            uint256,
            uint256,
            string memory,
            uint256
        )
    {
        require(
            id > 0 && id <= totalNfts.current(),
            "this nft does not exist!"
        );
        File storage _nft = _nftById[id];

        return (
            id,
            _nft.creator,
            _nft.jsonUrl,
            _nft.signature,
            _nft.price,
            _nft.limit,
            _nft.fileUrl,
            _nft.priceNonce.current()
        );
    }

    function nftInfoByNftUrl(string memory fileUrl)
        public
        view
        returns (
            uint256,
            address,
            string memory,
            bytes memory,
            uint256,
            uint256,
            string memory,
            uint256
        )
    {
        uint256 _nftId = nftIdByNftUrl[fileUrl];

        return nftInfoById(_nftId);
    }

    function nftsCreatedBy(address creator) public view returns (uint256) {
        return _creatorNfts[creator].length();
    }

    function nftOfCreatorByIndex(address creator, uint256 index)
        public
        view
        returns (uint256)
    {
        return _creatorNfts[creator].at(index);
    }

    // This is to support Native meta transactions
    // never use msg.sender directly, use _msgSender() instead
    function _msgSender()
        internal
        view
        override
        returns (address payable sender)
    {
        return ContextMixin.msgSender();
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"string","name":"fileUrl","type":"string"},{"indexed":false,"internalType":"string","name":"jsonUrl","type":"string"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"newFile","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fileUrl","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"newFilePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"fileUrl","type":"string"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"newCreator","type":"address"}],"name":"ownershipChange","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"signedHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"checkAddress","type":"address"}],"name":"checkSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkSignatureFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"},{"internalType":"string","name":"jsonUrl","type":"string"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"createNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"},{"internalType":"string","name":"jsonUrl","type":"string"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"createNftFromSignature","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"creatorTake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"signedHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"getSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftIdByNftUrl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"nftInfoById","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"}],"name":"nftInfoByNftUrl","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"nftOfCreatorByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"}],"name":"nftsCreatedBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"niftyRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newFlag","type":"bool"}],"name":"setCheckSignatureFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_take","type":"uint256"}],"name":"setCreatorTake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setNiftyRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"setPriceFromSignature","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalNfts","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"fileUrl","type":"string"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"address payable","name":"newCreator","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a81b191690553480156200001e57600080fd5b506000620000346001600160e01b03620000ae16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200009360016001600160e01b03620000ca16565b620000a860016001600160e01b036200016216565b620002a6565b6000620000c56200023760201b62002efb1760201c565b905090565b620000dd6001600160e01b03620000ae16565b6001600160a01b0316620000f96001600160e01b036200029716565b6001600160a01b03161462000144576040805162461bcd60e51b81526020600482018190526024820152600080516020620036b3833981519152604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b620001756001600160e01b03620000ae16565b6001600160a01b0316620001916001600160e01b036200029716565b6001600160a01b031614620001dc576040805162461bcd60e51b81526020600482018190526024820152600080516020620036b3833981519152604482015290519081900360640190fd5b6064811062000232576040805162461bcd60e51b815260206004820152601c60248201527f74616b65206973206d6f7265207468616e2039392070657263656e7400000000604482015290519081900360640190fd5b600455565b600033301415620002915760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620002949050565b50335b90565b6000546001600160a01b031690565b6133fd80620002b66000396000f3fe60806040526004361061019c5760003560e01c8063587947bd116100ec5780638da5cb5b1161008a578063e15221cc11610064578063e15221cc14610e4b578063eb84717914610e60578063f2fde38b14610f11578063f7b2ec0d14610f445761019c565b80638da5cb5b14610dbd5780639946aeaf14610dee578063c7429d6a14610e215761019c565b806365072667116100c65780636507266714610a74578063670e20f914610c44578063715018a614610d935780637c2115bd14610da85761019c565b8063587947bd146107c557806358fcc31d146108fd5780635b6b7b45146109365761019c565b806320379ee5116101595780632d0335ab116101335780632d0335ab146107355780633408e470146107685780634e42b6301461077d57806355cfc659146107925761019c565b806320379ee51461059657806322e01192146105ab578063286cdf581461065e5761019c565b806306c2005c146101a157806309ece530146103445780630c53c51c146104075780630d4f9ddb1461053e5780630f7e5970146105535780631656917614610568575b600080fd5b3480156101ad57600080fd5b506101cb600480360360208110156101c457600080fd5b5035610ffc565b60405180898152602001886001600160a01b03166001600160a01b0316815260200180602001806020018781526020018681526020018060200185815260200184810384528a818151815260200191508051906020019080838360005b83811015610240578181015183820152602001610228565b50505050905090810190601f16801561026d5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838360005b838110156102a0578181015183820152602001610288565b50505050905090810190601f1680156102cd5780820380516001836020036101000a031916815260200191505b50848103825286518152865160209182019188019080838360005b838110156103005781810151838201526020016102e8565b50505050905090810190601f16801561032d5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b34801561035057600080fd5b506103f56004803603602081101561036757600080fd5b810190602081018135600160201b81111561038157600080fd5b82018360208201111561039357600080fd5b803590602001918460018302840111600160201b831117156103b457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611284945050505050565b60408051918252519081900360200190f35b6104c9600480360360a081101561041d57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460018302840111600160201b8311171561047a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff166112a1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156105035781810151838201526020016104eb565b50505050905090810190601f1680156105305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561054a57600080fd5b506103f56115a4565b34801561055f57600080fd5b506104c96115aa565b34801561057457600080fd5b506105946004803603602081101561058b57600080fd5b503515156115c7565b005b3480156105a257600080fd5b506103f5611647565b3480156105b757600080fd5b506103f5600480360360408110156105ce57600080fd5b810190602081018135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460018302840111600160201b8311171561061b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061164e915050565b34801561066a57600080fd5b506107216004803603606081101561068157600080fd5b81359190810190604081016020820135600160201b8111156106a257600080fd5b8201836020820111156106b457600080fd5b803590602001918460018302840111600160201b831117156106d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061177d9050565b604080519115158252519081900360200190f35b34801561074157600080fd5b506103f56004803603602081101561075857600080fd5b50356001600160a01b03166118b1565b34801561077457600080fd5b506103f56118cc565b34801561078957600080fd5b506107216118d0565b34801561079e57600080fd5b506103f5600480360360208110156107b557600080fd5b50356001600160a01b03166118e0565b3480156107d157600080fd5b506103f5600480360360608110156107e857600080fd5b810190602081018135600160201b81111561080257600080fd5b82018360208201111561081457600080fd5b803590602001918460018302840111600160201b8311171561083557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561088757600080fd5b82018360208201111561089957600080fd5b803590602001918460018302840111600160201b831117156108ba57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611901915050565b34801561090957600080fd5b506103f56004803603604081101561092057600080fd5b506001600160a01b038135169060200135611b3b565b34801561094257600080fd5b506103f56004803603606081101561095957600080fd5b810190602081018135600160201b81111561097357600080fd5b82018360208201111561098557600080fd5b803590602001918460018302840111600160201b831117156109a657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b811115610a0057600080fd5b820183602082011115610a1257600080fd5b803590602001918460018302840111600160201b83111715610a3357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611b63945050505050565b348015610a8057600080fd5b506103f5600480360360a0811015610a9757600080fd5b810190602081018135600160201b811115610ab157600080fd5b820183602082011115610ac357600080fd5b803590602001918460018302840111600160201b83111715610ae457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610b3657600080fd5b820183602082011115610b4857600080fd5b803590602001918460018302840111600160201b83111715610b6957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435956001600160a01b0360208701351695919450925060608101915060400135600160201b811115610bd057600080fd5b820183602082011115610be257600080fd5b803590602001918460018302840111600160201b83111715610c0357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d7a945050505050565b348015610c5057600080fd5b5061059460048036036080811015610c6757600080fd5b810190602081018135600160201b811115610c8157600080fd5b820183602082011115610c9357600080fd5b803590602001918460018302840111600160201b83111715610cb457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b038535811696602087013590911695919450925060608101915060400135600160201b811115610d1f57600080fd5b820183602082011115610d3157600080fd5b803590602001918460018302840111600160201b83111715610d5257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506121a6945050505050565b348015610d9f57600080fd5b50610594612458565b348015610db457600080fd5b506103f5612504565b348015610dc957600080fd5b50610dd261250a565b604080516001600160a01b039092168252519081900360200190f35b348015610dfa57600080fd5b5061059460048036036020811015610e1157600080fd5b50356001600160a01b0316612519565b348015610e2d57600080fd5b5061059460048036036020811015610e4457600080fd5b503561259d565b348015610e5757600080fd5b50610dd2612659565b348015610e6c57600080fd5b506101cb60048036036020811015610e8357600080fd5b810190602081018135600160201b811115610e9d57600080fd5b820183602082011115610eaf57600080fd5b803590602001918460018302840111600160201b83111715610ed057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612668945050505050565b348015610f1d57600080fd5b5061059460048036036020811015610f3457600080fd5b50356001600160a01b03166126ff565b348015610f5057600080fd5b50610dd260048036036040811015610f6757600080fd5b81359190810190604081016020820135600160201b811115610f8857600080fd5b820183602082011115610f9a57600080fd5b803590602001918460018302840111600160201b83111715610fbb57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612801945050505050565b600080606080600080606060008089118015611021575061101d600361281c565b8911155b61106d576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420646f6573206e6f742065786973742160401b604482015290519081900360640190fd5b6000600760008b81526020019081526020016000209050898160010160009054906101000a90046001600160a01b0316826002018360050184600601548560040154866003016110bf8860070161281c565b8554604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281529188918301828280156111455780601f1061111a57610100808354040283529160200191611145565b820191906000526020600020905b81548152906001019060200180831161112857829003601f168201915b5050885460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959b508a9450925084019050828280156111d35780601f106111a8576101008083540402835291602001916111d3565b820191906000526020600020905b8154815290600101906020018083116111b657829003601f168201915b5050855460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152959a50879450925084019050828280156112615780601f1061123657610100808354040283529160200191611261565b820191906000526020600020905b81548152906001019060200180831161124457829003601f168201915b505050505091509850985098509850985098509850985050919395975091939597565b805160208183018101805160068252928201919093012091525481565b60606112ab6131ad565b50604080516060810182526001600160a01b038816600081815260026020908152908490205483528201529081018690526112e98782878787612820565b6113245760405162461bcd60e51b81526004018080602001828103825260218152602001806133a76021913960400191505060405180910390fd5b6001600160a01b03871660009081526002602052604090205461134e90600163ffffffff6128fd16565b6001600160a01b03881660008181526002602090815260408083209490945583519283523383820181905260609484018581528b51958501959095528a517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b958d9592948d94919260808501928601918190849084905b838110156113dd5781810151838201526020016113c5565b50505050905090810190601f16801561140a5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160006060306001600160a01b0316888a6040516020018083805190602001908083835b6020831061145b5780518252601f19909201916020918201910161143c565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b03166001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106114da5780518252601f1990920191602091820191016114bb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461153c576040519150601f19603f3d011682016040523d82523d6000602084013e611541565b606091505b509150915081611598576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b98975050505050505050565b60035481565b604051806040016040528060018152602001603160f81b81525081565b6115cf612957565b6001600160a01b03166115e061250a565b6001600160a01b031614611629576040805162461bcd60e51b81526020600482018190526024820152600080516020613387833981519152604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b6001545b90565b6000806006846040518082805190602001908083835b602083106116835780518252601f199092019160209182019101611664565b51815160001960209485036101000a019081169019919091161790529201948552506040519384900301909220549250505080611702576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420646f6573206e6f742065786973742160401b604482015290519081900360640190fd5b6000818152600760205260409020611718612957565b60018201546001600160a01b039081169116146117665760405162461bcd60e51b81526004018080602001828103825260238152602001806132926023913960400191505060405180910390fd5b80546117729085612966565b925050505b92915050565b6000611791826001600160a01b0316612a53565b156118895760408051630b135d3f60e11b808252600482018781526024830193845286516044840152865191936001600160a01b03871693631626ba7e938a938a9390929091606490910190602085019080838360005b838110156118005781810151838201526020016117e8565b50505050905090810190601f16801561182d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561184b57600080fd5b505afa15801561185f573d6000803e3d6000fd5b505050506040513d602081101561187557600080fd5b50516001600160e01b0319161490506118aa565b816001600160a01b031661189d8585612801565b6001600160a01b03161490505b9392505050565b6001600160a01b031660009081526002602052604090205490565b4690565b600054600160a01b900460ff1681565b6001600160a01b038116600090815260086020526040812061177790612a59565b6000806006856040518082805190602001908083835b602083106119365780518252601f199092019160209182019101611917565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390205411156119b8576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420616c7265616479206578697374732160401b604482015290519081900360640190fd5b60006119cd8585856119c8612957565b612a64565b90506119d7612cd0565b6001600160a01b031663551a23c96119ed612957565b87876040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a57578181015183820152602001611a3f565b50505050905090810190601f168015611a845780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ab7578181015183820152602001611a9f565b50505050905090810190601f168015611ae45780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015611b0657600080fd5b505af1158015611b1a573d6000803e3d6000fd5b505050506040513d6020811015611b3057600080fd5b509095945050505050565b6001600160a01b03821660009081526008602052604081206118aa908363ffffffff612d4616565b6000806006856040518082805190602001908083835b60208310611b985780518252601f199092019160209182019101611b79565b51815160001960209485036101000a019081169019919091161790529201948552506040519384900301909220549250505080611c17576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420646f6573206e6f742065786973742160401b604482015290519081900360640190fd5b600081815260076020819052604082209190601960f81b90829030908a908a90611c4290880161281c565b6040516001600160f81b0319808816602080840191825291881660218401526001600160601b0319606088901b16602284015285519092603601918601908083835b60208310611ca35780518252601f199092019160209182019101611c84565b51815160209384036101000a60001901801990921691161790529201948552508381019290925250604080518084038301815292810190528151910120600187015490955060009450611d0593508592508991506001600160a01b031661177d565b90508080611d1d5750600054600160a01b900460ff16155b611d6e576040805162461bcd60e51b815260206004820152601f60248201527f43726561746f7220646964206e6f74207369676e207468697320707269636500604482015290519081900360640190fd5b82546115989088612966565b6000806006876040518082805190602001908083835b60208310611daf5780518252601f199092019160209182019101611d90565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020541115611e31576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420616c7265616479206578697374732160401b604482015290519081900360640190fd5b6001600160a01b038316611e8c576040805162461bcd60e51b815260206004820152601a60248201527f43726561746f72206d757374206265207370656369666965642e000000000000604482015290519081900360640190fd5b604051601960f81b602080830182815260006021850181905230606081811b602288015289901b6001600160601b03191660368701528b519195869491938a938e938e938e9392604a909101918601908083835b60208310611eff5780518252601f199092019160209182019101611ee0565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611f475780518252601f199092019160209182019101611f28565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019750505050505050506040516020818303038152906040528051906020012090506000611f9d82858761177d565b90508080611fb55750600054600160a01b900460ff16155b612006576040805162461bcd60e51b815260206004820152601d60248201527f43726561746f7220646964206e6f74207369676e2074686973206e6674000000604482015290519081900360640190fd5b600061201489898989612a64565b6000818152600760209081526040909120875192935061203c926005909101918801906131d7565b50612045612cd0565b6001600160a01b031663551a23c9878b8b6040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156120be5781810151838201526020016120a6565b50505050905090810190601f1680156120eb5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561211e578181015183820152602001612106565b50505050905090810190601f16801561214b5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561216d57600080fd5b505af1158015612181573d6000803e3d6000fd5b505050506040513d602081101561219757600080fd5b50909998505050505050505050565b60006006856040518082805190602001908083835b602083106121da5780518252601f1990920191602091820191016121bb565b51815160001960209485036101000a019081169019919091161790529201948552506040519384900301909220549250505080612259576040805162461bcd60e51b815260206004820152601860248201527774686973206e667420646f6573206e6f742065786973742160401b604482015290519081900360640190fd5b604051601960f81b602080830182815260006021850181905230606081811b60228801528a901b6001600160601b03191660368701528a519195869491938b938d939192604a01918401908083835b602083106122c75780518252601f1990920191602091820191016122a8565b6001836020036101000a03801982511681845116808217855250505050505090500195505050505050604051602081830303815290604052805190602001209050600061231582858861177d565b9050808061232d5750600054600160a01b900460ff16155b61237e576040805162461bcd60e51b815260206004820152601d60248201527f43726561746f7220646964206e6f74207369676e2074686973206e6674000000604482015290519081900360640190fd5b60008381526007602090815260408083206001810180546001600160a01b0319166001600160a01b038b811691821790925583518581528d51818701528d5193969195928d16947f933a00049bad299f0fbf9813431c638e5df098b065cdb7f515811f1db909ae6f948f949293849392840192860191908190849084905b838110156124145781810151838201526020016123fc565b50505050905090810190601f1680156124415780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050505050505050565b612460612957565b6001600160a01b031661247161250a565b6001600160a01b0316146124ba576040805162461bcd60e51b81526020600482018190526024820152600080516020613387833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60045481565b6000546001600160a01b031690565b612521612957565b6001600160a01b031661253261250a565b6001600160a01b03161461257b576040805162461bcd60e51b81526020600482018190526024820152600080516020613387833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6125a5612957565b6001600160a01b03166125b661250a565b6001600160a01b0316146125ff576040805162461bcd60e51b81526020600482018190526024820152600080516020613387833981519152604482015290519081900360640190fd5b60648110612654576040805162461bcd60e51b815260206004820152601c60248201527f74616b65206973206d6f7265207468616e2039392070657263656e7400000000604482015290519081900360640190fd5b600455565b6005546001600160a01b031681565b600080606080600080606060008060068a6040518082805190602001908083835b602083106126a85780518252601f199092019160209182019101612689565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205492506126e39150829050610ffc565b9850985098509850985098509850985050919395975091939597565b612707612957565b6001600160a01b031661271861250a565b6001600160a01b031614612761576040805162461bcd60e51b81526020600482018190526024820152600080516020613387833981519152604482015290519081900360640190fd5b6001600160a01b0381166127a65760405162461bcd60e51b81526004018080602001828103825260268152602001806132f86026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006118aa8261281085612d52565b9063ffffffff612da316565b5490565b60006001600160a01b0386166128675760405162461bcd60e51b81526004018080602001828103825260258152602001806133406025913960400191505060405180910390fd5b600161287a61287587612e23565b612eaf565b83868660405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156128d4573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000828201838110156118aa576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000612961612efb565b905090565b60008281526007602081905260408220600681018490556129879101612f58565b60008381526007602090815260409182902082519182018590528282526003018054600260001961010060018416150201909116049282018390527f07cfaedb0a3a44301cc86c3ba90b9d0d580515f9bb1d20fa916f16b2964c3d0a92909185918190606082019085908015612a3e5780601f10612a1357610100808354040283529160200191612a3e565b820191906000526020600020905b815481529060010190602001808311612a2157829003601f168201915b5050935050505060405180910390a150919050565b3b151590565b60006117778261281c565b6000612a706003612f58565b6000612a7c600361281c565b60008181526007602090815260409091208281556001810180546001600160a01b0319166001600160a01b038816179055885192935091612ac5916003840191908a01906131d7565b508551612adb90600283019060208901906131d7565b50848160040181905550816006886040518082805190602001908083835b60208310612b185780518252601f199092019160209182019101612af9565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382019094209490945550506001600160a01b038616600090815260089092529020612b6b9083612f61565b5060018082015482546004840154604080518381526060810183905260806020820181815260038901805460026000199a821615610100029a909a01168990049284018390526001600160a01b03909716977fa2e68b9ad06ee9748ab4e91751fb66d6c2b118dd78c408dbfc167764fb7cffdc9795908a01949093929083019060a084019087908015612c3f5780601f10612c1457610100808354040283529160200191612c3f565b820191906000526020600020905b815481529060010190602001808311612c2257829003601f168201915b5050838103825285546002600019610100600184161502019091160480825260209091019086908015612cb35780601f10612c8857610100808354040283529160200191612cb3565b820191906000526020600020905b815481529060010190602001808311612c9657829003601f168201915b5050965050505050505060405180910390a2549695505050505050565b600554604080516313aedd4b60e31b815290516000926001600160a01b031691639d76ea58916004808301926020929190829003018186803b158015612d1557600080fd5b505afa158015612d29573d6000803e3d6000fd5b505050506040513d6020811015612d3f57600080fd5b5051905090565b60006118aa8383612f6d565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114612dfb576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a612e1986828585612fd1565b9695505050505050565b60006040518060800160405280604381526020016132b560439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03166001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6000612eb9611647565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b600033301415612f535760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061164b9050565b503390565b80546001019055565b60006118aa838361314b565b81546000908210612faf5760405162461bcd60e51b81526004018080602001828103825260228152602001806132706022913960400191505060405180910390fd5b826000018281548110612fbe57fe5b9060005260206000200154905092915050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156130325760405162461bcd60e51b815260040180806020018281038252602281526020018061331e6022913960400191505060405180910390fd5b8360ff16601b148061304757508360ff16601c145b6130825760405162461bcd60e51b81526004018080602001828103825260228152602001806133656022913960400191505060405180910390fd5b604080516000808252602080830180855289905260ff88168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa1580156130da573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613142576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b60006131578383613195565b61318d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611777565b506000611777565b60009081526001919091016020526040902054151590565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061321857805160ff1916838001178555613245565b82800160010185558215613245579182015b8281111561324557825182559160200191906001019061322a565b50613251929150613255565b5090565b61164b91905b80821115613251576000815560010161325b56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64736f6e6c79207468652063726561746f722063616e2073657420746865207072696365214d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345434453413a20696e76616c6964207369676e6174757265202773272076616c75654e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5349474e455245434453413a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e657220616e64207369676e617475726520646f206e6f74206d61746368a26469706673582212207426d5381994560ff74e7cb43e24f9818a7b069cc5a1420940e5c2d89b9c48a764736f6c634300060600334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

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.