Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 72078948 | 1041 days ago | 0 ETH | ||||
| 72064435 | 1041 days ago | 0 ETH | ||||
| 72064333 | 1041 days ago | 0 ETH | ||||
| 72058005 | 1041 days ago | 0 ETH | ||||
| 72017698 | 1041 days ago | 0 ETH | ||||
| 72014002 | 1041 days ago | 0 ETH | ||||
| 72013967 | 1041 days ago | 0 ETH | ||||
| 72008961 | 1041 days ago | 0 ETH | ||||
| 72008910 | 1041 days ago | 0 ETH | ||||
| 72008854 | 1041 days ago | 0 ETH | ||||
| 72008813 | 1041 days ago | 0 ETH | ||||
| 72008750 | 1041 days ago | 0 ETH | ||||
| 72008447 | 1041 days ago | 0 ETH | ||||
| 72008387 | 1041 days ago | 0 ETH | ||||
| 72008296 | 1041 days ago | 0 ETH | ||||
| 72008225 | 1041 days ago | 0 ETH | ||||
| 72001954 | 1041 days ago | 0 ETH | ||||
| 72001914 | 1041 days ago | 0 ETH | ||||
| 71991161 | 1041 days ago | 0 ETH | ||||
| 71991092 | 1041 days ago | 0 ETH | ||||
| 71991029 | 1041 days ago | 0 ETH | ||||
| 71985214 | 1041 days ago | 0 ETH | ||||
| 71985119 | 1041 days ago | 0 ETH | ||||
| 71984967 | 1041 days ago | 0 ETH | ||||
| 71984531 | 1041 days ago | 0 ETH |
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract NewBlindBox is ERC721EnumerableUpgradeable, OwnableUpgradeable {
using StringsUpgradeable for uint256;
mapping(address => bool) public admin; //
bytes32 public merkleRoot;
uint256 internal nonce;
mapping(uint256 => string) public cidMap; //key=; value=cid
mapping(address => mapping(uint256 => uint256)) public buyLimitList;
//// Events
struct EventInfo {
uint256 term; //
uint256 startTime; //
uint256 endTime; //
uint256 startTokenId; //
uint256 endTokenId; //
uint256 bought; //
uint256 price; //
uint256 buyLimit; //
bool whiteBool; //
}
uint256 public nowTerm; //()
mapping(uint256 => EventInfo) public eventInfos; //
mapping(uint256 => bool) public eventMap;
uint256[] public eventArray; //
mapping(uint256 => uint256[]) public indicesList; //tokenId
//
struct QualityWeight {
uint256 weight1; // n
uint256 weight2; // r
uint256 weight3; // sr
uint256 weight4; // ssr
}
// , nft
mapping(uint256 => uint256) public quality;
mapping(uint256 => QualityWeight) public qualityWeightList; // key=, value=
// token ,
mapping(uint256 => uint256) public tokenTerm; // key=tokenId, value=
event eventWithdraw(address indexed from, address indexed to, uint256 indexed tokenId, uint256 quality);
modifier checkAdmin()
{
require(admin[_msgSender()], "not admin");
_;
}
modifier checkEventsStatus()
{
require(eventMap[nowTerm], "No activity yet");
require(eventInfos[nowTerm].bought < eventInfos[nowTerm].endTokenId - eventInfos[nowTerm].startTokenId + 1, "Sold out");
require(buyLimitList[_msgSender()][nowTerm] < eventInfos[nowTerm].buyLimit, "The purchase quantity exceeds the upper limit");
require(msg.value >= eventInfos[nowTerm].price, "value error");
require(block.timestamp >= eventInfos[nowTerm].startTime, "Mint is not turned on");
require(block.timestamp < eventInfos[nowTerm].endTime, "Mint is closed");
_;
}
function initialize() public initializer
{
__ERC721_init("Starlight Edition", "Starlight Edition");
__Ownable_init();
}
function setAdmin(address _sender, bool _flag) public onlyOwner
{
admin[_sender] = _flag;
}
function _baseURI() internal override view virtual returns (string memory)
{
return cidMap[nowTerm];
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = cidMap[tokenTerm[tokenId]];
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), "/", quality[tokenId].toString())) : "";
}
function setCidMap(uint256 _term, string memory _cid) public checkAdmin
{
cidMap[_term] = _cid;
}
function setMerkleRoot(bytes32 _merkleRoot) public checkAdmin
{
merkleRoot = _merkleRoot;
}
function getMerkleLeaf(address _address) internal pure returns (bytes32)
{
return keccak256(abi.encodePacked(_address));
}
function checkMerkle(bytes32[] calldata _merkleProof, address _address) public view returns (bool)
{
return MerkleProof.verify(_merkleProof, merkleRoot, getMerkleLeaf(_address));
}
//
function setEventInfo(
uint256 _term,
uint256 _startTime,
uint256 _endTime,
uint256 _startTokenId,
uint256 _endTokenId,
uint256 _price,
uint256 _buyLimit,
bool _whiteBool
) public checkAdmin
{
require(!eventMap[_term], "There is already an event, please go to modify");
EventInfo memory o = EventInfo({
term : _term,
startTime : _startTime,
endTime : _endTime,
startTokenId : _startTokenId,
endTokenId : _endTokenId,
bought : 0,
price : _price ,
buyLimit : _buyLimit,
whiteBool : _whiteBool
});
eventInfos[_term] = o;
eventMap[_term] = true;
eventArray.push(_term);
uint256 total = _endTokenId - _startTokenId + 1;
uint256[] memory indices = new uint256[](total);
indicesList[_term] = indices;
}
//
function editEvents(
uint256 _term,
uint256 _startTime,
uint256 _endTime,
uint256 _buyLimit,
bool _whiteBool
) public checkAdmin
{
require(eventMap[_term], "There is no such event, please go to add");
eventInfos[_term].startTime = _startTime;
eventInfos[_term].endTime = _endTime;
eventInfos[_term].buyLimit = _buyLimit;
eventInfos[_term].whiteBool = _whiteBool;
}
//
function setQualityWeight(
uint256 _term,
uint256 _weight1,
uint256 _weight2,
uint256 _weight3,
uint256 _weight4
) public checkAdmin
{
require(_weight1 + _weight2 + _weight3 + _weight4 != 0, "quality weight argument error");
qualityWeightList[_term].weight1 = _weight1;
qualityWeightList[_term].weight2 = _weight2;
qualityWeightList[_term].weight3 = _weight3;
qualityWeightList[_term].weight4 = _weight4;
}
//
function setNowTerm(uint256 _term) public checkAdmin
{
nowTerm = _term;
}
function mint() external payable checkEventsStatus
{
require(!eventInfos[nowTerm].whiteBool, "Requires whitelist operation");
_mint(_msgSender());
}
function mintWithWhite(bytes32[] calldata _merkleProof) external payable checkEventsStatus
{
require(checkMerkle(_merkleProof, _msgSender()), "invalid merkle proof");
_mint(_msgSender());
}
function _mint(address _to) internal returns (uint) {
require(_to != address(0), "Cannot mint to 0x0");
require(eventInfos[nowTerm].startTokenId + eventInfos[nowTerm].bought - 1 < eventInfos[nowTerm].endTokenId, "Token limit reached");
uint id = randomIndex();
eventInfos[nowTerm].bought ++;
buyLimitList[_msgSender()][nowTerm] ++;
_safeMint(_msgSender(), id);
//
tokenTerm[id] = nowTerm;
quality[id] = randomQuality(tokenTerm[id]);
return id;
}
function randomIndex() internal returns (uint) {
uint totalSize = eventInfos[nowTerm].endTokenId - eventInfos[nowTerm].startTokenId - eventInfos[nowTerm].bought + 1;
uint index = uint(keccak256(abi.encodePacked(nonce, _msgSender(), block.difficulty, block.timestamp))) % totalSize;
uint value = 0;
if (indicesList[nowTerm][index] != 0) {
value = indicesList[nowTerm][index];
} else {
value = index;
}
// Move last value to selected position
if (indicesList[nowTerm][totalSize - 1] == 0) {
// Array position not initialized, so use position
indicesList[nowTerm][index] = totalSize - 1;
} else {
// Array position holds a value so use that
indicesList[nowTerm][index] = indicesList[nowTerm][totalSize - 1];
}
nonce++;
// // eventInfos[nowTerm].bought++;
// // Don't allow a zero index, start counting at 1
return value + eventInfos[nowTerm].startTokenId;
}
function randomQuality(uint256 _term) internal returns (uint) {
uint totalWeight = qualityWeightList[_term].weight1 + qualityWeightList[_term].weight2 +
qualityWeightList[_term].weight3 + qualityWeightList[_term].weight4;
require(totalWeight != 0, "total weight error");
nonce++;
uint weight = uint(keccak256(abi.encodePacked(nonce, _msgSender(), block.difficulty, block.timestamp))) % totalWeight;
uint curWeight = qualityWeightList[_term].weight1;
if (weight < curWeight)
return 10;
curWeight += qualityWeightList[_term].weight2;
if (weight < curWeight)
return 20;
curWeight += qualityWeightList[_term].weight3;
if (weight < curWeight)
return 30;
return 40;
}
function getAllTokensByOwner(address _account) external view returns (uint256[] memory)
{
uint256 length = balanceOf(_account);
uint256[] memory result = new uint256[](length);
for (uint i = 0; i < length; i++)
result[i] = tokenOfOwnerByIndex(_account, i);
return result;
}
struct ReturnTokenInfo {
uint256 tokenId;
uint256 quality;
}
function getAddressAllTokenIdAndQuality(address _account) external view returns (ReturnTokenInfo[] memory)
{
uint256 length = balanceOf(_account);
ReturnTokenInfo[] memory result = new ReturnTokenInfo[](length);
for (uint i = 0; i < length; i++) {
uint256 tokenId = tokenOfOwnerByIndex(_account, i);
ReturnTokenInfo memory o = ReturnTokenInfo({
tokenId: tokenId,
quality: quality[tokenId]
});
result[i] = o;
}
return result;
}
//
function extract(address payable _address) public checkAdmin
{
_address.transfer(address(this).balance);
}
// ,
function withdraw(address _from, address _to, uint256 _tokenId, uint256 _quality) external checkAdmin
{
if (!_exists(_tokenId))
{
_safeMint(_to, _tokenId);
quality[_tokenId] = _quality;
}
else
{
safeTransferFrom(_from, _to, _tokenId);
if (quality[_tokenId] != _quality)
{
quality[_tokenId] = _quality;
}
}
emit eventWithdraw(_from, _to, _tokenId, _quality);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
function __ERC721Enumerable_init() internal onlyInitializing {
}
function __ERC721Enumerable_init_unchained() internal onlyInitializing {
}
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {
return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @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 override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721Upgradeable.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[46] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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 {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
* consuming from one or the other at each step according to the instructions given by
* `proofFlags`.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
using AddressUpgradeable for address;
using StringsUpgradeable for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// 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;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC721_init_unchained(name_, symbol_);
}
function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
return
interfaceId == type(IERC721Upgradeable).interfaceId ||
interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @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) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721Upgradeable.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_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: caller is not token 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: caller is not token 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 _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721Upgradeable.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `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);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(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 = ERC721Upgradeable.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(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(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect 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);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @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` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[44] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../IERC721Upgradeable.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
/**
* @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);
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
* initialization step. This is essential to configure modules that are added through upgrades and that require
* initialization.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165Upgradeable.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721Upgradeable is IERC165Upgradeable {
/**
* @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`.
*
* 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;
/**
* @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 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 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 the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721ReceiverUpgradeable {
/**
* @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 `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721Upgradeable.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
/**
* @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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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");
(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");
(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");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.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 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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @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] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165Upgradeable).interfaceId;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165Upgradeable {
/**
* @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);
}{
"optimizer": {
"enabled": true,
"runs": 1
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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"},{"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"},{"indexed":false,"internalType":"uint256","name":"quality","type":"uint256"}],"name":"eventWithdraw","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"buyLimitList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_address","type":"address"}],"name":"checkMerkle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cidMap","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_term","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_buyLimit","type":"uint256"},{"internalType":"bool","name":"_whiteBool","type":"bool"}],"name":"editEvents","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"eventArray","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"eventInfos","outputs":[{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"startTokenId","type":"uint256"},{"internalType":"uint256","name":"endTokenId","type":"uint256"},{"internalType":"uint256","name":"bought","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"buyLimit","type":"uint256"},{"internalType":"bool","name":"whiteBool","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"eventMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"extract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAddressAllTokenIdAndQuality","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"quality","type":"uint256"}],"internalType":"struct NewBlindBox.ReturnTokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAllTokensByOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"indicesList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintWithWhite","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nowTerm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"quality","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"qualityWeightList","outputs":[{"internalType":"uint256","name":"weight1","type":"uint256"},{"internalType":"uint256","name":"weight2","type":"uint256"},{"internalType":"uint256","name":"weight3","type":"uint256"},{"internalType":"uint256","name":"weight4","type":"uint256"}],"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":"_sender","type":"address"},{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setAdmin","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":"uint256","name":"_term","type":"uint256"},{"internalType":"string","name":"_cid","type":"string"}],"name":"setCidMap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_term","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_startTokenId","type":"uint256"},{"internalType":"uint256","name":"_endTokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_buyLimit","type":"uint256"},{"internalType":"bool","name":"_whiteBool","type":"bool"}],"name":"setEventInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_term","type":"uint256"}],"name":"setNowTerm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_term","type":"uint256"},{"internalType":"uint256","name":"_weight1","type":"uint256"},{"internalType":"uint256","name":"_weight2","type":"uint256"},{"internalType":"uint256","name":"_weight3","type":"uint256"},{"internalType":"uint256","name":"_weight4","type":"uint256"}],"name":"setQualityWeight","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":"","type":"uint256"}],"name":"tokenTerm","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":[],"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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quality","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60808060405234610016576132d3908161001c8239f35b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714611c965750806306fdde0314611bf0578063081812fc14611bd0578063095ea7b314611a715780630e74868314611a405780631249c58b146118fc57806317a80bdb1461187757806318160ddd1461185857806323b872dd1461183257806325115923146117565780632eb4a7ab146117375780632f745c591461170e57806331b89088146115de57806342842e0e146115c55780634b0bddd21461157f5780634f6ccce7146114fa578063550eccab146114b05780636352211e1461147f57806363a846f814611441578063691812cd146113f457806370a08231146113c7578063715018a6146113795780637b7bb4d91461134c5780637bfe950c146112845780637cb64759146112545780638129fc1c14610f0c5780638da5cb5b14610ee357806395d89b4114610e0257806396a2f85514610dc1578063a22cb46514610d00578063a536528d14610cd8578063b88d4fde14610c4e578063b9c7a3b414610c1e578063bf9c97d414610be2578063c070a5f514610bc2578063c2cd1d9e14610a61578063c3b66952146108f057838163c7a5d2851461088857508063c87b56dd14610765578063d0649c98146104db578063daf254ab14610491578063e535c357146103d6578063e985e9c514610388578063e9fda7d4146102db578063ed094522146102b35763f2fde38b1461021f57600080fd5b346102af5760203660031901126102af57610238611d76565b90610241612005565b6001600160a01b0382161561025d575061025a9061205d565b51f35b608490602084519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50346102af5760203660031901126102af576020928291358152610107845220549051908152f35b50503461038457602090816003193601126102af57916102f9611d76565b9061030382612099565b61030c81612b2b565b92825b8281106103575750505083519383808695860192818752855180945286019401925b82811061034057505050500390f35b835185528695509381019392810192600101610331565b8061036a61037a9284999798969961278f565b6103748289612b17565b526128ff565b959294939561030f565b5080fd5b50503461038457806003193601126103845760ff816020936103a8611d76565b6103b0611d91565b6001600160a01b039182168352606a875283832091168252855220549151911615158152f35b50346102af5760a03660031901126102af57602435604435606435916084359333875260fb60205261040d60ff87892054166129f2565b6104248561041f8661041f8787612333565b612333565b1561044e573586526101066020528486205560018486200155600283852001556003828420015551f35b606490602087519162461bcd60e51b8352820152601d60248201527f7175616c6974792077656967687420617267756d656e74206572726f720000006044820152fd5b5091346104d857816003193601126104d857602435923581526101046020528181209081548410156104d857506020926104ca91611f0d565b91905490519160031b1c8152f35b80fd5b50346102af576101009081600319360112610761578035906064356084359260e4359182151580930361075d5733885260209260fb845261052160ff898b2054166129f2565b8289526101029081855260ff898b2054166107035788519061012082016001600160401b038111838210176106f0578a52848252858201986024358a528b8b8085019b6044358d526060860188815260808701918d835260a088019385855260c089019560a435875260e08a019760c43589528a019889528d8d825261010190522097518855519d60019e8f890155516002880155516003870155518a86015551600585015551600684015551600783015551151590600801906105e4916125ba565b8352868820805460ff1916871790556101038054600160401b9691878210156106dd578882018082558210156106ca578a52848a20018390556106279190612312565b60011981116106b7578561063b9101612b2b565b90875261010482528587209281519485116106a457508190835485855580861061068a575b500191865280862086925b84841061067757878751f35b805182559285019290850190820161066b565b84895282892061069e9181019087016128e8565b38610660565b634e487b7160e01b885260419052602487fd5b634e487b7160e01b885260118452602488fd5b634e487b7160e01b8b526032875260248bfd5b634e487b7160e01b8b526041875260248bfd5b634e487b7160e01b8c526041885260248cfd5b885162461bcd60e51b8152808701869052602e60248201527f546865726520697320616c726561647920616e206576656e742c20706c65617360448201526d6520676f20746f206d6f6469667960901b6064820152608490fd5b8780fd5b8380fd5b5091346104d857602090816003193601126104d85783359061078e610789836125cb565b612110565b818152610107835283812054815260fe83526107ab848220611f5f565b8051909590156108495750602184956107de6108459596610834946107cf8761292e565b9681526101058952205461292e565b875194826107f587945180928b8088019101611d1c565b8301610809825180938b8085019101611d1c565b01602f60f81b88820152610825825180938a8785019101611d1c565b01036001810184520182611e67565b925b51928284938452830190611d51565b0390f35b845190955091508282016001600160401b03811183821017610875578452815292509061084590610836565b634e487b7160e01b825260418652602482fd5b9190503461038457602036600319011261038457356001600160a01b03811690819003610384578180809233825260fb6020526108ca60ff87842054166129f2565b47908282156108e7575bf1156108dd5751f35b51903d90823e3d90fd5b506108fc6108d4565b509190346103845780600319360112610384576001600160401b03926024358481116107615736602382011215610761576109349036906024818501359101611ea5565b93338452602060fb815261094d60ff85872054166129f2565b8235855260fe8152838520928651928311610a4e575061096d8354611f25565b601f8111610a15575b5080601f83116001146109b25750849582939495926109a7575b50508160011b916000199060031b1c191617905551f35b015190503880610990565b90601f198316968487528287209287905b8982106109fd57505083600195969798106109e4575b505050811b01905551f35b015160001960f88460031b161c191690553880806109d9565b806001859682949686015181550195019301906109c3565b610a3e90848752828720601f850160051c810191848610610a44575b601f0160051c01906128e8565b38610976565b9091508190610a31565b634e487b7160e01b865260419052602485fd5b509190602092836003193601126102af5780356001600160401b03811161076157610a8f9036908301611deb565b949061010054958686526101028352610aad60ff8688205416612b5d565b8686526101018084526005868820015497610ad486888a2001546003898b20015490612312565b6001198111610baf57610b6495969798996001610af2920111612b9b565b33895260ff8652878920818a528652610b18888a205483885260078a8c20015411612bd2565b808952818652610b306006898b200154341015612c34565b808952818652610b486001898b200154421015612c6e565b88528452610b5d600287892001544210612cb2565b3391612a41565b15610b78575050610b7433612cef565b5051f35b606492519162461bcd60e51b8352820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b6044820152fd5b634e487b7160e01b895260118752602489fd5b505034610384578160031936011261038457602090610100549051908152f35b50346102af5760203660031901126102af578161084593610c0b9235815260fe60205220611f5f565b9051918291602083526020830190611d51565b50346102af5760203660031901126102af5735610103805482101561076157835260209283902001549051908152f35b50346102af5760803660031901126102af57610c68611d76565b90610c71611d91565b6064359290604435906001600160401b038511610cd45736602386011215610cd457610cac610ccf9486602461025a98369301359101611ea5565b92610cbf610cba84336122a4565b6121a4565b610cca83838361233f565b612704565b612280565b8680fd5b50346102af5760203660031901126102af576020928291358152610105845220549051908152f35b50346102af57816003193601126102af57610d19611d76565b610d21611ddc565b6001600160a01b0390911691338314610d825750338452606a602052828420828552602052610d52818486206125ba565b825190151581527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a351f35b606490602085519162461bcd60e51b8352820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152fd5b50503461038457806003193601126103845760209181906001600160a01b03610de8611d76565b16815260ff84528181206024358252845220549051908152f35b50503461038457816003193601126103845780519082606654610e2481611f25565b80855290600190818116908115610ebb5750600114610e62575b505050610e5082610845940383611e67565b51918291602083526020830190611d51565b60668352602095507f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943545b828410610ea8575050508261084594610e509282010194610e3e565b8054868501880152928601928101610e8c565b6108459750610e509450602092508693915060ff191682840152151560051b82010194610e3e565b50503461038457816003193601126103845760c95490516001600160a01b039091168152602090f35b50346102af57826003193601126102af5782549060ff8260081c161590818092611247575b8015611230575b156111d657600192828460ff1983161787556111c5575b50610f5861285b565b610f6061285b565b610f7960ff885460081c16610f7481612888565b612888565b81516001600160401b0393908481116111b25780610f98606554611f25565b94601f95868111611183575b50602090868311600114611122578b92611117575b5050600019600383901b1c191690871b176065555b81519384116106a45750908291610fe6606654611f25565b8281116110de575b50602091831160011461107d578792611072575b5050600019600383901b1c191690831b176066555b61102b60ff855460081c16610f7481612888565b6110343361205d565b61103c575051f35b60207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001985541685558351908152a151f35b015190503880611002565b606688528188208694509190601f198416895b8181106110c6575084116110ad575b505050811b01606655611017565b015160001960f88460031b161c1916905538808061109f565b82840151855588969094019360209384019301611090565b6111089060668a5260208a208480870160051c8201926020881061110e575b0160051c01906128e8565b38610fee565b925081926110fd565b015190503880610fb9565b60658c52818c208a94509190601f1984168d5b81811061116b57508411611152575b505050811b01606555610fce565b015160001960f88460031b161c19169055388080611144565b8284015185558c969094019360209384019301611135565b6111ac9060658d5260208d208880860160051c8201926020871061110e570160051c01906128e8565b38610fa4565b634e487b7160e01b895260418252602489fd5b61ffff191661010117855538610f4f565b608490602085519162461bcd60e51b8352820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152fd5b50303b158015610f385750600160ff841614610f38565b50600160ff841610610f31565b50346102af5760203660031901126102af5733835260fb60205261127d60ff83852054166129f2565b3560fc5551f35b5050346103845760803660031901126103845761129f611d76565b6112a7611d91565b90604435917fb8fb9813b7cb1fcfdeb933deafc7c2bcfe1a8975fd114f04a0ce9b2c866eb28760206064359233885260fb82526112e960ff888a2054166129f2565b6112f2866125cb565b611325576113008682612f98565b858852610105825283878920555b86519384526001600160a01b03908116941692a451f35b611330868287612207565b858852610105825286882054841461130e57838789205561130e565b50346102af5760203660031901126102af578160209360ff92358152610102855220541690519015158152f35b505034610384578160031936011261038457611393612005565b60c980546001600160a01b0319811690915590519082906001600160a01b031660008051602061323e8339815191528284a3f35b505034610384576020366003190112610384576020906113ed6113e8611d76565b612099565b9051908152f35b5091346104d857816003193601126104d8578235906001600160401b0382116104d8575061142a60209361143892369101611deb565b611432611d91565b91612a41565b90519015158152f35b5050346103845760203660031901126103845760209160ff9082906001600160a01b0361146c611d76565b16815260fb855220541690519015158152f35b5091346104d85760203660031901126104d8575061149f60209235612157565b90516001600160a01b039091168152f35b50346102af5760203660031901126102af57608092829135815261010660205220908154916001810154916003600283015492015492815194855260208501528301526060820152f35b5082346104d85760203660031901126104d85750803590609954821015611527576020836104ca84611edc565b608490602084519162461bcd60e51b8352820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152fd5b50503461038457806003193601126103845761025a61159c611d76565b6115a4611ddc565b906115ad612005565b6001600160a01b0316845260fb6020528284206125ba565b5050346103845761025a6115d836611da7565b91612207565b50503461038457602090816003193601126102af57916115fc611d76565b9061160682612099565b61160f81612a2a565b9261161c86519485611e67565b818452601f1961162b83612a2a565b01835b8181106116e4575050825b82811061168e57505050835193838594850191818652845180935281818701950193905b83821061166a5786860387f35b8451805187528301518684015287965094850194938201936001919091019061165d565b806116a16116da9284999798969961278f565b8089526101058652868920548751916116b983611e1b565b8252868201526116c98289612b17565b526116d48188612b17565b506128ff565b9592949395611639565b95879596819598516116f581611e1b565b898152898382015282828a01015201969395949661162e565b5050346103845780600319360112610384576020906113ed61172e611d76565b6024359061278f565b50503461038457816003193601126103845760209060fc549051908152f35b50346102af5760a03660031901126102af57803560843591821515830361182e5733855260fb60205261178e60ff85872054166129f2565b81855261010260205260ff8486205416156117da57509061025a9184526101016020526024356001848620015560443560028486200155606435600784862001556008838520016125ba565b608490602085519162461bcd60e51b8352820152602860248201527f5468657265206973206e6f2073756368206576656e742c20706c6561736520676044820152671bc81d1bc818591960c21b6064820152fd5b8480fd5b5050346103845761025a61184536611da7565b91611853610cba84336122a4565b61233f565b5050346103845781600319360112610384576020906099549051908152f35b50346102af5760203660031901126102af57816101209382358152610101602052208054926001820154926002830154906003840154908401549060058501549260068601549460ff6008600789015498015416978151998a5260208a01528801526060870152608086015260a085015260c084015260e08301521515610100820152f35b50826003193601126102af5761010054808452602090610102825261192660ff8587205416612b5d565b808552610101908183526005858720015461194d8587892001546003888a20015490612312565b6001198111611a2d57906001611964920111612b9b565b33865260ff8352848620818752835261198a858720548385526007878920015411612bd2565b8086528183526119a260068688200154341015612c34565b8086528183526119ba60018688200154421015612c6e565b8086528183526119d1600286882001544210612cb2565b8552815260ff60088486200154166119ee575050610b7433612cef565b606492519162461bcd60e51b8352820152601c60248201527b2932b8bab4b932b9903bb434ba32b634b9ba1037b832b930ba34b7b760211b6044820152fd5b634e487b7160e01b885260118652602488fd5b50346102af5760203660031901126102af5733835260fb602052611a6960ff83852054166129f2565b356101005551f35b50346102af57816003193601126102af57611a8a611d76565b602435916001600160a01b03908180611aa286612157565b16931692808414611b8357803314908115611b64575b5015611afb5750828552606960205283852080546001600160a01b03191683179055611ae383612157565b1692519260008051602061327e8339815191528585a4f35b608490602086519162461bcd60e51b8352820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b90508652606a60205284862033875260205260ff858720541638611ab8565b855162461bcd60e51b8152602081840152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b5091346104d85760203660031901126104d8575061149f6020923561217d565b50503461038457816003193601126103845780519082606554611c1281611f25565b80855290600190818116908115610ebb5750600114611c3d57505050610e5082610845940383611e67565b60658352602095507f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c75b828410611c83575050508261084594610e509282010194610e3e565b8054868501880152928601928101611c67565b925050346102af5760203660031901126102af573563ffffffff60e01b81168091036102af576020925063780e9d6360e01b8114908115611cd9575b5015158152f35b6380ac58cd60e01b811491508115611d0b575b8115611cfa575b5038611cd2565b6301ffc9a760e01b14905038611cf3565b635b5e139f60e01b81149150611cec565b918091926000905b828210611d3c575011611d35575050565b6000910152565b91508060209183015181860152018291611d24565b90602091611d6a81518092818552858086019101611d1c565b601f01601f1916010190565b600435906001600160a01b0382168203611d8c57565b600080fd5b602435906001600160a01b0382168203611d8c57565b6060906003190112611d8c576001600160a01b03906004358281168103611d8c57916024359081168103611d8c579060443590565b602435908115158203611d8c57565b9181601f84011215611d8c578235916001600160401b038311611d8c576020808501948460051b010111611d8c57565b604081019081106001600160401b03821117611e3657604052565b634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b03821117611e3657604052565b601f909101601f19168101906001600160401b03821190821017611e3657604052565b6001600160401b038111611e3657601f01601f191660200190565b929192611eb182611e8a565b91611ebf6040519384611e67565b829481845281830111611d8c578281602093846000960137010152565b609954811015611ef757609960005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b8054821015611ef75760005260206000200190600090565b90600182811c92168015611f55575b6020831014611f3f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f34565b9060405191826000825492611f7384611f25565b908184526001948581169081600014611fe25750600114611f9f575b5050611f9d92500383611e67565b565b9093915060005260209081600020936000915b818310611fca575050611f9d93508201013880611f8f565b85548884018501529485019487945091830191611fb2565b915050611f9d94506020925060ff191682840152151560051b8201013880611f8f565b60c9546001600160a01b0316330361201957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60c980546001600160a01b039283166001600160a01b0319821681179092556040519192169060008051602061323e83398151915290600090a3565b6001600160a01b031680156120b957600052606860205260406000205490565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b1561211757565b60405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606490fd5b6000908152606760205260409020546001600160a01b031661217a811515612110565b90565b612189610789826125cb565b6000908152606960205260409020546001600160a01b031690565b156121ab57565b60405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608490fd5b611f9d92610ccf926040519261221c84611e4c565b60008452610cbf610cba84336122a4565b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b1561228757565b60405162461bcd60e51b8152806122a06004820161222d565b0390fd5b906001600160a01b0380806122b884612157565b169316918383149384156122eb575b5083156122d5575b50505090565b6122e19192935061217d565b16143880806122cf565b909350600052606a60205260406000208260005260205260ff6040600020541692386122c7565b81811061231d570390565b634e487b7160e01b600052601160045260246000fd5b8119811161231d570190565b9061234983612157565b6001600160a01b038381169290918216839003612567578181169384156125165783612480575060995485600052609a60205260406000205561238b8561281d565b82840361244d575b50600084815260696020526040812080546001600160a01b031990811690915590916123be86612157565b169085836040519360008051602061327e8339815191528286a4838352606860205260408320805460018110612439576000190190558483526068602052604083208054600119811161243957600101905585835260676020526040832080549091168517905560008051602061325e8339815191529190a4565b634e487b7160e01b85526011600452602485fd5b61245690612099565b60406000858152609760205281812083825260205286828220558681526098602052205538612393565b84840361248e575b5061238b565b61249790612099565b6001811061231d576000190160009086825260209060988252604091828420548281036124df575b508884528383812055868452609781528284209184525281205538612488565b87855260978252838520838652825283852054888652609783528486208287528352808587205585526098825283852055386124bf565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b9060ff801983541691151516179055565b6000908152606760205260409020546001600160a01b0316151590565b9192600092909190803b156126fa57612636946040518092630a85bd0160e11b9485835233600484015287602484015260448301526080606483015281878160209a8b966084830190611d51565b03926001600160a01b03165af18491816126ba575b506126a9575050503d6000146126a1573d61266581611e8a565b906126736040519283611e67565b81528091833d92013e5b8051918261269e5760405162461bcd60e51b8152806122a06004820161222d565b01fd5b50606061267d565b6001600160e01b0319161492509050565b9091508581813d83116126f3575b6126d28183611e67565b8101031261182e57516001600160e01b03198116810361182e57903861264b565b503d6126c8565b5050915050600190565b9293600093909291803b156127845794849161275e9660405180948193630a85bd0160e11b9788845233600485015260018060a01b0380921660248501526044840152608060648401528260209b8c976084830190611d51565b0393165af18491816126ba57506126a9575050503d6000146126a1573d61266581611e8a565b505050915050600190565b61279881612099565b8210156127c45760018060a01b0316600052609760205260406000209060005260205260406000205490565b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b60995490600160401b821015611e3657612840826001611f9d9401609955611edc565b90919082549060031b600019811b9283911b16911916179055565b6040519061286882611e1b565b601182527029ba30b93634b3b43a1022b234ba34b7b760791b6020830152565b1561288f57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b8181106128f3575050565b600081556001016128e8565b600019811461231d5760010190565b8115612918570690565b634e487b7160e01b600052601260045260246000fd5b80156129d45780816000925b6129be575061294882611e8a565b916129566040519384611e67565b80835281601f1961296683611e8a565b013660208601375b61297757505090565b806001811061231d576000190191600a9182820660308119811161231d578651861015611ef7570160f81b6001600160f81b03191660001a908501601f015304908161296e565b90916129cb600a916128ff565b9291048061293a565b506040516129e181611e1b565b60018152600360fc1b602082015290565b156129f957565b60405162461bcd60e51b81526020600482015260096024820152683737ba1030b236b4b760b91b6044820152606490fd5b6001600160401b038111611e365760051b60200190565b909260fc54926040928351916020928381019160018060601b03199060601b16825260148152612a7081611e1b565b51902090612a7d87612a2a565b96612a8a86519889611e67565b8088528388019060051b820191368311611d8c578490915b838310612b075750505050916000925b8651841015612afd57612ac58488612b17565b519085600083831015612aed5750506000528252612ae7846000205b936128ff565b92612ab2565b9091612ae7938252855220612ae1565b9350945050501490565b8235815291810191859101612aa2565b8051821015611ef75760209160051b010190565b90612b3582612a2a565b612b426040519182611e67565b8281528092612b53601f1991612a2a565b0190602036910137565b15612b6457565b60405162461bcd60e51b815260206004820152600f60248201526e139bc81858dd1a5d9a5d1e481e595d608a1b6044820152606490fd5b15612ba257565b60405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606490fd5b15612bd957565b60405162461bcd60e51b815260206004820152602d60248201527f546865207075726368617365207175616e74697479206578636565647320746860448201526c19481d5c1c195c881b1a5b5a5d609a1b6064820152608490fd5b15612c3b57565b60405162461bcd60e51b815260206004820152600b60248201526a3b30b63ab29032b93937b960a91b6044820152606490fd5b15612c7557565b60405162461bcd60e51b815260206004820152601560248201527426b4b73a1034b9903737ba103a3ab93732b21037b760591b6044820152606490fd5b15612cb957565b60405162461bcd60e51b815260206004820152600e60248201526d135a5b9d081a5cc818db1bdcd95960921b6044820152606490fd5b6001600160a01b031615612f5e5761010080549060009180835261010192602092848452600394604093612d2f8786862001546005878720015490612333565b60018110612439578185528287526004868620015490600019011015612f2457808452818652612d81612d6e6004878720015489888820015490612312565b8286528388526005878720015490612312565b906001198211612439576001820191612dc88360fd54612db2612dc08c8c51928391820194429044903390886130ef565b03601f198101835282611e67565b51902061290e565b9180875261010490818a52612ddf848a8a20611f0d565b9054908c1b1c15612f1d57808852818a52612dfc848a8a20611f0d565b9054908c1b1c945b818952828b5260018a8a209110612f0957908b8b8a612e2a87612e709a99989796611f0d565b905490841b1c612ed65750505050612e4e926128409188548a528b52898920611f0d565b612e5960fd546128ff565b60fd55835497888652838852868620015490612333565b9583528452600583832001612e8581546128ff565b905533825260ff8452828220815483528452828220612ea481546128ff565b9055612eb08533612f98565b54848252610107845282822055610105612ecc8383205461311d565b9385835252205590565b839585612840969493612f049996612ef29452528d8d20611f0d565b9054911b1c938a528b52898920611f0d565b612e4e565b634e487b7160e01b89526011600452602489fd5b8394612e04565b845162461bcd60e51b8152600481018790526013602482015272151bdad95b881b1a5b5a5d081c995858da1959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526012602482015271043616e6e6f74206d696e7420746f203078360741b6044820152606490fd5b90604091825192612fa884611e4c565b60008085526001600160a01b0383169182156130ac57612fc7856125cb565b61306a57609954858352602090609a825282842055612fe58661281d565b612fee85612099565b8484526097825282842081855282528683852055868452609882528284205583835260688152818320805460011981116124395760010190558583526067905280822080546001600160a01b0319168417905551611f9d95610ccf95909490939092849260008051602061325e833981519152908290a46125e8565b5162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606490fd5b5162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606490fd5b90815260609190911b6001600160601b03191660208201526034810191909152605481019190915260740190565b600090808252610106602091818352604061316e61315b613148838820546001858a20015490612333565b8488528587526002848920015490612333565b8387528486526003838820015490612333565b8015613204576131a09061318360fd546128ff565b8060fd558351612dc081612db28a820194429044903390886130ef565b94828152838552818120548087106131f857828220600101546131c291612333565b938487106131ec576131dd9560029483525220015490612333565b116131e757602890565b601e90565b50505050505050601490565b50505050505050600a90565b815162461bcd60e51b81526004810186905260126024820152713a37ba30b6103bb2b4b3b43a1032b93937b960711b6044820152606490fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a264697066735822122013d0c534dda684a345b1529f8143755a9bd25d970433921b3dea2b385a84686164736f6c634300080f0033
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714611c965750806306fdde0314611bf0578063081812fc14611bd0578063095ea7b314611a715780630e74868314611a405780631249c58b146118fc57806317a80bdb1461187757806318160ddd1461185857806323b872dd1461183257806325115923146117565780632eb4a7ab146117375780632f745c591461170e57806331b89088146115de57806342842e0e146115c55780634b0bddd21461157f5780634f6ccce7146114fa578063550eccab146114b05780636352211e1461147f57806363a846f814611441578063691812cd146113f457806370a08231146113c7578063715018a6146113795780637b7bb4d91461134c5780637bfe950c146112845780637cb64759146112545780638129fc1c14610f0c5780638da5cb5b14610ee357806395d89b4114610e0257806396a2f85514610dc1578063a22cb46514610d00578063a536528d14610cd8578063b88d4fde14610c4e578063b9c7a3b414610c1e578063bf9c97d414610be2578063c070a5f514610bc2578063c2cd1d9e14610a61578063c3b66952146108f057838163c7a5d2851461088857508063c87b56dd14610765578063d0649c98146104db578063daf254ab14610491578063e535c357146103d6578063e985e9c514610388578063e9fda7d4146102db578063ed094522146102b35763f2fde38b1461021f57600080fd5b346102af5760203660031901126102af57610238611d76565b90610241612005565b6001600160a01b0382161561025d575061025a9061205d565b51f35b608490602084519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50346102af5760203660031901126102af576020928291358152610107845220549051908152f35b50503461038457602090816003193601126102af57916102f9611d76565b9061030382612099565b61030c81612b2b565b92825b8281106103575750505083519383808695860192818752855180945286019401925b82811061034057505050500390f35b835185528695509381019392810192600101610331565b8061036a61037a9284999798969961278f565b6103748289612b17565b526128ff565b959294939561030f565b5080fd5b50503461038457806003193601126103845760ff816020936103a8611d76565b6103b0611d91565b6001600160a01b039182168352606a875283832091168252855220549151911615158152f35b50346102af5760a03660031901126102af57602435604435606435916084359333875260fb60205261040d60ff87892054166129f2565b6104248561041f8661041f8787612333565b612333565b1561044e573586526101066020528486205560018486200155600283852001556003828420015551f35b606490602087519162461bcd60e51b8352820152601d60248201527f7175616c6974792077656967687420617267756d656e74206572726f720000006044820152fd5b5091346104d857816003193601126104d857602435923581526101046020528181209081548410156104d857506020926104ca91611f0d565b91905490519160031b1c8152f35b80fd5b50346102af576101009081600319360112610761578035906064356084359260e4359182151580930361075d5733885260209260fb845261052160ff898b2054166129f2565b8289526101029081855260ff898b2054166107035788519061012082016001600160401b038111838210176106f0578a52848252858201986024358a528b8b8085019b6044358d526060860188815260808701918d835260a088019385855260c089019560a435875260e08a019760c43589528a019889528d8d825261010190522097518855519d60019e8f890155516002880155516003870155518a86015551600585015551600684015551600783015551151590600801906105e4916125ba565b8352868820805460ff1916871790556101038054600160401b9691878210156106dd578882018082558210156106ca578a52848a20018390556106279190612312565b60011981116106b7578561063b9101612b2b565b90875261010482528587209281519485116106a457508190835485855580861061068a575b500191865280862086925b84841061067757878751f35b805182559285019290850190820161066b565b84895282892061069e9181019087016128e8565b38610660565b634e487b7160e01b885260419052602487fd5b634e487b7160e01b885260118452602488fd5b634e487b7160e01b8b526032875260248bfd5b634e487b7160e01b8b526041875260248bfd5b634e487b7160e01b8c526041885260248cfd5b885162461bcd60e51b8152808701869052602e60248201527f546865726520697320616c726561647920616e206576656e742c20706c65617360448201526d6520676f20746f206d6f6469667960901b6064820152608490fd5b8780fd5b8380fd5b5091346104d857602090816003193601126104d85783359061078e610789836125cb565b612110565b818152610107835283812054815260fe83526107ab848220611f5f565b8051909590156108495750602184956107de6108459596610834946107cf8761292e565b9681526101058952205461292e565b875194826107f587945180928b8088019101611d1c565b8301610809825180938b8085019101611d1c565b01602f60f81b88820152610825825180938a8785019101611d1c565b01036001810184520182611e67565b925b51928284938452830190611d51565b0390f35b845190955091508282016001600160401b03811183821017610875578452815292509061084590610836565b634e487b7160e01b825260418652602482fd5b9190503461038457602036600319011261038457356001600160a01b03811690819003610384578180809233825260fb6020526108ca60ff87842054166129f2565b47908282156108e7575bf1156108dd5751f35b51903d90823e3d90fd5b506108fc6108d4565b509190346103845780600319360112610384576001600160401b03926024358481116107615736602382011215610761576109349036906024818501359101611ea5565b93338452602060fb815261094d60ff85872054166129f2565b8235855260fe8152838520928651928311610a4e575061096d8354611f25565b601f8111610a15575b5080601f83116001146109b25750849582939495926109a7575b50508160011b916000199060031b1c191617905551f35b015190503880610990565b90601f198316968487528287209287905b8982106109fd57505083600195969798106109e4575b505050811b01905551f35b015160001960f88460031b161c191690553880806109d9565b806001859682949686015181550195019301906109c3565b610a3e90848752828720601f850160051c810191848610610a44575b601f0160051c01906128e8565b38610976565b9091508190610a31565b634e487b7160e01b865260419052602485fd5b509190602092836003193601126102af5780356001600160401b03811161076157610a8f9036908301611deb565b949061010054958686526101028352610aad60ff8688205416612b5d565b8686526101018084526005868820015497610ad486888a2001546003898b20015490612312565b6001198111610baf57610b6495969798996001610af2920111612b9b565b33895260ff8652878920818a528652610b18888a205483885260078a8c20015411612bd2565b808952818652610b306006898b200154341015612c34565b808952818652610b486001898b200154421015612c6e565b88528452610b5d600287892001544210612cb2565b3391612a41565b15610b78575050610b7433612cef565b5051f35b606492519162461bcd60e51b8352820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b6044820152fd5b634e487b7160e01b895260118752602489fd5b505034610384578160031936011261038457602090610100549051908152f35b50346102af5760203660031901126102af578161084593610c0b9235815260fe60205220611f5f565b9051918291602083526020830190611d51565b50346102af5760203660031901126102af5735610103805482101561076157835260209283902001549051908152f35b50346102af5760803660031901126102af57610c68611d76565b90610c71611d91565b6064359290604435906001600160401b038511610cd45736602386011215610cd457610cac610ccf9486602461025a98369301359101611ea5565b92610cbf610cba84336122a4565b6121a4565b610cca83838361233f565b612704565b612280565b8680fd5b50346102af5760203660031901126102af576020928291358152610105845220549051908152f35b50346102af57816003193601126102af57610d19611d76565b610d21611ddc565b6001600160a01b0390911691338314610d825750338452606a602052828420828552602052610d52818486206125ba565b825190151581527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a351f35b606490602085519162461bcd60e51b8352820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152fd5b50503461038457806003193601126103845760209181906001600160a01b03610de8611d76565b16815260ff84528181206024358252845220549051908152f35b50503461038457816003193601126103845780519082606654610e2481611f25565b80855290600190818116908115610ebb5750600114610e62575b505050610e5082610845940383611e67565b51918291602083526020830190611d51565b60668352602095507f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943545b828410610ea8575050508261084594610e509282010194610e3e565b8054868501880152928601928101610e8c565b6108459750610e509450602092508693915060ff191682840152151560051b82010194610e3e565b50503461038457816003193601126103845760c95490516001600160a01b039091168152602090f35b50346102af57826003193601126102af5782549060ff8260081c161590818092611247575b8015611230575b156111d657600192828460ff1983161787556111c5575b50610f5861285b565b610f6061285b565b610f7960ff885460081c16610f7481612888565b612888565b81516001600160401b0393908481116111b25780610f98606554611f25565b94601f95868111611183575b50602090868311600114611122578b92611117575b5050600019600383901b1c191690871b176065555b81519384116106a45750908291610fe6606654611f25565b8281116110de575b50602091831160011461107d578792611072575b5050600019600383901b1c191690831b176066555b61102b60ff855460081c16610f7481612888565b6110343361205d565b61103c575051f35b60207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989161ff001985541685558351908152a151f35b015190503880611002565b606688528188208694509190601f198416895b8181106110c6575084116110ad575b505050811b01606655611017565b015160001960f88460031b161c1916905538808061109f565b82840151855588969094019360209384019301611090565b6111089060668a5260208a208480870160051c8201926020881061110e575b0160051c01906128e8565b38610fee565b925081926110fd565b015190503880610fb9565b60658c52818c208a94509190601f1984168d5b81811061116b57508411611152575b505050811b01606555610fce565b015160001960f88460031b161c19169055388080611144565b8284015185558c969094019360209384019301611135565b6111ac9060658d5260208d208880860160051c8201926020871061110e570160051c01906128e8565b38610fa4565b634e487b7160e01b895260418252602489fd5b61ffff191661010117855538610f4f565b608490602085519162461bcd60e51b8352820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152fd5b50303b158015610f385750600160ff841614610f38565b50600160ff841610610f31565b50346102af5760203660031901126102af5733835260fb60205261127d60ff83852054166129f2565b3560fc5551f35b5050346103845760803660031901126103845761129f611d76565b6112a7611d91565b90604435917fb8fb9813b7cb1fcfdeb933deafc7c2bcfe1a8975fd114f04a0ce9b2c866eb28760206064359233885260fb82526112e960ff888a2054166129f2565b6112f2866125cb565b611325576113008682612f98565b858852610105825283878920555b86519384526001600160a01b03908116941692a451f35b611330868287612207565b858852610105825286882054841461130e57838789205561130e565b50346102af5760203660031901126102af578160209360ff92358152610102855220541690519015158152f35b505034610384578160031936011261038457611393612005565b60c980546001600160a01b0319811690915590519082906001600160a01b031660008051602061323e8339815191528284a3f35b505034610384576020366003190112610384576020906113ed6113e8611d76565b612099565b9051908152f35b5091346104d857816003193601126104d8578235906001600160401b0382116104d8575061142a60209361143892369101611deb565b611432611d91565b91612a41565b90519015158152f35b5050346103845760203660031901126103845760209160ff9082906001600160a01b0361146c611d76565b16815260fb855220541690519015158152f35b5091346104d85760203660031901126104d8575061149f60209235612157565b90516001600160a01b039091168152f35b50346102af5760203660031901126102af57608092829135815261010660205220908154916001810154916003600283015492015492815194855260208501528301526060820152f35b5082346104d85760203660031901126104d85750803590609954821015611527576020836104ca84611edc565b608490602084519162461bcd60e51b8352820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152fd5b50503461038457806003193601126103845761025a61159c611d76565b6115a4611ddc565b906115ad612005565b6001600160a01b0316845260fb6020528284206125ba565b5050346103845761025a6115d836611da7565b91612207565b50503461038457602090816003193601126102af57916115fc611d76565b9061160682612099565b61160f81612a2a565b9261161c86519485611e67565b818452601f1961162b83612a2a565b01835b8181106116e4575050825b82811061168e57505050835193838594850191818652845180935281818701950193905b83821061166a5786860387f35b8451805187528301518684015287965094850194938201936001919091019061165d565b806116a16116da9284999798969961278f565b8089526101058652868920548751916116b983611e1b565b8252868201526116c98289612b17565b526116d48188612b17565b506128ff565b9592949395611639565b95879596819598516116f581611e1b565b898152898382015282828a01015201969395949661162e565b5050346103845780600319360112610384576020906113ed61172e611d76565b6024359061278f565b50503461038457816003193601126103845760209060fc549051908152f35b50346102af5760a03660031901126102af57803560843591821515830361182e5733855260fb60205261178e60ff85872054166129f2565b81855261010260205260ff8486205416156117da57509061025a9184526101016020526024356001848620015560443560028486200155606435600784862001556008838520016125ba565b608490602085519162461bcd60e51b8352820152602860248201527f5468657265206973206e6f2073756368206576656e742c20706c6561736520676044820152671bc81d1bc818591960c21b6064820152fd5b8480fd5b5050346103845761025a61184536611da7565b91611853610cba84336122a4565b61233f565b5050346103845781600319360112610384576020906099549051908152f35b50346102af5760203660031901126102af57816101209382358152610101602052208054926001820154926002830154906003840154908401549060058501549260068601549460ff6008600789015498015416978151998a5260208a01528801526060870152608086015260a085015260c084015260e08301521515610100820152f35b50826003193601126102af5761010054808452602090610102825261192660ff8587205416612b5d565b808552610101908183526005858720015461194d8587892001546003888a20015490612312565b6001198111611a2d57906001611964920111612b9b565b33865260ff8352848620818752835261198a858720548385526007878920015411612bd2565b8086528183526119a260068688200154341015612c34565b8086528183526119ba60018688200154421015612c6e565b8086528183526119d1600286882001544210612cb2565b8552815260ff60088486200154166119ee575050610b7433612cef565b606492519162461bcd60e51b8352820152601c60248201527b2932b8bab4b932b9903bb434ba32b634b9ba1037b832b930ba34b7b760211b6044820152fd5b634e487b7160e01b885260118652602488fd5b50346102af5760203660031901126102af5733835260fb602052611a6960ff83852054166129f2565b356101005551f35b50346102af57816003193601126102af57611a8a611d76565b602435916001600160a01b03908180611aa286612157565b16931692808414611b8357803314908115611b64575b5015611afb5750828552606960205283852080546001600160a01b03191683179055611ae383612157565b1692519260008051602061327e8339815191528585a4f35b608490602086519162461bcd60e51b8352820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b90508652606a60205284862033875260205260ff858720541638611ab8565b855162461bcd60e51b8152602081840152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b5091346104d85760203660031901126104d8575061149f6020923561217d565b50503461038457816003193601126103845780519082606554611c1281611f25565b80855290600190818116908115610ebb5750600114611c3d57505050610e5082610845940383611e67565b60658352602095507f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c75b828410611c83575050508261084594610e509282010194610e3e565b8054868501880152928601928101611c67565b925050346102af5760203660031901126102af573563ffffffff60e01b81168091036102af576020925063780e9d6360e01b8114908115611cd9575b5015158152f35b6380ac58cd60e01b811491508115611d0b575b8115611cfa575b5038611cd2565b6301ffc9a760e01b14905038611cf3565b635b5e139f60e01b81149150611cec565b918091926000905b828210611d3c575011611d35575050565b6000910152565b91508060209183015181860152018291611d24565b90602091611d6a81518092818552858086019101611d1c565b601f01601f1916010190565b600435906001600160a01b0382168203611d8c57565b600080fd5b602435906001600160a01b0382168203611d8c57565b6060906003190112611d8c576001600160a01b03906004358281168103611d8c57916024359081168103611d8c579060443590565b602435908115158203611d8c57565b9181601f84011215611d8c578235916001600160401b038311611d8c576020808501948460051b010111611d8c57565b604081019081106001600160401b03821117611e3657604052565b634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b03821117611e3657604052565b601f909101601f19168101906001600160401b03821190821017611e3657604052565b6001600160401b038111611e3657601f01601f191660200190565b929192611eb182611e8a565b91611ebf6040519384611e67565b829481845281830111611d8c578281602093846000960137010152565b609954811015611ef757609960005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b8054821015611ef75760005260206000200190600090565b90600182811c92168015611f55575b6020831014611f3f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f34565b9060405191826000825492611f7384611f25565b908184526001948581169081600014611fe25750600114611f9f575b5050611f9d92500383611e67565b565b9093915060005260209081600020936000915b818310611fca575050611f9d93508201013880611f8f565b85548884018501529485019487945091830191611fb2565b915050611f9d94506020925060ff191682840152151560051b8201013880611f8f565b60c9546001600160a01b0316330361201957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60c980546001600160a01b039283166001600160a01b0319821681179092556040519192169060008051602061323e83398151915290600090a3565b6001600160a01b031680156120b957600052606860205260406000205490565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b1561211757565b60405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606490fd5b6000908152606760205260409020546001600160a01b031661217a811515612110565b90565b612189610789826125cb565b6000908152606960205260409020546001600160a01b031690565b156121ab57565b60405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608490fd5b611f9d92610ccf926040519261221c84611e4c565b60008452610cbf610cba84336122a4565b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b1561228757565b60405162461bcd60e51b8152806122a06004820161222d565b0390fd5b906001600160a01b0380806122b884612157565b169316918383149384156122eb575b5083156122d5575b50505090565b6122e19192935061217d565b16143880806122cf565b909350600052606a60205260406000208260005260205260ff6040600020541692386122c7565b81811061231d570390565b634e487b7160e01b600052601160045260246000fd5b8119811161231d570190565b9061234983612157565b6001600160a01b038381169290918216839003612567578181169384156125165783612480575060995485600052609a60205260406000205561238b8561281d565b82840361244d575b50600084815260696020526040812080546001600160a01b031990811690915590916123be86612157565b169085836040519360008051602061327e8339815191528286a4838352606860205260408320805460018110612439576000190190558483526068602052604083208054600119811161243957600101905585835260676020526040832080549091168517905560008051602061325e8339815191529190a4565b634e487b7160e01b85526011600452602485fd5b61245690612099565b60406000858152609760205281812083825260205286828220558681526098602052205538612393565b84840361248e575b5061238b565b61249790612099565b6001811061231d576000190160009086825260209060988252604091828420548281036124df575b508884528383812055868452609781528284209184525281205538612488565b87855260978252838520838652825283852054888652609783528486208287528352808587205585526098825283852055386124bf565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b9060ff801983541691151516179055565b6000908152606760205260409020546001600160a01b0316151590565b9192600092909190803b156126fa57612636946040518092630a85bd0160e11b9485835233600484015287602484015260448301526080606483015281878160209a8b966084830190611d51565b03926001600160a01b03165af18491816126ba575b506126a9575050503d6000146126a1573d61266581611e8a565b906126736040519283611e67565b81528091833d92013e5b8051918261269e5760405162461bcd60e51b8152806122a06004820161222d565b01fd5b50606061267d565b6001600160e01b0319161492509050565b9091508581813d83116126f3575b6126d28183611e67565b8101031261182e57516001600160e01b03198116810361182e57903861264b565b503d6126c8565b5050915050600190565b9293600093909291803b156127845794849161275e9660405180948193630a85bd0160e11b9788845233600485015260018060a01b0380921660248501526044840152608060648401528260209b8c976084830190611d51565b0393165af18491816126ba57506126a9575050503d6000146126a1573d61266581611e8a565b505050915050600190565b61279881612099565b8210156127c45760018060a01b0316600052609760205260406000209060005260205260406000205490565b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b60995490600160401b821015611e3657612840826001611f9d9401609955611edc565b90919082549060031b600019811b9283911b16911916179055565b6040519061286882611e1b565b601182527029ba30b93634b3b43a1022b234ba34b7b760791b6020830152565b1561288f57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b8181106128f3575050565b600081556001016128e8565b600019811461231d5760010190565b8115612918570690565b634e487b7160e01b600052601260045260246000fd5b80156129d45780816000925b6129be575061294882611e8a565b916129566040519384611e67565b80835281601f1961296683611e8a565b013660208601375b61297757505090565b806001811061231d576000190191600a9182820660308119811161231d578651861015611ef7570160f81b6001600160f81b03191660001a908501601f015304908161296e565b90916129cb600a916128ff565b9291048061293a565b506040516129e181611e1b565b60018152600360fc1b602082015290565b156129f957565b60405162461bcd60e51b81526020600482015260096024820152683737ba1030b236b4b760b91b6044820152606490fd5b6001600160401b038111611e365760051b60200190565b909260fc54926040928351916020928381019160018060601b03199060601b16825260148152612a7081611e1b565b51902090612a7d87612a2a565b96612a8a86519889611e67565b8088528388019060051b820191368311611d8c578490915b838310612b075750505050916000925b8651841015612afd57612ac58488612b17565b519085600083831015612aed5750506000528252612ae7846000205b936128ff565b92612ab2565b9091612ae7938252855220612ae1565b9350945050501490565b8235815291810191859101612aa2565b8051821015611ef75760209160051b010190565b90612b3582612a2a565b612b426040519182611e67565b8281528092612b53601f1991612a2a565b0190602036910137565b15612b6457565b60405162461bcd60e51b815260206004820152600f60248201526e139bc81858dd1a5d9a5d1e481e595d608a1b6044820152606490fd5b15612ba257565b60405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606490fd5b15612bd957565b60405162461bcd60e51b815260206004820152602d60248201527f546865207075726368617365207175616e74697479206578636565647320746860448201526c19481d5c1c195c881b1a5b5a5d609a1b6064820152608490fd5b15612c3b57565b60405162461bcd60e51b815260206004820152600b60248201526a3b30b63ab29032b93937b960a91b6044820152606490fd5b15612c7557565b60405162461bcd60e51b815260206004820152601560248201527426b4b73a1034b9903737ba103a3ab93732b21037b760591b6044820152606490fd5b15612cb957565b60405162461bcd60e51b815260206004820152600e60248201526d135a5b9d081a5cc818db1bdcd95960921b6044820152606490fd5b6001600160a01b031615612f5e5761010080549060009180835261010192602092848452600394604093612d2f8786862001546005878720015490612333565b60018110612439578185528287526004868620015490600019011015612f2457808452818652612d81612d6e6004878720015489888820015490612312565b8286528388526005878720015490612312565b906001198211612439576001820191612dc88360fd54612db2612dc08c8c51928391820194429044903390886130ef565b03601f198101835282611e67565b51902061290e565b9180875261010490818a52612ddf848a8a20611f0d565b9054908c1b1c15612f1d57808852818a52612dfc848a8a20611f0d565b9054908c1b1c945b818952828b5260018a8a209110612f0957908b8b8a612e2a87612e709a99989796611f0d565b905490841b1c612ed65750505050612e4e926128409188548a528b52898920611f0d565b612e5960fd546128ff565b60fd55835497888652838852868620015490612333565b9583528452600583832001612e8581546128ff565b905533825260ff8452828220815483528452828220612ea481546128ff565b9055612eb08533612f98565b54848252610107845282822055610105612ecc8383205461311d565b9385835252205590565b839585612840969493612f049996612ef29452528d8d20611f0d565b9054911b1c938a528b52898920611f0d565b612e4e565b634e487b7160e01b89526011600452602489fd5b8394612e04565b845162461bcd60e51b8152600481018790526013602482015272151bdad95b881b1a5b5a5d081c995858da1959606a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526012602482015271043616e6e6f74206d696e7420746f203078360741b6044820152606490fd5b90604091825192612fa884611e4c565b60008085526001600160a01b0383169182156130ac57612fc7856125cb565b61306a57609954858352602090609a825282842055612fe58661281d565b612fee85612099565b8484526097825282842081855282528683852055868452609882528284205583835260688152818320805460011981116124395760010190558583526067905280822080546001600160a01b0319168417905551611f9d95610ccf95909490939092849260008051602061325e833981519152908290a46125e8565b5162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606490fd5b5162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606490fd5b90815260609190911b6001600160601b03191660208201526034810191909152605481019190915260740190565b600090808252610106602091818352604061316e61315b613148838820546001858a20015490612333565b8488528587526002848920015490612333565b8387528486526003838820015490612333565b8015613204576131a09061318360fd546128ff565b8060fd558351612dc081612db28a820194429044903390886130ef565b94828152838552818120548087106131f857828220600101546131c291612333565b938487106131ec576131dd9560029483525220015490612333565b116131e757602890565b601e90565b50505050505050601490565b50505050505050600a90565b815162461bcd60e51b81526004810186905260126024820152713a37ba30b6103bb2b4b3b43a1032b93937b960711b6044820152606490fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a264697066735822122013d0c534dda684a345b1529f8143755a9bd25d970433921b3dea2b385a84686164736f6c634300080f0033
Net Worth in USD
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.