Contract
0xAad76bea7CFEc82927239415BB18D2e93518ecBB
3
Contract Overview
Balance:
0 Ether
More Info
My Name Tag:
Not Available
TokenTracker:
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
Registry
Compiler Version
v0.5.12+commit.7709ece9
Optimization Enabled:
No with 200 runs
Other Settings:
petersburg EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.5.12; import "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol"; contract IRegistry is IERC721Metadata { event NewURI(uint256 indexed tokenId, string uri); event NewURIPrefix(string prefix); event Resolve(uint256 indexed tokenId, address indexed to); event Sync(address indexed resolver, uint256 indexed updateId, uint256 indexed tokenId); /** * @dev Controlled function to set the token URI Prefix for all tokens. * @param prefix string URI to assign */ function controlledSetTokenURIPrefix(string calldata prefix) external; /** * @dev Returns whether the given spender can transfer a given token ID. * @param spender address of the spender to query * @param tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function isApprovedOrOwner(address spender, uint256 tokenId) external view returns (bool); /** * @dev Mints a new a child token. * Calculates child token ID using a namehash function. * Requires the msg.sender to be the owner, approved, or operator of tokenId. * Requires the token not exist. * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the parent token * @param label subdomain label of the child token ID */ function mintChild(address to, uint256 tokenId, string calldata label) external; /** * @dev Controlled function to mint a given token ID. * Requires the msg.sender to be controller. * Requires the token ID to not exist. * @param to address the given token ID will be minted to * @param label string that is a subdomain * @param tokenId uint256 ID of the parent token */ function controlledMintChild(address to, uint256 tokenId, string calldata label) external; /** * @dev Transfers the ownership of a child token ID to another address. * Calculates child token ID using a namehash function. * Requires the msg.sender to be the owner, approved, or operator of tokenId. * Requires the token already exist. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param label subdomain label of the child token ID */ function transferFromChild(address from, address to, uint256 tokenId, string calldata label) external; /** * @dev Controlled function to transfers the ownership of a token ID to * another address. * Requires the msg.sender to be controller. * Requires the token already exist. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function controlledTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Safely transfers the ownership of a child token ID to another address. * Calculates child token ID using a namehash function. * Implements a ERC721Reciever check unlike transferFromChild. * Requires the msg.sender to be the owner, approved, or operator of tokenId. * Requires the token already exist. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 parent ID of the token to be transferred * @param label subdomain label of the child token ID * @param _data bytes data to send along with a safe transfer check */ function safeTransferFromChild(address from, address to, uint256 tokenId, string calldata label, bytes calldata _data) external; /// Shorthand for calling the above ^^^ safeTransferFromChild function with an empty _data parameter. Similar to ERC721.safeTransferFrom. function safeTransferFromChild(address from, address to, uint256 tokenId, string calldata label) external; /** * @dev Controlled frunction to safely transfers the ownership of a token ID * to another address. * Implements a ERC721Reciever check unlike controlledSafeTransferFrom. * Requires the msg.sender to be controller. * Requires the token already exist. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 parent ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function controlledSafeTransferFrom(address from, address to, uint256 tokenId, bytes calldata _data) external; /** * @dev Burns a child token ID. * Calculates child token ID using a namehash function. * Requires the msg.sender to be the owner, approved, or operator of tokenId. * Requires the token already exist. * @param tokenId uint256 ID of the token to be transferred * @param label subdomain label of the child token ID */ function burnChild(uint256 tokenId, string calldata label) external; /** * @dev Controlled function to burn a given token ID. * Requires the msg.sender to be controller. * Requires the token already exist. * @param tokenId uint256 ID of the token to be burned */ function controlledBurn(uint256 tokenId) external; /** * @dev Sets the resolver of a given token ID to another address. * Requires the msg.sender to be the owner, approved, or operator. * @param to address the given token ID will resolve to * @param tokenId uint256 ID of the token to be transferred */ function resolveTo(address to, uint256 tokenId) external; /** * @dev Gets the resolver of the specified token ID. * @param tokenId uint256 ID of the token to query the resolver of * @return address currently marked as the resolver of the given token ID */ function resolverOf(uint256 tokenId) external view returns (address); /** * @dev Controlled function to sets the resolver of a given token ID. * Requires the msg.sender to be controller. * @param to address the given token ID will resolve to * @param tokenId uint256 ID of the token to be transferred */ function controlledResolveTo(address to, uint256 tokenId) external; /** * @dev Provides child token (subdomain) of provided tokenId. * @param tokenId uint256 ID of the token * @param label label of subdomain (for `aaa.bbb.crypto` it will be `aaa`) */ function childIdOf(uint256 tokenId, string calldata label) external pure returns (uint256); /** * @dev Transfer domain ownership without resetting domain records. * @param to address of new domain owner * @param tokenId uint256 ID of the token to be transferred */ function setOwner(address to, uint256 tokenId) external; }
pragma solidity 0.5.12; import "./IRegistry.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721Burnable.sol"; import "./util/ControllerRole.sol"; // solium-disable no-empty-blocks,error-reason /** * @title Registry * @dev An ERC721 Token see https://eips.ethereum.org/EIPS/eip-721. With * additional functions so other trusted contracts to interact with the tokens. */ contract Registry is IRegistry, ControllerRole, ERC721Burnable { // Optional mapping for token URIs mapping(uint256 => string) internal _tokenURIs; string internal _prefix; // Mapping from token ID to resolver address mapping (uint256 => address) internal _tokenResolvers; // uint256(keccak256(abi.encodePacked(uint256(0x0), keccak256(abi.encodePacked("crypto"))))) uint256 private constant _CRYPTO_HASH = 0x0f4a10a4f46c288cea365fcf45cccf0e9d901b945b9829ccdb54c10dc3cb7a6f; modifier onlyApprovedOrOwner(uint256 tokenId) { require(_isApprovedOrOwner(msg.sender, tokenId)); _; } constructor () public { _mint(address(0xdead), _CRYPTO_HASH); // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(0x5b5e139f); // ERC721 Metadata Interface _tokenURIs[root()] = "crypto"; emit NewURI(root(), "crypto"); } /// ERC721 Metadata extension function name() external view returns (string memory) { return ".crypto"; } function symbol() external view returns (string memory) { return "UD"; } function tokenURI(uint256 tokenId) external view returns (string memory) { require(_exists(tokenId)); return string(abi.encodePacked(_prefix, _tokenURIs[tokenId])); } function controlledSetTokenURIPrefix(string calldata prefix) external onlyController { _prefix = prefix; emit NewURIPrefix(prefix); } /// Ownership function isApprovedOrOwner(address spender, uint256 tokenId) external view returns (bool) { return _isApprovedOrOwner(spender, tokenId); } /// Registry Constants function root() public pure returns (uint256) { return _CRYPTO_HASH; } function childIdOf(uint256 tokenId, string calldata label) external pure returns (uint256) { return _childId(tokenId, label); } /// Minting function mintChild(address to, uint256 tokenId, string calldata label) external onlyApprovedOrOwner(tokenId) { _mintChild(to, tokenId, label); } function controlledMintChild(address to, uint256 tokenId, string calldata label) external onlyController { _mintChild(to, tokenId, label); } function safeMintChild(address to, uint256 tokenId, string calldata label) external onlyApprovedOrOwner(tokenId) { _safeMintChild(to, tokenId, label, ""); } function safeMintChild(address to, uint256 tokenId, string calldata label, bytes calldata _data) external onlyApprovedOrOwner(tokenId) { _safeMintChild(to, tokenId, label, _data); } function controlledSafeMintChild(address to, uint256 tokenId, string calldata label, bytes calldata _data) external onlyController { _safeMintChild(to, tokenId, label, _data); } /// Transfering function setOwner(address to, uint256 tokenId) external onlyApprovedOrOwner(tokenId) { super._transferFrom(ownerOf(tokenId), to, tokenId); } function transferFromChild(address from, address to, uint256 tokenId, string calldata label) external onlyApprovedOrOwner(tokenId) { _transferFrom(from, to, _childId(tokenId, label)); } function controlledTransferFrom(address from, address to, uint256 tokenId) external onlyController { _transferFrom(from, to, tokenId); } function safeTransferFromChild( address from, address to, uint256 tokenId, string memory label, bytes memory _data ) public onlyApprovedOrOwner(tokenId) { uint256 childId = _childId(tokenId, label); _transferFrom(from, to, childId); require(_checkOnERC721Received(from, to, childId, _data)); } function safeTransferFromChild(address from, address to, uint256 tokenId, string calldata label) external { safeTransferFromChild(from, to, tokenId, label, ""); } function controlledSafeTransferFrom(address from, address to, uint256 tokenId, bytes calldata _data) external onlyController { _transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data)); } /// Burning function burnChild(uint256 tokenId, string calldata label) external onlyApprovedOrOwner(tokenId) { _burn(_childId(tokenId, label)); } function controlledBurn(uint256 tokenId) external onlyController { _burn(tokenId); } /// Resolution function resolverOf(uint256 tokenId) external view returns (address) { address resolver = _tokenResolvers[tokenId]; require(resolver != address(0)); return resolver; } function resolveTo(address to, uint256 tokenId) external onlyApprovedOrOwner(tokenId) { _resolveTo(to, tokenId); } function controlledResolveTo(address to, uint256 tokenId) external onlyController { _resolveTo(to, tokenId); } function sync(uint256 tokenId, uint256 updateId) external { require(_tokenResolvers[tokenId] == msg.sender); emit Sync(msg.sender, updateId, tokenId); } /// Internal function _childId(uint256 tokenId, string memory label) internal pure returns (uint256) { require(bytes(label).length != 0); return uint256(keccak256(abi.encodePacked(tokenId, keccak256(abi.encodePacked(label))))); } function _mintChild(address to, uint256 tokenId, string memory label) internal { uint256 childId = _childId(tokenId, label); _mint(to, childId); require(bytes(label).length != 0); require(_exists(childId)); bytes memory domain = abi.encodePacked(label, ".", _tokenURIs[tokenId]); _tokenURIs[childId] = string(domain); emit NewURI(childId, string(domain)); } function _safeMintChild(address to, uint256 tokenId, string memory label, bytes memory _data) internal { _mintChild(to, tokenId, label); require(_checkOnERC721Received(address(0), to, _childId(tokenId, label), _data)); } function _transferFrom(address from, address to, uint256 tokenId) internal { super._transferFrom(from, to, tokenId); // Clear resolver (if any) if (_tokenResolvers[tokenId] != address(0x0)) { delete _tokenResolvers[tokenId]; } } function _burn(uint256 tokenId) internal { super._burn(tokenId); // Clear resolver (if any) if (_tokenResolvers[tokenId] != address(0x0)) { delete _tokenResolvers[tokenId]; } // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } function _resolveTo(address to, uint256 tokenId) internal { require(_exists(tokenId)); emit Resolve(tokenId, to); _tokenResolvers[tokenId] = to; } }
pragma solidity 0.5.12; import "@openzeppelin/contracts/access/Roles.sol"; // solium-disable error-reason /** * @title ControllerRole * @dev An Controller role defined using the Open Zeppelin Role system. */ contract ControllerRole { using Roles for Roles.Role; // NOTE: Commented out standard Role events to save gas. // event ControllerAdded(address indexed account); // event ControllerRemoved(address indexed account); Roles.Role private _controllers; constructor () public { _addController(msg.sender); } modifier onlyController() { require(isController(msg.sender)); _; } function isController(address account) public view returns (bool) { return _controllers.has(account); } function addController(address account) public onlyController { _addController(account); } function renounceController() public { _removeController(msg.sender); } function _addController(address account) internal { _controllers.add(account); // emit ControllerAdded(account); } function _removeController(address account) internal { _controllers.remove(account); // emit ControllerRemoved(account); } }
pragma solidity ^0.5.0; /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } }
pragma solidity ^0.5.0; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the SafeMath * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
pragma solidity ^0.5.0; import "./IERC165.sol"; /** * @dev Implementation of the `IERC165` interface. * * Contracts may inherit from this and call `_registerInterface` to declare * their support of an interface. */ contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See `IERC165.supportsInterface`. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See `IERC165.supportsInterface`. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC165 standard, as defined in the * [EIP](https://eips.ethereum.org/EIPS/eip-165). * * Implementers can declare support of contract interfaces, which can then be * queried by others (`ERC165Checker`). * * For an implementation, see `ERC165`. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * 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); }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } }
pragma solidity ^0.5.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; import "../../drafts/Counters.sol"; import "../../introspection/ERC165.sol"; /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to number of owned token mapping (address => Counters.Counter) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; constructor () public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); } /** * @dev Gets the balance of the specified address. * @param owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address owner) public view returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _ownedTokensCount[owner].current(); } /** * @dev Gets the owner of the specified token ID. * @param tokenId uint256 ID of the token to query the owner of * @return address currently marked as the owner of the given token ID */ function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param to address to be approved for the given token ID * @param tokenId uint256 ID of the token to be approved */ function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(msg.sender == owner || isApprovedForAll(owner, msg.sender), "ERC721: approve caller is not owner nor approved for all" ); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Gets the approved address for a token ID, or zero if no address set * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */ function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf. * @param to operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address to, bool approved) public { require(to != msg.sender, "ERC721: approve to caller"); _operatorApprovals[msg.sender][to] = approved; emit ApprovalForAll(msg.sender, to, approved); } /** * @dev Tells whether an operator is approved by a given owner. * @param owner owner address which you want to query the approval of * @param operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Transfers the ownership of a given token ID to another address. * Usage of this method is discouraged, use `safeTransferFrom` whenever possible. * Requires the msg.sender to be the owner, approved, or operator. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function transferFrom(address from, address to, uint256 tokenId) public { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved"); _transferFrom(from, to, tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public { transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether the specified token exists. * @param tokenId uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 tokenId) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); } /** * @dev Returns whether the given spender can transfer a given token ID. * @param spender address of the spender to query * @param tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Internal function to mint a new token. * Reverts if the given token ID already exists. * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted */ function _mint(address to, uint256 tokenId) internal { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _tokenOwner[tokenId] = to; _ownedTokensCount[to].increment(); emit Transfer(address(0), to, tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use _burn(uint256) instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */ function _burn(address owner, uint256 tokenId) internal { require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own"); _clearApproval(tokenId); _ownedTokensCount[owner].decrement(); _tokenOwner[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * @param tokenId uint256 ID of the token being burned */ function _burn(uint256 tokenId) internal { _burn(ownerOf(tokenId), tokenId); } /** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to transferFrom, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function _transferFrom(address from, address to, uint256 tokenId) internal { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _clearApproval(tokenId); _ownedTokensCount[from].decrement(); _ownedTokensCount[to].increment(); _tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Internal function to invoke `onERC721Received` on a target address. * The call is not executed if the target address is not a contract. * * This function is deprecated. * @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) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED); } /** * @dev Private function to clear current approval of a given token ID. * @param tokenId uint256 ID of the token to be transferred */ function _clearApproval(uint256 tokenId) private { if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } } }
pragma solidity ^0.5.0; import "./ERC721.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ contract ERC721Burnable is ERC721 { /** * @dev Burns a specific ERC721 token. * @param tokenId uint256 id of the ERC721 token to be burned. */ function burn(uint256 tokenId) public { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
pragma solidity ^0.5.0; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ contract IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) public view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) public view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either `approve` or `setApproveForAll`. */ function safeTransferFrom(address from, address to, uint256 tokenId) public; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either `approve` or `setApproveForAll`. */ function transferFrom(address from, address to, uint256 tokenId) public; function approve(address to, uint256 tokenId) public; function getApproved(uint256 tokenId) public view returns (address operator); function setApprovalForAll(address operator, bool _approved) public; function isApprovedForAll(address owner, address operator) public view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public; }
pragma solidity ^0.5.0; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ contract IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); }
pragma solidity ^0.5.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 contract address is always the message sender. * @param operator The address which called `safeTransferFrom` function * @param from The address which previously owned the token * @param tokenId The NFT identifier which is being transferred * @param data Additional data with no specified format * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); }
pragma solidity ^0.5.0; /** * @dev Collection of functions related to the address type, */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "petersburg", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"NewURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prefix","type":"string"}],"name":"NewURIPrefix","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Resolve","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"resolver","type":"address"},{"indexed":true,"internalType":"uint256","name":"updateId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Sync","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"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"burnChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"childIdOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"controlledBurn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"controlledMintChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"controlledResolveTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"controlledSafeMintChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"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":"controlledSafeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"controlledSetTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"controlledTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isApprovedOrOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"mintChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resolveTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resolverOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"root","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"safeMintChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeMintChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"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":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"safeTransferFromChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFromChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"updateId","type":"uint256"}],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"label","type":"string"}],"name":"transferFromChild","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200002a6301ffc9a760e01b6200018b60201b60201c565b6200003b336200029460201b60201c565b620000536380ac58cd60e01b6200018b60201b60201c565b6200008761dead7f0f4a10a4f46c288cea365fcf45cccf0e9d901b945b9829ccdb54c10dc3cb7a6f620002b260201b60201c565b6200009f635b5e139f60e01b6200018b60201b60201c565b6040518060400160405280600681526020017f63727970746f000000000000000000000000000000000000000000000000000081525060066000620000e9620004e160201b60201c565b815260200190815260200160002090805190602001906200010c92919062000755565b506200011d620004e160201b60201c565b7fc5beef08f693b11c316c0c8394a377a0033c9cf701b8cd8afd79cecef60c39526040518080602001828103825260068152602001807f63727970746f000000000000000000000000000000000000000000000000000081525060200191505060405180910390a262000804565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141562000228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b6001600080837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b620002af8160016200050960201b620033d41790919060201c565b50565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000356576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4552433732313a206d696e7420746f20746865207a65726f206164647265737381525060200191505060405180910390fd5b6200036781620005ed60201b60201c565b15620003db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081525060200191505060405180910390fd5b816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000481600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206200065f60201b620035901760201c565b808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b60007f0f4a10a4f46c288cea365fcf45cccf0e9d901b945b9829ccdb54c10dc3cb7a6f905090565b6200051b82826200067560201b60201c565b156200058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415915050919050565b6001816000016000828254019250508190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620006fe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180620045d86022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200079857805160ff1916838001178555620007c9565b82800160010185558215620007c9579182015b82811115620007c8578251825591602001919060010190620007ab565b5b509050620007d89190620007dc565b5090565b6200080191905b80821115620007fd576000816000905550600101620007e3565b5090565b90565b613dc480620008146000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c80637c69eae211610130578063b5466669116100b8578063d284d97a1161007c578063d284d97a1461136d578063d8d3cc6e146113e6578063e67ca8a314611489578063e985e9c5146114b7578063ebf0c7171461153357610232565b8063b546666914610e8a578063b88d4fde14610f2d578063c29b52f914611032578063c87b56dd146111ce578063ce9fb82b1461127557610232565b8063a22cb465116100ff578063a22cb46514610cde578063a7fc7a0714610d2e578063ab3b87fe14610d72578063b3f9e4cb14610dc0578063b429afeb14610e2e57610232565b80637c69eae214610a3257806395d89b4114610ad55780639d74398914610b585780639e5be9a514610c1b57610232565b806342842e0e116101be5780635cbe1112116101825780635cbe1112146108485780636352211e146108cb57806366ac3b681461093957806368b62d321461094357806370a08231146109da57610232565b806342842e0e1461064b57806342966c68146106b9578063430c2081146106e7578063538361a71461074d57806357aac5741461078557610232565b8063081812fc11610205578063081812fc14610485578063095ea7b3146104f35780632392c1891461054157806323b872dd1461058f5780632525d06a146105fd57610232565b806301ffc9a71461023757806302759c371461029c5780630467e0141461030a57806306fdde0314610402575b600080fd5b6102826004803603602081101561024d57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611551565b604051808215151515815260200191505060405180910390f35b610308600480360360608110156102b257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115b8565b005b6104006004803603608081101561032057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561036757600080fd5b82018360208201111561037957600080fd5b8035906020019184600183028401116401000000008311171561039b57600080fd5b9091929391929390803590602001906401000000008111156103bc57600080fd5b8201836020820111156103ce57600080fd5b803590602001918460018302840111640100000000831117156103f057600080fd5b90919293919293905050506115da565b005b61040a611688565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561044a57808201518184015260208101905061042f565b50505050905090810190601f1680156104775780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104b16004803603602081101561049b57600080fd5b81019080803590602001909291905050506116c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611760565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611939565b005b6105fb600480360360608110156105a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061195c565b005b6106496004803603604081101561061357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119cb565b005b6106b76004803603606081101561066157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119eb565b005b6106e5600480360360208110156106cf57600080fd5b8101908080359060200190929190505050611a0b565b005b610733600480360360408110156106fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a76565b604051808215151515815260200191505060405180910390f35b6107836004803603604081101561076357600080fd5b810190808035906020019092919080359060200190929190505050611a8a565b005b6108466004803603608081101561079b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561080257600080fd5b82018360208201111561081457600080fd5b8035906020019184600183028401116401000000008311171561083657600080fd5b9091929391929390505050611b3e565b005b6108c96004803603604081101561085e57600080fd5b81019080803590602001909291908035906020019064010000000081111561088557600080fd5b82018360208201111561089757600080fd5b803590602001918460018302840111640100000000831117156108b957600080fd5b9091929391929390505050611bbb565b005b6108f7600480360360208110156108e157600080fd5b8101908080359060200190929190505050611c2b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610941611cf3565b005b6109c46004803603604081101561095957600080fd5b81019080803590602001909291908035906020019064010000000081111561098057600080fd5b82018360208201111561099257600080fd5b803590602001918460018302840111640100000000831117156109b457600080fd5b9091929391929390505050611cfe565b6040518082815260200191505060405180910390f35b610a1c600480360360208110156109f057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d57565b6040518082815260200191505060405180910390f35b610ad360048036036060811015610a4857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610a8f57600080fd5b820183602082011115610aa157600080fd5b80359060200191846001830284011164010000000083111715610ac357600080fd5b9091929391929390505050611e2c565b005b610add611ea6565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b1d578082015181840152602081019050610b02565b50505050905090810190601f168015610b4a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610c1960048036036080811015610b6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610bd557600080fd5b820183602082011115610be757600080fd5b80359060200191846001830284011164010000000083111715610c0957600080fd5b9091929391929390505050611ee3565b005b610cdc60048036036080811015610c3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610c9857600080fd5b820183602082011115610caa57600080fd5b80359060200191846001830284011164010000000083111715610ccc57600080fd5b9091929391929390505050611f4a565b005b610d2c60048036036040811015610cf457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611fbe565b005b610d7060048036036020811015610d4457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612161565b005b610dbe60048036036040811015610d8857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061217f565b005b610dec60048036036020811015610dd657600080fd5b81019080803590602001909291905050506121ab565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e7060048036036020811015610e4457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612227565b604051808215151515815260200191505060405180910390f35b610f2b60048036036060811015610ea057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610ee757600080fd5b820183602082011115610ef957600080fd5b80359060200191846001830284011164010000000083111715610f1b57600080fd5b9091929391929390505050612244565b005b61103060048036036080811015610f4357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610faa57600080fd5b820183602082011115610fbc57600080fd5b80359060200191846001830284011164010000000083111715610fde57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506122ab565b005b6111cc600480360360a081101561104857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156110af57600080fd5b8201836020820111156110c157600080fd5b803590602001918460018302840111640100000000831117156110e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561114657600080fd5b82018360208201111561115857600080fd5b8035906020019184600183028401116401000000008311171561117a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061231d565b005b6111fa600480360360208110156111e457600080fd5b8101908080359060200190929190505050612368565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561123a57808201518184015260208101905061121f565b50505050905090810190601f1680156112675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61136b6004803603608081101561128b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156112d257600080fd5b8201836020820111156112e457600080fd5b8035906020019184600183028401116401000000008311171561130657600080fd5b90919293919293908035906020019064010000000081111561132757600080fd5b82018360208201111561133957600080fd5b8035906020019184600183028401116401000000008311171561135b57600080fd5b9091929391929390505050612464565b005b6113e46004803603602081101561138357600080fd5b81019080803590602001906401000000008111156113a057600080fd5b8201836020820111156113b257600080fd5b803590602001918460018302840111640100000000831117156113d457600080fd5b9091929391929390505050612515565b005b611487600480360360608110156113fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561144357600080fd5b82018360208201111561145557600080fd5b8035906020019184600183028401116401000000008311171561147757600080fd5b90919293919293905050506125a0565b005b6114b56004803603602081101561149f57600080fd5b810190808035906020019092919050505061260a565b005b611519600480360360408110156114cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612628565b604051808215151515815260200191505060405180910390f35b61153b6126bc565b6040518082815260200191505060405180910390f35b6000806000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b6115c133612227565b6115ca57600080fd5b6115d58383836126e4565b505050565b6115e333612227565b6115ec57600080fd5b611680868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612792565b505050505050565b60606040518060400160405280600781526020017f2e63727970746f00000000000000000000000000000000000000000000000000815250905090565b60006116d0826127c2565b611725576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613c72602c913960400191505060405180910390fd5b6003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061176b82611c2b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156117f2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613ce96021913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061183257506118318133612628565b5b611887576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180613bc66038913960400191505060405180910390fd5b826003600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b806119443382612834565b61194d57600080fd5b6119578383612928565b505050565b6119663382612834565b6119bb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180613d0a6031913960400191505060405180910390fd5b6119c68383836126e4565b505050565b6119d433612227565b6119dd57600080fd5b6119e78282612928565b5050565b611a06838383604051806020016040528060008152506122ab565b505050565b611a153382612834565b611a6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180613d606030913960400191505060405180910390fd5b611a73816129d4565b50565b6000611a828383612834565b905092915050565b3373ffffffffffffffffffffffffffffffffffffffff166008600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611af557600080fd5b81813373ffffffffffffffffffffffffffffffffffffffff167ff10fc780c78f994a214c79a2ae8d8b7bfe7cc3f0f935a8f05a29525e71d7f12760405160405180910390a45050565b611b4733612227565b611b5057600080fd5b611b5b8585856126e4565b611bab85858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612acd565b611bb457600080fd5b5050505050565b82611bc63382612834565b611bcf57600080fd5b611c25611c208585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612cb6565b6129d4565b50505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613c286029913960400191505060405180910390fd5b80915050919050565b611cfc33612d71565b565b6000611d4e8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612cb6565b90509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613bfe602a913960400191505060405180910390fd5b611e25600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020612d88565b9050919050565b82611e373382612834565b611e4057600080fd5b611e9f858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060405180602001604052806000815250612792565b5050505050565b60606040518060400160405280600281526020017f5544000000000000000000000000000000000000000000000000000000000000815250905090565b611f4385858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506040518060200160405280600081525061231d565b5050505050565b82611f553382612834565b611f5e57600080fd5b611fb68686611fb18787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612cb6565b6126e4565b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612060576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552433732313a20617070726f766520746f2063616c6c65720000000000000081525060200191505060405180910390fd5b80600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051808215151515815260200191505060405180910390a35050565b61216a33612227565b61217357600080fd5b61217c81612d96565b50565b8061218a3382612834565b61219357600080fd5b6121a661219f83611c2b565b8484612dad565b505050565b6000806008600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561221e57600080fd5b80915050919050565b600061223d82600161300890919063ffffffff16565b9050919050565b61224d33612227565b61225657600080fd5b6122a5848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506130e6565b50505050565b6122b684848461195c565b6122c284848484612acd565b612317576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180613b446032913960400191505060405180910390fd5b50505050565b826123283382612834565b61233157600080fd5b600061233d8585612cb6565b905061234a8787836126e4565b61235687878386612acd565b61235f57600080fd5b50505050505050565b6060612373826127c2565b61237c57600080fd5b60076006600084815260200190815260200160002060405160200180838054600181600116156101000203166002900480156123ef5780601f106123cd5761010080835404028352918201916123ef565b820191906000526020600020905b8154815290600101906020018083116123db575b5050828054600181600116156101000203166002900480156124485780601f10612426576101008083540402835291820191612448565b820191906000526020600020905b815481529060010190602001808311612434575b5050925050506040516020818303038152906040529050919050565b8461246f3382612834565b61247857600080fd5b61250c878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612792565b50505050505050565b61251e33612227565b61252757600080fd5b8181600791906125389291906139d6565b507f4b120d6a959a84a520fa48f5f937cca0e79129423487af7901213b5d2e89313b828260405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a15050565b826125ab3382612834565b6125b457600080fd5b612603858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506130e6565b5050505050565b61261333612227565b61261c57600080fd5b612625816129d4565b50565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f0f4a10a4f46c288cea365fcf45cccf0e9d901b945b9829ccdb54c10dc3cb7a6f905090565b6126ef838383612dad565b600073ffffffffffffffffffffffffffffffffffffffff166008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461278d576008600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b505050565b61279d8484846130e6565b6127b36000856127ad8686612cb6565b84612acd565b6127bc57600080fd5b50505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415915050919050565b600061283f826127c2565b612894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613b9a602c913960400191505060405180910390fd5b600061289f83611c2b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061290e57508373ffffffffffffffffffffffffffffffffffffffff166128f6846116c5565b73ffffffffffffffffffffffffffffffffffffffff16145b8061291f575061291e8185612628565b5b91505092915050565b612931816127c2565b61293a57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16817fb1b34e6d89e1c584527d447f4b29ffad55635a37edeeb564939a6483401b31a560405160405180910390a3816008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6129dd816132ef565b600073ffffffffffffffffffffffffffffffffffffffff166008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a7b576008600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b60006006600083815260200190815260200160002080546001816001161561010002031660029004905014612aca57600660008281526020019081526020016000206000612ac99190613a56565b5b50565b6000612aee8473ffffffffffffffffffffffffffffffffffffffff16613304565b612afb5760019050612cae565b60008473ffffffffffffffffffffffffffffffffffffffff1663150b7a02338887876040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612bd6578082015181840152602081019050612bbb565b50505050905090810190601f168015612c035780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015612c2557600080fd5b505af1158015612c39573d6000803e3d6000fd5b505050506040513d6020811015612c4f57600080fd5b8101908080519060200190929190505050905063150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150505b949350505050565b60008082511415612cc657600080fd5b82826040516020018082805190602001908083835b60208310612cfe5780518252602082019150602081019050602083039250612cdb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012060405160200180838152602001828152602001925050506040516020818303038152906040528051906020012060001c905092915050565b612d8581600161331790919063ffffffff16565b50565b600081600001549050919050565b612daa8160016133d490919063ffffffff16565b50565b8273ffffffffffffffffffffffffffffffffffffffff16612dcd82611c2b565b73ffffffffffffffffffffffffffffffffffffffff1614612e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613cc06029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612ebf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613b766024913960400191505060405180910390fd5b612ec8816134af565b612f0f600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061356d565b612f56600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020613590565b816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561308f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613c9e6022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60006130f28383612cb6565b90506130fe84826135a6565b60008251141561310d57600080fd5b613116816127c2565b61311f57600080fd5b606082600660008681526020019081526020016000206040516020018083805190602001908083835b6020831061316b5780518252602082019150602081019050602083039250613148565b6001836020036101000a038019825116818451168082178552505050505050905001807f2e000000000000000000000000000000000000000000000000000000000000008152506001018280546001816001161561010002031660029004801561320c5780601f106131ea57610100808354040283529182019161320c565b820191906000526020600020905b8154815290600101906020018083116131f8575b50509250505060405160208183030381529060405290508060066000848152602001908152602001600020908051906020019061324a929190613a9e565b50817fc5beef08f693b11c316c0c8394a377a0033c9cf701b8cd8afd79cecef60c3952826040518080602001828103825283818151815260200191508051906020019080838360005b838110156132ae578082015181840152602081019050613293565b50505050905090810190601f1680156132db5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050505050565b6133016132fb82611c2b565b826137be565b50565b600080823b905060008111915050919050565b6133218282613008565b613376576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613c516021913960400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6133de8282613008565b15613451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff166003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461356a5760006003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6135856001826000015461394d90919063ffffffff16565b816000018190555050565b6001816000016000828254019250508190555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613649576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4552433732313a206d696e7420746f20746865207a65726f206164647265737381525060200191505060405180910390fd5b613652816127c2565b156136c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081525060200191505060405180910390fd5b816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061375e600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020613590565b808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b8173ffffffffffffffffffffffffffffffffffffffff166137de82611c2b565b73ffffffffffffffffffffffffffffffffffffffff161461384a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d3b6025913960400191505060405180910390fd5b613853816134af565b61389a600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061356d565b60006002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000828211156139c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613a1757803560ff1916838001178555613a45565b82800160010185558215613a45579182015b82811115613a44578235825591602001919060010190613a29565b5b509050613a529190613b1e565b5090565b50805460018160011615610100020316600290046000825580601f10613a7c5750613a9b565b601f016020900490600052602060002090810190613a9a9190613b1e565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613adf57805160ff1916838001178555613b0d565b82800160010185558215613b0d579182015b82811115613b0c578251825591602001919060010190613af1565b5b509050613b1a9190613b1e565b5090565b613b4091905b80821115613b3c576000816000905550600101613b24565b5090565b9056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e526f6c65733a206163636f756e7420697320746865207a65726f20616464726573734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732313a206275726e206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a265627a7a72315820edc8c5afb5ba7333d13d23ad51d7de2390886664844d8bd5e95214b28bb4f30764736f6c634300050c0032526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373
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.