Contract Overview
Balance:
0 AVAX
AVAX Value:
$0.00
[ Download CSV Export ]
Contract Name:
SnowballNFTClaimedHolidayHat
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity)
/**
*Submitted for verification at snowtrace.io on 2022-04-14
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant alphabet = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = alphabet[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/utils/EnumerableMap.sol
/**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableMap for EnumerableMap.UintToAddressMap;
*
* // Declare a set state variable
* EnumerableMap.UintToAddressMap private myMap;
* }
* ```
*
* As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
* supported.
*/
library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAddressMap) are just wrappers around
// the underlying Map.
// This means that we can only create new EnumerableMaps for types that fit
// in bytes32.
struct MapEntry {
bytes32 _key;
bytes32 _value;
}
struct Map {
// Storage of map keys and values
MapEntry[] _entries;
// Position of the entry defined by a key in the `entries` array, plus 1
// because index 0 means a key is not in the map.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/
function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) { // Equivalent to !contains(map, key)
map._entries.push(MapEntry({ _key: key, _value: value }));
// The entry is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
map._indexes[key] = map._entries.length;
return true;
} else {
map._entries[keyIndex - 1]._value = value;
return false;
}
}
/**
* @dev Removes a key-value pair from a map. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/
function _remove(Map storage map, bytes32 key) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex != 0) { // Equivalent to contains(map, key)
// To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one
// in the array, and then remove the last entry (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = keyIndex - 1;
uint256 lastIndex = map._entries.length - 1;
// When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
MapEntry storage lastEntry = map._entries[lastIndex];
// Move the last entry to the index where the entry to delete is
map._entries[toDeleteIndex] = lastEntry;
// Update the index for the moved entry
map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved entry was stored
map._entries.pop();
// Delete the index for the deleted slot
delete map._indexes[key];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the key is in the map. O(1).
*/
function _contains(Map storage map, bytes32 key) private view returns (bool) {
return map._indexes[key] != 0;
}
/**
* @dev Returns the number of key-value pairs in the map. O(1).
*/
function _length(Map storage map) private view returns (uint256) {
return map._entries.length;
}
/**
* @dev Returns the key-value pair stored at position `index` in the map. O(1).
*
* Note that there are no guarantees on the ordering of entries inside the
* array, and it may change when more entries are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
require(map._entries.length > index, "EnumerableMap: index out of bounds");
MapEntry storage entry = map._entries[index];
return (entry._key, entry._value);
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)
return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based
}
/**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/
function _get(Map storage map, bytes32 key) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value; // All indexes are 1-based
}
/**
* @dev Same as {_get}, with a custom error message when `key` is not in the map.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {_tryGet}.
*/
function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value; // All indexes are 1-based
}
// UintToAddressMap
struct UintToAddressMap {
Map _inner;
}
/**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/
function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/
function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
return _remove(map._inner, bytes32(key));
}
/**
* @dev Returns true if the key is in the map. O(1).
*/
function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
return _contains(map._inner, bytes32(key));
}
/**
* @dev Returns the number of elements in the map. O(1).
*/
function length(UintToAddressMap storage map) internal view returns (uint256) {
return _length(map._inner);
}
/**
* @dev Returns the element stored at position `index` in the set. O(1).
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
(bytes32 key, bytes32 value) = _at(map._inner, index);
return (uint256(key), address(uint160(uint256(value))));
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*
* _Available since v3.4._
*/
function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
(bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));
return (success, address(uint160(uint256(value))));
}
/**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/
function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
return address(uint160(uint256(_get(map._inner, bytes32(key)))));
}
/**
* @dev Same as {get}, with a custom error message when `key` is not in the map.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryGet}.
*/
function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));
}
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/utils/EnumerableSet.sol
/**
* @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: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/utils/Address.sol
/**
* @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: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/introspection/ERC165.sol
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () {
// Derived contracts need only register support for their own interfaces,
// we register support for ERC165 itself here
_registerInterface(type(IERC165).interfaceId);
}
/**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return _supportedInterfaces[interfaceId];
}
/**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
*/
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}
interface HolidayNFT is IERC721{
/**
* @dev Returns list of `tokenId` of owner.
*/
function tokensOfOwner(address _owner) external view returns(uint256[] memory );
}
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC721/IERC721Enumerable.sol
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC721/IERC721Metadata.sol
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/introspection/IERC165.sol
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol
/*
* @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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol
/**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Mapping from holder address to their (enumerable) set of owned tokens
mapping (address => EnumerableSet.UintSet) private _holderTokens;
// Enumerable mapping from token ids to their owners
EnumerableMap.UintToAddressMap private _tokenOwners;
// Mapping from token ID to approved address
mapping (uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping (address => mapping (address => bool)) private _operatorApprovals;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURI;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
// register the supported interfaces to conform to ERC721 via ERC165
_registerInterface(type(IERC721).interfaceId);
_registerInterface(type(IERC721Metadata).interfaceId);
_registerInterface(type(IERC721Enumerable).interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _holderTokens[owner].length();
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory _tokenURI = _tokenURIs[tokenId];
string memory base = baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
// If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
return string(abi.encodePacked(base, tokenId.toString()));
}
/**
* @dev Returns the base URI set via {_setBaseURI}. This will be
* automatically added as a prefix in {tokenURI} to each token's URI, or
* to the token ID if no specific URI is set for that token ID.
*/
function baseURI() public view virtual returns (string memory) {
return _baseURI;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
return _holderTokens[owner].at(index);
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
// _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
return _tokenOwners.length();
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
(uint256 tokenId, ) = _tokenOwners.at(index);
return tokenId;
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _tokenOwners.contains(tokenId);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
_mint(to, tokenId);
require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId, to);
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId); // internal owner
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
_holderTokens[owner].remove(tokenId);
_tokenOwners.remove(tokenId);
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_holderTokens[from].remove(tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId, to);
emit Transfer(from, to, tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/
function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
private returns (bool)
{
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
// solhint-disable-next-line no-inline-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _approve(address to, uint256 tokenId) private {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
}
// File: http://github.com/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol
/**
* @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 () {
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: https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/utils/math/SafeMath.sol
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
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) {
unchecked {
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) {
unchecked {
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) {
unchecked {
// 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) {
unchecked {
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) {
unchecked {
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) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return 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) {
return a * b;
}
/**
* @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.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
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) {
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) {
unchecked {
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.
*
* 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).
*
* 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) {
unchecked {
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) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
// File @openzeppelin/contracts/utils/[email protected]
/**
* @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;`
*/
library Counters {
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 {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
}
contract SnowballNFTClaimedHolidayHat is ERC721, Ownable{
address public constant unclaimedNFT = 0x9fF1918d212c435AD1F1734E9C4DC2DB835161Af;
address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;
using Counters for Counters.Counter;
Counters.Counter public _tokenIds;
constructor() ERC721("Snowball Claimed Holiday Hat", "SNOBCLAIMHOLIDAY") {
setBaseURI("ipfs://bafybeibm7e7fpkuqkyxuns7t35ahswetiktvyehn3sd75oxvv6i6ai26gq?id=");
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint256 index;
for (index = 0; index < tokenCount; index++) {
result[index] = tokenOfOwnerByIndex(_owner, index);
}
return result;
}
}
function mintAndBurn(uint256 qty) public {
require(qty > 0, "!qty");
address msgSender = _msgSender();
uint256 userBalance = HolidayNFT(unclaimedNFT).balanceOf(msgSender);
require(userBalance >= qty, "Not enough NFTs");
uint256[] memory userTokenList = HolidayNFT(unclaimedNFT).tokensOfOwner(msgSender);
uint256 index;
for (index = 0; index < qty; index++) {
//we store 1:1 user NFT
HolidayNFT(unclaimedNFT).transferFrom(msgSender, address(burnAddress), userTokenList[index]);
uint256 newItemId = _tokenIds.current();
_mint(msgSender, newItemId);
_tokenIds.increment();
}
}
function setBaseURI(string memory baseURI) public onlyOwner {
_setBaseURI(baseURI);
}
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_tokenIds","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"mintAndBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unclaimedNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280601c81526020017f536e6f7762616c6c20436c61696d656420486f6c6964617920486174000000008152506040518060400160405280601081526020016f534e4f42434c41494d484f4c4944415960801b815250620000896301ffc9a760e01b6200015a60201b60201c565b81516200009e90600690602085019062000262565b508051620000b490600790602084019062000262565b50620000c76380ac58cd60e01b6200015a565b620000d9635b5e139f60e01b6200015a565b620000eb63780e9d6360e01b6200015a565b5050600a80546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620001546040518060800160405280604681526020016200240460469139620001df565b62000345565b6001600160e01b03198082161415620001ba5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b600a546001600160a01b031633146200023b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620001b1565b620002468162000249565b50565b80516200025e90600990602084019062000262565b5050565b828054620002709062000308565b90600052602060002090601f016020900481019282620002945760008555620002df565b82601f10620002af57805160ff1916838001178555620002df565b82800160010185558215620002df579182015b82811115620002df578251825591602001919060010190620002c2565b50620002ed929150620002f1565b5090565b5b80821115620002ed5760008155600101620002f2565b600181811c908216806200031d57607f821691505b602082108114156200033f57634e487b7160e01b600052602260045260246000fd5b50919050565b6120af80620003556000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806370d5ae05116100de578063aa46a40011610097578063c87b56dd11610071578063c87b56dd1461035a578063d44b8f3f1461036d578063e985e9c514610388578063f2fde38b146103c457600080fd5b8063aa46a4001461032a578063b81869bc14610334578063b88d4fde1461034757600080fd5b806370d5ae05146102cd578063715018a6146102d65780638462151c146102de5780638da5cb5b146102fe57806395d89b411461030f578063a22cb4651461031757600080fd5b80632f745c591161014b57806355f804b31161012557806355f804b31461028c5780636352211e1461029f5780636c0360eb146102b257806370a08231146102ba57600080fd5b80632f745c591461025357806342842e0e146102665780634f6ccce71461027957600080fd5b806301ffc9a71461019357806306fdde03146101d5578063081812fc146101ea578063095ea7b31461021557806318160ddd1461022a57806323b872dd14610240575b600080fd5b6101c06101a1366004611c4c565b6001600160e01b03191660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b6101dd6103d7565b6040516101cc9190611ddd565b6101fd6101f8366004611ccf565b610469565b6040516001600160a01b0390911681526020016101cc565b610228610223366004611b75565b6104f6565b005b61023261060c565b6040519081526020016101cc565b61022861024e366004611a81565b61061d565b610232610261366004611b75565b61064e565b610228610274366004611a81565b610679565b610232610287366004611ccf565b610694565b61022861029a366004611c86565b6106aa565b6101fd6102ad366004611ccf565b6106e0565b6101dd610708565b6102326102c8366004611a33565b610717565b6101fd61dead81565b6102286107a3565b6102f16102ec366004611a33565b610817565b6040516101cc9190611d99565b600a546001600160a01b03166101fd565b6101dd6108d2565b610228610325366004611b39565b6108e1565b600b546102329081565b610228610342366004611ccf565b6109a6565b610228610355366004611abd565b610c40565b6101dd610368366004611ccf565b610c78565b6101fd739ff1918d212c435ad1f1734e9c4dc2db835161af81565b6101c0610396366004611a4e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102286103d2366004611a33565b610dea565b6060600680546103e690611f68565b80601f016020809104026020016040519081016040528092919081815260200182805461041290611f68565b801561045f5780601f106104345761010080835404028352916020019161045f565b820191906000526020600020905b81548152906001019060200180831161044257829003601f168201915b5050505050905090565b600061047482610ed5565b6104da5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610501826106e0565b9050806001600160a01b0316836001600160a01b0316141561056f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016104d1565b336001600160a01b038216148061058b575061058b8133610396565b6105fd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016104d1565b6106078383610ee2565b505050565b60006106186002610f50565b905090565b6106273382610f5a565b6106435760405162461bcd60e51b81526004016104d190611e77565b610607838383611044565b6001600160a01b038216600090815260016020526040812061067090836111c5565b90505b92915050565b61060783838360405180602001604052806000815250610c40565b6000806106a26002846111d1565b509392505050565b600a546001600160a01b031633146106d45760405162461bcd60e51b81526004016104d190611e42565b6106dd816111ed565b50565b6000610673826040518060600160405280602981526020016120516029913960029190611204565b6060600980546103e690611f68565b60006001600160a01b0382166107825760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016104d1565b6001600160a01b038216600090815260016020526040902061067390610f50565b600a546001600160a01b031633146107cd5760405162461bcd60e51b81526004016104d190611e42565b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a80546001600160a01b0319169055565b6060600061082483610717565b9050806108415760408051600080825260208201909252906106a2565b60008167ffffffffffffffff81111561085c5761085c612024565b604051908082528060200260200182016040528015610885578160200160208202803683370190505b50905060005b828110156106a25761089d858261064e565b8282815181106108af576108af61200e565b6020908102919091010152806108c481611f9d565b91505061088b565b50919050565b6060600780546103e690611f68565b6001600160a01b03821633141561093a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016104d1565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600081116109df5760405162461bcd60e51b81526004016104d1906020808252600490820152632171747960e01b604082015260600190565b6000336040516370a0823160e01b81526001600160a01b0382166004820152909150600090739ff1918d212c435ad1f1734e9c4dc2db835161af906370a082319060240160206040518083038186803b158015610a3b57600080fd5b505afa158015610a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a739190611ce8565b905082811015610ab75760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204e46547360881b60448201526064016104d1565b604051632118854760e21b81526001600160a01b0383166004820152600090739ff1918d212c435ad1f1734e9c4dc2db835161af90638462151c9060240160006040518083038186803b158015610b0d57600080fd5b505afa158015610b21573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b499190810190611b9f565b905060005b84811015610c3957739ff1918d212c435ad1f1734e9c4dc2db835161af6001600160a01b03166323b872dd8561dead858581518110610b8f57610b8f61200e565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610be957600080fd5b505af1158015610bfd573d6000803e3d6000fd5b505050506000610c0c600b5490565b9050610c18858261121b565b610c26600b80546001019055565b5080610c3181611f9d565b915050610b4e565b5050505050565b610c4a3383610f5a565b610c665760405162461bcd60e51b81526004016104d190611e77565b610c7284848484611333565b50505050565b6060610c8382610ed5565b610ce75760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016104d1565b60008281526008602052604081208054610d0090611f68565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2c90611f68565b8015610d795780601f10610d4e57610100808354040283529160200191610d79565b820191906000526020600020905b815481529060010190602001808311610d5c57829003601f168201915b505050505090506000610d8a610708565b9050805160001415610d9d575092915050565b815115610dcf578082604051602001610db7929190611d2d565b60405160208183030381529060405292505050919050565b80610dd985611366565b604051602001610db7929190611d2d565b600a546001600160a01b03163314610e145760405162461bcd60e51b81526004016104d190611e42565b6001600160a01b038116610e795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d1565b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610673600283611464565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610f17826106e0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610673825490565b6000610f6582610ed5565b610fc65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016104d1565b6000610fd1836106e0565b9050806001600160a01b0316846001600160a01b0316148061100c5750836001600160a01b031661100184610469565b6001600160a01b0316145b8061103c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611057826106e0565b6001600160a01b0316146110bf5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016104d1565b6001600160a01b0382166111215760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016104d1565b61112c600082610ee2565b6001600160a01b038316600090815260016020526040902061114e908261147c565b506001600160a01b03821660009081526001602052604090206111719082611488565b5061117e60028284611494565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061067083836114aa565b60008080806111e08686611530565b9097909650945050505050565b8051611200906009906020840190611926565b5050565b60006112118484846115cd565b90505b9392505050565b6001600160a01b0382166112715760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016104d1565b61127a81610ed5565b156112c75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016104d1565b6001600160a01b03821660009081526001602052604090206112e99082611488565b506112f660028284611494565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61133e848484611044565b61134a84848484611636565b610c725760405162461bcd60e51b81526004016104d190611df0565b60608161138a5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156113b4578061139e81611f9d565b91506113ad9050600a83611f11565b915061138e565b60008167ffffffffffffffff8111156113cf576113cf612024565b6040519080825280601f01601f1916602001820160405280156113f9576020820181803683370190505b5090505b841561103c5761140e600183611f25565b915061141b600a86611fb8565b611426906030611ef9565b60f81b81838151811061143b5761143b61200e565b60200101906001600160f81b031916908160001a90535061145d600a86611f11565b94506113fd565b60008181526001830160205260408120541515610670565b60006106708383611743565b60006106708383611836565b600061121184846001600160a01b038516611885565b815460009082106115085760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016104d1565b82600001828154811061151d5761151d61200e565b9060005260206000200154905092915050565b8154600090819083106115905760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016104d1565b60008460000184815481106115a7576115a761200e565b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816115fd5760405162461bcd60e51b81526004016104d19190611ddd565b508461160a600183611f25565b8154811061161a5761161a61200e565b9060005260206000209060020201600101549150509392505050565b60006001600160a01b0384163b1561173857604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061167a903390899088908890600401611d5c565b602060405180830381600087803b15801561169457600080fd5b505af19250505080156116c4575060408051601f3d908101601f191682019092526116c191810190611c69565b60015b61171e573d8080156116f2576040519150601f19603f3d011682016040523d82523d6000602084013e6116f7565b606091505b5080516117165760405162461bcd60e51b81526004016104d190611df0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061103c565b506001949350505050565b6000818152600183016020526040812054801561182c576000611767600183611f25565b855490915060009061177b90600190611f25565b905060008660000182815481106117945761179461200e565b90600052602060002001549050808760000184815481106117b7576117b761200e565b6000918252602090912001556117ce836001611ef9565b600082815260018901602052604090205586548790806117f0576117f0611ff8565b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610673565b6000915050610673565b600081815260018301602052604081205461187d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610673565b506000610673565b6000828152600184016020526040812054806118ea575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611214565b82856118f7600184611f25565b815481106119075761190761200e565b9060005260206000209060020201600101819055506000915050611214565b82805461193290611f68565b90600052602060002090601f016020900481019282611954576000855561199a565b82601f1061196d57805160ff191683800117855561199a565b8280016001018555821561199a579182015b8281111561199a57825182559160200191906001019061197f565b506119a69291506119aa565b5090565b5b808211156119a657600081556001016119ab565b600067ffffffffffffffff8311156119d9576119d9612024565b6119ec601f8401601f1916602001611ec8565b9050828152838383011115611a0057600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114611a2e57600080fd5b919050565b600060208284031215611a4557600080fd5b61067082611a17565b60008060408385031215611a6157600080fd5b611a6a83611a17565b9150611a7860208401611a17565b90509250929050565b600080600060608486031215611a9657600080fd5b611a9f84611a17565b9250611aad60208501611a17565b9150604084013590509250925092565b60008060008060808587031215611ad357600080fd5b611adc85611a17565b9350611aea60208601611a17565b925060408501359150606085013567ffffffffffffffff811115611b0d57600080fd5b8501601f81018713611b1e57600080fd5b611b2d878235602084016119bf565b91505092959194509250565b60008060408385031215611b4c57600080fd5b611b5583611a17565b915060208301358015158114611b6a57600080fd5b809150509250929050565b60008060408385031215611b8857600080fd5b611b9183611a17565b946020939093013593505050565b60006020808385031215611bb257600080fd5b825167ffffffffffffffff80821115611bca57600080fd5b818501915085601f830112611bde57600080fd5b815181811115611bf057611bf0612024565b8060051b9150611c01848301611ec8565b8181528481019084860184860187018a1015611c1c57600080fd5b600095505b83861015611c3f578051835260019590950194918601918601611c21565b5098975050505050505050565b600060208284031215611c5e57600080fd5b81356112148161203a565b600060208284031215611c7b57600080fd5b81516112148161203a565b600060208284031215611c9857600080fd5b813567ffffffffffffffff811115611caf57600080fd5b8201601f81018413611cc057600080fd5b61103c848235602084016119bf565b600060208284031215611ce157600080fd5b5035919050565b600060208284031215611cfa57600080fd5b5051919050565b60008151808452611d19816020860160208601611f3c565b601f01601f19169290920160200192915050565b60008351611d3f818460208801611f3c565b835190830190611d53818360208801611f3c565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611d8f90830184611d01565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611dd157835183529284019291840191600101611db5565b50909695505050505050565b6020815260006106706020830184611d01565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ef157611ef1612024565b604052919050565b60008219821115611f0c57611f0c611fcc565b500190565b600082611f2057611f20611fe2565b500490565b600082821015611f3757611f37611fcc565b500390565b60005b83811015611f57578181015183820152602001611f3f565b83811115610c725750506000910152565b600181811c90821680611f7c57607f821691505b602082108114156108cc57634e487b7160e01b600052602260045260246000fd5b6000600019821415611fb157611fb1611fcc565b5060010190565b600082611fc757611fc7611fe2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146106dd57600080fdfe4552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656ea26469706673582212204a0ae6f4459a683146ee939805e422c2dcc73afadf8df86c0cc300829318fb8a64736f6c63430008070033697066733a2f2f62616679626569626d37653766706b75716b7978756e7337743335616873776574696b74767965686e33736437356f7876763669366169323667713f69643d
Deployed ByteCode Sourcemap
66949:1902:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31526:150;;;;;;:::i;:::-;-1:-1:-1;;;;;;31635:33:0;31611:4;31635:33;;;;;;;;;;;;;;31526:150;;;;7579:14:1;;7572:22;7554:41;;7542:2;7527:18;31526:150:0;;;;;;;;43180:100;;;:::i;:::-;;;;;;;:::i;45966:221::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;5860:32:1;;;5842:51;;5830:2;5815:18;45966:221:0;5696:203:1;45496:404:0;;;;;;:::i;:::-;;:::i;:::-;;44974:211;;;:::i;:::-;;;15430:25:1;;;15418:2;15403:18;44974:211:0;15284:177:1;46856:305:0;;;;;;:::i;:::-;;:::i;44736:162::-;;;;;;:::i;:::-;;:::i;47232:151::-;;;;;;:::i;:::-;;:::i;45262:172::-;;;;;;:::i;:::-;;:::i;68744:99::-;;;;;;:::i;:::-;;:::i;42936:177::-;;;;;;:::i;:::-;;:::i;44555:97::-;;;:::i;42647:221::-;;;;;;:::i;:::-;;:::i;67100:80::-;;67138:42;67100:80;;58008:148;;;:::i;67459:540::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;57357:87::-;57430:6;;-1:-1:-1;;;;;57430:6:0;57357:87;;43349:104;;;:::i;46259:295::-;;;;;;:::i;:::-;;:::i;67229:33::-;;;;;;;68007:725;;;;;;:::i;:::-;;:::i;47454:285::-;;;;;;:::i;:::-;;:::i;43524:792::-;;;;;;:::i;:::-;;:::i;67012:81::-;;67051:42;67012:81;;46625:164;;;;;;:::i;:::-;-1:-1:-1;;;;;46746:25:0;;;46722:4;46746:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;46625:164;58311:244;;;;;;:::i;:::-;;:::i;43180:100::-;43234:13;43267:5;43260:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43180:100;:::o;45966:221::-;46042:7;46070:16;46078:7;46070;:16::i;:::-;46062:73;;;;-1:-1:-1;;;46062:73:0;;12734:2:1;46062:73:0;;;12716:21:1;12773:2;12753:18;;;12746:30;12812:34;12792:18;;;12785:62;-1:-1:-1;;;12863:18:1;;;12856:42;12915:19;;46062:73:0;;;;;;;;;-1:-1:-1;46155:24:0;;;;:15;:24;;;;;;-1:-1:-1;;;;;46155:24:0;;45966:221::o;45496:404::-;45577:13;45593:23;45608:7;45593:14;:23::i;:::-;45577:39;;45641:5;-1:-1:-1;;;;;45635:11:0;:2;-1:-1:-1;;;;;45635:11:0;;;45627:57;;;;-1:-1:-1;;;45627:57:0;;14666:2:1;45627:57:0;;;14648:21:1;14705:2;14685:18;;;14678:30;14744:34;14724:18;;;14717:62;-1:-1:-1;;;14795:18:1;;;14788:31;14836:19;;45627:57:0;14464:397:1;45627:57:0;40564:10;-1:-1:-1;;;;;45705:21:0;;;;:69;;-1:-1:-1;45730:44:0;45754:5;40564:10;46625:164;:::i;45730:44::-;45697:161;;;;-1:-1:-1;;;45697:161:0;;10790:2:1;45697:161:0;;;10772:21:1;10829:2;10809:18;;;10802:30;10868:34;10848:18;;;10841:62;10939:26;10919:18;;;10912:54;10983:19;;45697:161:0;10588:420:1;45697:161:0;45871:21;45880:2;45884:7;45871:8;:21::i;:::-;45566:334;45496:404;;:::o;44974:211::-;45035:7;45156:21;:12;:19;:21::i;:::-;45149:28;;44974:211;:::o;46856:305::-;47017:41;40564:10;47050:7;47017:18;:41::i;:::-;47009:103;;;;-1:-1:-1;;;47009:103:0;;;;;;;:::i;:::-;47125:28;47135:4;47141:2;47145:7;47125:9;:28::i;44736:162::-;-1:-1:-1;;;;;44860:20:0;;44833:7;44860:20;;;:13;:20;;;;;:30;;44884:5;44860:23;:30::i;:::-;44853:37;;44736:162;;;;;:::o;47232:151::-;47336:39;47353:4;47359:2;47363:7;47336:39;;;;;;;;;;;;:16;:39::i;45262:172::-;45337:7;;45379:22;:12;45395:5;45379:15;:22::i;:::-;-1:-1:-1;45357:44:0;45262:172;-1:-1:-1;;;45262:172:0:o;68744:99::-;57430:6;;-1:-1:-1;;;;;57430:6:0;40564:10;57577:23;57569:68;;;;-1:-1:-1;;;57569:68:0;;;;;;;:::i;:::-;68815:20:::1;68827:7;68815:11;:20::i;:::-;68744:99:::0;:::o;42936:177::-;43008:7;43035:70;43052:7;43035:70;;;;;;;;;;;;;;;;;:12;;:70;:16;:70::i;44555:97::-;44603:13;44636:8;44629:15;;;;;:::i;42647:221::-;42719:7;-1:-1:-1;;;;;42747:19:0;;42739:74;;;;-1:-1:-1;;;42739:74:0;;11215:2:1;42739:74:0;;;11197:21:1;11254:2;11234:18;;;11227:30;11293:34;11273:18;;;11266:62;-1:-1:-1;;;11344:18:1;;;11337:40;11394:19;;42739:74:0;11013:406:1;42739:74:0;-1:-1:-1;;;;;42831:20:0;;;;;;:13;:20;;;;;:29;;:27;:29::i;58008:148::-;57430:6;;-1:-1:-1;;;;;57430:6:0;40564:10;57577:23;57569:68;;;;-1:-1:-1;;;57569:68:0;;;;;;;:::i;:::-;58099:6:::1;::::0;58078:40:::1;::::0;58115:1:::1;::::0;-1:-1:-1;;;;;58099:6:0::1;::::0;58078:40:::1;::::0;58115:1;;58078:40:::1;58129:6;:19:::0;;-1:-1:-1;;;;;;58129:19:0::1;::::0;;58008:148::o;67459:540::-;67520:16;67550:18;67571:17;67581:6;67571:9;:17::i;:::-;67550:38;-1:-1:-1;67603:15:0;67599:393;;67680:16;;;67694:1;67680:16;;;;;;;;;;;;67599:393;67729:23;67769:10;67755:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;67755:25:0;;67729:51;;67795:13;67823:130;67847:10;67839:5;:18;67823:130;;;67903:34;67923:6;67931:5;67903:19;:34::i;:::-;67887:6;67894:5;67887:13;;;;;;;;:::i;:::-;;;;;;;;;;:50;67859:7;;;;:::i;:::-;;;;67823:130;;67599:393;67539:460;67459:540;;;:::o;43349:104::-;43405:13;43438:7;43431:14;;;;;:::i;46259:295::-;-1:-1:-1;;;;;46362:24:0;;40564:10;46362:24;;46354:62;;;;-1:-1:-1;;;46354:62:0;;10023:2:1;46354:62:0;;;10005:21:1;10062:2;10042:18;;;10035:30;10101:27;10081:18;;;10074:55;10146:18;;46354:62:0;9821:349:1;46354:62:0;40564:10;46429:32;;;;:18;:32;;;;;;;;-1:-1:-1;;;;;46429:42:0;;;;;;;;;;;;:53;;-1:-1:-1;;46429:53:0;;;;;;;;;;46498:48;;7554:41:1;;;46429:42:0;;40564:10;46498:48;;7527:18:1;46498:48:0;;;;;;;46259:295;;:::o;68007:725::-;68073:1;68067:3;:7;68059:24;;;;-1:-1:-1;;;68059:24:0;;;;;;13147:2:1;13129:21;;;13186:1;13166:18;;;13159:29;-1:-1:-1;;;13219:2:1;13204:18;;13197:34;13263:2;13248:18;;12945:327;68059:24:0;68096:17;40564:10;68161:45;;-1:-1:-1;;;68161:45:0;;-1:-1:-1;;;;;5860:32:1;;68161:45:0;;;5842:51:1;68096:32:0;;-1:-1:-1;68139:19:0;;67051:42;;68161:34;;5815:18:1;;68161:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;68139:67;;68242:3;68227:11;:18;;68219:46;;;;-1:-1:-1;;;68219:46:0;;11626:2:1;68219:46:0;;;11608:21:1;11665:2;11645:18;;;11638:30;-1:-1:-1;;;11684:18:1;;;11677:45;11739:18;;68219:46:0;11424:339:1;68219:46:0;68311:49;;-1:-1:-1;;;68311:49:0;;-1:-1:-1;;;;;5860:32:1;;68311:49:0;;;5842:51:1;68278:30:0;;67051:42;;68311:38;;5815:18:1;;68311:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;68311:49:0;;;;;;;;;;;;:::i;:::-;68278:82;;68373:13;68397:328;68421:3;68413:5;:11;68397:328;;;67051:42;-1:-1:-1;;;;;68487:37:0;;68525:9;67138:42;68558:13;68572:5;68558:20;;;;;;;;:::i;:::-;;;;;;;;;;;68487:92;;-1:-1:-1;;;;;;68487:92:0;;;;;;;-1:-1:-1;;;;;6162:15:1;;;68487:92:0;;;6144:34:1;6214:15;;;;6194:18;;;6187:43;6246:18;;;6239:34;6079:18;;68487:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68596:17;68616:19;:9;66542:14;;66450:114;68616:19;68596:39;;68650:27;68656:9;68667;68650:5;:27::i;:::-;68692:21;:9;66661:19;;66679:1;66661:19;;;66572:127;68692:21;-1:-1:-1;68426:7:0;;;;:::i;:::-;;;;68397:328;;;68048:684;;;;68007:725;:::o;47454:285::-;47586:41;40564:10;47619:7;47586:18;:41::i;:::-;47578:103;;;;-1:-1:-1;;;47578:103:0;;;;;;;:::i;:::-;47692:39;47706:4;47712:2;47716:7;47725:5;47692:13;:39::i;:::-;47454:285;;;;:::o;43524:792::-;43597:13;43631:16;43639:7;43631;:16::i;:::-;43623:76;;;;-1:-1:-1;;;43623:76:0;;14250:2:1;43623:76:0;;;14232:21:1;14289:2;14269:18;;;14262:30;14328:34;14308:18;;;14301:62;-1:-1:-1;;;14379:18:1;;;14372:45;14434:19;;43623:76:0;14048:411:1;43623:76:0;43712:23;43738:19;;;:10;:19;;;;;43712:45;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43768:18;43789:9;:7;:9::i;:::-;43768:30;;43880:4;43874:18;43896:1;43874:23;43870:72;;;-1:-1:-1;43921:9:0;43524:792;-1:-1:-1;;43524:792:0:o;43870:72::-;44046:23;;:27;44042:108;;44121:4;44127:9;44104:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;44090:48;;;;43524:792;;;:::o;44042:108::-;44282:4;44288:18;:7;:16;:18::i;:::-;44265:42;;;;;;;;;:::i;58311:244::-;57430:6;;-1:-1:-1;;;;;57430:6:0;40564:10;57577:23;57569:68;;;;-1:-1:-1;;;57569:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;58400:22:0;::::1;58392:73;;;::::0;-1:-1:-1;;;58392:73:0;;8854:2:1;58392:73:0::1;::::0;::::1;8836:21:1::0;8893:2;8873:18;;;8866:30;8932:34;8912:18;;;8905:62;-1:-1:-1;;;8983:18:1;;;8976:36;9029:19;;58392:73:0::1;8652:402:1::0;58392:73:0::1;58502:6;::::0;58481:38:::1;::::0;-1:-1:-1;;;;;58481:38:0;;::::1;::::0;58502:6:::1;::::0;58481:38:::1;::::0;58502:6:::1;::::0;58481:38:::1;58530:6;:17:::0;;-1:-1:-1;;;;;;58530:17:0::1;-1:-1:-1::0;;;;;58530:17:0;;;::::1;::::0;;;::::1;::::0;;58311:244::o;49206:127::-;49271:4;49295:30;:12;49317:7;49295:21;:30::i;55350:183::-;55416:24;;;;:15;:24;;;;;:29;;-1:-1:-1;;;;;;55416:29:0;-1:-1:-1;;;;;55416:29:0;;;;;;;;:24;;55470:23;55416:24;55470:14;:23::i;:::-;-1:-1:-1;;;;;55461:46:0;;;;;;;;;;;55350:183;;:::o;10109:123::-;10178:7;10205:19;10213:3;6771:19;;6688:110;49500:355;49593:4;49618:16;49626:7;49618;:16::i;:::-;49610:73;;;;-1:-1:-1;;;49610:73:0;;10377:2:1;49610:73:0;;;10359:21:1;10416:2;10396:18;;;10389:30;10455:34;10435:18;;;10428:62;-1:-1:-1;;;10506:18:1;;;10499:42;10558:19;;49610:73:0;10175:408:1;49610:73:0;49694:13;49710:23;49725:7;49710:14;:23::i;:::-;49694:39;;49763:5;-1:-1:-1;;;;;49752:16:0;:7;-1:-1:-1;;;;;49752:16:0;;:51;;;;49796:7;-1:-1:-1;;;;;49772:31:0;:20;49784:7;49772:11;:20::i;:::-;-1:-1:-1;;;;;49772:31:0;;49752:51;:94;;;-1:-1:-1;;;;;;46746:25:0;;;46722:4;46746:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;49807:39;49744:103;49500:355;-1:-1:-1;;;;49500:355:0:o;52636:597::-;52761:4;-1:-1:-1;;;;;52734:31:0;:23;52749:7;52734:14;:23::i;:::-;-1:-1:-1;;;;;52734:31:0;;52726:85;;;;-1:-1:-1;;;52726:85:0;;13840:2:1;52726:85:0;;;13822:21:1;13879:2;13859:18;;;13852:30;13918:34;13898:18;;;13891:62;-1:-1:-1;;;13969:18:1;;;13962:39;14018:19;;52726:85:0;13638:405:1;52726:85:0;-1:-1:-1;;;;;52848:16:0;;52840:65;;;;-1:-1:-1;;;52840:65:0;;9618:2:1;52840:65:0;;;9600:21:1;9657:2;9637:18;;;9630:30;9696:34;9676:18;;;9669:62;-1:-1:-1;;;9747:18:1;;;9740:34;9791:19;;52840:65:0;9416:400:1;52840:65:0;53022:29;53039:1;53043:7;53022:8;:29::i;:::-;-1:-1:-1;;;;;53064:19:0;;;;;;:13;:19;;;;;:35;;53091:7;53064:26;:35::i;:::-;-1:-1:-1;;;;;;53110:17:0;;;;;;:13;:17;;;;;:30;;53132:7;53110:21;:30::i;:::-;-1:-1:-1;53153:29:0;:12;53170:7;53179:2;53153:16;:29::i;:::-;;53217:7;53213:2;-1:-1:-1;;;;;53198:27:0;53207:4;-1:-1:-1;;;;;53198:27:0;;;;;;;;;;;52636:597;;;:::o;21650:137::-;21721:7;21756:22;21760:3;21772:5;21756:3;:22::i;10571:236::-;10651:7;;;;10711:22;10715:3;10727:5;10711:3;:22::i;:::-;10680:53;;;;-1:-1:-1;10571:236:0;-1:-1:-1;;;;;10571:236:0:o;53834:100::-;53907:19;;;;:8;;:19;;;;;:::i;:::-;;53834:100;:::o;11857:213::-;11964:7;12015:44;12020:3;12040;12046:12;12015:4;:44::i;:::-;12007:53;-1:-1:-1;11857:213:0;;;;;;:::o;51121:404::-;-1:-1:-1;;;;;51201:16:0;;51193:61;;;;-1:-1:-1;;;51193:61:0;;12373:2:1;51193:61:0;;;12355:21:1;;;12392:18;;;12385:30;12451:34;12431:18;;;12424:62;12503:18;;51193:61:0;12171:356:1;51193:61:0;51274:16;51282:7;51274;:16::i;:::-;51273:17;51265:58;;;;-1:-1:-1;;;51265:58:0;;9261:2:1;51265:58:0;;;9243:21:1;9300:2;9280:18;;;9273:30;9339;9319:18;;;9312:58;9387:18;;51265:58:0;9059:352:1;51265:58:0;-1:-1:-1;;;;;51394:17:0;;;;;;:13;:17;;;;;:30;;51416:7;51394:21;:30::i;:::-;-1:-1:-1;51437:29:0;:12;51454:7;51463:2;51437:16;:29::i;:::-;-1:-1:-1;51484:33:0;;51509:7;;-1:-1:-1;;;;;51484:33:0;;;51501:1;;51484:33;;51501:1;;51484:33;51121:404;;:::o;48621:272::-;48735:28;48745:4;48751:2;48755:7;48735:9;:28::i;:::-;48782:48;48805:4;48811:2;48815:7;48824:5;48782:22;:48::i;:::-;48774:111;;;;-1:-1:-1;;;48774:111:0;;;;;;;:::i;284:723::-;340:13;561:10;557:53;;-1:-1:-1;;588:10:0;;;;;;;;;;;;-1:-1:-1;;;588:10:0;;;;;284:723::o;557:53::-;635:5;620:12;676:78;683:9;;676:78;;709:8;;;;:::i;:::-;;-1:-1:-1;732:10:0;;-1:-1:-1;740:2:0;732:10;;:::i;:::-;;;676:78;;;764:19;796:6;786:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;786:17:0;;764:39;;814:154;821:10;;814:154;;848:11;858:1;848:11;;:::i;:::-;;-1:-1:-1;917:10:0;925:2;917:5;:10;:::i;:::-;904:24;;:2;:24;:::i;:::-;891:39;;874:6;881;874:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;874:56:0;;;;;;;;-1:-1:-1;945:11:0;954:2;945:11;;:::i;:::-;;;814:154;;9870:151;9954:4;6563:17;;;:12;;;:17;;;;;;:22;;9978:35;6468:125;20737:137;20807:4;20831:35;20839:3;20859:5;20831:7;:35::i;20430:131::-;20497:4;20521:32;20526:3;20546:5;20521:4;:32::i;9293:185::-;9382:4;9406:64;9411:3;9431;-1:-1:-1;;;;;9445:23:0;;9406:4;:64::i;16688:204::-;16783:18;;16755:7;;16783:26;-1:-1:-1;16775:73:0;;;;-1:-1:-1;;;16775:73:0;;8032:2:1;16775:73:0;;;8014:21:1;8071:2;8051:18;;;8044:30;8110:34;8090:18;;;8083:62;-1:-1:-1;;;8161:18:1;;;8154:32;8203:19;;16775:73:0;7830:398:1;16775:73:0;16866:3;:11;;16878:5;16866:18;;;;;;;;:::i;:::-;;;;;;;;;16859:25;;16688:204;;;;:::o;7153:279::-;7257:19;;7220:7;;;;7257:27;-1:-1:-1;7249:74:0;;;;-1:-1:-1;;;7249:74:0;;11970:2:1;7249:74:0;;;11952:21:1;12009:2;11989:18;;;11982:30;12048:34;12028:18;;;12021:62;-1:-1:-1;;;12099:18:1;;;12092:32;12141:19;;7249:74:0;11768:398:1;7249:74:0;7336:22;7361:3;:12;;7374:5;7361:19;;;;;;;;:::i;:::-;;;;;;;;;;;7336:44;;7399:5;:10;;;7411:5;:12;;;7391:33;;;;;7153:279;;;;;:::o;8650:319::-;8744:7;8783:17;;;:12;;;:17;;;;;;8834:12;8819:13;8811:36;;;;-1:-1:-1;;;8811:36:0;;;;;;;;:::i;:::-;-1:-1:-1;8901:3:0;8914:12;8925:1;8914:8;:12;:::i;:::-;8901:26;;;;;;;;:::i;:::-;;;;;;;;;;;:33;;;8894:40;;;8650:319;;;;;:::o;54499:843::-;54620:4;-1:-1:-1;;;;;54646:13:0;;22936:20;22975:8;54642:693;;54682:72;;-1:-1:-1;;;54682:72:0;;-1:-1:-1;;;;;54682:36:0;;;;;:72;;40564:10;;54733:4;;54739:7;;54748:5;;54682:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54682:72:0;;;;;;;;-1:-1:-1;;54682:72:0;;;;;;;;;;;;:::i;:::-;;;54678:602;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54928:13:0;;54924:341;;54971:60;;-1:-1:-1;;;54971:60:0;;;;;;;:::i;54924:341::-;55215:6;55209:13;55200:6;55196:2;55192:15;55185:38;54678:602;-1:-1:-1;;;;;;54805:55:0;-1:-1:-1;;;54805:55:0;;-1:-1:-1;54798:62:0;;54642:693;-1:-1:-1;55319:4:0;54499:843;;;;;;:::o;14390:1544::-;14456:4;14595:19;;;:12;;;:19;;;;;;14631:15;;14627:1300;;14993:21;15017:14;15030:1;15017:10;:14;:::i;:::-;15066:18;;14993:38;;-1:-1:-1;15046:17:0;;15066:22;;15087:1;;15066:22;:::i;:::-;15046:42;;15333:17;15353:3;:11;;15365:9;15353:22;;;;;;;;:::i;:::-;;;;;;;;;15333:42;;15499:9;15470:3;:11;;15482:13;15470:26;;;;;;;;:::i;:::-;;;;;;;;;;:38;15602:17;:13;15618:1;15602:17;:::i;:::-;15576:23;;;;:12;;;:23;;;;;:43;15728:17;;15576:3;;15728:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;15823:3;:12;;:19;15836:5;15823:19;;;;;;;;;;;15816:26;;;15866:4;15859:11;;;;;;;;14627:1300;15910:5;15903:12;;;;;13800:414;13863:4;6563:17;;;:12;;;:17;;;;;;13880:327;;-1:-1:-1;13923:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;14106:18;;14084:19;;;:12;;;:19;;;;;;:40;;;;14139:11;;13880:327;-1:-1:-1;14190:5:0;14183:12;;3968:692;4044:4;4179:17;;;:12;;;:17;;;;;;4213:13;4209:444;;-1:-1:-1;;4298:38:0;;;;;;;;;;;;;;;;;;4280:57;;;;;;;;:12;:57;;;;;;;;;;;;;;;;;;;;;;;;4495:19;;4475:17;;;:12;;;:17;;;;;;;:39;4529:11;;4209:444;4609:5;4573:3;4586:12;4597:1;4586:8;:12;:::i;:::-;4573:26;;;;;;;;:::i;:::-;;;;;;;;;;;:33;;:41;;;;4636:5;4629:12;;;;;-1:-1:-1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:406:1;78:5;112:18;104:6;101:30;98:56;;;134:18;;:::i;:::-;172:57;217:2;196:15;;-1:-1:-1;;192:29:1;223:4;188:40;172:57;:::i;:::-;163:66;;252:6;245:5;238:21;292:3;283:6;278:3;274:16;271:25;268:45;;;309:1;306;299:12;268:45;358:6;353:3;346:4;339:5;335:16;322:43;412:1;405:4;396:6;389:5;385:18;381:29;374:40;14:406;;;;;:::o;425:173::-;493:20;;-1:-1:-1;;;;;542:31:1;;532:42;;522:70;;588:1;585;578:12;522:70;425:173;;;:::o;603:186::-;662:6;715:2;703:9;694:7;690:23;686:32;683:52;;;731:1;728;721:12;683:52;754:29;773:9;754:29;:::i;794:260::-;862:6;870;923:2;911:9;902:7;898:23;894:32;891:52;;;939:1;936;929:12;891:52;962:29;981:9;962:29;:::i;:::-;952:39;;1010:38;1044:2;1033:9;1029:18;1010:38;:::i;:::-;1000:48;;794:260;;;;;:::o;1059:328::-;1136:6;1144;1152;1205:2;1193:9;1184:7;1180:23;1176:32;1173:52;;;1221:1;1218;1211:12;1173:52;1244:29;1263:9;1244:29;:::i;:::-;1234:39;;1292:38;1326:2;1315:9;1311:18;1292:38;:::i;:::-;1282:48;;1377:2;1366:9;1362:18;1349:32;1339:42;;1059:328;;;;;:::o;1392:666::-;1487:6;1495;1503;1511;1564:3;1552:9;1543:7;1539:23;1535:33;1532:53;;;1581:1;1578;1571:12;1532:53;1604:29;1623:9;1604:29;:::i;:::-;1594:39;;1652:38;1686:2;1675:9;1671:18;1652:38;:::i;:::-;1642:48;;1737:2;1726:9;1722:18;1709:32;1699:42;;1792:2;1781:9;1777:18;1764:32;1819:18;1811:6;1808:30;1805:50;;;1851:1;1848;1841:12;1805:50;1874:22;;1927:4;1919:13;;1915:27;-1:-1:-1;1905:55:1;;1956:1;1953;1946:12;1905:55;1979:73;2044:7;2039:2;2026:16;2021:2;2017;2013:11;1979:73;:::i;:::-;1969:83;;;1392:666;;;;;;;:::o;2063:347::-;2128:6;2136;2189:2;2177:9;2168:7;2164:23;2160:32;2157:52;;;2205:1;2202;2195:12;2157:52;2228:29;2247:9;2228:29;:::i;:::-;2218:39;;2307:2;2296:9;2292:18;2279:32;2354:5;2347:13;2340:21;2333:5;2330:32;2320:60;;2376:1;2373;2366:12;2320:60;2399:5;2389:15;;;2063:347;;;;;:::o;2415:254::-;2483:6;2491;2544:2;2532:9;2523:7;2519:23;2515:32;2512:52;;;2560:1;2557;2550:12;2512:52;2583:29;2602:9;2583:29;:::i;:::-;2573:39;2659:2;2644:18;;;;2631:32;;-1:-1:-1;;;2415:254:1:o;2674:947::-;2769:6;2800:2;2843;2831:9;2822:7;2818:23;2814:32;2811:52;;;2859:1;2856;2849:12;2811:52;2892:9;2886:16;2921:18;2962:2;2954:6;2951:14;2948:34;;;2978:1;2975;2968:12;2948:34;3016:6;3005:9;3001:22;2991:32;;3061:7;3054:4;3050:2;3046:13;3042:27;3032:55;;3083:1;3080;3073:12;3032:55;3112:2;3106:9;3134:2;3130;3127:10;3124:36;;;3140:18;;:::i;:::-;3186:2;3183:1;3179:10;3169:20;;3209:28;3233:2;3229;3225:11;3209:28;:::i;:::-;3271:15;;;3302:12;;;;3334:11;;;3364;;;3360:20;;3357:33;-1:-1:-1;3354:53:1;;;3403:1;3400;3393:12;3354:53;3425:1;3416:10;;3435:156;3449:2;3446:1;3443:9;3435:156;;;3506:10;;3494:23;;3467:1;3460:9;;;;;3537:12;;;;3569;;3435:156;;;-1:-1:-1;3610:5:1;2674:947;-1:-1:-1;;;;;;;;2674:947:1:o;3626:245::-;3684:6;3737:2;3725:9;3716:7;3712:23;3708:32;3705:52;;;3753:1;3750;3743:12;3705:52;3792:9;3779:23;3811:30;3835:5;3811:30;:::i;3876:249::-;3945:6;3998:2;3986:9;3977:7;3973:23;3969:32;3966:52;;;4014:1;4011;4004:12;3966:52;4046:9;4040:16;4065:30;4089:5;4065:30;:::i;4130:450::-;4199:6;4252:2;4240:9;4231:7;4227:23;4223:32;4220:52;;;4268:1;4265;4258:12;4220:52;4308:9;4295:23;4341:18;4333:6;4330:30;4327:50;;;4373:1;4370;4363:12;4327:50;4396:22;;4449:4;4441:13;;4437:27;-1:-1:-1;4427:55:1;;4478:1;4475;4468:12;4427:55;4501:73;4566:7;4561:2;4548:16;4543:2;4539;4535:11;4501:73;:::i;4585:180::-;4644:6;4697:2;4685:9;4676:7;4672:23;4668:32;4665:52;;;4713:1;4710;4703:12;4665:52;-1:-1:-1;4736:23:1;;4585:180;-1:-1:-1;4585:180:1:o;4770:184::-;4840:6;4893:2;4881:9;4872:7;4868:23;4864:32;4861:52;;;4909:1;4906;4899:12;4861:52;-1:-1:-1;4932:16:1;;4770:184;-1:-1:-1;4770:184:1:o;4959:257::-;5000:3;5038:5;5032:12;5065:6;5060:3;5053:19;5081:63;5137:6;5130:4;5125:3;5121:14;5114:4;5107:5;5103:16;5081:63;:::i;:::-;5198:2;5177:15;-1:-1:-1;;5173:29:1;5164:39;;;;5205:4;5160:50;;4959:257;-1:-1:-1;;4959:257:1:o;5221:470::-;5400:3;5438:6;5432:13;5454:53;5500:6;5495:3;5488:4;5480:6;5476:17;5454:53;:::i;:::-;5570:13;;5529:16;;;;5592:57;5570:13;5529:16;5626:4;5614:17;;5592:57;:::i;:::-;5665:20;;5221:470;-1:-1:-1;;;;5221:470:1:o;6284:488::-;-1:-1:-1;;;;;6553:15:1;;;6535:34;;6605:15;;6600:2;6585:18;;6578:43;6652:2;6637:18;;6630:34;;;6700:3;6695:2;6680:18;;6673:31;;;6478:4;;6721:45;;6746:19;;6738:6;6721:45;:::i;:::-;6713:53;6284:488;-1:-1:-1;;;;;;6284:488:1:o;6777:632::-;6948:2;7000:21;;;7070:13;;6973:18;;;7092:22;;;6919:4;;6948:2;7171:15;;;;7145:2;7130:18;;;6919:4;7214:169;7228:6;7225:1;7222:13;7214:169;;;7289:13;;7277:26;;7358:15;;;;7323:12;;;;7250:1;7243:9;7214:169;;;-1:-1:-1;7400:3:1;;6777:632;-1:-1:-1;;;;;;6777:632:1:o;7606:219::-;7755:2;7744:9;7737:21;7718:4;7775:44;7815:2;7804:9;7800:18;7792:6;7775:44;:::i;8233:414::-;8435:2;8417:21;;;8474:2;8454:18;;;8447:30;8513:34;8508:2;8493:18;;8486:62;-1:-1:-1;;;8579:2:1;8564:18;;8557:48;8637:3;8622:19;;8233:414::o;13277:356::-;13479:2;13461:21;;;13498:18;;;13491:30;13557:34;13552:2;13537:18;;13530:62;13624:2;13609:18;;13277:356::o;14866:413::-;15068:2;15050:21;;;15107:2;15087:18;;;15080:30;15146:34;15141:2;15126:18;;15119:62;-1:-1:-1;;;15212:2:1;15197:18;;15190:47;15269:3;15254:19;;14866:413::o;15466:275::-;15537:2;15531:9;15602:2;15583:13;;-1:-1:-1;;15579:27:1;15567:40;;15637:18;15622:34;;15658:22;;;15619:62;15616:88;;;15684:18;;:::i;:::-;15720:2;15713:22;15466:275;;-1:-1:-1;15466:275:1:o;15746:128::-;15786:3;15817:1;15813:6;15810:1;15807:13;15804:39;;;15823:18;;:::i;:::-;-1:-1:-1;15859:9:1;;15746:128::o;15879:120::-;15919:1;15945;15935:35;;15950:18;;:::i;:::-;-1:-1:-1;15984:9:1;;15879:120::o;16004:125::-;16044:4;16072:1;16069;16066:8;16063:34;;;16077:18;;:::i;:::-;-1:-1:-1;16114:9:1;;16004:125::o;16134:258::-;16206:1;16216:113;16230:6;16227:1;16224:13;16216:113;;;16306:11;;;16300:18;16287:11;;;16280:39;16252:2;16245:10;16216:113;;;16347:6;16344:1;16341:13;16338:48;;;-1:-1:-1;;16382:1:1;16364:16;;16357:27;16134:258::o;16397:380::-;16476:1;16472:12;;;;16519;;;16540:61;;16594:4;16586:6;16582:17;16572:27;;16540:61;16647:2;16639:6;16636:14;16616:18;16613:38;16610:161;;;16693:10;16688:3;16684:20;16681:1;16674:31;16728:4;16725:1;16718:15;16756:4;16753:1;16746:15;16782:135;16821:3;-1:-1:-1;;16842:17:1;;16839:43;;;16862:18;;:::i;:::-;-1:-1:-1;16909:1:1;16898:13;;16782:135::o;16922:112::-;16954:1;16980;16970:35;;16985:18;;:::i;:::-;-1:-1:-1;17019:9:1;;16922:112::o;17039:127::-;17100:10;17095:3;17091:20;17088:1;17081:31;17131:4;17128:1;17121:15;17155:4;17152:1;17145:15;17171:127;17232:10;17227:3;17223:20;17220:1;17213:31;17263:4;17260:1;17253:15;17287:4;17284:1;17277:15;17303:127;17364:10;17359:3;17355:20;17352:1;17345:31;17395:4;17392:1;17385:15;17419:4;17416:1;17409:15;17435:127;17496:10;17491:3;17487:20;17484:1;17477:31;17527:4;17524:1;17517:15;17551:4;17548:1;17541:15;17567:127;17628:10;17623:3;17619:20;17616:1;17609:31;17659:4;17656:1;17649:15;17683:4;17680:1;17673:15;17699:131;-1:-1:-1;;;;;;17773:32:1;;17763:43;;17753:71;;17820:1;17817;17810:12
Swarm Source
ipfs://4a0ae6f4459a683146ee939805e422c2dcc73afadf8df86c0cc300829318fb8a
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.