ERC-721
NFT
Overview
Max Total Supply
7,368 GENESISAPOSTLE
Holders
2,196
Market
Volume (24H)
0.0404 ETH
Min Price (24H)
$28.32 @ 0.007700 ETH
Max Price (24H)
$91.96 @ 0.025000 ETH
Other Info
Token Contract
Balance
1 GENESISAPOSTLELoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GenesisApostle
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // External interfaces import "./interface/IBYOKey.sol"; import "./interface/IBYOPill.sol"; // Base interfaces import "./interface/IApostle.sol"; contract GenesisApostle is IApostle { // Constants uint256 private constant KEY_IDX = 0; uint256 private constant MAX_APOSTLES_PER_TX = 50; // Options bool public m_redeemOpen = false; // External IBYOPill public m_pillContract; IBYOKey public m_keyContract; constructor(string memory _name, string memory _symbol, string memory _baseURI, address pillContract, address keyContract) IApostle (_name, _symbol, _baseURI) { m_pillContract = IBYOPill(pillContract); m_keyContract = IBYOKey (keyContract); } // OWNER ONLY function toggleRedeemActive () public onlyOwner { m_redeemOpen = !m_redeemOpen; } // PUBLIC function redeem(uint256[] calldata pillIds) public isRedeemActive { uint256 redeemCount = pillIds.length; require (redeemCount > 0, "At least one."); require (redeemCount <= MAX_APOSTLES_PER_TX, "Exceeding per tx redeems."); require (m_keyContract.balanceOf (msg.sender, KEY_IDX) >= redeemCount, "Not enough keys."); checkPills (pillIds); for (uint256 i = 0; i < redeemCount; i++) { _safeMint(msg.sender, pillIds[i]); } m_keyContract.burnFromRedeem (msg.sender, KEY_IDX, redeemCount); } // VIEWS function isPillUsed (uint256 _pillId) public view returns (bool) { return _exists (_pillId); } // INTERNALS function checkPills (uint256[] memory pills) internal view { for (uint256 i = 0; i < pills.length; i++) { require (!isPillUsed(pills[i]), "One of pills is used !"); require (m_pillContract.ownerOf(pills[i]) == msg.sender, "Not your pill."); } } // MODIFIERS modifier isRedeemActive() { require(m_redeemOpen || owner() == _msgSender(), "Redeeming is not active."); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract IBYOKey { function balanceOf(address owner, uint256 index) external virtual view returns (uint256 balance); function burnFromRedeem(address _account, uint256 _keyIdx, uint256 _amount) external virtual; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract IBYOPill { function ownerOf(uint256 tokenId) public virtual view returns (address owner); function tokenOfOwnerByIndex(address owner, uint256 index) public virtual view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ITRYPToken.sol"; import "./IERC721EnumerableNameable.sol"; contract IApostle is IERC721EnumerableNameable { enum APOSTLE_TYPE { NONE, VOYAGER, PSYCHONAUT, ANCIENT, GODDESS } // Toggles bool public m_canValidate = false; bool public m_tokenGeneration = false; // Properties mapping (uint256 => APOSTLE_TYPE) private m_ApostleTypes; bytes32 private m_apostlesMerkle; string private m_baseUri = ""; // External ITRYPToken m_trypContract; constructor(string memory _name, string memory _symbol, string memory baseURI) IERC721EnumerableNameable (_name, _symbol) { m_baseUri = baseURI; } // OWNER ONLY function toggleValidation () external onlyOwner { m_canValidate = !m_canValidate; } function toggleTokenGeneration () external onlyOwner { m_tokenGeneration = !m_tokenGeneration; } function setTokenAddress (address _tokenAddress) public onlyOwner { m_trypContract = ITRYPToken (_tokenAddress); } function setApostleValidationMerkle (bytes32 _merkle) external onlyOwner { m_apostlesMerkle = _merkle; } function setBaseURI(string memory _uri) external onlyOwner { m_baseUri = _uri; } function setNamingPrice(uint256 _price) external onlyOwner { m_nameChangePrice = _price; } function setBioPrice(uint256 _price) external onlyOwner { m_bioChangePrice = _price; } // PUBLIC function changeName(uint256 _tokenId, string memory _newName) public override isTokenEnabled { m_trypContract.burn(msg.sender, m_nameChangePrice); super.changeName(_tokenId, _newName); } function changeBio(uint256 _tokenId, string memory _newBio) public override isTokenEnabled { m_trypContract.burn(msg.sender, m_bioChangePrice); super.changeBio(_tokenId, _newBio); } // VIEWS function validateApostle(uint _idx, uint _typeIdx, bytes32[] calldata _merkleProof) public isValidationActive { require(_exists(_idx), "Apostle does not exist."); require(ownerOf(_idx) == msg.sender, "You do not own this apostle."); require(m_ApostleTypes[_idx] == APOSTLE_TYPE(0), "Already validated."); // Verify merkle for apostle validation bytes32 nHash = keccak256(abi.encodePacked(_idx, _typeIdx)); require( MerkleProof.verify(_merkleProof, m_apostlesMerkle, nHash), "Invalid merkle proof !" ); m_ApostleTypes[_idx] = APOSTLE_TYPE(_typeIdx); } function getTypeForApostle (uint _idx) public view returns (APOSTLE_TYPE) { return m_ApostleTypes[_idx]; } // INTERNALS function _baseURI() internal view override returns (string memory) { return m_baseUri; } // EXTERNAL function getReward() external isTokenEnabled { m_trypContract.updateReward(msg.sender, address(0), 0); m_trypContract.claimReward(msg.sender); } // OVERRIDE function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (m_tokenGeneration) { m_trypContract.updateReward(from, to, tokenId); } } // MODIFIERS modifier isValidationActive() { require(m_canValidate, "Validation not open yet."); _; } modifier isTokenEnabled () { require(m_tokenGeneration, "Token generation not enabled."); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; interface ITRYPToken { function updateReward(address _from, address _to, uint256 _tokenId) external; function claimReward(address _to) external; function burn(address _from, uint256 _amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract IERC721EnumerableNameable is ERC721Enumerable, Ownable { uint256 public m_nameChangePrice = 1000 ether; uint256 public m_bioChangePrice = 1000 ether; mapping (uint256 => string) private _tokenName; mapping (string => bool) private _nameReserved; mapping (uint256 => string) private _tokenBio; event NameChange (uint256 indexed tokenId, string newName); event BioChange (uint256 indexed tokenId, string bio); constructor(string memory _name, string memory _symbol) ERC721 (_name, _symbol) {} function changeName(uint256 tokenId, string memory newName) public virtual { address owner = ownerOf(tokenId); require(_msgSender() == owner, "You do not own this token."); require(validateName(newName) == true, "Invalid name."); require(sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "New name is same as the current one."); require(isNameReserved(newName) == false, "Name already reserved."); // If already named, dereserve old name if (bytes(_tokenName[tokenId]).length > 0) { toggleReserveName(_tokenName[tokenId], false); } toggleReserveName(newName, true); _tokenName[tokenId] = newName; emit NameChange(tokenId, newName); } function changeBio(uint256 _tokenId, string memory _bio) public virtual { address owner = ownerOf(_tokenId); require(_msgSender() == owner, "You do not own this token."); _tokenBio[_tokenId] = _bio; emit BioChange(_tokenId, _bio); } function toggleReserveName(string memory str, bool isReserve) internal { _nameReserved[toLower(str)] = isReserve; } function tokenNameByIndex(uint256 index) public view returns (string memory) { return _tokenName[index]; } function tokenBioByIndex(uint256 index) public view returns (string memory) { return _tokenBio[index]; } function isNameReserved(string memory nameString) public view returns (bool) { return _nameReserved[toLower(nameString)]; } function validateName(string memory str) public pure returns (bool){ bytes memory b = bytes(str); if(b.length < 1) return false; if(b.length > 25) return false; if(b[0] == 0x20) return false; if (b[b.length - 1] == 0x20) return false; bytes1 lastChar = b[0]; for(uint i; i<b.length; i++){ bytes1 char = b[i]; if (char == 0x20 && lastChar == 0x20) return false; if( !(char >= 0x30 && char <= 0x39) && !(char >= 0x41 && char <= 0x5A) && !(char >= 0x61 && char <= 0x7A) && !(char == 0x20) ) return false; lastChar = char; } return true; } function toLower(string memory str) public pure returns (string memory){ bytes memory bStr = bytes(str); bytes memory bLower = new bytes(bStr.length); for (uint i = 0; i < bStr.length; i++) { if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { bLower[i] = bytes1(uint8(bStr[i]) + 32); } else { bLower[i] = bStr[i]; } } return string(bLower); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.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 ERC721Enumerable is ERC721, IERC721Enumerable { // 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(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.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 < ERC721Enumerable.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 = ERC721.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 = ERC721.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(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings 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. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _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: owner query for nonexistent token"); 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) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 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 overriden 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 = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _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) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); 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); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { 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 {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT 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 IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT 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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "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
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseURI","type":"string"},{"internalType":"address","name":"pillContract","type":"address"},{"internalType":"address","name":"keyContract","type":"address"}],"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":"bio","type":"string"}],"name":"BioChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_newBio","type":"string"}],"name":"changeBio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"getTypeForApostle","outputs":[{"internalType":"enum IApostle.APOSTLE_TYPE","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pillId","type":"uint256"}],"name":"isPillUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_bioChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_canValidate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_keyContract","outputs":[{"internalType":"contract IBYOKey","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_nameChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_pillContract","outputs":[{"internalType":"contract IBYOPill","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_redeemOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_tokenGeneration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pillIds","type":"uint256[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkle","type":"bytes32"}],"name":"setApostleValidationMerkle","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":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setBioPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setNamingPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"toLower","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"toggleRedeemActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleTokenGeneration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleValidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenBioByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenNameByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"},{"internalType":"uint256","name":"_typeIdx","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"validateApostle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
683635c9adc5dea00000600b819055600c556010805461ffff1916905560a0604081905260006080819052620000389160139162000173565b506014805460ff60a01b191690553480156200005357600080fd5b50604051620038ac380380620038ac833981016040819052620000769162000303565b8484848282818181600090805190602001906200009592919062000173565b508051620000ab90600190602084019062000173565b505050620000c8620000c26200011d60201b60201c565b62000121565b50508051620000df90601390602084019062000173565b5050601580546001600160a01b039586166001600160a01b031991821617909155601680549490951693169290921790925550620003f79350505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200018190620003ba565b90600052602060002090601f016020900481019282620001a55760008555620001f0565b82601f10620001c057805160ff1916838001178555620001f0565b82800160010185558215620001f0579182015b82811115620001f0578251825591602001919060010190620001d3565b50620001fe92915062000202565b5090565b5b80821115620001fe576000815560010162000203565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024157600080fd5b81516001600160401b03808211156200025e576200025e62000219565b604051601f8301601f19908116603f0116810190828211818310171562000289576200028962000219565b81604052838152602092508683858801011115620002a657600080fd5b600091505b83821015620002ca5785820183015181830184015290820190620002ab565b83821115620002dc5760008385830101525b9695505050505050565b80516001600160a01b0381168114620002fe57600080fd5b919050565b600080600080600060a086880312156200031c57600080fd5b85516001600160401b03808211156200033457600080fd5b6200034289838a016200022f565b965060208801519150808211156200035957600080fd5b6200036789838a016200022f565b955060408801519150808211156200037e57600080fd5b506200038d888289016200022f565b9350506200039e60608701620002e6565b9150620003ae60808701620002e6565b90509295509295909350565b600181811c90821680620003cf57607f821691505b60208210811415620003f157634e487b7160e01b600052602260045260246000fd5b50919050565b6134a580620004076000396000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c80636d5224181161015c578063af57dcce116100ce578063d596c86211610087578063d596c8621461058c578063df8addbd14610594578063e985e9c5146105a7578063f2fde38b146105e3578063f8279c90146105f6578063f9afb26a146105fe57600080fd5b8063af57dcce14610524578063b38c7ae814610536578063b76fad011461054a578063b88d4fde14610553578063c39cbef114610566578063c87b56dd1461057957600080fd5b80639156b69d116101205780639156b69d146104c75780639416b423146104da57806395d89b41146104ed5780639ffdb65a146104f5578063a22cb46514610508578063ad43bfc21461051b57600080fd5b80636d5224181461047557806370a0823114610488578063715018a61461049b5780637186a73f146104a35780638da5cb5b146104b657600080fd5b80632a2c6e001161020057806349c8bbe2116101b957806349c8bbe2146103e65780634d426528146104165780634f6ccce71461042957806355f804b31461043c57806359f2f8971461044f5780636352211e1461046257600080fd5b80632a2c6e001461038a5780632cd295641461039d5780632f745c59146103b057806333dfefdb146103c35780633d18b912146103cb57806342842e0e146103d357600080fd5b806309c954961161025257806309c954961461031957806315b56d101461032c57806318160ddd1461033f5780631ce923281461035157806323b872dd1461036457806326a4e8d21461037757600080fd5b806301ffc9a71461028f57806306d8038e146102b757806306fdde03146102c4578063081812fc146102d9578063095ea7b314610304575b600080fd5b6102a261029d366004612c4c565b610611565b60405190151581526020015b60405180910390f35b6010546102a29060ff1681565b6102cc610622565b6040516102ae9190612cc1565b6102ec6102e7366004612cd4565b6106b4565b6040516001600160a01b0390911681526020016102ae565b610317610312366004612d02565b610741565b005b610317610327366004612cd4565b610857565b6102a261033a366004612dda565b610886565b6008545b6040519081526020016102ae565b6016546102ec906001600160a01b031681565b610317610372366004612e0f565b6108b9565b610317610385366004612e50565b6108ea565b6015546102ec906001600160a01b031681565b6103176103ab366004612cd4565b610936565b6103436103be366004612d02565b610965565b6103176109fb565b610317610a39565b6103176103e1366004612e0f565b610b2a565b6104096103f4366004612cd4565b60009081526011602052604090205460ff1690565b6040516102ae9190612e83565b610317610424366004612eab565b610b45565b610343610437366004612cd4565b610be2565b61031761044a366004612dda565b610c75565b6102cc61045d366004612cd4565b610cb2565b6102ec610470366004612cd4565b610d54565b6102cc610483366004612cd4565b610dcb565b610343610496366004612e50565b610de8565b610317610e6f565b6103176104b1366004612cd4565b610ea5565b600a546001600160a01b03166102ec565b6103176104d5366004612f3e565b610ed4565b6102cc6104e8366004612dda565b61113b565b6102cc61129e565b6102a2610503366004612dda565b6112ad565b610317610516366004612f91565b6114bc565b610343600c5481565b6010546102a290610100900460ff1681565b6014546102a290600160a01b900460ff1681565b610343600b5481565b610317610561366004612fcf565b611581565b610317610574366004612eab565b6115b3565b6102cc610587366004612cd4565b61164c565b610317611717565b6102a26105a2366004612cd4565b611762565b6102a26105b536600461304f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103176105f1366004612e50565b61176d565b610317611808565b61031761060c36600461307d565b61184f565b600061061c82611afa565b92915050565b606060008054610631906130bf565b80601f016020809104026020016040519081016040528092919081815260200182805461065d906130bf565b80156106aa5780601f1061067f576101008083540402835291602001916106aa565b820191906000526020600020905b81548152906001019060200180831161068d57829003601f168201915b5050505050905090565b60006106bf82611b1f565b6107255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061074c82610d54565b9050806001600160a01b0316836001600160a01b031614156107ba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161071c565b336001600160a01b03821614806107d657506107d681336105b5565b6108485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161071c565b6108528383611b3c565b505050565b600a546001600160a01b031633146108815760405162461bcd60e51b815260040161071c906130fa565b601255565b6000600e6108938361113b565b6040516108a0919061312f565b9081526040519081900360200190205460ff1692915050565b6108c33382611baa565b6108df5760405162461bcd60e51b815260040161071c9061314b565b610852838383611c94565b600a546001600160a01b031633146109145760405162461bcd60e51b815260040161071c906130fa565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146109605760405162461bcd60e51b815260040161071c906130fa565b600b55565b600061097083610de8565b82106109d25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161071c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610a255760405162461bcd60e51b815260040161071c906130fa565b6010805460ff19811660ff90911615179055565b601054610100900460ff16610a605760405162461bcd60e51b815260040161071c9061319c565b60145460405163164746fd60e11b815233600482015260006024820181905260448201526001600160a01b0390911690632c8e8dfa90606401600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505060145460405163d279c19160e01b81523360048201526001600160a01b03909116925063d279c1919150602401600060405180830381600087803b158015610b1057600080fd5b505af1158015610b24573d6000803e3d6000fd5b50505050565b61085283838360405180602001604052806000815250611581565b601054610100900460ff16610b6c5760405162461bcd60e51b815260040161071c9061319c565b601454600c54604051632770a7eb60e21b815233600482015260248101919091526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b158015610bbc57600080fd5b505af1158015610bd0573d6000803e3d6000fd5b50505050610bde8282611e3f565b5050565b6000610bed60085490565b8210610c505760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161071c565b60088281548110610c6357610c636131d3565b90600052602060002001549050919050565b600a546001600160a01b03163314610c9f5760405162461bcd60e51b815260040161071c906130fa565b8051610bde906013906020840190612b9d565b6000818152600f60205260409020805460609190610ccf906130bf565b80601f0160208091040260200160405190810160405280929190818152602001828054610cfb906130bf565b8015610d485780601f10610d1d57610100808354040283529160200191610d48565b820191906000526020600020905b815481529060010190602001808311610d2b57829003601f168201915b50505050509050919050565b6000818152600260205260408120546001600160a01b03168061061c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161071c565b6000818152600d60205260409020805460609190610ccf906130bf565b60006001600160a01b038216610e535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161071c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610e995760405162461bcd60e51b815260040161071c906130fa565b610ea36000611f01565b565b600a546001600160a01b03163314610ecf5760405162461bcd60e51b815260040161071c906130fa565b600c55565b60105460ff16610f265760405162461bcd60e51b815260206004820152601860248201527f56616c69646174696f6e206e6f74206f70656e207965742e0000000000000000604482015260640161071c565b610f2f84611b1f565b610f7b5760405162461bcd60e51b815260206004820152601760248201527f41706f73746c6520646f6573206e6f742065786973742e000000000000000000604482015260640161071c565b33610f8585610d54565b6001600160a01b031614610fdb5760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206f776e20746869732061706f73746c652e00000000604482015260640161071c565b60008481526011602052604081205460ff166004811115610ffe57610ffe612e6d565b146110405760405162461bcd60e51b815260206004820152601260248201527120b63932b0b23c903b30b634b230ba32b21760711b604482015260640161071c565b60408051602081018690529081018490526000906060016040516020818303038152906040528051906020012090506110b0838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506012549150849050611f53565b6110f55760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d65726b6c652070726f6f66202160501b604482015260640161071c565b83600481111561110757611107612e6d565b6000868152601160205260409020805460ff1916600183600481111561112f5761112f612e6d565b02179055505050505050565b606060008290506000815167ffffffffffffffff81111561115e5761115e612d2e565b6040519080825280601f01601f191660200182016040528015611188576020820181803683370190505b50905060005b82518110156112965760418382815181106111ab576111ab6131d3565b016020015160f81c108015906111db5750605a8382815181106111d0576111d06131d3565b016020015160f81c11155b1561123d578281815181106111f2576111f26131d3565b602001015160f81c60f81b60f81c602061120c91906131ff565b60f81b828281518110611221576112216131d3565b60200101906001600160f81b031916908160001a905350611284565b82818151811061124f5761124f6131d3565b602001015160f81c60f81b82828151811061126c5761126c6131d3565b60200101906001600160f81b031916908160001a9053505b8061128e81613224565b91505061118e565b509392505050565b606060018054610631906130bf565b6000808290506001815110156112c65750600092915050565b6019815111156112d95750600092915050565b806000815181106112ec576112ec6131d3565b6020910101516001600160f81b031916600160fd1b14156113105750600092915050565b806001825161131f919061323f565b8151811061132f5761132f6131d3565b6020910101516001600160f81b031916600160fd1b14156113535750600092915050565b600081600081518110611368576113686131d3565b01602001516001600160f81b031916905060005b82518110156114b1576000838281518110611399576113996131d3565b01602001516001600160f81b0319169050600160fd1b811480156113ca5750600160fd1b6001600160f81b03198416145b156113db5750600095945050505050565b600360fc1b6001600160f81b03198216108015906114075750603960f81b6001600160f81b0319821611155b15801561143d5750604160f81b6001600160f81b031982161080159061143b5750602d60f91b6001600160f81b0319821611155b155b80156114725750606160f81b6001600160f81b03198216108015906114705750603d60f91b6001600160f81b0319821611155b155b801561148c5750600160fd1b6001600160f81b0319821614155b1561149d5750600095945050505050565b9150806114a981613224565b91505061137c565b506001949350505050565b6001600160a01b0382163314156115155760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161071c565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61158b3383611baa565b6115a75760405162461bcd60e51b815260040161071c9061314b565b610b2484848484612002565b601054610100900460ff166115da5760405162461bcd60e51b815260040161071c9061319c565b601454600b54604051632770a7eb60e21b815233600482015260248101919091526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b15801561162a57600080fd5b505af115801561163e573d6000803e3d6000fd5b50505050610bde8282612035565b606061165782611b1f565b6116bb5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161071c565b60006116c561235a565b905060008151116116e55760405180602001604052806000815250611710565b806116ef84612369565b604051602001611700929190613256565b6040516020818303038152906040525b9392505050565b600a546001600160a01b031633146117415760405162461bcd60e51b815260040161071c906130fa565b6014805460ff60a01b198116600160a01b9182900460ff1615909102179055565b600061061c82611b1f565b600a546001600160a01b031633146117975760405162461bcd60e51b815260040161071c906130fa565b6001600160a01b0381166117fc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071c565b61180581611f01565b50565b600a546001600160a01b031633146118325760405162461bcd60e51b815260040161071c906130fa565b6010805461ff001981166101009182900460ff1615909102179055565b601454600160a01b900460ff16806118715750600a546001600160a01b031633145b6118bd5760405162461bcd60e51b815260206004820152601860248201527f52656465656d696e67206973206e6f74206163746976652e0000000000000000604482015260640161071c565b80806118fb5760405162461bcd60e51b815260206004820152600d60248201526c20ba103632b0b9ba1037b7329760991b604482015260640161071c565b603281111561194c5760405162461bcd60e51b815260206004820152601960248201527f457863656564696e67207065722074782072656465656d732e00000000000000604482015260640161071c565b601654604051627eeac760e11b81523360048201526000602482015282916001600160a01b03169062fdd58e9060440160206040518083038186803b15801561199457600080fd5b505afa1580156119a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cc9190613285565b1015611a0d5760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41035b2bcb99760811b604482015260640161071c565b611a4983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061246792505050565b60005b81811015611a8857611a7633858584818110611a6a57611a6a6131d3565b905060200201356125d3565b80611a8081613224565b915050611a4c565b506016546040516303aeca2160e41b815233600482015260006024820152604481018390526001600160a01b0390911690633aeca210906064015b600060405180830381600087803b158015611add57600080fd5b505af1158015611af1573d6000803e3d6000fd5b50505050505050565b60006001600160e01b0319821663780e9d6360e01b148061061c575061061c826125ed565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b7182610d54565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611bb582611b1f565b611c165760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161071c565b6000611c2183610d54565b9050806001600160a01b0316846001600160a01b03161480611c5c5750836001600160a01b0316611c51846106b4565b6001600160a01b0316145b80611c8c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ca782610d54565b6001600160a01b031614611d0f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161071c565b6001600160a01b038216611d715760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161071c565b611d7c83838361263d565b611d87600082611b3c565b6001600160a01b0383166000908152600360205260408120805460019290611db090849061323f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dde90849061329e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611e4a83610d54565b9050336001600160a01b03821614611ea45760405162461bcd60e51b815260206004820152601a60248201527f596f7520646f206e6f74206f776e207468697320746f6b656e2e000000000000604482015260640161071c565b6000838152600f602090815260409091208351611ec392850190612b9d565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d83604051611ef49190612cc1565b60405180910390a2505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081815b8551811015611ff7576000868281518110611f7557611f756131d3565b60200260200101519050808311611fb7576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611fe4565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611fef81613224565b915050611f58565b509092149392505050565b61200d848484611c94565b61201984848484612699565b610b245760405162461bcd60e51b815260040161071c906132b6565b600061204083610d54565b9050336001600160a01b0382161461209a5760405162461bcd60e51b815260206004820152601a60248201527f596f7520646f206e6f74206f776e207468697320746f6b656e2e000000000000604482015260640161071c565b6120a3826112ad565b15156001146120e45760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b604482015260640161071c565b6000838152600d602052604090819020905160029161210291613308565b602060405180830381855afa15801561211f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121429190613285565b600283604051612152919061312f565b602060405180830381855afa15801561216f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121929190613285565b14156121ec5760405162461bcd60e51b8152602060048201526024808201527f4e6577206e616d652069732073616d65206173207468652063757272656e742060448201526337b7329760e11b606482015260840161071c565b6121f582610886565b1561223b5760405162461bcd60e51b81526020600482015260166024820152752730b6b29030b63932b0b23c903932b9b2b93b32b21760511b604482015260640161071c565b6000838152600d602052604081208054612254906130bf565b905011156122ff576000838152600d6020526040902080546122ff919061227a906130bf565b80601f01602080910402602001604051908101604052809291908181526020018280546122a6906130bf565b80156122f35780601f106122c8576101008083540402835291602001916122f3565b820191906000526020600020905b8154815290600101906020018083116122d657829003601f168201915b5050505050600061279b565b61230a82600161279b565b6000838152600d60209081526040909120835161232992850190612b9d565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051611ef49190612cc1565b606060138054610631906130bf565b60608161238d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123b757806123a181613224565b91506123b09050600a836133ba565b9150612391565b60008167ffffffffffffffff8111156123d2576123d2612d2e565b6040519080825280601f01601f1916602001820160405280156123fc576020820181803683370190505b5090505b8415611c8c5761241160018361323f565b915061241e600a866133ce565b61242990603061329e565b60f81b81838151811061243e5761243e6131d3565b60200101906001600160f81b031916908160001a905350612460600a866133ba565b9450612400565b60005b8151811015610bde57612495828281518110612488576124886131d3565b6020026020010151611762565b156124db5760405162461bcd60e51b81526020600482015260166024820152754f6e65206f662070696c6c732069732075736564202160501b604482015260640161071c565b601554825133916001600160a01b031690636352211e90859085908110612504576125046131d3565b60200260200101516040518263ffffffff1660e01b815260040161252a91815260200190565b60206040518083038186803b15801561254257600080fd5b505afa158015612556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257a91906133e2565b6001600160a01b0316146125c15760405162461bcd60e51b815260206004820152600e60248201526d2737ba103cb7bab9103834b6361760911b604482015260640161071c565b806125cb81613224565b91505061246a565b610bde8282604051806020016040528060008152506127d8565b60006001600160e01b031982166380ac58cd60e01b148061261e57506001600160e01b03198216635b5e139f60e01b145b8061061c57506301ffc9a760e01b6001600160e01b031983161461061c565b61264883838361280b565b601054610100900460ff16156108525760145460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526044820184905290911690632c8e8dfa90606401611ac3565b60006001600160a01b0384163b156114b157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126dd9033908990889088906004016133ff565b602060405180830381600087803b1580156126f757600080fd5b505af1925050508015612727575060408051601f3d908101601f191682019092526127249181019061343c565b60015b612781573d808015612755576040519150601f19603f3d011682016040523d82523d6000602084013e61275a565b606091505b5080516127795760405162461bcd60e51b815260040161071c906132b6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c8c565b80600e6127a78461113b565b6040516127b4919061312f565b908152604051908190036020019020805491151560ff199092169190911790555050565b6127e28383612816565b6127ef6000848484612699565b6108525760405162461bcd60e51b815260040161071c906132b6565b610852838383612955565b6001600160a01b03821661286c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161071c565b61287581611b1f565b156128c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161071c565b6128ce6000838361263d565b6001600160a01b03821660009081526003602052604081208054600192906128f790849061329e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166129b0576129ab81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6129d3565b816001600160a01b0316836001600160a01b0316146129d3576129d38382612a0d565b6001600160a01b0382166129ea5761085281612aaa565b826001600160a01b0316826001600160a01b031614610852576108528282612b59565b60006001612a1a84610de8565b612a24919061323f565b600083815260076020526040902054909150808214612a77576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612abc9060019061323f565b60008381526009602052604081205460088054939450909284908110612ae457612ae46131d3565b906000526020600020015490508060088381548110612b0557612b056131d3565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612b3d57612b3d613459565b6001900381819060005260206000200160009055905550505050565b6000612b6483610de8565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612ba9906130bf565b90600052602060002090601f016020900481019282612bcb5760008555612c11565b82601f10612be457805160ff1916838001178555612c11565b82800160010185558215612c11579182015b82811115612c11578251825591602001919060010190612bf6565b50612c1d929150612c21565b5090565b5b80821115612c1d5760008155600101612c22565b6001600160e01b03198116811461180557600080fd5b600060208284031215612c5e57600080fd5b813561171081612c36565b60005b83811015612c84578181015183820152602001612c6c565b83811115610b245750506000910152565b60008151808452612cad816020860160208601612c69565b601f01601f19169290920160200192915050565b6020815260006117106020830184612c95565b600060208284031215612ce657600080fd5b5035919050565b6001600160a01b038116811461180557600080fd5b60008060408385031215612d1557600080fd5b8235612d2081612ced565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d5f57612d5f612d2e565b604051601f8501601f19908116603f01168101908282118183101715612d8757612d87612d2e565b81604052809350858152868686011115612da057600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612dcb57600080fd5b61171083833560208501612d44565b600060208284031215612dec57600080fd5b813567ffffffffffffffff811115612e0357600080fd5b611c8c84828501612dba565b600080600060608486031215612e2457600080fd5b8335612e2f81612ced565b92506020840135612e3f81612ced565b929592945050506040919091013590565b600060208284031215612e6257600080fd5b813561171081612ced565b634e487b7160e01b600052602160045260246000fd5b6020810160058310612ea557634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215612ebe57600080fd5b82359150602083013567ffffffffffffffff811115612edc57600080fd5b612ee885828601612dba565b9150509250929050565b60008083601f840112612f0457600080fd5b50813567ffffffffffffffff811115612f1c57600080fd5b6020830191508360208260051b8501011115612f3757600080fd5b9250929050565b60008060008060608587031215612f5457600080fd5b8435935060208501359250604085013567ffffffffffffffff811115612f7957600080fd5b612f8587828801612ef2565b95989497509550505050565b60008060408385031215612fa457600080fd5b8235612faf81612ced565b915060208301358015158114612fc457600080fd5b809150509250929050565b60008060008060808587031215612fe557600080fd5b8435612ff081612ced565b9350602085013561300081612ced565b925060408501359150606085013567ffffffffffffffff81111561302357600080fd5b8501601f8101871361303457600080fd5b61304387823560208401612d44565b91505092959194509250565b6000806040838503121561306257600080fd5b823561306d81612ced565b91506020830135612fc481612ced565b6000806020838503121561309057600080fd5b823567ffffffffffffffff8111156130a757600080fd5b6130b385828601612ef2565b90969095509350505050565b600181811c908216806130d357607f821691505b602082108114156130f457634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008251613141818460208701612c69565b9190910192915050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601d908201527f546f6b656e2067656e65726174696f6e206e6f7420656e61626c65642e000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff0382111561321c5761321c6131e9565b019392505050565b6000600019821415613238576132386131e9565b5060010190565b600082821015613251576132516131e9565b500390565b60008351613268818460208801612c69565b83519083019061327c818360208801612c69565b01949350505050565b60006020828403121561329757600080fd5b5051919050565b600082198211156132b1576132b16131e9565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600080835481600182811c91508083168061332457607f831692505b602080841082141561334457634e487b7160e01b86526022600452602486fd5b818015613358576001811461336957613396565b60ff19861689528489019650613396565b60008a81526020902060005b8681101561338e5781548b820152908501908301613375565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601260045260246000fd5b6000826133c9576133c96133a4565b500490565b6000826133dd576133dd6133a4565b500690565b6000602082840312156133f457600080fd5b815161171081612ced565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061343290830184612c95565b9695505050505050565b60006020828403121561344e57600080fd5b815161171081612c36565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208d70474b7c1755f6f5bfb3b3987a5654aca006fbcd85973030912dcc69893e2a64736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000bd275ce24f32d6ce4e9d9519c55abe9bc0ed7fcf00000000000000000000000007f7c1fb71a4b3d50f6146d13b53f115afb83236000000000000000000000000000000000000000000000000000000000000000e47656e6573697341706f73746c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e47454e4553495341504f53544c450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061028a5760003560e01c80636d5224181161015c578063af57dcce116100ce578063d596c86211610087578063d596c8621461058c578063df8addbd14610594578063e985e9c5146105a7578063f2fde38b146105e3578063f8279c90146105f6578063f9afb26a146105fe57600080fd5b8063af57dcce14610524578063b38c7ae814610536578063b76fad011461054a578063b88d4fde14610553578063c39cbef114610566578063c87b56dd1461057957600080fd5b80639156b69d116101205780639156b69d146104c75780639416b423146104da57806395d89b41146104ed5780639ffdb65a146104f5578063a22cb46514610508578063ad43bfc21461051b57600080fd5b80636d5224181461047557806370a0823114610488578063715018a61461049b5780637186a73f146104a35780638da5cb5b146104b657600080fd5b80632a2c6e001161020057806349c8bbe2116101b957806349c8bbe2146103e65780634d426528146104165780634f6ccce71461042957806355f804b31461043c57806359f2f8971461044f5780636352211e1461046257600080fd5b80632a2c6e001461038a5780632cd295641461039d5780632f745c59146103b057806333dfefdb146103c35780633d18b912146103cb57806342842e0e146103d357600080fd5b806309c954961161025257806309c954961461031957806315b56d101461032c57806318160ddd1461033f5780631ce923281461035157806323b872dd1461036457806326a4e8d21461037757600080fd5b806301ffc9a71461028f57806306d8038e146102b757806306fdde03146102c4578063081812fc146102d9578063095ea7b314610304575b600080fd5b6102a261029d366004612c4c565b610611565b60405190151581526020015b60405180910390f35b6010546102a29060ff1681565b6102cc610622565b6040516102ae9190612cc1565b6102ec6102e7366004612cd4565b6106b4565b6040516001600160a01b0390911681526020016102ae565b610317610312366004612d02565b610741565b005b610317610327366004612cd4565b610857565b6102a261033a366004612dda565b610886565b6008545b6040519081526020016102ae565b6016546102ec906001600160a01b031681565b610317610372366004612e0f565b6108b9565b610317610385366004612e50565b6108ea565b6015546102ec906001600160a01b031681565b6103176103ab366004612cd4565b610936565b6103436103be366004612d02565b610965565b6103176109fb565b610317610a39565b6103176103e1366004612e0f565b610b2a565b6104096103f4366004612cd4565b60009081526011602052604090205460ff1690565b6040516102ae9190612e83565b610317610424366004612eab565b610b45565b610343610437366004612cd4565b610be2565b61031761044a366004612dda565b610c75565b6102cc61045d366004612cd4565b610cb2565b6102ec610470366004612cd4565b610d54565b6102cc610483366004612cd4565b610dcb565b610343610496366004612e50565b610de8565b610317610e6f565b6103176104b1366004612cd4565b610ea5565b600a546001600160a01b03166102ec565b6103176104d5366004612f3e565b610ed4565b6102cc6104e8366004612dda565b61113b565b6102cc61129e565b6102a2610503366004612dda565b6112ad565b610317610516366004612f91565b6114bc565b610343600c5481565b6010546102a290610100900460ff1681565b6014546102a290600160a01b900460ff1681565b610343600b5481565b610317610561366004612fcf565b611581565b610317610574366004612eab565b6115b3565b6102cc610587366004612cd4565b61164c565b610317611717565b6102a26105a2366004612cd4565b611762565b6102a26105b536600461304f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103176105f1366004612e50565b61176d565b610317611808565b61031761060c36600461307d565b61184f565b600061061c82611afa565b92915050565b606060008054610631906130bf565b80601f016020809104026020016040519081016040528092919081815260200182805461065d906130bf565b80156106aa5780601f1061067f576101008083540402835291602001916106aa565b820191906000526020600020905b81548152906001019060200180831161068d57829003601f168201915b5050505050905090565b60006106bf82611b1f565b6107255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061074c82610d54565b9050806001600160a01b0316836001600160a01b031614156107ba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161071c565b336001600160a01b03821614806107d657506107d681336105b5565b6108485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161071c565b6108528383611b3c565b505050565b600a546001600160a01b031633146108815760405162461bcd60e51b815260040161071c906130fa565b601255565b6000600e6108938361113b565b6040516108a0919061312f565b9081526040519081900360200190205460ff1692915050565b6108c33382611baa565b6108df5760405162461bcd60e51b815260040161071c9061314b565b610852838383611c94565b600a546001600160a01b031633146109145760405162461bcd60e51b815260040161071c906130fa565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146109605760405162461bcd60e51b815260040161071c906130fa565b600b55565b600061097083610de8565b82106109d25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161071c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610a255760405162461bcd60e51b815260040161071c906130fa565b6010805460ff19811660ff90911615179055565b601054610100900460ff16610a605760405162461bcd60e51b815260040161071c9061319c565b60145460405163164746fd60e11b815233600482015260006024820181905260448201526001600160a01b0390911690632c8e8dfa90606401600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505060145460405163d279c19160e01b81523360048201526001600160a01b03909116925063d279c1919150602401600060405180830381600087803b158015610b1057600080fd5b505af1158015610b24573d6000803e3d6000fd5b50505050565b61085283838360405180602001604052806000815250611581565b601054610100900460ff16610b6c5760405162461bcd60e51b815260040161071c9061319c565b601454600c54604051632770a7eb60e21b815233600482015260248101919091526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b158015610bbc57600080fd5b505af1158015610bd0573d6000803e3d6000fd5b50505050610bde8282611e3f565b5050565b6000610bed60085490565b8210610c505760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161071c565b60088281548110610c6357610c636131d3565b90600052602060002001549050919050565b600a546001600160a01b03163314610c9f5760405162461bcd60e51b815260040161071c906130fa565b8051610bde906013906020840190612b9d565b6000818152600f60205260409020805460609190610ccf906130bf565b80601f0160208091040260200160405190810160405280929190818152602001828054610cfb906130bf565b8015610d485780601f10610d1d57610100808354040283529160200191610d48565b820191906000526020600020905b815481529060010190602001808311610d2b57829003601f168201915b50505050509050919050565b6000818152600260205260408120546001600160a01b03168061061c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161071c565b6000818152600d60205260409020805460609190610ccf906130bf565b60006001600160a01b038216610e535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161071c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610e995760405162461bcd60e51b815260040161071c906130fa565b610ea36000611f01565b565b600a546001600160a01b03163314610ecf5760405162461bcd60e51b815260040161071c906130fa565b600c55565b60105460ff16610f265760405162461bcd60e51b815260206004820152601860248201527f56616c69646174696f6e206e6f74206f70656e207965742e0000000000000000604482015260640161071c565b610f2f84611b1f565b610f7b5760405162461bcd60e51b815260206004820152601760248201527f41706f73746c6520646f6573206e6f742065786973742e000000000000000000604482015260640161071c565b33610f8585610d54565b6001600160a01b031614610fdb5760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206f776e20746869732061706f73746c652e00000000604482015260640161071c565b60008481526011602052604081205460ff166004811115610ffe57610ffe612e6d565b146110405760405162461bcd60e51b815260206004820152601260248201527120b63932b0b23c903b30b634b230ba32b21760711b604482015260640161071c565b60408051602081018690529081018490526000906060016040516020818303038152906040528051906020012090506110b0838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506012549150849050611f53565b6110f55760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d65726b6c652070726f6f66202160501b604482015260640161071c565b83600481111561110757611107612e6d565b6000868152601160205260409020805460ff1916600183600481111561112f5761112f612e6d565b02179055505050505050565b606060008290506000815167ffffffffffffffff81111561115e5761115e612d2e565b6040519080825280601f01601f191660200182016040528015611188576020820181803683370190505b50905060005b82518110156112965760418382815181106111ab576111ab6131d3565b016020015160f81c108015906111db5750605a8382815181106111d0576111d06131d3565b016020015160f81c11155b1561123d578281815181106111f2576111f26131d3565b602001015160f81c60f81b60f81c602061120c91906131ff565b60f81b828281518110611221576112216131d3565b60200101906001600160f81b031916908160001a905350611284565b82818151811061124f5761124f6131d3565b602001015160f81c60f81b82828151811061126c5761126c6131d3565b60200101906001600160f81b031916908160001a9053505b8061128e81613224565b91505061118e565b509392505050565b606060018054610631906130bf565b6000808290506001815110156112c65750600092915050565b6019815111156112d95750600092915050565b806000815181106112ec576112ec6131d3565b6020910101516001600160f81b031916600160fd1b14156113105750600092915050565b806001825161131f919061323f565b8151811061132f5761132f6131d3565b6020910101516001600160f81b031916600160fd1b14156113535750600092915050565b600081600081518110611368576113686131d3565b01602001516001600160f81b031916905060005b82518110156114b1576000838281518110611399576113996131d3565b01602001516001600160f81b0319169050600160fd1b811480156113ca5750600160fd1b6001600160f81b03198416145b156113db5750600095945050505050565b600360fc1b6001600160f81b03198216108015906114075750603960f81b6001600160f81b0319821611155b15801561143d5750604160f81b6001600160f81b031982161080159061143b5750602d60f91b6001600160f81b0319821611155b155b80156114725750606160f81b6001600160f81b03198216108015906114705750603d60f91b6001600160f81b0319821611155b155b801561148c5750600160fd1b6001600160f81b0319821614155b1561149d5750600095945050505050565b9150806114a981613224565b91505061137c565b506001949350505050565b6001600160a01b0382163314156115155760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161071c565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61158b3383611baa565b6115a75760405162461bcd60e51b815260040161071c9061314b565b610b2484848484612002565b601054610100900460ff166115da5760405162461bcd60e51b815260040161071c9061319c565b601454600b54604051632770a7eb60e21b815233600482015260248101919091526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b15801561162a57600080fd5b505af115801561163e573d6000803e3d6000fd5b50505050610bde8282612035565b606061165782611b1f565b6116bb5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161071c565b60006116c561235a565b905060008151116116e55760405180602001604052806000815250611710565b806116ef84612369565b604051602001611700929190613256565b6040516020818303038152906040525b9392505050565b600a546001600160a01b031633146117415760405162461bcd60e51b815260040161071c906130fa565b6014805460ff60a01b198116600160a01b9182900460ff1615909102179055565b600061061c82611b1f565b600a546001600160a01b031633146117975760405162461bcd60e51b815260040161071c906130fa565b6001600160a01b0381166117fc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071c565b61180581611f01565b50565b600a546001600160a01b031633146118325760405162461bcd60e51b815260040161071c906130fa565b6010805461ff001981166101009182900460ff1615909102179055565b601454600160a01b900460ff16806118715750600a546001600160a01b031633145b6118bd5760405162461bcd60e51b815260206004820152601860248201527f52656465656d696e67206973206e6f74206163746976652e0000000000000000604482015260640161071c565b80806118fb5760405162461bcd60e51b815260206004820152600d60248201526c20ba103632b0b9ba1037b7329760991b604482015260640161071c565b603281111561194c5760405162461bcd60e51b815260206004820152601960248201527f457863656564696e67207065722074782072656465656d732e00000000000000604482015260640161071c565b601654604051627eeac760e11b81523360048201526000602482015282916001600160a01b03169062fdd58e9060440160206040518083038186803b15801561199457600080fd5b505afa1580156119a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cc9190613285565b1015611a0d5760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41035b2bcb99760811b604482015260640161071c565b611a4983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061246792505050565b60005b81811015611a8857611a7633858584818110611a6a57611a6a6131d3565b905060200201356125d3565b80611a8081613224565b915050611a4c565b506016546040516303aeca2160e41b815233600482015260006024820152604481018390526001600160a01b0390911690633aeca210906064015b600060405180830381600087803b158015611add57600080fd5b505af1158015611af1573d6000803e3d6000fd5b50505050505050565b60006001600160e01b0319821663780e9d6360e01b148061061c575061061c826125ed565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b7182610d54565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611bb582611b1f565b611c165760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161071c565b6000611c2183610d54565b9050806001600160a01b0316846001600160a01b03161480611c5c5750836001600160a01b0316611c51846106b4565b6001600160a01b0316145b80611c8c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ca782610d54565b6001600160a01b031614611d0f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161071c565b6001600160a01b038216611d715760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161071c565b611d7c83838361263d565b611d87600082611b3c565b6001600160a01b0383166000908152600360205260408120805460019290611db090849061323f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dde90849061329e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611e4a83610d54565b9050336001600160a01b03821614611ea45760405162461bcd60e51b815260206004820152601a60248201527f596f7520646f206e6f74206f776e207468697320746f6b656e2e000000000000604482015260640161071c565b6000838152600f602090815260409091208351611ec392850190612b9d565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d83604051611ef49190612cc1565b60405180910390a2505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081815b8551811015611ff7576000868281518110611f7557611f756131d3565b60200260200101519050808311611fb7576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611fe4565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080611fef81613224565b915050611f58565b509092149392505050565b61200d848484611c94565b61201984848484612699565b610b245760405162461bcd60e51b815260040161071c906132b6565b600061204083610d54565b9050336001600160a01b0382161461209a5760405162461bcd60e51b815260206004820152601a60248201527f596f7520646f206e6f74206f776e207468697320746f6b656e2e000000000000604482015260640161071c565b6120a3826112ad565b15156001146120e45760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b604482015260640161071c565b6000838152600d602052604090819020905160029161210291613308565b602060405180830381855afa15801561211f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121429190613285565b600283604051612152919061312f565b602060405180830381855afa15801561216f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906121929190613285565b14156121ec5760405162461bcd60e51b8152602060048201526024808201527f4e6577206e616d652069732073616d65206173207468652063757272656e742060448201526337b7329760e11b606482015260840161071c565b6121f582610886565b1561223b5760405162461bcd60e51b81526020600482015260166024820152752730b6b29030b63932b0b23c903932b9b2b93b32b21760511b604482015260640161071c565b6000838152600d602052604081208054612254906130bf565b905011156122ff576000838152600d6020526040902080546122ff919061227a906130bf565b80601f01602080910402602001604051908101604052809291908181526020018280546122a6906130bf565b80156122f35780601f106122c8576101008083540402835291602001916122f3565b820191906000526020600020905b8154815290600101906020018083116122d657829003601f168201915b5050505050600061279b565b61230a82600161279b565b6000838152600d60209081526040909120835161232992850190612b9d565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051611ef49190612cc1565b606060138054610631906130bf565b60608161238d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123b757806123a181613224565b91506123b09050600a836133ba565b9150612391565b60008167ffffffffffffffff8111156123d2576123d2612d2e565b6040519080825280601f01601f1916602001820160405280156123fc576020820181803683370190505b5090505b8415611c8c5761241160018361323f565b915061241e600a866133ce565b61242990603061329e565b60f81b81838151811061243e5761243e6131d3565b60200101906001600160f81b031916908160001a905350612460600a866133ba565b9450612400565b60005b8151811015610bde57612495828281518110612488576124886131d3565b6020026020010151611762565b156124db5760405162461bcd60e51b81526020600482015260166024820152754f6e65206f662070696c6c732069732075736564202160501b604482015260640161071c565b601554825133916001600160a01b031690636352211e90859085908110612504576125046131d3565b60200260200101516040518263ffffffff1660e01b815260040161252a91815260200190565b60206040518083038186803b15801561254257600080fd5b505afa158015612556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257a91906133e2565b6001600160a01b0316146125c15760405162461bcd60e51b815260206004820152600e60248201526d2737ba103cb7bab9103834b6361760911b604482015260640161071c565b806125cb81613224565b91505061246a565b610bde8282604051806020016040528060008152506127d8565b60006001600160e01b031982166380ac58cd60e01b148061261e57506001600160e01b03198216635b5e139f60e01b145b8061061c57506301ffc9a760e01b6001600160e01b031983161461061c565b61264883838361280b565b601054610100900460ff16156108525760145460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526044820184905290911690632c8e8dfa90606401611ac3565b60006001600160a01b0384163b156114b157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126dd9033908990889088906004016133ff565b602060405180830381600087803b1580156126f757600080fd5b505af1925050508015612727575060408051601f3d908101601f191682019092526127249181019061343c565b60015b612781573d808015612755576040519150601f19603f3d011682016040523d82523d6000602084013e61275a565b606091505b5080516127795760405162461bcd60e51b815260040161071c906132b6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c8c565b80600e6127a78461113b565b6040516127b4919061312f565b908152604051908190036020019020805491151560ff199092169190911790555050565b6127e28383612816565b6127ef6000848484612699565b6108525760405162461bcd60e51b815260040161071c906132b6565b610852838383612955565b6001600160a01b03821661286c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161071c565b61287581611b1f565b156128c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161071c565b6128ce6000838361263d565b6001600160a01b03821660009081526003602052604081208054600192906128f790849061329e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166129b0576129ab81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6129d3565b816001600160a01b0316836001600160a01b0316146129d3576129d38382612a0d565b6001600160a01b0382166129ea5761085281612aaa565b826001600160a01b0316826001600160a01b031614610852576108528282612b59565b60006001612a1a84610de8565b612a24919061323f565b600083815260076020526040902054909150808214612a77576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612abc9060019061323f565b60008381526009602052604081205460088054939450909284908110612ae457612ae46131d3565b906000526020600020015490508060088381548110612b0557612b056131d3565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612b3d57612b3d613459565b6001900381819060005260206000200160009055905550505050565b6000612b6483610de8565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612ba9906130bf565b90600052602060002090601f016020900481019282612bcb5760008555612c11565b82601f10612be457805160ff1916838001178555612c11565b82800160010185558215612c11579182015b82811115612c11578251825591602001919060010190612bf6565b50612c1d929150612c21565b5090565b5b80821115612c1d5760008155600101612c22565b6001600160e01b03198116811461180557600080fd5b600060208284031215612c5e57600080fd5b813561171081612c36565b60005b83811015612c84578181015183820152602001612c6c565b83811115610b245750506000910152565b60008151808452612cad816020860160208601612c69565b601f01601f19169290920160200192915050565b6020815260006117106020830184612c95565b600060208284031215612ce657600080fd5b5035919050565b6001600160a01b038116811461180557600080fd5b60008060408385031215612d1557600080fd5b8235612d2081612ced565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d5f57612d5f612d2e565b604051601f8501601f19908116603f01168101908282118183101715612d8757612d87612d2e565b81604052809350858152868686011115612da057600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612dcb57600080fd5b61171083833560208501612d44565b600060208284031215612dec57600080fd5b813567ffffffffffffffff811115612e0357600080fd5b611c8c84828501612dba565b600080600060608486031215612e2457600080fd5b8335612e2f81612ced565b92506020840135612e3f81612ced565b929592945050506040919091013590565b600060208284031215612e6257600080fd5b813561171081612ced565b634e487b7160e01b600052602160045260246000fd5b6020810160058310612ea557634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215612ebe57600080fd5b82359150602083013567ffffffffffffffff811115612edc57600080fd5b612ee885828601612dba565b9150509250929050565b60008083601f840112612f0457600080fd5b50813567ffffffffffffffff811115612f1c57600080fd5b6020830191508360208260051b8501011115612f3757600080fd5b9250929050565b60008060008060608587031215612f5457600080fd5b8435935060208501359250604085013567ffffffffffffffff811115612f7957600080fd5b612f8587828801612ef2565b95989497509550505050565b60008060408385031215612fa457600080fd5b8235612faf81612ced565b915060208301358015158114612fc457600080fd5b809150509250929050565b60008060008060808587031215612fe557600080fd5b8435612ff081612ced565b9350602085013561300081612ced565b925060408501359150606085013567ffffffffffffffff81111561302357600080fd5b8501601f8101871361303457600080fd5b61304387823560208401612d44565b91505092959194509250565b6000806040838503121561306257600080fd5b823561306d81612ced565b91506020830135612fc481612ced565b6000806020838503121561309057600080fd5b823567ffffffffffffffff8111156130a757600080fd5b6130b385828601612ef2565b90969095509350505050565b600181811c908216806130d357607f821691505b602082108114156130f457634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008251613141818460208701612c69565b9190910192915050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601d908201527f546f6b656e2067656e65726174696f6e206e6f7420656e61626c65642e000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff0382111561321c5761321c6131e9565b019392505050565b6000600019821415613238576132386131e9565b5060010190565b600082821015613251576132516131e9565b500390565b60008351613268818460208801612c69565b83519083019061327c818360208801612c69565b01949350505050565b60006020828403121561329757600080fd5b5051919050565b600082198211156132b1576132b16131e9565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600080835481600182811c91508083168061332457607f831692505b602080841082141561334457634e487b7160e01b86526022600452602486fd5b818015613358576001811461336957613396565b60ff19861689528489019650613396565b60008a81526020902060005b8681101561338e5781548b820152908501908301613375565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601260045260246000fd5b6000826133c9576133c96133a4565b500490565b6000826133dd576133dd6133a4565b500690565b6000602082840312156133f457600080fd5b815161171081612ced565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061343290830184612c95565b9695505050505050565b60006020828403121561344e57600080fd5b815161171081612c36565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208d70474b7c1755f6f5bfb3b3987a5654aca006fbcd85973030912dcc69893e2a64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000bd275ce24f32d6ce4e9d9519c55abe9bc0ed7fcf00000000000000000000000007f7c1fb71a4b3d50f6146d13b53f115afb83236000000000000000000000000000000000000000000000000000000000000000e47656e6573697341706f73746c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e47454e4553495341504f53544c450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): GenesisApostle
Arg [1] : _symbol (string): GENESISAPOSTLE
Arg [2] : _baseURI (string):
Arg [3] : pillContract (address): 0xbD275ce24f32d6cE4e9d9519C55ABe9Bc0ed7fCf
Arg [4] : keyContract (address): 0x07f7C1fB71a4b3D50f6146d13b53F115AFB83236
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 000000000000000000000000bd275ce24f32d6ce4e9d9519c55abe9bc0ed7fcf
Arg [4] : 00000000000000000000000007f7c1fb71a4b3d50f6146d13b53f115afb83236
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [6] : 47656e6573697341706f73746c65000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [8] : 47454e4553495341504f53544c45000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.