ERC-721
NFT
Overview
Max Total Supply
709 SOULS
Holders
387
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
12 SOULSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ForgottenSouls
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@////////@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@../////////////%%%%%//@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@..////////%%/////%%%%%@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@.../////../////%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@ ............ .....@@@@@@@@@@@@@@@@@@@@../////...//////////%%///%%@@@%%@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@ ..... ..... @@@@@@@@@@@@.../////@@.....///%%////////%%@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@ ..... .. @@@@@@@@@@@@@@@@@/////@@@@@@@@@@...///////%%%//@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@ ..... @@@@@@@ ..@@@@@@@@@@@@@@@@@@..///@@@@@ @@@@@..////////%%%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@ ..... @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@..@@@@@ @@.../////%%%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@ ..... @@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@..@@@ @@@../////%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@ ..... @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@..@@@@@@@@ @@@@@@@@@@ @@/////%%%@@@@@%%@@@@@@@@@@@@@ // @@@@@@@@@@ ... @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@..@@@@@ @@ @@ @@/////%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@ ... @@@@@@@@@@@@@@@@@@@@@@@ ..@@@@@@@@@@@@@@@@@@.. @@///@@ @@@@@// /////%%%@@///@@@@@@@@@@@@@@@ // @@@@@@@@@@ ... @@@@@@@@@@@@@@@@@@@@ @@@@@ @@@@@@@@@@@@@@@@@@.. @@@@@ ../////%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ .. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@..@@@ ..///@@////////@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ .. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@..@@@ @@@ @@@ @@@ ...@@...//%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ .. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@%%%..@@@ @@ @@ ///@@...//%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ .. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@..@@@@@ //@@@@@...//%%%@@%%%@@@@@@@@@@@@@@@ // @@@@@@@ ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@//...@@ ..///@@@@@//...//@@@@@%%%@@@@@@@@@@@@@@@ // @@@@@@@ ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@%%@@@@@///..@@@@@@@@@@@@@..///../////...@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@../////@@@@@@@@.....%%/////%%%/////@@@@@@@@@@@@@@@@@@@@ // @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@...///////...@@...//%%%/////..%%%/////@@///@@@@@@@@@@@@@@@ // @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ %%@@@..///..///..///@@...//%%%/////..%%%//...//@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...%%...//////////..///@@...//%%%/////..%%%//...%%@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ %%%%%...///////////////@@...//%%%///////...%%...%%///@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@// //%%%//...//...%%////////@@...////////////...%%///../////@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@// ///%%...//...%%.../////%%...//%%%///////...%%///%%...//@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%% /////...//...//.../////%%/////%%%//%%%//////////%%///@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/// //////////...@@.../////%%/////%%%//%%%///////%%%%%...@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/// ///%%/////...@@.../////..//////////%%%//...//%%%@@...@@///@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ///%%/////%%%//////////..//////////%%%//.../////@@...@@///@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //%%%///////@@@/////..///..//////////////////%%...@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@// //%%%//...//@@@/////..///..//////////@@@/////%%...@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //%%%/////@@///..///..///../////%%%//@@@//@@@%%@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //@@@/////@@@@@..////////../////%%%//////////@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //@@@//%%%@@///.....//@@@../////%%%//@@@/////@@///@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@/////@@///../////@@@..////////%%@@@//%%%@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@//@@@@@...../////////////@@///%%///..///@@...@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@//@@@@@...../////...@@///@@///%%///..///@@///@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@//@@@@@...@@...//...@@/////@@@%%////////@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@...@@...@@///@@...//@@@/////@@///@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@/////...@@///@@...@@@@@//%%%@@///@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@/////@@@@@@@@@@...@@///@@///@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///@@@@@//@@@@@///@@@@@@@@@@@@///@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // Forgotten Souls // // https://www.forgottenrunes.com // Twitter: https://twitter.com/forgottenrunes // // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma experimental ABIEncoderV2; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC1155/IERC1155.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; interface IERC721Burnable is IERC721 { function burn(uint256 tokenId) external; } interface IERC1155Burnable is IERC1155 { function burn( address account, uint256 id, uint256 value ) external; } interface IBookOfLore { function addLoreWithScribe( address tokenContract, uint256 tokenId, uint256 parentLoreId, bool nsfw, string memory loreMetadataURI ) external; } contract ForgottenSouls is ERC721Enumerable, ReentrancyGuard, Ownable { using Strings for uint256; struct Flammable { uint256 offset; uint256 startBlock; } mapping(address => Flammable) public flammables; address[] public flammableAddresses; // resolve soulId to source tokenId, caveat is you need to know the // flammable offsets mapping(uint256 => uint256) public soulIdToFlammableTokenId; // keep the order of a given soul's burning mapping(uint256 => uint256) public soulIdToBurnIdx; // use this to enumerate all souls. nextBurnIdx is your max mapping(uint256 => uint256) public burnIdxToSoulId; // resolve a flammable token to the soulId. Useful for Book of Lore mapping(address => mapping(uint256 => uint256)) public flammableTokenToSoulId; address public bookOfLoreAddress; address public infinityVeilAddress; string public provenanceHash; // the typical base token URI stored here string public _baseTokenURI; // periodically we'll archive to IPFS and store here string public _baseTokenArchiveURI; uint256 public _archiveBurnIdx = 0; uint256 public nextBurnIdx = 0; uint256 public sacredFlameTokenId = 0; uint256 public constant MAX_SUPPLY = 1112; event SoulBurned( address tokenContract, uint256 tokenId, uint256 soulId, uint256 burnIdx ); constructor( address _infinityVeilAddress, address _bookOfLoreAddress, string memory _baseURI ) ERC721('ForgottenSouls', 'SOULS') { infinityVeilAddress = _infinityVeilAddress; bookOfLoreAddress = _bookOfLoreAddress; setBaseURI(_baseURI); } function baseURI() public view returns (string memory) { return _baseTokenURI; } function baseArchiveURI() public view returns (string memory) { return _baseTokenArchiveURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), 'ERC721Metadata: URI query for nonexistent token' ); if ( _archiveBurnIdx > 0 && soulIdToBurnIdx[tokenId] <= _archiveBurnIdx ) { return string( abi.encodePacked(_baseTokenArchiveURI, tokenId.toString()) ); } else { return string(abi.encodePacked(_baseTokenURI, tokenId.toString())); } } function tokensOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { // Return an empty array return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); uint256 index; for (index = 0; index < tokenCount; index++) { result[index] = tokenOfOwnerByIndex(_owner, index); } return result; } } function numFlammableAddresses() public view returns (uint256) { return flammableAddresses.length; } // I know you think this function should be called "burn" because you're // burning a Wizard and a Flame but that is just confusing to everyone function mint(address _tokenContract, uint256 _tokenId) public nonReentrant { require( (flammables[_tokenContract].startBlock > 0) && (block.number > flammables[_tokenContract].startBlock), 'NOT_FLAMMABLE' ); require( IERC721(_tokenContract).ownerOf(_tokenId) == _msgSender(), 'NOT_OWNER' ); require( IERC1155(infinityVeilAddress).balanceOf( _msgSender(), sacredFlameTokenId ) > 0, 'NO_FLAMES' ); require(nextBurnIdx < MAX_SUPPLY, 'MAX_SUPPLY'); uint256 newSoulTokenId = _tokenId + flammables[_tokenContract].offset; soulIdToFlammableTokenId[newSoulTokenId] = _tokenId; soulIdToBurnIdx[newSoulTokenId] = nextBurnIdx; burnIdxToSoulId[nextBurnIdx] = newSoulTokenId; flammableTokenToSoulId[_tokenContract][_tokenId] = newSoulTokenId; // write the Lore if (bookOfLoreAddress != address(0)) { IBookOfLore(bookOfLoreAddress).addLoreWithScribe( _tokenContract, _tokenId, 0, false, '' ); } // burn the flame IERC1155Burnable(infinityVeilAddress).burn( _msgSender(), sacredFlameTokenId, 1 ); // burn the wizardToken :( IERC721Burnable(_tokenContract).burn(_tokenId); _safeMint(_msgSender(), newSoulTokenId); // emit the event emit SoulBurned(_tokenContract, _tokenId, newSoulTokenId, nextBurnIdx); // increment the soul id nextBurnIdx = nextBurnIdx + 1; } function burnSoulTokenItselfDestroyingItForever(uint256 tokenId) public virtual { require( _isApprovedOrOwner(_msgSender(), tokenId), 'ERC721Burnable: caller is not owner nor approved' ); _burn(tokenId); } /* * Only the owner can do these things */ function addFlammable( address contractAddress, uint256 offset, uint256 startBlock ) public onlyOwner { flammableAddresses.push(contractAddress); setFlammable(contractAddress, offset, startBlock); } function setFlammable( address contractAddress, uint256 offset, uint256 startBlock ) public onlyOwner { flammables[contractAddress].offset = offset; flammables[contractAddress].startBlock = startBlock; } function setBaseURI(string memory _newBaseURI) public onlyOwner { _baseTokenURI = _newBaseURI; } function setProvenanceHash(string memory _newProvenanceHash) public onlyOwner { provenanceHash = _newProvenanceHash; } function setInfinityVeilContractAddress(address _infinityVeilAddress) public onlyOwner { infinityVeilAddress = _infinityVeilAddress; } function setBookOfLoreContractAddress(address _bookOfLoreAddress) public onlyOwner { bookOfLoreAddress = _bookOfLoreAddress; } function setFlameTokenId(uint256 _sacredFlameTokenId) public onlyOwner { sacredFlameTokenId = _sacredFlameTokenId; } // emergency exit functions function withdrawAll() public payable onlyOwner { require(payable(msg.sender).send(address(this).balance)); } function forwardERC20s(IERC20 _token, uint256 _amount) public onlyOwner { _token.transfer(msg.sender, _amount); } function setTokenArchiveURI( string memory _newTokenArchiveURI, uint256 _newArchiveBurnIdx ) public onlyOwner { require(_newArchiveBurnIdx < nextBurnIdx, 'NOT_CREATED_YET'); _baseTokenArchiveURI = _newTokenArchiveURI; _archiveBurnIdx = _newArchiveBurnIdx; } function uploadImages(bytes calldata s) external onlyOwner {} function uploadAttributes(bytes calldata s) external onlyOwner {} }
// 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; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// 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; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// 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(to).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); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly 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; 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" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_infinityVeilAddress","type":"address"},{"internalType":"address","name":"_bookOfLoreAddress","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"soulId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnIdx","type":"uint256"}],"name":"SoulBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_archiveBurnIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_baseTokenArchiveURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"addFlammable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseArchiveURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bookOfLoreAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnIdxToSoulId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnSoulTokenItselfDestroyingItForever","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flammableAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"flammableTokenToSoulId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"flammables","outputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forwardERC20s","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":"infinityVeilAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextBurnIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numFlammableAddresses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sacredFlameTokenId","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bookOfLoreAddress","type":"address"}],"name":"setBookOfLoreContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sacredFlameTokenId","type":"uint256"}],"name":"setFlameTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"setFlammable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_infinityVeilAddress","type":"address"}],"name":"setInfinityVeilContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newProvenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newTokenArchiveURI","type":"string"},{"internalType":"uint256","name":"_newArchiveBurnIdx","type":"uint256"}],"name":"setTokenArchiveURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"soulIdToBurnIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"soulIdToFlammableTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"s","type":"bytes"}],"name":"uploadAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"s","type":"bytes"}],"name":"uploadImages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60806040526000601755600060185560006019553480156200002057600080fd5b50604051620036433803806200364383398101604081905262000043916200029c565b604080518082018252600e81526d466f72676f7474656e536f756c7360901b602080830191825283518085019094526005845264534f554c5360d81b9084015281519192916200009691600091620001d9565b508051620000ac906001906020840190620001d9565b50506001600a5550620000c8620000c26200010c565b62000110565b601380546001600160a01b038086166001600160a01b0319928316179092556012805492851692909116919091179055620001038162000162565b5050506200041b565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200016c6200010c565b6001600160a01b03166200017f620001ca565b6001600160a01b031614620001b15760405162461bcd60e51b8152600401620001a89062000393565b60405180910390fd5b8051620001c6906015906020840190620001d9565b5050565b600b546001600160a01b031690565b828054620001e790620003c8565b90600052602060002090601f0160209004810192826200020b576000855562000256565b82601f106200022657805160ff191683800117855562000256565b8280016001018555821562000256579182015b828111156200025657825182559160200191906001019062000239565b506200026492915062000268565b5090565b5b8082111562000264576000815560010162000269565b80516001600160a01b03811681146200029757600080fd5b919050565b600080600060608486031215620002b1578283fd5b620002bc846200027f565b92506020620002cd8186016200027f565b60408601519093506001600160401b0380821115620002ea578384fd5b818701915087601f830112620002fe578384fd5b81518181111562000313576200031362000405565b604051601f8201601f191681018501838111828210171562000339576200033962000405565b60405281815283820185018a101562000350578586fd5b8592505b8183101562000373578383018501518184018601529184019162000354565b818311156200038457858583830101525b80955050505050509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600281046001821680620003dd57607f821691505b60208210811415620003ff57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b613218806200042b6000396000f3fe6080604052600436106102fe5760003560e01c806370a0823111610190578063a22cb465116100dc578063c6ab67a311610095578063d4cb1a4a1161006f578063d4cb1a4a1461085c578063e756ed541461088a578063e985e9c5146108aa578063f2fde38b146108ca576102fe565b8063c6ab67a314610812578063c87b56dd14610827578063cfc86f7b14610847576102fe565b8063a22cb46514610772578063b61fca16146103ea578063b6e6e1c114610792578063b7fe71f7146107b2578063b88d4fde146107d2578063c66dc90c146107f2576102fe565b8063853828b61161014957806395d89b411161012357806395d89b41146107135780639727151a146107285780639a578341146107485780639baa96f61461075d576102fe565b8063853828b6146106d657806389d93e2b146106de5780638da5cb5b146106fe576102fe565b806370a082311461061f578063715018a61461063f5780637a86aa6b1461065457806383e2fa1b1461067457806383f3958a146106945780638462151c146106a9576102fe565b806332cb6b0c1161024f5780634f6ccce7116102085780636352211e116101e25780636352211e146105b557806368ae97ea146105d55780636c0360eb146105f55780636c319a221461060a576102fe565b80634f6ccce714610560578063537875ca1461058057806355f804b314610595576102fe565b806332cb6b0c146104b65780633bfec1b7146104cb5780633fb83809146104eb57806340c10f191461050057806342842e0e14610520578063469caf8614610540576102fe565b806312e2cfca116102bc5780631f639eef116102965780631f639eef1461044157806323b872dd146104615780632f745c591461048157806331c78bed146104a1576102fe565b806312e2cfca146103ea57806313e269041461040a57806318160ddd1461042c576102fe565b8062c8fe871461030357806301ffc9a71461032557806306fdde031461035b578063081812fc1461037d578063095ea7b3146103aa57806310969523146103ca575b600080fd5b34801561030f57600080fd5b5061032361031e3660046127cb565b6108ea565b005b34801561033157600080fd5b506103456103403660046126b0565b61092c565b6040516103529190612a15565b60405180910390f35b34801561036757600080fd5b50610370610959565b6040516103529190612a20565b34801561038957600080fd5b5061039d6103983660046127cb565b6109eb565b60405161035291906128e9565b3480156103b657600080fd5b506103236103c5366004612635565b610a2e565b3480156103d657600080fd5b506103236103e5366004612755565b610ac6565b3480156103f657600080fd5b506103236104053660046126e8565b610b1c565b34801561041657600080fd5b5061041f610b5b565b6040516103529190613071565b34801561043857600080fd5b5061041f610b61565b34801561044d57600080fd5b5061041f61045c366004612635565b610b67565b34801561046d57600080fd5b5061032361047c36600461254b565b610b84565b34801561048d57600080fd5b5061041f61049c366004612635565b610bb6565b3480156104ad57600080fd5b5061041f610c08565b3480156104c257600080fd5b5061041f610c0e565b3480156104d757600080fd5b5061041f6104e63660046127cb565b610c14565b3480156104f757600080fd5b50610370610c26565b34801561050c57600080fd5b5061032361051b366004612635565b610cb4565b34801561052c57600080fd5b5061032361053b36600461254b565b6110d7565b34801561054c57600080fd5b5061032361055b366004612660565b6110f2565b34801561056c57600080fd5b5061041f61057b3660046127cb565b611187565b34801561058c57600080fd5b506103706111e2565b3480156105a157600080fd5b506103236105b0366004612755565b6111f1565b3480156105c157600080fd5b5061039d6105d03660046127cb565b611243565b3480156105e157600080fd5b506103236105f0366004612788565b611278565b34801561060157600080fd5b506103706112f2565b34801561061657600080fd5b5061039d611301565b34801561062b57600080fd5b5061041f61063a3660046124db565b611310565b34801561064b57600080fd5b50610323611354565b34801561066057600080fd5b5061032361066f3660046124db565b61139f565b34801561068057600080fd5b5061032361068f3660046124db565b611400565b3480156106a057600080fd5b5061041f611461565b3480156106b557600080fd5b506106c96106c43660046124db565b611467565b60405161035291906129d1565b610323611548565b3480156106ea57600080fd5b5061041f6106f93660046127cb565b6115ab565b34801561070a57600080fd5b5061039d6115bd565b34801561071f57600080fd5b506103706115cc565b34801561073457600080fd5b50610323610743366004612635565b6115db565b34801561075457600080fd5b5061039d61169a565b34801561076957600080fd5b5061041f6116a9565b34801561077e57600080fd5b5061032361078d366004612608565b6116af565b34801561079e57600080fd5b506103236107ad3660046127cb565b61177d565b3480156107be57600080fd5b506103236107cd366004612660565b6117c1565b3480156107de57600080fd5b506103236107ed36600461258b565b611822565b3480156107fe57600080fd5b5061039d61080d3660046127cb565b611861565b34801561081e57600080fd5b5061037061188b565b34801561083357600080fd5b506103706108423660046127cb565b611898565b34801561085357600080fd5b50610370611923565b34801561086857600080fd5b5061087c6108773660046124db565b611930565b60405161035292919061307a565b34801561089657600080fd5b5061041f6108a53660046127cb565b611949565b3480156108b657600080fd5b506103456108c5366004612513565b61195b565b3480156108d657600080fd5b506103236108e53660046124db565b611989565b6108fb6108f56119f7565b826119fb565b6109205760405162461bcd60e51b815260040161091790613021565b60405180910390fd5b61092981611a80565b50565b60006001600160e01b0319821663780e9d6360e01b1480610951575061095182611b27565b90505b919050565b60606000805461096890613103565b80601f016020809104026020016040519081016040528092919081815260200182805461099490613103565b80156109e15780601f106109b6576101008083540402835291602001916109e1565b820191906000526020600020905b8154815290600101906020018083116109c457829003601f168201915b5050505050905090565b60006109f682611b67565b610a125760405162461bcd60e51b815260040161091790612dac565b506000908152600460205260409020546001600160a01b031690565b6000610a3982611243565b9050806001600160a01b0316836001600160a01b03161415610a6d5760405162461bcd60e51b815260040161091790612ec5565b806001600160a01b0316610a7f6119f7565b6001600160a01b03161480610a9b5750610a9b816108c56119f7565b610ab75760405162461bcd60e51b815260040161091790612c87565b610ac18383611b84565b505050565b610ace6119f7565b6001600160a01b0316610adf6115bd565b6001600160a01b031614610b055760405162461bcd60e51b815260040161091790612df8565b8051610b189060149060208401906123ac565b5050565b610b246119f7565b6001600160a01b0316610b356115bd565b6001600160a01b031614610b185760405162461bcd60e51b815260040161091790612df8565b600d5490565b60085490565b601160209081526000928352604080842090915290825290205481565b610b8f6108f56119f7565b610bab5760405162461bcd60e51b815260040161091790612f06565b610ac1838383611bf2565b6000610bc183611310565b8210610bdf5760405162461bcd60e51b815260040161091790612a33565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60185481565b61045881565b60106020526000908152604090205481565b60168054610c3390613103565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5f90613103565b8015610cac5780601f10610c8157610100808354040283529160200191610cac565b820191906000526020600020905b815481529060010190602001808311610c8f57829003601f168201915b505050505081565b6002600a541415610cd75760405162461bcd60e51b815260040161091790612fea565b6002600a556001600160a01b0382166000908152600c602052604090206001015415801590610d2057506001600160a01b0382166000908152600c602052604090206001015443115b610d3c5760405162461bcd60e51b815260040161091790612c60565b610d446119f7565b6001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401610d799190613071565b60206040518083038186803b158015610d9157600080fd5b505afa158015610da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc991906124f7565b6001600160a01b031614610def5760405162461bcd60e51b815260040161091790612fa3565b6013546000906001600160a01b031662fdd58e610e0a6119f7565b6019546040518363ffffffff1660e01b8152600401610e2a92919061293a565b60206040518083038186803b158015610e4257600080fd5b505afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a91906127e3565b11610e975760405162461bcd60e51b815260040161091790612bf1565b61045860185410610eba5760405162461bcd60e51b815260040161091790612fc6565b6001600160a01b0382166000908152600c6020526040812054610edd9083613094565b6000818152600e60209081526040808320869055601854600f83528184208190558352601082528083208490556001600160a01b038088168452601183528184208785529092529091208290556012549192501615610fa05760125460405163cfc2450160e01b81526001600160a01b039091169063cfc2450190610f6d90869086906000908190600401612953565b600060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b505050505b6013546001600160a01b031663f5298aca610fb96119f7565b60195460016040518463ffffffff1660e01b8152600401610fdc9392919061298a565b600060405180830381600087803b158015610ff657600080fd5b505af115801561100a573d6000803e3d6000fd5b5050604051630852cd8d60e31b81526001600160a01b03861692506342966c68915061103a908590600401613071565b600060405180830381600087803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b5050505061107d6110776119f7565b82611d1f565b7f260eb26ec2743e08ce9ffbdc6282e315cefa254b413b254e3d575cc3f2d780898383836018546040516110b494939291906129ab565b60405180910390a16018546110ca906001613094565b60185550506001600a5550565b610ac183838360405180602001604052806000815250611822565b6110fa6119f7565b6001600160a01b031661110b6115bd565b6001600160a01b0316146111315760405162461bcd60e51b815260040161091790612df8565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b038516179055610ac18383836117c1565b6000611191610b61565b82106111af5760405162461bcd60e51b815260040161091790612f57565b600882815481106111d057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b60606016805461096890613103565b6111f96119f7565b6001600160a01b031661120a6115bd565b6001600160a01b0316146112305760405162461bcd60e51b815260040161091790612df8565b8051610b189060159060208401906123ac565b6000818152600260205260408120546001600160a01b0316806109515760405162461bcd60e51b815260040161091790612d2e565b6112806119f7565b6001600160a01b03166112916115bd565b6001600160a01b0316146112b75760405162461bcd60e51b815260040161091790612df8565b60185481106112d85760405162461bcd60e51b815260040161091790612b4d565b81516112eb9060169060208501906123ac565b5060175550565b60606015805461096890613103565b6013546001600160a01b031681565b60006001600160a01b0382166113385760405162461bcd60e51b815260040161091790612ce4565b506001600160a01b031660009081526003602052604090205490565b61135c6119f7565b6001600160a01b031661136d6115bd565b6001600160a01b0316146113935760405162461bcd60e51b815260040161091790612df8565b61139d6000611d39565b565b6113a76119f7565b6001600160a01b03166113b86115bd565b6001600160a01b0316146113de5760405162461bcd60e51b815260040161091790612df8565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6114086119f7565b6001600160a01b03166114196115bd565b6001600160a01b03161461143f5760405162461bcd60e51b815260040161091790612df8565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60195481565b6060600061147483611310565b905080611491575050604080516000815260208101909152610954565b60008167ffffffffffffffff8111156114ba57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114e3578160200160208202803683370190505b50905060005b82811015611538576114fb8582610bb6565b82828151811061151b57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061153081613138565b9150506114e9565b5091506109549050565b50919050565b6115506119f7565b6001600160a01b03166115616115bd565b6001600160a01b0316146115875760405162461bcd60e51b815260040161091790612df8565b60405133904780156108fc02916000818181858888f1935050505061139d57600080fd5b600f6020526000908152604090205481565b600b546001600160a01b031690565b60606001805461096890613103565b6115e36119f7565b6001600160a01b03166115f46115bd565b6001600160a01b03161461161a5760405162461bcd60e51b815260040161091790612df8565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb90611648903390859060040161293a565b602060405180830381600087803b15801561166257600080fd5b505af1158015611676573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac19190612694565b6012546001600160a01b031681565b60175481565b6116b76119f7565b6001600160a01b0316826001600160a01b031614156116e85760405162461bcd60e51b815260040161091790612bba565b80600560006116f56119f7565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556117396119f7565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117719190612a15565b60405180910390a35050565b6117856119f7565b6001600160a01b03166117966115bd565b6001600160a01b0316146117bc5760405162461bcd60e51b815260040161091790612df8565b601955565b6117c96119f7565b6001600160a01b03166117da6115bd565b6001600160a01b0316146118005760405162461bcd60e51b815260040161091790612df8565b6001600160a01b039092166000908152600c6020526040902090815560010155565b61183361182d6119f7565b836119fb565b61184f5760405162461bcd60e51b815260040161091790612f06565b61185b84848484611d8b565b50505050565b600d818154811061187157600080fd5b6000918252602090912001546001600160a01b0316905081565b60148054610c3390613103565b60606118a382611b67565b6118bf5760405162461bcd60e51b815260040161091790612e76565b60006017541180156118e157506017546000838152600f602052604090205411155b156119185760166118f183611dbe565b604051602001611902929190612843565b6040516020818303038152906040529050610954565b60156118f183611dbe565b60158054610c3390613103565b600c602052600090815260409020805460019091015482565b600e6020526000908152604090205481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6119916119f7565b6001600160a01b03166119a26115bd565b6001600160a01b0316146119c85760405162461bcd60e51b815260040161091790612df8565b6001600160a01b0381166119ee5760405162461bcd60e51b815260040161091790612ad0565b61092981611d39565b3390565b6000611a0682611b67565b611a225760405162461bcd60e51b815260040161091790612c14565b6000611a2d83611243565b9050806001600160a01b0316846001600160a01b03161480611a685750836001600160a01b0316611a5d846109eb565b6001600160a01b0316145b80611a785750611a78818561195b565b949350505050565b6000611a8b82611243565b9050611a9981600084611ed9565b611aa4600083611b84565b6001600160a01b0381166000908152600360205260408120805460019290611acd9084906130c0565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160e01b031982166380ac58cd60e01b1480611b5857506001600160e01b03198216635b5e139f60e01b145b80610951575061095182611f62565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bb982611243565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b0316611c0582611243565b6001600160a01b031614611c2b5760405162461bcd60e51b815260040161091790612e2d565b6001600160a01b038216611c515760405162461bcd60e51b815260040161091790612b76565b611c5c838383611ed9565b611c67600082611b84565b6001600160a01b0383166000908152600360205260408120805460019290611c909084906130c0565b90915550506001600160a01b0382166000908152600360205260408120805460019290611cbe908490613094565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610b18828260405180602001604052806000815250611f7b565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611d96848484611bf2565b611da284848484611fae565b61185b5760405162461bcd60e51b815260040161091790612a7e565b606081611de357506040805180820190915260018152600360fc1b6020820152610954565b8160005b8115611e0d5780611df781613138565b9150611e069050600a836130ac565b9150611de7565b60008167ffffffffffffffff811115611e3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611e60576020820181803683370190505b5090505b8415611a7857611e756001836130c0565b9150611e82600a86613153565b611e8d906030613094565b60f81b818381518110611eb057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611ed2600a866130ac565b9450611e64565b611ee4838383610ac1565b6001600160a01b038316611f0057611efb816120c9565b611f23565b816001600160a01b0316836001600160a01b031614611f2357611f23838261210d565b6001600160a01b038216611f3f57611f3a816121aa565b610ac1565b826001600160a01b0316826001600160a01b031614610ac157610ac18282612283565b6001600160e01b031981166301ffc9a760e01b14919050565b611f8583836122c7565b611f926000848484611fae565b610ac15760405162461bcd60e51b815260040161091790612a7e565b6000611fc2846001600160a01b03166123a6565b156120be57836001600160a01b031663150b7a02611fde6119f7565b8786866040518563ffffffff1660e01b815260040161200094939291906128fd565b602060405180830381600087803b15801561201a57600080fd5b505af192505050801561204a575060408051601f3d908101601f19168201909252612047918101906126cc565b60015b6120a4573d808015612078576040519150601f19603f3d011682016040523d82523d6000602084013e61207d565b606091505b50805161209c5760405162461bcd60e51b815260040161091790612a7e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a78565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161211a84611310565b61212491906130c0565b600083815260076020526040902054909150808214612177576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906121bc906001906130c0565b600083815260096020526040812054600880549394509092849081106121f257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061222157634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061226757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061228e83611310565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166122ed5760405162461bcd60e51b815260040161091790612d77565b6122f681611b67565b156123135760405162461bcd60e51b815260040161091790612b16565b61231f60008383611ed9565b6001600160a01b0382166000908152600360205260408120805460019290612348908490613094565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b8280546123b890613103565b90600052602060002090601f0160209004810192826123da5760008555612420565b82601f106123f357805160ff1916838001178555612420565b82800160010185558215612420579182015b82811115612420578251825591602001919060010190612405565b5061242c929150612430565b5090565b5b8082111561242c5760008155600101612431565b600067ffffffffffffffff8084111561246057612460613193565b604051601f8501601f19168101602001828111828210171561248457612484613193565b60405284815291508183850186101561249c57600080fd5b8484602083013760006020868301015250509392505050565b600082601f8301126124c5578081fd5b6124d483833560208501612445565b9392505050565b6000602082840312156124ec578081fd5b81356124d4816131a9565b600060208284031215612508578081fd5b81516124d4816131a9565b60008060408385031215612525578081fd5b8235612530816131a9565b91506020830135612540816131a9565b809150509250929050565b60008060006060848603121561255f578081fd5b833561256a816131a9565b9250602084013561257a816131a9565b929592945050506040919091013590565b600080600080608085870312156125a0578081fd5b84356125ab816131a9565b935060208501356125bb816131a9565b925060408501359150606085013567ffffffffffffffff8111156125dd578182fd5b8501601f810187136125ed578182fd5b6125fc87823560208401612445565b91505092959194509250565b6000806040838503121561261a578182fd5b8235612625816131a9565b91506020830135612540816131be565b60008060408385031215612647578182fd5b8235612652816131a9565b946020939093013593505050565b600080600060608486031215612674578283fd5b833561267f816131a9565b95602085013595506040909401359392505050565b6000602082840312156126a5578081fd5b81516124d4816131be565b6000602082840312156126c1578081fd5b81356124d4816131cc565b6000602082840312156126dd578081fd5b81516124d4816131cc565b600080602083850312156126fa578182fd5b823567ffffffffffffffff80821115612711578384fd5b818501915085601f830112612724578384fd5b813581811115612732578485fd5b866020828501011115612743578485fd5b60209290920196919550909350505050565b600060208284031215612766578081fd5b813567ffffffffffffffff81111561277c578182fd5b611a78848285016124b5565b6000806040838503121561279a578182fd5b823567ffffffffffffffff8111156127b0578283fd5b6127bc858286016124b5565b95602094909401359450505050565b6000602082840312156127dc578081fd5b5035919050565b6000602082840312156127f4578081fd5b5051919050565b600081518084526128138160208601602086016130d7565b601f01601f19169290920160200192915050565b600081516128398185602086016130d7565b9290920192915050565b825460009081906002810460018083168061285f57607f831692505b602080841082141561287f57634e487b7160e01b87526022600452602487fd5b81801561289357600181146128a4576128d0565b60ff198616895284890196506128d0565b6128ad8b613088565b885b868110156128c85781548b8201529085019083016128af565b505084890196505b5050505050506128e08185612827565b95945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612930908301846127fb565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03949094168452602084019290925260408301521515606082015260a06080820181905260009082015260c00190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6020808252825182820181905260009190848201906040850190845b81811015612a09578351835292840192918401916001016129ed565b50909695505050505050565b901515815260200190565b6000602082526124d460208301846127fb565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600f908201526e1393d517d0d4915055115117d65155608a1b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600990820152684e4f5f464c414d455360b81b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c4e4f545f464c414d4d41424c4560981b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b6020808252600a90820152694d41585f535550504c5960b01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b90815260200190565b918252602082015260400190565b60009081526020902090565b600082198211156130a7576130a7613167565b500190565b6000826130bb576130bb61317d565b500490565b6000828210156130d2576130d2613167565b500390565b60005b838110156130f25781810151838201526020016130da565b8381111561185b5750506000910152565b60028104600182168061311757607f821691505b6020821081141561154257634e487b7160e01b600052602260045260246000fd5b600060001982141561314c5761314c613167565b5060010190565b6000826131625761316261317d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461092957600080fd5b801515811461092957600080fd5b6001600160e01b03198116811461092957600080fdfea2646970667358221220223df4a1bf9ec6029a29817ec238575a9125a9ca4a648fe243932d0073e200ee64736f6c6343000800003300000000000000000000000031158181b4b91a423bfdc758fc3bf8735711f9c50000000000000000000000004218948d1da133cf4b0758639a8c065dbdccb2bb0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f706f7274616c2e666f72676f7474656e72756e65732e636f6d2f6170692f736f756c732f646174612f000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102fe5760003560e01c806370a0823111610190578063a22cb465116100dc578063c6ab67a311610095578063d4cb1a4a1161006f578063d4cb1a4a1461085c578063e756ed541461088a578063e985e9c5146108aa578063f2fde38b146108ca576102fe565b8063c6ab67a314610812578063c87b56dd14610827578063cfc86f7b14610847576102fe565b8063a22cb46514610772578063b61fca16146103ea578063b6e6e1c114610792578063b7fe71f7146107b2578063b88d4fde146107d2578063c66dc90c146107f2576102fe565b8063853828b61161014957806395d89b411161012357806395d89b41146107135780639727151a146107285780639a578341146107485780639baa96f61461075d576102fe565b8063853828b6146106d657806389d93e2b146106de5780638da5cb5b146106fe576102fe565b806370a082311461061f578063715018a61461063f5780637a86aa6b1461065457806383e2fa1b1461067457806383f3958a146106945780638462151c146106a9576102fe565b806332cb6b0c1161024f5780634f6ccce7116102085780636352211e116101e25780636352211e146105b557806368ae97ea146105d55780636c0360eb146105f55780636c319a221461060a576102fe565b80634f6ccce714610560578063537875ca1461058057806355f804b314610595576102fe565b806332cb6b0c146104b65780633bfec1b7146104cb5780633fb83809146104eb57806340c10f191461050057806342842e0e14610520578063469caf8614610540576102fe565b806312e2cfca116102bc5780631f639eef116102965780631f639eef1461044157806323b872dd146104615780632f745c591461048157806331c78bed146104a1576102fe565b806312e2cfca146103ea57806313e269041461040a57806318160ddd1461042c576102fe565b8062c8fe871461030357806301ffc9a71461032557806306fdde031461035b578063081812fc1461037d578063095ea7b3146103aa57806310969523146103ca575b600080fd5b34801561030f57600080fd5b5061032361031e3660046127cb565b6108ea565b005b34801561033157600080fd5b506103456103403660046126b0565b61092c565b6040516103529190612a15565b60405180910390f35b34801561036757600080fd5b50610370610959565b6040516103529190612a20565b34801561038957600080fd5b5061039d6103983660046127cb565b6109eb565b60405161035291906128e9565b3480156103b657600080fd5b506103236103c5366004612635565b610a2e565b3480156103d657600080fd5b506103236103e5366004612755565b610ac6565b3480156103f657600080fd5b506103236104053660046126e8565b610b1c565b34801561041657600080fd5b5061041f610b5b565b6040516103529190613071565b34801561043857600080fd5b5061041f610b61565b34801561044d57600080fd5b5061041f61045c366004612635565b610b67565b34801561046d57600080fd5b5061032361047c36600461254b565b610b84565b34801561048d57600080fd5b5061041f61049c366004612635565b610bb6565b3480156104ad57600080fd5b5061041f610c08565b3480156104c257600080fd5b5061041f610c0e565b3480156104d757600080fd5b5061041f6104e63660046127cb565b610c14565b3480156104f757600080fd5b50610370610c26565b34801561050c57600080fd5b5061032361051b366004612635565b610cb4565b34801561052c57600080fd5b5061032361053b36600461254b565b6110d7565b34801561054c57600080fd5b5061032361055b366004612660565b6110f2565b34801561056c57600080fd5b5061041f61057b3660046127cb565b611187565b34801561058c57600080fd5b506103706111e2565b3480156105a157600080fd5b506103236105b0366004612755565b6111f1565b3480156105c157600080fd5b5061039d6105d03660046127cb565b611243565b3480156105e157600080fd5b506103236105f0366004612788565b611278565b34801561060157600080fd5b506103706112f2565b34801561061657600080fd5b5061039d611301565b34801561062b57600080fd5b5061041f61063a3660046124db565b611310565b34801561064b57600080fd5b50610323611354565b34801561066057600080fd5b5061032361066f3660046124db565b61139f565b34801561068057600080fd5b5061032361068f3660046124db565b611400565b3480156106a057600080fd5b5061041f611461565b3480156106b557600080fd5b506106c96106c43660046124db565b611467565b60405161035291906129d1565b610323611548565b3480156106ea57600080fd5b5061041f6106f93660046127cb565b6115ab565b34801561070a57600080fd5b5061039d6115bd565b34801561071f57600080fd5b506103706115cc565b34801561073457600080fd5b50610323610743366004612635565b6115db565b34801561075457600080fd5b5061039d61169a565b34801561076957600080fd5b5061041f6116a9565b34801561077e57600080fd5b5061032361078d366004612608565b6116af565b34801561079e57600080fd5b506103236107ad3660046127cb565b61177d565b3480156107be57600080fd5b506103236107cd366004612660565b6117c1565b3480156107de57600080fd5b506103236107ed36600461258b565b611822565b3480156107fe57600080fd5b5061039d61080d3660046127cb565b611861565b34801561081e57600080fd5b5061037061188b565b34801561083357600080fd5b506103706108423660046127cb565b611898565b34801561085357600080fd5b50610370611923565b34801561086857600080fd5b5061087c6108773660046124db565b611930565b60405161035292919061307a565b34801561089657600080fd5b5061041f6108a53660046127cb565b611949565b3480156108b657600080fd5b506103456108c5366004612513565b61195b565b3480156108d657600080fd5b506103236108e53660046124db565b611989565b6108fb6108f56119f7565b826119fb565b6109205760405162461bcd60e51b815260040161091790613021565b60405180910390fd5b61092981611a80565b50565b60006001600160e01b0319821663780e9d6360e01b1480610951575061095182611b27565b90505b919050565b60606000805461096890613103565b80601f016020809104026020016040519081016040528092919081815260200182805461099490613103565b80156109e15780601f106109b6576101008083540402835291602001916109e1565b820191906000526020600020905b8154815290600101906020018083116109c457829003601f168201915b5050505050905090565b60006109f682611b67565b610a125760405162461bcd60e51b815260040161091790612dac565b506000908152600460205260409020546001600160a01b031690565b6000610a3982611243565b9050806001600160a01b0316836001600160a01b03161415610a6d5760405162461bcd60e51b815260040161091790612ec5565b806001600160a01b0316610a7f6119f7565b6001600160a01b03161480610a9b5750610a9b816108c56119f7565b610ab75760405162461bcd60e51b815260040161091790612c87565b610ac18383611b84565b505050565b610ace6119f7565b6001600160a01b0316610adf6115bd565b6001600160a01b031614610b055760405162461bcd60e51b815260040161091790612df8565b8051610b189060149060208401906123ac565b5050565b610b246119f7565b6001600160a01b0316610b356115bd565b6001600160a01b031614610b185760405162461bcd60e51b815260040161091790612df8565b600d5490565b60085490565b601160209081526000928352604080842090915290825290205481565b610b8f6108f56119f7565b610bab5760405162461bcd60e51b815260040161091790612f06565b610ac1838383611bf2565b6000610bc183611310565b8210610bdf5760405162461bcd60e51b815260040161091790612a33565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60185481565b61045881565b60106020526000908152604090205481565b60168054610c3390613103565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5f90613103565b8015610cac5780601f10610c8157610100808354040283529160200191610cac565b820191906000526020600020905b815481529060010190602001808311610c8f57829003601f168201915b505050505081565b6002600a541415610cd75760405162461bcd60e51b815260040161091790612fea565b6002600a556001600160a01b0382166000908152600c602052604090206001015415801590610d2057506001600160a01b0382166000908152600c602052604090206001015443115b610d3c5760405162461bcd60e51b815260040161091790612c60565b610d446119f7565b6001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401610d799190613071565b60206040518083038186803b158015610d9157600080fd5b505afa158015610da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc991906124f7565b6001600160a01b031614610def5760405162461bcd60e51b815260040161091790612fa3565b6013546000906001600160a01b031662fdd58e610e0a6119f7565b6019546040518363ffffffff1660e01b8152600401610e2a92919061293a565b60206040518083038186803b158015610e4257600080fd5b505afa158015610e56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7a91906127e3565b11610e975760405162461bcd60e51b815260040161091790612bf1565b61045860185410610eba5760405162461bcd60e51b815260040161091790612fc6565b6001600160a01b0382166000908152600c6020526040812054610edd9083613094565b6000818152600e60209081526040808320869055601854600f83528184208190558352601082528083208490556001600160a01b038088168452601183528184208785529092529091208290556012549192501615610fa05760125460405163cfc2450160e01b81526001600160a01b039091169063cfc2450190610f6d90869086906000908190600401612953565b600060405180830381600087803b158015610f8757600080fd5b505af1158015610f9b573d6000803e3d6000fd5b505050505b6013546001600160a01b031663f5298aca610fb96119f7565b60195460016040518463ffffffff1660e01b8152600401610fdc9392919061298a565b600060405180830381600087803b158015610ff657600080fd5b505af115801561100a573d6000803e3d6000fd5b5050604051630852cd8d60e31b81526001600160a01b03861692506342966c68915061103a908590600401613071565b600060405180830381600087803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b5050505061107d6110776119f7565b82611d1f565b7f260eb26ec2743e08ce9ffbdc6282e315cefa254b413b254e3d575cc3f2d780898383836018546040516110b494939291906129ab565b60405180910390a16018546110ca906001613094565b60185550506001600a5550565b610ac183838360405180602001604052806000815250611822565b6110fa6119f7565b6001600160a01b031661110b6115bd565b6001600160a01b0316146111315760405162461bcd60e51b815260040161091790612df8565b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b038516179055610ac18383836117c1565b6000611191610b61565b82106111af5760405162461bcd60e51b815260040161091790612f57565b600882815481106111d057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b60606016805461096890613103565b6111f96119f7565b6001600160a01b031661120a6115bd565b6001600160a01b0316146112305760405162461bcd60e51b815260040161091790612df8565b8051610b189060159060208401906123ac565b6000818152600260205260408120546001600160a01b0316806109515760405162461bcd60e51b815260040161091790612d2e565b6112806119f7565b6001600160a01b03166112916115bd565b6001600160a01b0316146112b75760405162461bcd60e51b815260040161091790612df8565b60185481106112d85760405162461bcd60e51b815260040161091790612b4d565b81516112eb9060169060208501906123ac565b5060175550565b60606015805461096890613103565b6013546001600160a01b031681565b60006001600160a01b0382166113385760405162461bcd60e51b815260040161091790612ce4565b506001600160a01b031660009081526003602052604090205490565b61135c6119f7565b6001600160a01b031661136d6115bd565b6001600160a01b0316146113935760405162461bcd60e51b815260040161091790612df8565b61139d6000611d39565b565b6113a76119f7565b6001600160a01b03166113b86115bd565b6001600160a01b0316146113de5760405162461bcd60e51b815260040161091790612df8565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6114086119f7565b6001600160a01b03166114196115bd565b6001600160a01b03161461143f5760405162461bcd60e51b815260040161091790612df8565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60195481565b6060600061147483611310565b905080611491575050604080516000815260208101909152610954565b60008167ffffffffffffffff8111156114ba57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114e3578160200160208202803683370190505b50905060005b82811015611538576114fb8582610bb6565b82828151811061151b57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061153081613138565b9150506114e9565b5091506109549050565b50919050565b6115506119f7565b6001600160a01b03166115616115bd565b6001600160a01b0316146115875760405162461bcd60e51b815260040161091790612df8565b60405133904780156108fc02916000818181858888f1935050505061139d57600080fd5b600f6020526000908152604090205481565b600b546001600160a01b031690565b60606001805461096890613103565b6115e36119f7565b6001600160a01b03166115f46115bd565b6001600160a01b03161461161a5760405162461bcd60e51b815260040161091790612df8565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb90611648903390859060040161293a565b602060405180830381600087803b15801561166257600080fd5b505af1158015611676573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac19190612694565b6012546001600160a01b031681565b60175481565b6116b76119f7565b6001600160a01b0316826001600160a01b031614156116e85760405162461bcd60e51b815260040161091790612bba565b80600560006116f56119f7565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556117396119f7565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117719190612a15565b60405180910390a35050565b6117856119f7565b6001600160a01b03166117966115bd565b6001600160a01b0316146117bc5760405162461bcd60e51b815260040161091790612df8565b601955565b6117c96119f7565b6001600160a01b03166117da6115bd565b6001600160a01b0316146118005760405162461bcd60e51b815260040161091790612df8565b6001600160a01b039092166000908152600c6020526040902090815560010155565b61183361182d6119f7565b836119fb565b61184f5760405162461bcd60e51b815260040161091790612f06565b61185b84848484611d8b565b50505050565b600d818154811061187157600080fd5b6000918252602090912001546001600160a01b0316905081565b60148054610c3390613103565b60606118a382611b67565b6118bf5760405162461bcd60e51b815260040161091790612e76565b60006017541180156118e157506017546000838152600f602052604090205411155b156119185760166118f183611dbe565b604051602001611902929190612843565b6040516020818303038152906040529050610954565b60156118f183611dbe565b60158054610c3390613103565b600c602052600090815260409020805460019091015482565b600e6020526000908152604090205481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6119916119f7565b6001600160a01b03166119a26115bd565b6001600160a01b0316146119c85760405162461bcd60e51b815260040161091790612df8565b6001600160a01b0381166119ee5760405162461bcd60e51b815260040161091790612ad0565b61092981611d39565b3390565b6000611a0682611b67565b611a225760405162461bcd60e51b815260040161091790612c14565b6000611a2d83611243565b9050806001600160a01b0316846001600160a01b03161480611a685750836001600160a01b0316611a5d846109eb565b6001600160a01b0316145b80611a785750611a78818561195b565b949350505050565b6000611a8b82611243565b9050611a9981600084611ed9565b611aa4600083611b84565b6001600160a01b0381166000908152600360205260408120805460019290611acd9084906130c0565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160e01b031982166380ac58cd60e01b1480611b5857506001600160e01b03198216635b5e139f60e01b145b80610951575061095182611f62565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bb982611243565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b0316611c0582611243565b6001600160a01b031614611c2b5760405162461bcd60e51b815260040161091790612e2d565b6001600160a01b038216611c515760405162461bcd60e51b815260040161091790612b76565b611c5c838383611ed9565b611c67600082611b84565b6001600160a01b0383166000908152600360205260408120805460019290611c909084906130c0565b90915550506001600160a01b0382166000908152600360205260408120805460019290611cbe908490613094565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610b18828260405180602001604052806000815250611f7b565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611d96848484611bf2565b611da284848484611fae565b61185b5760405162461bcd60e51b815260040161091790612a7e565b606081611de357506040805180820190915260018152600360fc1b6020820152610954565b8160005b8115611e0d5780611df781613138565b9150611e069050600a836130ac565b9150611de7565b60008167ffffffffffffffff811115611e3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611e60576020820181803683370190505b5090505b8415611a7857611e756001836130c0565b9150611e82600a86613153565b611e8d906030613094565b60f81b818381518110611eb057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611ed2600a866130ac565b9450611e64565b611ee4838383610ac1565b6001600160a01b038316611f0057611efb816120c9565b611f23565b816001600160a01b0316836001600160a01b031614611f2357611f23838261210d565b6001600160a01b038216611f3f57611f3a816121aa565b610ac1565b826001600160a01b0316826001600160a01b031614610ac157610ac18282612283565b6001600160e01b031981166301ffc9a760e01b14919050565b611f8583836122c7565b611f926000848484611fae565b610ac15760405162461bcd60e51b815260040161091790612a7e565b6000611fc2846001600160a01b03166123a6565b156120be57836001600160a01b031663150b7a02611fde6119f7565b8786866040518563ffffffff1660e01b815260040161200094939291906128fd565b602060405180830381600087803b15801561201a57600080fd5b505af192505050801561204a575060408051601f3d908101601f19168201909252612047918101906126cc565b60015b6120a4573d808015612078576040519150601f19603f3d011682016040523d82523d6000602084013e61207d565b606091505b50805161209c5760405162461bcd60e51b815260040161091790612a7e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a78565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161211a84611310565b61212491906130c0565b600083815260076020526040902054909150808214612177576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906121bc906001906130c0565b600083815260096020526040812054600880549394509092849081106121f257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061222157634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061226757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061228e83611310565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166122ed5760405162461bcd60e51b815260040161091790612d77565b6122f681611b67565b156123135760405162461bcd60e51b815260040161091790612b16565b61231f60008383611ed9565b6001600160a01b0382166000908152600360205260408120805460019290612348908490613094565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b8280546123b890613103565b90600052602060002090601f0160209004810192826123da5760008555612420565b82601f106123f357805160ff1916838001178555612420565b82800160010185558215612420579182015b82811115612420578251825591602001919060010190612405565b5061242c929150612430565b5090565b5b8082111561242c5760008155600101612431565b600067ffffffffffffffff8084111561246057612460613193565b604051601f8501601f19168101602001828111828210171561248457612484613193565b60405284815291508183850186101561249c57600080fd5b8484602083013760006020868301015250509392505050565b600082601f8301126124c5578081fd5b6124d483833560208501612445565b9392505050565b6000602082840312156124ec578081fd5b81356124d4816131a9565b600060208284031215612508578081fd5b81516124d4816131a9565b60008060408385031215612525578081fd5b8235612530816131a9565b91506020830135612540816131a9565b809150509250929050565b60008060006060848603121561255f578081fd5b833561256a816131a9565b9250602084013561257a816131a9565b929592945050506040919091013590565b600080600080608085870312156125a0578081fd5b84356125ab816131a9565b935060208501356125bb816131a9565b925060408501359150606085013567ffffffffffffffff8111156125dd578182fd5b8501601f810187136125ed578182fd5b6125fc87823560208401612445565b91505092959194509250565b6000806040838503121561261a578182fd5b8235612625816131a9565b91506020830135612540816131be565b60008060408385031215612647578182fd5b8235612652816131a9565b946020939093013593505050565b600080600060608486031215612674578283fd5b833561267f816131a9565b95602085013595506040909401359392505050565b6000602082840312156126a5578081fd5b81516124d4816131be565b6000602082840312156126c1578081fd5b81356124d4816131cc565b6000602082840312156126dd578081fd5b81516124d4816131cc565b600080602083850312156126fa578182fd5b823567ffffffffffffffff80821115612711578384fd5b818501915085601f830112612724578384fd5b813581811115612732578485fd5b866020828501011115612743578485fd5b60209290920196919550909350505050565b600060208284031215612766578081fd5b813567ffffffffffffffff81111561277c578182fd5b611a78848285016124b5565b6000806040838503121561279a578182fd5b823567ffffffffffffffff8111156127b0578283fd5b6127bc858286016124b5565b95602094909401359450505050565b6000602082840312156127dc578081fd5b5035919050565b6000602082840312156127f4578081fd5b5051919050565b600081518084526128138160208601602086016130d7565b601f01601f19169290920160200192915050565b600081516128398185602086016130d7565b9290920192915050565b825460009081906002810460018083168061285f57607f831692505b602080841082141561287f57634e487b7160e01b87526022600452602487fd5b81801561289357600181146128a4576128d0565b60ff198616895284890196506128d0565b6128ad8b613088565b885b868110156128c85781548b8201529085019083016128af565b505084890196505b5050505050506128e08185612827565b95945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612930908301846127fb565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03949094168452602084019290925260408301521515606082015260a06080820181905260009082015260c00190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6020808252825182820181905260009190848201906040850190845b81811015612a09578351835292840192918401916001016129ed565b50909695505050505050565b901515815260200190565b6000602082526124d460208301846127fb565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600f908201526e1393d517d0d4915055115117d65155608a1b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600990820152684e4f5f464c414d455360b81b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c4e4f545f464c414d4d41424c4560981b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b6020808252600a90820152694d41585f535550504c5960b01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b90815260200190565b918252602082015260400190565b60009081526020902090565b600082198211156130a7576130a7613167565b500190565b6000826130bb576130bb61317d565b500490565b6000828210156130d2576130d2613167565b500390565b60005b838110156130f25781810151838201526020016130da565b8381111561185b5750506000910152565b60028104600182168061311757607f821691505b6020821081141561154257634e487b7160e01b600052602260045260246000fd5b600060001982141561314c5761314c613167565b5060010190565b6000826131625761316261317d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461092957600080fd5b801515811461092957600080fd5b6001600160e01b03198116811461092957600080fdfea2646970667358221220223df4a1bf9ec6029a29817ec238575a9125a9ca4a648fe243932d0073e200ee64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000031158181b4b91a423bfdc758fc3bf8735711f9c50000000000000000000000004218948d1da133cf4b0758639a8c065dbdccb2bb0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f706f7274616c2e666f72676f7474656e72756e65732e636f6d2f6170692f736f756c732f646174612f000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _infinityVeilAddress (address): 0x31158181b4b91A423bfDC758fC3bf8735711f9C5
Arg [1] : _bookOfLoreAddress (address): 0x4218948D1Da133CF4B0758639a8C065Dbdccb2BB
Arg [2] : _baseURI (string): https://portal.forgottenrunes.com/api/souls/data/
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000031158181b4b91a423bfdc758fc3bf8735711f9c5
Arg [1] : 0000000000000000000000004218948d1da133cf4b0758639a8c065dbdccb2bb
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000031
Arg [4] : 68747470733a2f2f706f7274616c2e666f72676f7474656e72756e65732e636f
Arg [5] : 6d2f6170692f736f756c732f646174612f000000000000000000000000000000
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.