Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 16268456 | 565 days ago | IN | Create: DoidRegistry | 0 ETH | 0.0361894 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DoidRegistry
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: None pragma solidity >=0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./interfaces/IDoidRegistry.sol"; import "./interfaces/IPassRegistry.sol"; import "./resolvers/AddressResolver.sol"; import "./StringUtils.sol"; //import "hardhat/console.sol"; contract DoidRegistryStorage { // address of passRegistry IPassRegistry passReg; // A map stores all commitments mapping(bytes32 => uint256) public commitments; uint256 public minCommitmentAge; uint256 public maxCommitmentAge; mapping(bytes32 => bytes) public names; /** * @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. * The size of the __gap array is calculated so that the amount of storage used by a * contract always adds up to the same number (in this case 50 storage slots). * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; } contract DoidRegistry is DoidRegistryStorage, ERC721EnumerableUpgradeable, AddressResolver, IDoidRegistry { using StringUtils for string; function initialize( address passRegistry, uint256 _minCommitmentAge, uint256 _maxCommitmentAge ) public initializer { minCommitmentAge = _minCommitmentAge; maxCommitmentAge = _maxCommitmentAge; passReg = IPassRegistry(passRegistry); } function isAuthorised(bytes32 node) internal view override returns (bool) { address owner = ownerOf(uint256(node)); return owner == msg.sender || isApprovedForAll(owner, msg.sender); } function supportsInterface( bytes4 interfaceId ) public view override(AddressResolver, ERC721EnumerableUpgradeable) returns (bool) { return interfaceId == type(IDoidRegistry).interfaceId || super.supportsInterface(interfaceId); } function tokensOfOwner(address _user) public view override returns (uint256[] memory) { uint256[] memory tokenIds = new uint[](balanceOf(_user)); for (uint256 index = 0; index < balanceOf(_user); index++) { tokenIds[index] = tokenOfOwnerByIndex(_user, index); } return tokenIds; } function namesOfOwner(address _user) public view override returns (DoidInfo[] memory) { DoidInfo[] memory tokenIds = new DoidInfo[](balanceOf(_user)); for (uint256 index = 0; index < balanceOf(_user); index++) { uint256 tokenId = tokenOfOwnerByIndex(_user, index); tokenIds[index].tokenId = tokenId; tokenIds[index].name = _nameOfToken(tokenId); } return tokenIds; } function nameHash(string memory name) public pure override returns (bytes32) { return keccak256(bytes(name)); } function _nameOfToken(uint256 id) internal view returns (string memory) { return string(names[bytes32(id)]); } function _nameOfHash(bytes32 node) internal view returns (string memory) { return string(names[node]); } function valid(string memory _name) public pure override returns (bool) { bytes memory bStr = bytes(_name); for (uint i = 0; i < bStr.length; i++) { // Uppercase character... if ((bStr[i] >= 0x41) && (bStr[i] <= 0x5A)) { return false; } // . if (bStr[i] == 0x2E) { return false; } } return _name.doidlen() >= 6; } /** * @dev Returns true iff the specified name is available for registration. */ function available(string memory name) public view override returns (bool) { if (_exists(uint256(nameHash(name)))) return false; if (passReserved(name)) { return false; } return true; } // Returns true iff the specified name is available for registration. function available(uint256 id) public view override returns (bool) { if (_exists(id)) return false; if (passReserved(id)) { return false; } return true; } function statusOfName( string memory _name ) public view override returns (string memory status, address owner, uint id) { status = "available"; bytes32 node = keccak256(bytes(_name)); id = 0; if (_exists(uint(node))) { status = "registered"; owner = ownerOf(uint(node)); id = uint(node); return (status, owner, id); } uint passId = passReg.getPassByHash(node); if (passReg.exists(passId)) { status = "locked"; owner = passReg.getUserByHash(node); id = passId; } else if (!valid(_name) || passReg.nameReserves(_name)) { status = "reserved"; } } /** * @dev Returns true if the specified name is reserved by pass. */ function passReserved(uint256 id) public view returns (bool) { address owner = passReg.getUserByHash(bytes32(id)); if (owner != tx.origin) { return true; } return false; } function passReserved(string memory name) public view returns (bool) { if (passReg.nameExists(name)) { if (passReg.nameReserves(name)) return true; address owner = passReg.getUserByName(name); if (owner == tx.origin) { return false; } return true; } if (name.doidlen() < 6) { return true; } return false; } function makeCommitment( string memory name, address owner, bytes32 secret, bytes[] calldata data ) public pure override returns (bytes32) { bytes32 label = keccak256(bytes(name)); return keccak256(abi.encode(label, owner, data, secret)); } function commit(bytes32 commitment) public override { require(commitments[commitment] + maxCommitmentAge < block.timestamp, "IC"); commitments[commitment] = block.timestamp; } function _consumeCommitment(string memory name, bytes32 commitment) internal { // Require an old enough commitment. require(commitments[commitment] + minCommitmentAge <= block.timestamp, "CN"); // If the commitment is too old, or the name is registered, stop require(commitments[commitment] + maxCommitmentAge > block.timestamp, "CO"); require(available(name), "IN"); delete (commitments[commitment]); } /** * @dev Register a name. * @param name The address of the tokenId. * @param owner The address that should own the registration. */ function register( string calldata name, address owner, bytes32 secret, bytes[] calldata data ) external override { _register(name, owner, secret, data); } function _register( string calldata name, address owner, bytes32 secret, bytes[] calldata data ) internal { _consumeCommitment(name, makeCommitment(name, owner, secret, data)); _register(name, owner); } function _register(string calldata name, address owner) internal { require(available(name), "IN"); bytes32 node = keccak256(bytes(name)); uint id = uint(node); names[node] = bytes(name); _mint(owner, id); setAddr(node, COIN_TYPE_ETH, addressToBytes(owner)); emit NameRegistered(id, name, owner); } function claimLockedName(string calldata name, address owner) public override { require(_msgSender() == address(passReg), "Excuted by PassRegistry only"); _register(name, owner); } function name() public pure override returns (string memory) { return "DOID: Decentralized OpenID"; } function symbol() public pure override returns (string memory) { return "DOID"; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory passName = _nameOfToken(tokenId); return string( abi.encodePacked( // data:application/json;charset=UTF-8, // {"name":" "data:application/json;charset=UTF-8," "%7B%22name%22%3A%22", passName, // .doid","description":" ".doid%22%2C%22description%22%3A%22", passName, // .doid, a decentralized OpenID.","image":"data:image/svg+xml;charset=UTF-8, ".doid%2C%20a%20decentralized%20OpenID.%22%2C%22image%22%3A%22data%3Aimage%2Fsvg%2Bxml%3Bcharset=UTF-8%2C", // <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="#fff"><defs><radialGradient cx="30%" cy="-30%" r="2" id="a"><stop offset="20%" stop-color="#FFEA94"/><stop offset="45%" stop-color="#D39750"/><stop offset="80%" stop-color="#51290F"/></radialGradient></defs><rect width="100%" height="100%" fill="url(#a)"/><path d="m23.706 15.918 2.602 1.38c.337.208.548.548.548.936v5.909c0 .365-.183.677-.47.885l-2.76 1.77a1.045 1.045 0 0 1-1.092.054l-2.212-1.197 3.802-2.29.026-4.426-2.864-1.51 2.422-1.508zm-1.692 7.419.624.311-2.422 1.484-.624-.312 2.422-1.483zm-.416-1.068.624.312-2.422 1.483-.652-.312 2.447-1.483zm-1.562-9.709 2.107 1.119-3.799 2.318-.025 4.4 2.863 1.537-2.422 1.51-2.498-1.355c-.416-.208-.652-.652-.652-1.093V15.32c0-.416.208-.832.573-1.068l2.552-1.638a1.234 1.234 0 0 1 1.3-.054zm2.967 2.498.624.312-2.422 1.484-.624-.312 2.422-1.484zm-.441-1.068.652.338-2.422 1.483-.652-.337 2.422-1.484z"/> // <text x="15" y="128" font-size="12" font-family="Arial,sans-serif"> "%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%2520128%2520128%2522%2520fill%253D%2522%2523fff%2522%253E%253Cdefs%253E%253CradialGradient%2520cx%253D%252230%2525%2522%2520cy%253D%2522-30%2525%2522%2520r%253D%25222%2522%2520id%253D%2522a%2522%253E%253Cstop%2520offset%253D%252220%2525%2522%2520stop-color%253D%2522%2523FFEA94%2522%252F%253E%253Cstop%2520offset%253D%252245%2525%2522%2520stop-color%253D%2522%2523D39750%2522%252F%253E%253Cstop%2520offset%253D%252280%2525%2522%2520stop-color%253D%2522%252351290F%2522%252F%253E%253C%252FradialGradient%253E%253C%252Fdefs%253E%253Crect%2520width%253D%2522100%2525%2522%2520height%253D%2522100%2525%2522%2520fill%253D%2522url(%2523a)%2522%252F%253E%253Cpath%2520d%253D%2522m23.706%252015.918%25202.602%25201.38c.337.208.548.548.548.936v5.909c0%2520.365-.183.677-.47.885l-2.76%25201.77a1.045%25201.045%25200%25200%25201-1.092.054l-2.212-1.197%25203.802-2.29.026-4.426-2.864-1.51%25202.422-1.508zm-1.692%25207.419.624.311-2.422%25201.484-.624-.312%25202.422-1.483zm-.416-1.068.624.312-2.422%25201.483-.652-.312%25202.447-1.483zm-1.562-9.709%25202.107%25201.119-3.799%25202.318-.025%25204.4%25202.863%25201.537-2.422%25201.51-2.498-1.355c-.416-.208-.652-.652-.652-1.093V15.32c0-.416.208-.832.573-1.068l2.552-1.638a1.234%25201.234%25200%25200%25201%25201.3-.054zm2.967%25202.498.624.312-2.422%25201.484-.624-.312%25202.422-1.484zm-.441-1.068.652.338-2.422%25201.483-.652-.337%25202.422-1.484z%2522%252F%253E" "%253Ctext%2520x%253D%252215%2522%2520y%253D%2522110%2522%2520font-size%253D%252212%2522%2520font-family%253D%2522Arial%252Csans-serif%2522%253E", passName, // .doid</text></svg> // "} ".doid%253C%252Ftext%253E%253C%252Fsvg%253E" "%22%7D" ) ); } }
// SPDX-License-Identifier: None pragma solidity >=0.8.4; library StringUtils { /** * @dev Returns the length of a given string * * @param s The string to measure the length of * @return The length of the input string */ function strlen(string memory s) internal pure returns (uint256) { uint256 len; uint256 i = 0; uint256 bytelength = bytes(s).length; for (len = 0; i < bytelength; len++) { bytes1 b = bytes(s)[i]; if (b < 0x80) { i += 1; } else if (b < 0xE0) { i += 2; } else if (b < 0xF0) { i += 3; } else if (b < 0xF8) { i += 4; } else if (b < 0xFC) { i += 5; } else { i += 6; } } return len; } function doidlen(string memory s) internal pure returns (uint256) { uint256 len; uint256 i = 0; uint256 bytelength = bytes(s).length; for (len = 0; i < bytelength; len++) { bytes1 b = bytes(s)[i]; if (b < 0x80) { i += 1; } else { len++; if (b < 0xE0) { i += 2; } else if (b < 0xF0) { i += 3; } else if (b < 0xF8) { i += 4; } else if (b < 0xFC) { i += 5; } else { i += 6; } } } return len; } struct Slice { uint256 _len; uint256 _ptr; } /** * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */ function toSlice(string memory self) internal pure returns (Slice memory) { uint256 ptr; /* solium-disable-next-line security/no-inline-assembly */ assembly { ptr := add(self, 0x20) } return Slice(bytes(self).length, ptr); } /** * @dev Returns the keccak-256 hash of the slice. * @param self The slice to hash. * @return ret The hash of the slice. */ function keccak(Slice memory self) internal pure returns (bytes32 ret) { /* solium-disable-next-line security/no-inline-assembly */ assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /** * @dev Returns the slice of the original slice. * @param self The slice to hash. * @param index The index of original slice for slice ptr. * @param len The sub slice length. * @return The slice of the original slice. */ function slice( Slice memory self, uint256 index, uint256 len ) internal pure returns (Slice memory) { return Slice(len, self._ptr + index); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import "./ResolverBase.sol"; import "./IAddressResolver.sol"; // import "hardhat/console.sol"; contract AddressResolverStorage { mapping(bytes32 => mapping(uint256 => bytes)) _addresses; mapping(bytes32 => EnumerableSetUpgradeable.UintSet) _nameTypes; uint256 public constant COIN_TYPE_ETH = 60; /** * @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. * The size of the __gap array is calculated so that the amount of storage used by a * contract always adds up to the same number (in this case 50 storage slots). * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[48] private __gap; } abstract contract AddressResolver is AddressResolverStorage, IAddressResolver, ResolverBase { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; using StringsUpgradeable for uint256; function makeAddrMessage( string memory name, uint256 coinType, address a, uint256 timestamp, uint256 nonce ) public pure override returns (string memory) { return string( abi.encodePacked( "Click sign to allow setting address for ", name, " to ", StringsUpgradeable.toHexString(a), "\n\n" "This request will not trigger a blockchain transaction or cost any gas fees." "\n\n" "This message will expire after 24 hours." "\n\n" "Coin type: ", coinType.toHexString(), "\nTimestamp: ", timestamp.toString(), "\nNonce: ", nonce.toHexString() ) ); } function recoverAddr( string memory name, uint256 coinType, address a, uint256 timestamp, uint256 nonce, bytes memory signature ) internal pure returns (address) { bytes memory prefix = "\x19Ethereum Signed Message:\n"; string memory message = makeAddrMessage(name, coinType, a, timestamp, nonce); bytes32 _hashMessage = keccak256( abi.encodePacked(prefix, bytes(message).length.toString(), message) ); return recoverSigner(_hashMessage, signature); } function recoverSigner( bytes32 _hashMessage, bytes memory _sig ) internal pure returns (address) { bytes32 r; bytes32 s; uint8 v; assembly { /* First 32 bytes stores the length of the signature add(sig, 32) = pointer of sig + 32 effectively, skips first 32 bytes of signature mload(p) loads next 32 bytes starting at the memory address p into memory */ // first 32 bytes, after the length prefix r := mload(add(_sig, 32)) // second 32 bytes s := mload(add(_sig, 64)) // final byte (first byte of the next 32 bytes) v := byte(0, mload(add(_sig, 96))) } return ecrecover(_hashMessage, v, r, s); } function setAddr( string memory name, uint256 coinType, address a, uint256 timestamp, uint256 nonce, bytes memory signature ) public override { bytes32 node = keccak256(bytes(name)); require(isAuthorised(node), "NO"); require(block.timestamp - timestamp < 86400, "EXP"); address recoverdAddress = recoverAddr(name, coinType, a, timestamp, nonce, signature); require(a == recoverdAddress, "IA"); setAddr(node, coinType, addressToBytes(a)); } function setAddr(bytes32 node, uint256 coinType, bytes memory a) internal { emit AddressChanged(node, coinType, a); _addresses[node][coinType] = a; _nameTypes[node].add(coinType); } function addrs(bytes32 node) public view virtual override returns (TypedAddress[] memory) { EnumerableSetUpgradeable.UintSet storage types = _nameTypes[node]; TypedAddress[] memory ret = new TypedAddress[](types.length()); for (uint256 index = 0; index < types.length(); index++) { uint coinType = types.at(index); ret[index].coinType = coinType; ret[index].addr = _addresses[node][coinType]; } return ret; } function addrOfType( bytes32 node, uint256 coinType ) public view virtual override returns (bytes memory) { return _addresses[node][coinType]; } function addr(bytes32 node) public view virtual override returns (address) { bytes memory a = addrOfType(node, COIN_TYPE_ETH); if (a.length == 0) { return address(0); } return bytesToAddress(a); } function supportsInterface(bytes4 interfaceID) public view virtual override returns (bool) { return interfaceID == type(IAddressResolver).interfaceId || super.supportsInterface(interfaceID); } function bytesToAddress(bytes memory b) internal pure returns (address payable a) { require(b.length == 20); assembly { a := div(mload(add(b, 32)), exp(256, 12)) } } function addressToBytes(address a) internal pure returns (bytes memory b) { b = new bytes(20); assembly { mstore(add(b, 32), mul(a, exp(256, 12))) } } }
// SPDX-License-Identifier: None pragma solidity >=0.8.4; interface IDoidRegistry { event NameRegistered(uint256 indexed id, string name, address indexed owner); struct DoidInfo { uint256 tokenId; string name; } /** * @dev Request user's tokens * @return tokenIds. */ function tokensOfOwner(address _user) external view returns (uint256[] memory); /** * @dev Request user's names * @return names with tokenId. */ function namesOfOwner(address _user) external view returns (DoidInfo[] memory); /** * @dev Request status of a name * @return status 'available' or 'registered' or 'locked', or 'reserved'. * @return owner address that owns or locks this name * @return id token id of name (if registered) or pass (if locked) or 0 (if available or reserved). */ function statusOfName( string memory name ) external view returns (string memory status, address owner, uint id); function nameHash(string memory name) external view returns (bytes32); function valid(string memory name) external pure returns (bool); function available(string memory name) external view returns (bool); function available(uint256 id) external view returns (bool); function makeCommitment( string memory name, address owner, bytes32 secret, bytes[] calldata data ) external pure returns (bytes32); function commit(bytes32 commitment) external; function register( string calldata name, address owner, bytes32 secret, bytes[] calldata data ) external; /** * @dev Claim a locked name for PassRegistry. * @notice Can only be called by PassRegistry. */ function claimLockedName(string memory name, address owner) external; }
pragma solidity ^0.8.0; interface IPassRegistry { struct PassInfo { uint passId; bytes32 passClass; bytes32 passHash; } function getUserInvitedNumber(address _user) external view returns (uint, uint); function getUserByName(string memory _name) external view returns (address); function getNameByHash(bytes32 _hash) external view returns (string memory); function getPassByHash(bytes32 _hash) external view returns (uint); function getUserByHash(bytes32 _hash) external view returns (address); function getUserPassInfo(uint _passId) external view returns (PassInfo memory); function nameExists(string memory _name) external view returns (bool); function nameReserves(string memory _name) external view returns (bool); function exists(uint _passId) external view returns (bool); }
// 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 pragma solidity >=0.8.4; /** * Interface for the new (multicoin) addr function. */ interface IAddressResolver { event AddressChanged(bytes32 indexed node, uint256 coinType, bytes newAddress); struct TypedAddress { uint256 coinType; bytes addr; } /** * @dev Make a messge to sign for setting address. * @param name name to set address. * @param coinType type of coin to set address. * @param a address to set. * @param timestamp signature will expire after 24 hours since timestamp. * @param nonce nonce. * @return message to sign. */ function makeAddrMessage( string memory name, uint256 coinType, address a, uint256 timestamp, uint256 nonce ) external returns (string memory); /** * @dev Set address for name with coinType. * @param name name to set address. * @param coinType type of coin to set address. * @param a address to set. * @param timestamp signature will expire after 24 hours since timestamp. * @param nonce nonce. * @param signature signature of makeAddrMessage. */ function setAddr( string memory name, uint256 coinType, address a, uint256 timestamp, uint256 nonce, bytes memory signature ) external; /** * @dev returns address for coinType of a node * @param node request node. * @param coinType coinType to request. * @return address in bytes. */ function addrOfType(bytes32 node, uint256 coinType) external view returns (bytes memory); /** * Returns the address associated with the node. * @param node The node to query. * @return The associated address. */ function addr(bytes32 node) external view returns (address); /** * @dev returns all address bytes for all cointypes for a node * @param node request node. * @return TypedAddress array of all addresses with type. */ function addrs(bytes32 node) external view returns (TypedAddress[] memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; abstract contract ResolverBase is ERC165Upgradeable { function isAuthorised(bytes32 node) internal view virtual returns (bool); modifier authorised(bytes32 node) { require(isAuthorised(node)); _; } }
// 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 (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// 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); }
// 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) (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 (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) (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.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 (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 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"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":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NameRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"COIN_TYPE_ETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addrOfType","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addrs","outputs":[{"components":[{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"addr","type":"bytes"}],"internalType":"struct IAddressResolver.TypedAddress[]","name":"","type":"tuple[]"}],"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":"uint256","name":"id","type":"uint256"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"name":"claimLockedName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitment","type":"bytes32"}],"name":"commit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"commitments","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":"address","name":"passRegistry","type":"address"},{"internalType":"uint256","name":"_minCommitmentAge","type":"uint256"},{"internalType":"uint256","name":"_maxCommitmentAge","type":"uint256"}],"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":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"address","name":"a","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"makeAddrMessage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"makeCommitment","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"maxCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"nameHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"names","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"namesOfOwner","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct IDoidRegistry.DoidInfo[]","name":"","type":"tuple[]"}],"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":"string","name":"name","type":"string"}],"name":"passReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"passReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"register","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":"string","name":"name","type":"string"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"address","name":"a","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"statusOfName","outputs":[{"internalType":"string","name":"status","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","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":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"valid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061450e806100206000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c8063839df9451161013b578063b5a3be8d116100b8578063ce1e09c01161007c578063ce1e09c01461058f578063d95156bd14610598578063e96a6504146105ab578063e985e9c5146105b3578063f14fcbc8146105c657600080fd5b8063b5a3be8d14610523578063b88d4fde14610543578063b95eb99114610556578063bbc459a614610569578063c87b56dd1461057c57600080fd5b806396e494e8116100ff57806396e494e8146104b55780639791c097146104c8578063a22cb465146104db578063a479d68e146104ee578063aeb8ce9b1461051057600080fd5b8063839df945146104395780638462151c146104595780638bb3582c146104795780638d839ffe1461048c57806395d89b411461049557600080fd5b80633e837491116101c95780636352211e1161018d5780636352211e146103cd57806370a08231146103e057806372dead8a146103f3578063792e970f146104135780637a1ac61e1461042657600080fd5b80633e8374911461036857806342842e0e1461037b5780634f6ccce71461038e57806352c673e3146103a157806361e40016146103b457600080fd5b806318160ddd1161021057806318160ddd1461030a57806320c38e2b1461031c57806323b872dd1461032f5780632f745c59146103425780633b3b57de1461035557600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc146102b7578063095ea7b3146102e2578063141eed67146102f7575b600080fd5b61026061025b3660046131b6565b6105d9565b60405190151581526020015b60405180910390f35b60408051808201909152601a81527f444f49443a20446563656e7472616c697a6564204f70656e494400000000000060208201525b60405161026c9190614240565b6102ca6102c536600461317d565b610604565b6040516001600160a01b03909116815260200161026c565b6102f56102f0366004613102565b61062b565b005b6102f56103053660046131ee565b610746565b60fc545b60405190815260200161026c565b6102aa61032a36600461317d565b6107b4565b6102f561033d36600461302c565b61084e565b61030e610350366004613102565b61087f565b6102ca61036336600461317d565b610915565b6102606103763660046132cc565b610948565b6102f561038936600461302c565b610b22565b61030e61039c36600461317d565b610b3d565b6102f56103af3660046133eb565b610bde565b61030e6103c23660046132cc565b805160209091012090565b6102ca6103db36600461317d565b610cd5565b61030e6103ee366004612fbc565b610d35565b61040661040136600461317d565b610dbb565b60405161026c91906140de565b6102aa610421366004613383565b610f7e565b6102f561043436600461312d565b610fd3565b61030e61044736600461317d565b60016020526000908152604090205481565b61046c610467366004612fbc565b611104565b60405161026c9190614143565b61026061048736600461317d565b6111c3565b61030e60025481565b6040805180820190915260048152631113d25160e21b60208201526102aa565b6102606104c336600461317d565b611264565b6102606104d63660046132cc565b6112a7565b6102f56104e93660046130d5565b6113a4565b6105016104fc3660046132cc565b6113b3565b60405161026c93929190614267565b61026061051e3660046132cc565b6116a3565b610536610531366004612fbc565b6116e4565b60405161026c919061406b565b6102f561055136600461306c565b6117f9565b6102f5610564366004613242565b61182b565b6102aa610577366004613195565b611841565b6102aa61058a36600461317d565b6118ef565b61030e60035481565b61030e6105a63660046132fe565b611933565b61030e603c81565b6102606105c1366004612ff4565b61197b565b6102f56105d436600461317d565b6119a9565b60006001600160e01b03198216636f67973760e11b14806105fe57506105fe82611a0b565b92915050565b600061060f82611a30565b50600090815260cc60205260409020546001600160a01b031690565b600061063682610cd5565b9050806001600160a01b0316836001600160a01b031614156106a95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106c557506106c5813361197b565b6107375760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106a0565b6107418383611a92565b505050565b6000546001600160a01b0316336001600160a01b0316146107a95760405162461bcd60e51b815260206004820152601c60248201527f4578637574656420627920506173735265676973747279206f6e6c790000000060448201526064016106a0565b610741838383611b00565b600460205260009081526040902080546107cd906143f3565b80601f01602080910402602001604051908101604052809291908181526020018280546107f9906143f3565b80156108465780601f1061081b57610100808354040283529160200191610846565b820191906000526020600020905b81548152906001019060200180831161082957829003601f168201915b505050505081565b6108583382611c10565b6108745760405162461bcd60e51b81526004016106a0906142e7565b610741838383611c6f565b600061088a83610d35565b82106108ec5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106a0565b506001600160a01b0391909116600090815260fa60209081526040808320938352929052205490565b60008061092383603c611841565b90508051600014156109385750600092915050565b61094181611e16565b9392505050565b60008054604051636631bd7f60e11b81526001600160a01b039091169063cc637afe90610979908590600401614240565b60206040518083038186803b15801561099157600080fd5b505afa1580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190613161565b15610b01576000546040516327bd40a960e21b81526001600160a01b0390911690639ef502a4906109fe908590600401614240565b60206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190613161565b15610a5b57506001919050565b60008054604051634bff500960e01b81526001600160a01b0390911690634bff500990610a8c908690600401614240565b60206040518083038186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc9190612fd8565b90506001600160a01b038116321415610af85750600092915050565b50600192915050565b6006610b0c83611e35565b1015610b1a57506001919050565b506000919050565b610741838383604051806020016040528060008152506117f9565b6000610b4860fc5490565b8210610bab5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106a0565b60fc8281548110610bcc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b85516020870120610bee81611f53565b610c1f5760405162461bcd60e51b81526020600482015260026024820152614e4f60f01b60448201526064016106a0565b62015180610c2d8542614399565b10610c605760405162461bcd60e51b815260206004820152600360248201526204558560ec1b60448201526064016106a0565b6000610c70888888888888611f7d565b9050806001600160a01b0316866001600160a01b031614610cb85760405162461bcd60e51b8152602060048201526002602482015261494160f01b60448201526064016106a0565b610ccb8288610cc689612014565b612044565b5050505050505050565b600081815260ca60205260408120546001600160a01b0316806105fe5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106a0565b60006001600160a01b038216610d9f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106a0565b506001600160a01b0316600090815260cb602052604090205490565b6000818152603260205260408120606091610dd5826120be565b6001600160401b03811115610dfa57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e4057816020015b604080518082019091526000815260606020820152815260200190600190039081610e185790505b50905060005b610e4f836120be565b811015610f76576000610e6284836120c8565b905080838381518110610e8557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151919091526000878152603182526040808220848352909252208054610eb5906143f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee1906143f3565b8015610f2e5780601f10610f0357610100808354040283529160200191610f2e565b820191906000526020600020905b815481529060010190602001808311610f1157829003601f168201915b5050505050838381518110610f5357634e487b7160e01b600052603260045260246000fd5b602002602001015160200181905250508080610f6e9061442e565b915050610e46565b509392505050565b606085610f8a856120d4565b610f93876120ea565b610f9c8661213e565b610fa5866120ea565b604051602001610fb9959493929190613ec5565b604051602081830303815290604052905095945050505050565b606354610100900460ff1615808015610ff35750606354600160ff909116105b8061100d5750303b15801561100d575060635460ff166001145b6110705760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106a0565b6063805460ff191660011790558015611093576063805461ff0019166101001790555b60028390556003829055600080546001600160a01b0319166001600160a01b03861617905580156110fe576063805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6060600061111183610d35565b6001600160401b0381111561113657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561115f578160200160208202803683370190505b50905060005b61116e84610d35565b8110156111bc5761117f848261087f565b82828151811061119f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806111b48161442e565b915050611165565b5092915050565b60008054604051637e26ee3160e11b81526004810184905282916001600160a01b03169063fc4ddc629060240160206040518083038186803b15801561120857600080fd5b505afa15801561121c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112409190612fd8565b90506001600160a01b038116321461125b5750600192915050565b50600092915050565b600081815260ca60205260408120546001600160a01b03161561128957506000919050565b611292826111c3565b1561129f57506000919050565b506001919050565b600081815b815181101561138f57604160f81b8282815181106112da57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916108015906113295750605a60f81b82828151811061131757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191611155b15611338575060009392505050565b81818151811061135857634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916601760f91b141561137d575060009392505050565b806113878161442e565b9150506112ac565b50600661139b84611e35565b10159392505050565b6113af338383612257565b5050565b604080518082019091526009815268617661696c61626c6560b81b602080830191909152825190830120600090819061140381600090815260ca60205260409020546001600160a01b0316151590565b1561143d5760408051808201909152600a8152691c9959da5cdd195c995960b21b6020820152935061143481610cd5565b9250905061169c565b600080546040516330b350c960e21b8152600481018490526001600160a01b039091169063c2cd43249060240160206040518083038186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba919061347b565b600054604051634f558e7960e01b8152600481018390529192506001600160a01b031690634f558e799060240160206040518083038186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115379190613161565b156115e05760408051808201825260068152651b1bd8dad95960d21b60208201526000549151637e26ee3160e11b8152600481018590529096506001600160a01b039091169063fc4ddc629060240160206040518083038186803b15801561159e57600080fd5b505afa1580156115b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d69190612fd8565b9350809250611699565b6115e9866112a7565b158061167057506000546040516327bd40a960e21b81526001600160a01b0390911690639ef502a490611620908990600401614240565b60206040518083038186803b15801561163857600080fd5b505afa15801561164c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116709190613161565b1561169957604051806040016040528060088152602001671c995cd95c9d995960c21b81525094505b50505b9193909250565b805160208201206000906116ce90600090815260ca60205260409020546001600160a01b0316151590565b156116db57506000919050565b61129282610948565b606060006116f183610d35565b6001600160401b0381111561171657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561175c57816020015b6040805180820190915260008152606060208201528152602001906001900390816117345790505b50905060005b61176b84610d35565b8110156111bc57600061177e858361087f565b9050808383815181106117a157634e487b7160e01b600052603260045260246000fd5b6020908102919091010151526117b681612326565b8383815181106117d657634e487b7160e01b600052603260045260246000fd5b6020026020010151602001819052505080806117f19061442e565b915050611762565b6118033383611c10565b61181f5760405162461bcd60e51b81526004016106a0906142e7565b6110fe848484846123c8565b6118398686868686866123fb565b505050505050565b60008281526031602090815260408083208484529091529020805460609190611869906143f3565b80601f0160208091040260200160405190810160405280929190818152602001828054611895906143f3565b80156118e25780601f106118b7576101008083540402835291602001916118e2565b820191906000526020600020905b8154815290600101906020018083116118c557829003601f168201915b5050505050905092915050565b60606118fa82611a30565b600061190583612326565b905080818260405160200161191c93929190613557565b604051602081830303815290604052915050919050565b600080868051906020012090508086858588604051602001611959959493929190614187565b6040516020818303038152906040528051906020012091505095945050505050565b6001600160a01b03918216600090815260cd6020908152604080832093909416825291909152205460ff1690565b60035460008281526001602052604090205442916119c69161434e565b106119f85760405162461bcd60e51b8152602060048201526002602482015261494360f01b60448201526064016106a0565b6000908152600160205260409020429055565b60006001600160e01b03198216636ce4a38f60e11b14806105fe57506105fe82612488565b600081815260ca60205260409020546001600160a01b0316611a8f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106a0565b50565b600081815260cc6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ac782610cd5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611b3f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116a392505050565b611b705760405162461bcd60e51b815260206004820152600260248201526124a760f11b60448201526064016106a0565b60008383604051611b82929190613504565b604080519182900390912060008181526004602052919091209091508190611bab908686612da1565b50611bb683826124ad565b611bc582603c610cc686612014565b826001600160a01b0316817f9828659b64c66e7160a8a5f1f535250190e8aadb84e52e6584de17af554ffe3f8787604051611c01929190614253565b60405180910390a35050505050565b600080611c1c83610cd5565b9050806001600160a01b0316846001600160a01b03161480611c435750611c43818561197b565b80611c675750836001600160a01b0316611c5c84610604565b6001600160a01b0316145b949350505050565b826001600160a01b0316611c8282610cd5565b6001600160a01b031614611ce65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106a0565b6001600160a01b038216611d485760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106a0565b611d538383836125fb565b611d5e600082611a92565b6001600160a01b038316600090815260cb60205260408120805460019290611d87908490614399565b90915550506001600160a01b038216600090815260cb60205260408120805460019290611db590849061434e565b9091555050600081815260ca602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008151601414611e2657600080fd5b5060200151600160601b900490565b8051600090819081905b80821015611f4a576000858381518110611e6957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160ff1b811015611e9857611e9160018461434e565b9250611f37565b83611ea28161442e565b945050600760fd1b6001600160f81b031982161015611ec657611e9160028461434e565b600f60fc1b6001600160f81b031982161015611ee757611e9160038461434e565b601f60fb1b6001600160f81b031982161015611f0857611e9160048461434e565b603f60fa1b6001600160f81b031982161015611f2957611e9160058461434e565b611f3460068461434e565b92505b5082611f428161442e565b935050611e3f565b50909392505050565b600080611f5f83610cd5565b90506001600160a01b0381163314806109415750610941813361197b565b60408051808201909152601a81527f19457468657265756d205369676e6564204d6573736167653a0a000000000000602082015260009081611fc28989898989610f7e565b9050600082611fd1835161213e565b83604051602001611fe493929190613514565b60405160208183030381529060405280519060200120905061200681866126b3565b9a9950505050505050505050565b604080516014808252818301909252606091602082018180368337505050600160601b9290920260208301525090565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af7528383604051612076929190614335565b60405180910390a26000838152603160209081526040808320858452825290912082516120a592840190612e25565b5060008381526032602052604090206110fe908361272b565b60006105fe825490565b60006109418383612737565b60606105fe6001600160a01b038316601461276f565b6060816121115750506040805180820190915260048152630307830360e41b602082015290565b8160005b811561213457806121258161442e565b915050600882901c9150612115565b611c67848261276f565b6060816121625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561218c57806121768161442e565b91506121859050600a83614366565b9150612166565b6000816001600160401b038111156121b457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121de576020820181803683370190505b5090505b8415611c67576121f3600183614399565b9150612200600a86614449565b61220b90603061434e565b60f81b81838151811061222e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612250600a86614366565b94506121e2565b816001600160a01b0316836001600160a01b031614156122b95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106a0565b6001600160a01b03838116600081815260cd6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000818152600460205260409020805460609190612343906143f3565b80601f016020809104026020016040519081016040528092919081815260200182805461236f906143f3565b80156123bc5780601f10612391576101008083540402835291602001916123bc565b820191906000526020600020905b81548152906001019060200180831161239f57829003601f168201915b50505050509050919050565b6123d3848484611c6f565b6123df84848484612950565b6110fe5760405162461bcd60e51b81526004016106a090614295565b61247d86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a8152612478935091508a908a90819084018382808284376000920191909152508a925089915088905087611933565b612a5d565b611839868686611b00565b60006001600160e01b0319821663780e9d6360e01b14806105fe57506105fe82612b48565b6001600160a01b0382166125035760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106a0565b600081815260ca60205260409020546001600160a01b0316156125685760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106a0565b612574600083836125fb565b6001600160a01b038216600090815260cb6020526040812080546001929061259d90849061434e565b9091555050600081815260ca602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316612656576126518160fc8054600083815260fd60205260408120829055600182018355919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00155565b612679565b816001600160a01b0316836001600160a01b031614612679576126798382612b98565b6001600160a01b0382166126905761074181612c35565b826001600160a01b0316826001600160a01b031614610741576107418282612d0e565b6020818101516040808401516060808601518351600080825296810180865289905290861a9381018490529081018490526080810182905290919060019060a0016020604051602081039080840390855afa158015612716573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60006109418383612d52565b600082600001828154811061275c57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6060600061277e83600261437a565b61278990600261434e565b6001600160401b038111156127ae57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127d8576020820181803683370190505b509050600360fc1b8160008151811061280157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061283e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061286284600261437a565b61286d90600161434e565b90505b6001811115612901576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106128af57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106128d357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936128fa816143dc565b9050612870565b5083156109415760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106a0565b60006001600160a01b0384163b15612a5257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612994903390899088908890600401614038565b602060405180830381600087803b1580156129ae57600080fd5b505af19250505080156129de575060408051601f3d908101601f191682019092526129db918101906131d2565b60015b612a38573d808015612a0c576040519150601f19603f3d011682016040523d82523d6000602084013e612a11565b606091505b508051612a305760405162461bcd60e51b81526004016106a090614295565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c67565b506001949350505050565b6002546000828152600160205260409020544291612a7a9161434e565b1115612aad5760405162461bcd60e51b815260206004820152600260248201526121a760f11b60448201526064016106a0565b6003546000828152600160205260409020544291612aca9161434e565b11612afc5760405162461bcd60e51b8152602060048201526002602482015261434f60f01b60448201526064016106a0565b612b05826116a3565b612b365760405162461bcd60e51b815260206004820152600260248201526124a760f11b60448201526064016106a0565b60009081526001602052604081205550565b60006001600160e01b031982166380ac58cd60e01b1480612b7957506001600160e01b03198216635b5e139f60e01b145b806105fe57506301ffc9a760e01b6001600160e01b03198316146105fe565b60006001612ba584610d35565b612baf9190614399565b600083815260fb6020526040902054909150808214612c02576001600160a01b038416600090815260fa60209081526040808320858452825280832054848452818420819055835260fb90915290208190555b50600091825260fb602090815260408084208490556001600160a01b03909416835260fa81528383209183525290812055565b60fc54600090612c4790600190614399565b600083815260fd602052604081205460fc8054939450909284908110612c7d57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060fc8381548110612cac57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260fd909152604080822084905585825281205560fc805480612cf257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612d1983610d35565b6001600160a01b03909316600090815260fa60209081526040808320868452825280832085905593825260fb9052919091209190915550565b6000818152600183016020526040812054612d99575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105fe565b5060006105fe565b828054612dad906143f3565b90600052602060002090601f016020900481019282612dcf5760008555612e15565b82601f10612de85782800160ff19823516178555612e15565b82800160010185558215612e15579182015b82811115612e15578235825591602001919060010190612dfa565b50612e21929150612e99565b5090565b828054612e31906143f3565b90600052602060002090601f016020900481019282612e535760008555612e15565b82601f10612e6c57805160ff1916838001178555612e15565b82800160010185558215612e15579182015b82811115612e15578251825591602001919060010190612e7e565b5b80821115612e215760008155600101612e9a565b60008083601f840112612ebf578182fd5b5081356001600160401b03811115612ed5578182fd5b6020830191508360208260051b8501011115612ef057600080fd5b9250929050565b600082601f830112612f07578081fd5b81356001600160401b0380821115612f2157612f21614489565b604051601f8301601f19908116603f01168101908282118183101715612f4957612f49614489565b81604052838152866020858801011115612f61578485fd5b8360208701602083013792830160200193909352509392505050565b60008083601f840112612f8e578182fd5b5081356001600160401b03811115612fa4578182fd5b602083019150836020828501011115612ef057600080fd5b600060208284031215612fcd578081fd5b81356109418161449f565b600060208284031215612fe9578081fd5b81516109418161449f565b60008060408385031215613006578081fd5b82356130118161449f565b915060208301356130218161449f565b809150509250929050565b600080600060608486031215613040578081fd5b833561304b8161449f565b9250602084013561305b8161449f565b929592945050506040919091013590565b60008060008060808587031215613081578081fd5b843561308c8161449f565b9350602085013561309c8161449f565b92506040850135915060608501356001600160401b038111156130bd578182fd5b6130c987828801612ef7565b91505092959194509250565b600080604083850312156130e7578182fd5b82356130f28161449f565b91506020830135613021816144b4565b60008060408385031215613114578182fd5b823561311f8161449f565b946020939093013593505050565b600080600060608486031215613141578283fd5b833561314c8161449f565b95602085013595506040909401359392505050565b600060208284031215613172578081fd5b8151610941816144b4565b60006020828403121561318e578081fd5b5035919050565b600080604083850312156131a7578182fd5b50508035926020909101359150565b6000602082840312156131c7578081fd5b8135610941816144c2565b6000602082840312156131e3578081fd5b8151610941816144c2565b600080600060408486031215613202578081fd5b83356001600160401b03811115613217578182fd5b61322386828701612f7d565b90945092505060208401356132378161449f565b809150509250925092565b6000806000806000806080878903121561325a578384fd5b86356001600160401b0380821115613270578586fd5b61327c8a838b01612f7d565b9098509650602089013591506132918261449f565b90945060408801359350606088013590808211156132ad578384fd5b506132ba89828a01612eae565b979a9699509497509295939492505050565b6000602082840312156132dd578081fd5b81356001600160401b038111156132f2578182fd5b611c6784828501612ef7565b600080600080600060808688031215613315578283fd5b85356001600160401b038082111561332b578485fd5b61333789838a01612ef7565b9650602088013591506133498261449f565b9094506040870135935060608701359080821115613365578283fd5b5061337288828901612eae565b969995985093965092949392505050565b600080600080600060a0868803121561339a578283fd5b85356001600160401b038111156133af578384fd5b6133bb88828901612ef7565b9550506020860135935060408601356133d38161449f565b94979396509394606081013594506080013592915050565b60008060008060008060c08789031215613403578384fd5b86356001600160401b0380821115613419578586fd5b6134258a838b01612ef7565b9750602089013596506040890135915061343e8261449f565b909450606088013593506080880135925060a08801359080821115613461578283fd5b5061346e89828a01612ef7565b9150509295509295509295565b60006020828403121561348c578081fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526134d48160208601602086016143b0565b601f01601f19169290920160200192915050565b600081516134fa8185602086016143b0565b9290920192915050565b8183823760009101908152919050565b600084516135268184602089016143b0565b84519083019061353a8183602089016143b0565b845191019061354d8183602088016143b0565b0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b636861727365743d555481527f462d382c2537422532326e616d652532322533412532320000000000000000006020820152600084516135b58160378501602089016143b0565b7f2e646f69642532322532432532326465736372697074696f6e2532322533412560379184019182015261191960f11b605782015284516135fd8160598401602089016143b0565b7f2e646f696425324325323061253230646563656e7472616c697a65642532304f605992909101918201527f70656e49442e253232253243253232696d61676525323225334125323264617460798201527f61253341696d616765253246737667253242786d6c253342636861727365743d6099820152675554462d3825324360c01b60b98201527f25323533437376672532353230786d6c6e73253235334425323532326874747060c18201527f2532353341253235324625323532467777772e77332e6f72672532353246323060e18201527f303025323532467376672532353232253235323076696577426f7825323533446101018201527f25323532323025323532303025323532303132382532353230313238253235326101218201527f32253235323066696c6c253235334425323532322532353233666666253235326101418201527f3225323533452532353343646566732532353345253235334372616469616c476101618201527f72616469656e74253235323063782532353344253235323233302532353235256101818201527f3235323225323532306379253235334425323532322d333025323532352532356101a18201527f32322532353230722532353344253235323232253235323225323532306964256101c18201527f3235334425323532326125323532322532353345253235334373746f702532356101e18201527f32306f66667365742532353344253235323232302532353235253235323225326102018201527f35323073746f702d636f6c6f72253235334425323532322532353233464645416102218201527f3934253235323225323532462532353345253235334373746f7025323532306f6102418201527f66667365742532353344253235323234352532353235253235323225323532306102618201527f73746f702d636f6c6f72253235334425323532322532353233443339373530256102818201527f3235323225323532462532353345253235334373746f7025323532306f6666736102a18201527f657425323533442532353232383025323532352532353232253235323073746f6102c18201527f702d636f6c6f72253235334425323532322532353233353132393046253235326102e18201527f32253235324625323533452532353343253235324672616469616c47726164696103018201527f656e7425323533452532353343253235324664656673253235334525323533436103218201527f72656374253235323077696474682532353344253235323231303025323532356103418201527f25323532322532353230686569676874253235334425323532323130302532356103618201527f32352532353232253235323066696c6c2532353344253235323275726c2825326103818201527f35323361292532353232253235324625323533452532353343706174682532356103a18201527f323064253235334425323532326d32332e373036253235323031352e393138256103c18201527f32353230322e3630322532353230312e3338632e3333372e3230382e3534382e6103e18201527f3534382e3534382e39333676352e393039633025323532302e3336352d2e31386104018201527f332e3637372d2e34372e3838356c2d322e37362532353230312e373761312e306104218201527f34352532353230312e3034352532353230302532353230302532353230312d316104418201527f2e3039322e3035346c2d322e3231322d312e3139372532353230332e3830322d6104618201527f322e32392e3032362d342e3432362d322e3836342d312e35312532353230322e6104818201527f3432322d312e3530387a6d2d312e3639322532353230372e3431392e3632342e6104a18201527f3331312d322e3432322532353230312e3438342d2e3632342d2e3331322532356104c18201527f3230322e3432322d312e3438337a6d2d2e3431362d312e3036382e3632342e336104e18201527f31322d322e3432322532353230312e3438332d2e3635322d2e333132253235326105018201527f30322e3434372d312e3438337a6d2d312e3536322d392e3730392532353230326105218201527f2e3130372532353230312e3131392d332e3739392532353230322e3331382d2e6105418201527f3032352532353230342e342532353230322e3836332532353230312e3533372d6105618201527f322e3432322532353230312e35312d322e3439382d312e333535632d2e3431366105818201527f2d2e3230382d2e3635322d2e3635322d2e3635322d312e3039335631352e33326105a18201527f63302d2e3431362e3230382d2e3833322e3537332d312e3036386c322e3535326105c18201527f2d312e36333861312e3233342532353230312e323334253235323030253235326105e18201527f30302532353230312532353230312e332d2e3035347a6d322e393637253235326106018201527f30322e3439382e3632342e3331322d322e3432322532353230312e3438342d2e6106218201527f3632342d2e3331322532353230322e3432322d312e3438347a6d2d2e3434312d6106418201527f312e3036382e3635322e3333382d322e3432322532353230312e3438332d2e366106618201527f35322d2e3333372532353230322e3432322d312e3438347a25323532322532356106818201527f32462532353345253235334374657874253235323078253235334425323532326106a18201527f31352532353232253235323079253235334425323532323131302532353232256106c18201527f32353230666f6e742d73697a65253235334425323532323132253235323225326106e18201527f353230666f6e742d66616d696c7925323533442532353232417269616c25323561070182015275324373616e732d73657269662532353232253235334560501b610721820152613ebb613e796107378301866134e8565b7f2e646f696425323533432532353246746578742532353345253235334325323581526f0c919cdd99c94c8d4cd1494c8c894dd160821b602082015260300190565b9695505050505050565b7f436c69636b207369676e20746f20616c6c6f772073657474696e672061646472815267032b9b9903337b9160c51b602082015260008651613f0e816028850160208b016143b0565b630103a37960e51b6028918401918201528651613f3281602c840160208b016143b0565b7f0a0a5468697320726571756573742077696c6c206e6f74207472696767657220602c92909101918201527f6120626c6f636b636861696e207472616e73616374696f6e206f7220636f7374604c8201527f20616e792067617320666565732e0a0a54686973206d6573736167652077696c606c8201527f6c2065787069726520616674657220323420686f7572732e0a0a436f696e2074608c8201526403cb8329d160dd1b60ac82015261402c61402661401361400d613ff660b186018b6134e8565b6a52a34b6b2b9ba30b6b81d160a51b8152600c0190565b886134e8565b6652737b731b29d160c51b815260080190565b856134e8565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ebb908301846134bc565b60006020808301818452808551808352604092508286019150828160051b870101848801865b838110156140d057888303603f190185528151805184528701518784018790526140bd878501826134bc565b9588019593505090860190600101614091565b509098975050505050505050565b60006020808301818452808551808352604092508286019150828160051b870101848801865b838110156140d057888303603f19018552815180518452870151878401879052614130878501826134bc565b9588019593505090860190600101614104565b6020808252825182820181905260009190848201906040850190845b8181101561417b5783518352928401929184019160010161415f565b50909695505050505050565b600060808201878352602060018060a01b03881681850152608060408501528186835260a08501905060a08760051b860101925087845b8881101561422957868503609f190183528135368b9003601e190181126141e3578687fd5b8a0180356001600160401b038111156141fa578788fd5b8036038c1315614208578788fd5b6142158782888501613493565b9650505091830191908301906001016141be565b505050506060929092019290925295945050505050565b60208152600061094160208301846134bc565b602081526000611c67602083018486613493565b60608152600061427a60608301866134bc565b6001600160a01b039490941660208301525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b828152604060208201526000611c6760408301846134bc565b600082198211156143615761436161445d565b500190565b60008261437557614375614473565b500490565b60008160001904831182151516156143945761439461445d565b500290565b6000828210156143ab576143ab61445d565b500390565b60005b838110156143cb5781810151838201526020016143b3565b838111156110fe5750506000910152565b6000816143eb576143eb61445d565b506000190190565b600181811c9082168061440757607f821691505b6020821081141561442857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156144425761444261445d565b5060010190565b60008261445857614458614473565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611a8f57600080fd5b8015158114611a8f57600080fd5b6001600160e01b031981168114611a8f57600080fdfea26469706673582212202ad5a280743210686959a0f31067154d2f151563d169e86c36baaa718e0e475664736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c8063839df9451161013b578063b5a3be8d116100b8578063ce1e09c01161007c578063ce1e09c01461058f578063d95156bd14610598578063e96a6504146105ab578063e985e9c5146105b3578063f14fcbc8146105c657600080fd5b8063b5a3be8d14610523578063b88d4fde14610543578063b95eb99114610556578063bbc459a614610569578063c87b56dd1461057c57600080fd5b806396e494e8116100ff57806396e494e8146104b55780639791c097146104c8578063a22cb465146104db578063a479d68e146104ee578063aeb8ce9b1461051057600080fd5b8063839df945146104395780638462151c146104595780638bb3582c146104795780638d839ffe1461048c57806395d89b411461049557600080fd5b80633e837491116101c95780636352211e1161018d5780636352211e146103cd57806370a08231146103e057806372dead8a146103f3578063792e970f146104135780637a1ac61e1461042657600080fd5b80633e8374911461036857806342842e0e1461037b5780634f6ccce71461038e57806352c673e3146103a157806361e40016146103b457600080fd5b806318160ddd1161021057806318160ddd1461030a57806320c38e2b1461031c57806323b872dd1461032f5780632f745c59146103425780633b3b57de1461035557600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc146102b7578063095ea7b3146102e2578063141eed67146102f7575b600080fd5b61026061025b3660046131b6565b6105d9565b60405190151581526020015b60405180910390f35b60408051808201909152601a81527f444f49443a20446563656e7472616c697a6564204f70656e494400000000000060208201525b60405161026c9190614240565b6102ca6102c536600461317d565b610604565b6040516001600160a01b03909116815260200161026c565b6102f56102f0366004613102565b61062b565b005b6102f56103053660046131ee565b610746565b60fc545b60405190815260200161026c565b6102aa61032a36600461317d565b6107b4565b6102f561033d36600461302c565b61084e565b61030e610350366004613102565b61087f565b6102ca61036336600461317d565b610915565b6102606103763660046132cc565b610948565b6102f561038936600461302c565b610b22565b61030e61039c36600461317d565b610b3d565b6102f56103af3660046133eb565b610bde565b61030e6103c23660046132cc565b805160209091012090565b6102ca6103db36600461317d565b610cd5565b61030e6103ee366004612fbc565b610d35565b61040661040136600461317d565b610dbb565b60405161026c91906140de565b6102aa610421366004613383565b610f7e565b6102f561043436600461312d565b610fd3565b61030e61044736600461317d565b60016020526000908152604090205481565b61046c610467366004612fbc565b611104565b60405161026c9190614143565b61026061048736600461317d565b6111c3565b61030e60025481565b6040805180820190915260048152631113d25160e21b60208201526102aa565b6102606104c336600461317d565b611264565b6102606104d63660046132cc565b6112a7565b6102f56104e93660046130d5565b6113a4565b6105016104fc3660046132cc565b6113b3565b60405161026c93929190614267565b61026061051e3660046132cc565b6116a3565b610536610531366004612fbc565b6116e4565b60405161026c919061406b565b6102f561055136600461306c565b6117f9565b6102f5610564366004613242565b61182b565b6102aa610577366004613195565b611841565b6102aa61058a36600461317d565b6118ef565b61030e60035481565b61030e6105a63660046132fe565b611933565b61030e603c81565b6102606105c1366004612ff4565b61197b565b6102f56105d436600461317d565b6119a9565b60006001600160e01b03198216636f67973760e11b14806105fe57506105fe82611a0b565b92915050565b600061060f82611a30565b50600090815260cc60205260409020546001600160a01b031690565b600061063682610cd5565b9050806001600160a01b0316836001600160a01b031614156106a95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106c557506106c5813361197b565b6107375760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016106a0565b6107418383611a92565b505050565b6000546001600160a01b0316336001600160a01b0316146107a95760405162461bcd60e51b815260206004820152601c60248201527f4578637574656420627920506173735265676973747279206f6e6c790000000060448201526064016106a0565b610741838383611b00565b600460205260009081526040902080546107cd906143f3565b80601f01602080910402602001604051908101604052809291908181526020018280546107f9906143f3565b80156108465780601f1061081b57610100808354040283529160200191610846565b820191906000526020600020905b81548152906001019060200180831161082957829003601f168201915b505050505081565b6108583382611c10565b6108745760405162461bcd60e51b81526004016106a0906142e7565b610741838383611c6f565b600061088a83610d35565b82106108ec5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106a0565b506001600160a01b0391909116600090815260fa60209081526040808320938352929052205490565b60008061092383603c611841565b90508051600014156109385750600092915050565b61094181611e16565b9392505050565b60008054604051636631bd7f60e11b81526001600160a01b039091169063cc637afe90610979908590600401614240565b60206040518083038186803b15801561099157600080fd5b505afa1580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190613161565b15610b01576000546040516327bd40a960e21b81526001600160a01b0390911690639ef502a4906109fe908590600401614240565b60206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190613161565b15610a5b57506001919050565b60008054604051634bff500960e01b81526001600160a01b0390911690634bff500990610a8c908690600401614240565b60206040518083038186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc9190612fd8565b90506001600160a01b038116321415610af85750600092915050565b50600192915050565b6006610b0c83611e35565b1015610b1a57506001919050565b506000919050565b610741838383604051806020016040528060008152506117f9565b6000610b4860fc5490565b8210610bab5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106a0565b60fc8281548110610bcc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b85516020870120610bee81611f53565b610c1f5760405162461bcd60e51b81526020600482015260026024820152614e4f60f01b60448201526064016106a0565b62015180610c2d8542614399565b10610c605760405162461bcd60e51b815260206004820152600360248201526204558560ec1b60448201526064016106a0565b6000610c70888888888888611f7d565b9050806001600160a01b0316866001600160a01b031614610cb85760405162461bcd60e51b8152602060048201526002602482015261494160f01b60448201526064016106a0565b610ccb8288610cc689612014565b612044565b5050505050505050565b600081815260ca60205260408120546001600160a01b0316806105fe5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106a0565b60006001600160a01b038216610d9f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106a0565b506001600160a01b0316600090815260cb602052604090205490565b6000818152603260205260408120606091610dd5826120be565b6001600160401b03811115610dfa57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e4057816020015b604080518082019091526000815260606020820152815260200190600190039081610e185790505b50905060005b610e4f836120be565b811015610f76576000610e6284836120c8565b905080838381518110610e8557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151919091526000878152603182526040808220848352909252208054610eb5906143f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee1906143f3565b8015610f2e5780601f10610f0357610100808354040283529160200191610f2e565b820191906000526020600020905b815481529060010190602001808311610f1157829003601f168201915b5050505050838381518110610f5357634e487b7160e01b600052603260045260246000fd5b602002602001015160200181905250508080610f6e9061442e565b915050610e46565b509392505050565b606085610f8a856120d4565b610f93876120ea565b610f9c8661213e565b610fa5866120ea565b604051602001610fb9959493929190613ec5565b604051602081830303815290604052905095945050505050565b606354610100900460ff1615808015610ff35750606354600160ff909116105b8061100d5750303b15801561100d575060635460ff166001145b6110705760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106a0565b6063805460ff191660011790558015611093576063805461ff0019166101001790555b60028390556003829055600080546001600160a01b0319166001600160a01b03861617905580156110fe576063805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6060600061111183610d35565b6001600160401b0381111561113657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561115f578160200160208202803683370190505b50905060005b61116e84610d35565b8110156111bc5761117f848261087f565b82828151811061119f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806111b48161442e565b915050611165565b5092915050565b60008054604051637e26ee3160e11b81526004810184905282916001600160a01b03169063fc4ddc629060240160206040518083038186803b15801561120857600080fd5b505afa15801561121c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112409190612fd8565b90506001600160a01b038116321461125b5750600192915050565b50600092915050565b600081815260ca60205260408120546001600160a01b03161561128957506000919050565b611292826111c3565b1561129f57506000919050565b506001919050565b600081815b815181101561138f57604160f81b8282815181106112da57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916108015906113295750605a60f81b82828151811061131757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191611155b15611338575060009392505050565b81818151811061135857634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916601760f91b141561137d575060009392505050565b806113878161442e565b9150506112ac565b50600661139b84611e35565b10159392505050565b6113af338383612257565b5050565b604080518082019091526009815268617661696c61626c6560b81b602080830191909152825190830120600090819061140381600090815260ca60205260409020546001600160a01b0316151590565b1561143d5760408051808201909152600a8152691c9959da5cdd195c995960b21b6020820152935061143481610cd5565b9250905061169c565b600080546040516330b350c960e21b8152600481018490526001600160a01b039091169063c2cd43249060240160206040518083038186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba919061347b565b600054604051634f558e7960e01b8152600481018390529192506001600160a01b031690634f558e799060240160206040518083038186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115379190613161565b156115e05760408051808201825260068152651b1bd8dad95960d21b60208201526000549151637e26ee3160e11b8152600481018590529096506001600160a01b039091169063fc4ddc629060240160206040518083038186803b15801561159e57600080fd5b505afa1580156115b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d69190612fd8565b9350809250611699565b6115e9866112a7565b158061167057506000546040516327bd40a960e21b81526001600160a01b0390911690639ef502a490611620908990600401614240565b60206040518083038186803b15801561163857600080fd5b505afa15801561164c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116709190613161565b1561169957604051806040016040528060088152602001671c995cd95c9d995960c21b81525094505b50505b9193909250565b805160208201206000906116ce90600090815260ca60205260409020546001600160a01b0316151590565b156116db57506000919050565b61129282610948565b606060006116f183610d35565b6001600160401b0381111561171657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561175c57816020015b6040805180820190915260008152606060208201528152602001906001900390816117345790505b50905060005b61176b84610d35565b8110156111bc57600061177e858361087f565b9050808383815181106117a157634e487b7160e01b600052603260045260246000fd5b6020908102919091010151526117b681612326565b8383815181106117d657634e487b7160e01b600052603260045260246000fd5b6020026020010151602001819052505080806117f19061442e565b915050611762565b6118033383611c10565b61181f5760405162461bcd60e51b81526004016106a0906142e7565b6110fe848484846123c8565b6118398686868686866123fb565b505050505050565b60008281526031602090815260408083208484529091529020805460609190611869906143f3565b80601f0160208091040260200160405190810160405280929190818152602001828054611895906143f3565b80156118e25780601f106118b7576101008083540402835291602001916118e2565b820191906000526020600020905b8154815290600101906020018083116118c557829003601f168201915b5050505050905092915050565b60606118fa82611a30565b600061190583612326565b905080818260405160200161191c93929190613557565b604051602081830303815290604052915050919050565b600080868051906020012090508086858588604051602001611959959493929190614187565b6040516020818303038152906040528051906020012091505095945050505050565b6001600160a01b03918216600090815260cd6020908152604080832093909416825291909152205460ff1690565b60035460008281526001602052604090205442916119c69161434e565b106119f85760405162461bcd60e51b8152602060048201526002602482015261494360f01b60448201526064016106a0565b6000908152600160205260409020429055565b60006001600160e01b03198216636ce4a38f60e11b14806105fe57506105fe82612488565b600081815260ca60205260409020546001600160a01b0316611a8f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106a0565b50565b600081815260cc6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ac782610cd5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611b3f83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116a392505050565b611b705760405162461bcd60e51b815260206004820152600260248201526124a760f11b60448201526064016106a0565b60008383604051611b82929190613504565b604080519182900390912060008181526004602052919091209091508190611bab908686612da1565b50611bb683826124ad565b611bc582603c610cc686612014565b826001600160a01b0316817f9828659b64c66e7160a8a5f1f535250190e8aadb84e52e6584de17af554ffe3f8787604051611c01929190614253565b60405180910390a35050505050565b600080611c1c83610cd5565b9050806001600160a01b0316846001600160a01b03161480611c435750611c43818561197b565b80611c675750836001600160a01b0316611c5c84610604565b6001600160a01b0316145b949350505050565b826001600160a01b0316611c8282610cd5565b6001600160a01b031614611ce65760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106a0565b6001600160a01b038216611d485760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106a0565b611d538383836125fb565b611d5e600082611a92565b6001600160a01b038316600090815260cb60205260408120805460019290611d87908490614399565b90915550506001600160a01b038216600090815260cb60205260408120805460019290611db590849061434e565b9091555050600081815260ca602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008151601414611e2657600080fd5b5060200151600160601b900490565b8051600090819081905b80821015611f4a576000858381518110611e6957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160ff1b811015611e9857611e9160018461434e565b9250611f37565b83611ea28161442e565b945050600760fd1b6001600160f81b031982161015611ec657611e9160028461434e565b600f60fc1b6001600160f81b031982161015611ee757611e9160038461434e565b601f60fb1b6001600160f81b031982161015611f0857611e9160048461434e565b603f60fa1b6001600160f81b031982161015611f2957611e9160058461434e565b611f3460068461434e565b92505b5082611f428161442e565b935050611e3f565b50909392505050565b600080611f5f83610cd5565b90506001600160a01b0381163314806109415750610941813361197b565b60408051808201909152601a81527f19457468657265756d205369676e6564204d6573736167653a0a000000000000602082015260009081611fc28989898989610f7e565b9050600082611fd1835161213e565b83604051602001611fe493929190613514565b60405160208183030381529060405280519060200120905061200681866126b3565b9a9950505050505050505050565b604080516014808252818301909252606091602082018180368337505050600160601b9290920260208301525090565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af7528383604051612076929190614335565b60405180910390a26000838152603160209081526040808320858452825290912082516120a592840190612e25565b5060008381526032602052604090206110fe908361272b565b60006105fe825490565b60006109418383612737565b60606105fe6001600160a01b038316601461276f565b6060816121115750506040805180820190915260048152630307830360e41b602082015290565b8160005b811561213457806121258161442e565b915050600882901c9150612115565b611c67848261276f565b6060816121625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561218c57806121768161442e565b91506121859050600a83614366565b9150612166565b6000816001600160401b038111156121b457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121de576020820181803683370190505b5090505b8415611c67576121f3600183614399565b9150612200600a86614449565b61220b90603061434e565b60f81b81838151811061222e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612250600a86614366565b94506121e2565b816001600160a01b0316836001600160a01b031614156122b95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106a0565b6001600160a01b03838116600081815260cd6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000818152600460205260409020805460609190612343906143f3565b80601f016020809104026020016040519081016040528092919081815260200182805461236f906143f3565b80156123bc5780601f10612391576101008083540402835291602001916123bc565b820191906000526020600020905b81548152906001019060200180831161239f57829003601f168201915b50505050509050919050565b6123d3848484611c6f565b6123df84848484612950565b6110fe5760405162461bcd60e51b81526004016106a090614295565b61247d86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a8152612478935091508a908a90819084018382808284376000920191909152508a925089915088905087611933565b612a5d565b611839868686611b00565b60006001600160e01b0319821663780e9d6360e01b14806105fe57506105fe82612b48565b6001600160a01b0382166125035760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106a0565b600081815260ca60205260409020546001600160a01b0316156125685760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106a0565b612574600083836125fb565b6001600160a01b038216600090815260cb6020526040812080546001929061259d90849061434e565b9091555050600081815260ca602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316612656576126518160fc8054600083815260fd60205260408120829055600182018355919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00155565b612679565b816001600160a01b0316836001600160a01b031614612679576126798382612b98565b6001600160a01b0382166126905761074181612c35565b826001600160a01b0316826001600160a01b031614610741576107418282612d0e565b6020818101516040808401516060808601518351600080825296810180865289905290861a9381018490529081018490526080810182905290919060019060a0016020604051602081039080840390855afa158015612716573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60006109418383612d52565b600082600001828154811061275c57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6060600061277e83600261437a565b61278990600261434e565b6001600160401b038111156127ae57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127d8576020820181803683370190505b509050600360fc1b8160008151811061280157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061283e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061286284600261437a565b61286d90600161434e565b90505b6001811115612901576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106128af57634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106128d357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936128fa816143dc565b9050612870565b5083156109415760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106a0565b60006001600160a01b0384163b15612a5257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612994903390899088908890600401614038565b602060405180830381600087803b1580156129ae57600080fd5b505af19250505080156129de575060408051601f3d908101601f191682019092526129db918101906131d2565b60015b612a38573d808015612a0c576040519150601f19603f3d011682016040523d82523d6000602084013e612a11565b606091505b508051612a305760405162461bcd60e51b81526004016106a090614295565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c67565b506001949350505050565b6002546000828152600160205260409020544291612a7a9161434e565b1115612aad5760405162461bcd60e51b815260206004820152600260248201526121a760f11b60448201526064016106a0565b6003546000828152600160205260409020544291612aca9161434e565b11612afc5760405162461bcd60e51b8152602060048201526002602482015261434f60f01b60448201526064016106a0565b612b05826116a3565b612b365760405162461bcd60e51b815260206004820152600260248201526124a760f11b60448201526064016106a0565b60009081526001602052604081205550565b60006001600160e01b031982166380ac58cd60e01b1480612b7957506001600160e01b03198216635b5e139f60e01b145b806105fe57506301ffc9a760e01b6001600160e01b03198316146105fe565b60006001612ba584610d35565b612baf9190614399565b600083815260fb6020526040902054909150808214612c02576001600160a01b038416600090815260fa60209081526040808320858452825280832054848452818420819055835260fb90915290208190555b50600091825260fb602090815260408084208490556001600160a01b03909416835260fa81528383209183525290812055565b60fc54600090612c4790600190614399565b600083815260fd602052604081205460fc8054939450909284908110612c7d57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060fc8381548110612cac57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260fd909152604080822084905585825281205560fc805480612cf257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612d1983610d35565b6001600160a01b03909316600090815260fa60209081526040808320868452825280832085905593825260fb9052919091209190915550565b6000818152600183016020526040812054612d99575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105fe565b5060006105fe565b828054612dad906143f3565b90600052602060002090601f016020900481019282612dcf5760008555612e15565b82601f10612de85782800160ff19823516178555612e15565b82800160010185558215612e15579182015b82811115612e15578235825591602001919060010190612dfa565b50612e21929150612e99565b5090565b828054612e31906143f3565b90600052602060002090601f016020900481019282612e535760008555612e15565b82601f10612e6c57805160ff1916838001178555612e15565b82800160010185558215612e15579182015b82811115612e15578251825591602001919060010190612e7e565b5b80821115612e215760008155600101612e9a565b60008083601f840112612ebf578182fd5b5081356001600160401b03811115612ed5578182fd5b6020830191508360208260051b8501011115612ef057600080fd5b9250929050565b600082601f830112612f07578081fd5b81356001600160401b0380821115612f2157612f21614489565b604051601f8301601f19908116603f01168101908282118183101715612f4957612f49614489565b81604052838152866020858801011115612f61578485fd5b8360208701602083013792830160200193909352509392505050565b60008083601f840112612f8e578182fd5b5081356001600160401b03811115612fa4578182fd5b602083019150836020828501011115612ef057600080fd5b600060208284031215612fcd578081fd5b81356109418161449f565b600060208284031215612fe9578081fd5b81516109418161449f565b60008060408385031215613006578081fd5b82356130118161449f565b915060208301356130218161449f565b809150509250929050565b600080600060608486031215613040578081fd5b833561304b8161449f565b9250602084013561305b8161449f565b929592945050506040919091013590565b60008060008060808587031215613081578081fd5b843561308c8161449f565b9350602085013561309c8161449f565b92506040850135915060608501356001600160401b038111156130bd578182fd5b6130c987828801612ef7565b91505092959194509250565b600080604083850312156130e7578182fd5b82356130f28161449f565b91506020830135613021816144b4565b60008060408385031215613114578182fd5b823561311f8161449f565b946020939093013593505050565b600080600060608486031215613141578283fd5b833561314c8161449f565b95602085013595506040909401359392505050565b600060208284031215613172578081fd5b8151610941816144b4565b60006020828403121561318e578081fd5b5035919050565b600080604083850312156131a7578182fd5b50508035926020909101359150565b6000602082840312156131c7578081fd5b8135610941816144c2565b6000602082840312156131e3578081fd5b8151610941816144c2565b600080600060408486031215613202578081fd5b83356001600160401b03811115613217578182fd5b61322386828701612f7d565b90945092505060208401356132378161449f565b809150509250925092565b6000806000806000806080878903121561325a578384fd5b86356001600160401b0380821115613270578586fd5b61327c8a838b01612f7d565b9098509650602089013591506132918261449f565b90945060408801359350606088013590808211156132ad578384fd5b506132ba89828a01612eae565b979a9699509497509295939492505050565b6000602082840312156132dd578081fd5b81356001600160401b038111156132f2578182fd5b611c6784828501612ef7565b600080600080600060808688031215613315578283fd5b85356001600160401b038082111561332b578485fd5b61333789838a01612ef7565b9650602088013591506133498261449f565b9094506040870135935060608701359080821115613365578283fd5b5061337288828901612eae565b969995985093965092949392505050565b600080600080600060a0868803121561339a578283fd5b85356001600160401b038111156133af578384fd5b6133bb88828901612ef7565b9550506020860135935060408601356133d38161449f565b94979396509394606081013594506080013592915050565b60008060008060008060c08789031215613403578384fd5b86356001600160401b0380821115613419578586fd5b6134258a838b01612ef7565b9750602089013596506040890135915061343e8261449f565b909450606088013593506080880135925060a08801359080821115613461578283fd5b5061346e89828a01612ef7565b9150509295509295509295565b60006020828403121561348c578081fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526134d48160208601602086016143b0565b601f01601f19169290920160200192915050565b600081516134fa8185602086016143b0565b9290920192915050565b8183823760009101908152919050565b600084516135268184602089016143b0565b84519083019061353a8183602089016143b0565b845191019061354d8183602088016143b0565b0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b636861727365743d555481527f462d382c2537422532326e616d652532322533412532320000000000000000006020820152600084516135b58160378501602089016143b0565b7f2e646f69642532322532432532326465736372697074696f6e2532322533412560379184019182015261191960f11b605782015284516135fd8160598401602089016143b0565b7f2e646f696425324325323061253230646563656e7472616c697a65642532304f605992909101918201527f70656e49442e253232253243253232696d61676525323225334125323264617460798201527f61253341696d616765253246737667253242786d6c253342636861727365743d6099820152675554462d3825324360c01b60b98201527f25323533437376672532353230786d6c6e73253235334425323532326874747060c18201527f2532353341253235324625323532467777772e77332e6f72672532353246323060e18201527f303025323532467376672532353232253235323076696577426f7825323533446101018201527f25323532323025323532303025323532303132382532353230313238253235326101218201527f32253235323066696c6c253235334425323532322532353233666666253235326101418201527f3225323533452532353343646566732532353345253235334372616469616c476101618201527f72616469656e74253235323063782532353344253235323233302532353235256101818201527f3235323225323532306379253235334425323532322d333025323532352532356101a18201527f32322532353230722532353344253235323232253235323225323532306964256101c18201527f3235334425323532326125323532322532353345253235334373746f702532356101e18201527f32306f66667365742532353344253235323232302532353235253235323225326102018201527f35323073746f702d636f6c6f72253235334425323532322532353233464645416102218201527f3934253235323225323532462532353345253235334373746f7025323532306f6102418201527f66667365742532353344253235323234352532353235253235323225323532306102618201527f73746f702d636f6c6f72253235334425323532322532353233443339373530256102818201527f3235323225323532462532353345253235334373746f7025323532306f6666736102a18201527f657425323533442532353232383025323532352532353232253235323073746f6102c18201527f702d636f6c6f72253235334425323532322532353233353132393046253235326102e18201527f32253235324625323533452532353343253235324672616469616c47726164696103018201527f656e7425323533452532353343253235324664656673253235334525323533436103218201527f72656374253235323077696474682532353344253235323231303025323532356103418201527f25323532322532353230686569676874253235334425323532323130302532356103618201527f32352532353232253235323066696c6c2532353344253235323275726c2825326103818201527f35323361292532353232253235324625323533452532353343706174682532356103a18201527f323064253235334425323532326d32332e373036253235323031352e393138256103c18201527f32353230322e3630322532353230312e3338632e3333372e3230382e3534382e6103e18201527f3534382e3534382e39333676352e393039633025323532302e3336352d2e31386104018201527f332e3637372d2e34372e3838356c2d322e37362532353230312e373761312e306104218201527f34352532353230312e3034352532353230302532353230302532353230312d316104418201527f2e3039322e3035346c2d322e3231322d312e3139372532353230332e3830322d6104618201527f322e32392e3032362d342e3432362d322e3836342d312e35312532353230322e6104818201527f3432322d312e3530387a6d2d312e3639322532353230372e3431392e3632342e6104a18201527f3331312d322e3432322532353230312e3438342d2e3632342d2e3331322532356104c18201527f3230322e3432322d312e3438337a6d2d2e3431362d312e3036382e3632342e336104e18201527f31322d322e3432322532353230312e3438332d2e3635322d2e333132253235326105018201527f30322e3434372d312e3438337a6d2d312e3536322d392e3730392532353230326105218201527f2e3130372532353230312e3131392d332e3739392532353230322e3331382d2e6105418201527f3032352532353230342e342532353230322e3836332532353230312e3533372d6105618201527f322e3432322532353230312e35312d322e3439382d312e333535632d2e3431366105818201527f2d2e3230382d2e3635322d2e3635322d2e3635322d312e3039335631352e33326105a18201527f63302d2e3431362e3230382d2e3833322e3537332d312e3036386c322e3535326105c18201527f2d312e36333861312e3233342532353230312e323334253235323030253235326105e18201527f30302532353230312532353230312e332d2e3035347a6d322e393637253235326106018201527f30322e3439382e3632342e3331322d322e3432322532353230312e3438342d2e6106218201527f3632342d2e3331322532353230322e3432322d312e3438347a6d2d2e3434312d6106418201527f312e3036382e3635322e3333382d322e3432322532353230312e3438332d2e366106618201527f35322d2e3333372532353230322e3432322d312e3438347a25323532322532356106818201527f32462532353345253235334374657874253235323078253235334425323532326106a18201527f31352532353232253235323079253235334425323532323131302532353232256106c18201527f32353230666f6e742d73697a65253235334425323532323132253235323225326106e18201527f353230666f6e742d66616d696c7925323533442532353232417269616c25323561070182015275324373616e732d73657269662532353232253235334560501b610721820152613ebb613e796107378301866134e8565b7f2e646f696425323533432532353246746578742532353345253235334325323581526f0c919cdd99c94c8d4cd1494c8c894dd160821b602082015260300190565b9695505050505050565b7f436c69636b207369676e20746f20616c6c6f772073657474696e672061646472815267032b9b9903337b9160c51b602082015260008651613f0e816028850160208b016143b0565b630103a37960e51b6028918401918201528651613f3281602c840160208b016143b0565b7f0a0a5468697320726571756573742077696c6c206e6f74207472696767657220602c92909101918201527f6120626c6f636b636861696e207472616e73616374696f6e206f7220636f7374604c8201527f20616e792067617320666565732e0a0a54686973206d6573736167652077696c606c8201527f6c2065787069726520616674657220323420686f7572732e0a0a436f696e2074608c8201526403cb8329d160dd1b60ac82015261402c61402661401361400d613ff660b186018b6134e8565b6a52a34b6b2b9ba30b6b81d160a51b8152600c0190565b886134e8565b6652737b731b29d160c51b815260080190565b856134e8565b98975050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ebb908301846134bc565b60006020808301818452808551808352604092508286019150828160051b870101848801865b838110156140d057888303603f190185528151805184528701518784018790526140bd878501826134bc565b9588019593505090860190600101614091565b509098975050505050505050565b60006020808301818452808551808352604092508286019150828160051b870101848801865b838110156140d057888303603f19018552815180518452870151878401879052614130878501826134bc565b9588019593505090860190600101614104565b6020808252825182820181905260009190848201906040850190845b8181101561417b5783518352928401929184019160010161415f565b50909695505050505050565b600060808201878352602060018060a01b03881681850152608060408501528186835260a08501905060a08760051b860101925087845b8881101561422957868503609f190183528135368b9003601e190181126141e3578687fd5b8a0180356001600160401b038111156141fa578788fd5b8036038c1315614208578788fd5b6142158782888501613493565b9650505091830191908301906001016141be565b505050506060929092019290925295945050505050565b60208152600061094160208301846134bc565b602081526000611c67602083018486613493565b60608152600061427a60608301866134bc565b6001600160a01b039490941660208301525060400152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b828152604060208201526000611c6760408301846134bc565b600082198211156143615761436161445d565b500190565b60008261437557614375614473565b500490565b60008160001904831182151516156143945761439461445d565b500290565b6000828210156143ab576143ab61445d565b500390565b60005b838110156143cb5781810151838201526020016143b3565b838111156110fe5750506000910152565b6000816143eb576143eb61445d565b506000190190565b600181811c9082168061440757607f821691505b6020821081141561442857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156144425761444261445d565b5060010190565b60008261445857614458614473565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611a8f57600080fd5b8015158114611a8f57600080fd5b6001600160e01b031981168114611a8f57600080fdfea26469706673582212202ad5a280743210686959a0f31067154d2f151563d169e86c36baaa718e0e475664736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
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.