ERC-721
Overview
Max Total Supply
1,150 XFTL
Holders
111
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
AscendedLords
Compiler Version
v0.8.11+commit.d7f03943
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "ERC721.sol"; import "ERC721Enumerable.sol"; import "Counters.sol"; import "AccessControl.sol"; interface ArtifactsInterface { function artifactType(uint256 tokenId) external view returns (uint256); function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract AscendedLords is AccessControl, ERC721Enumerable { using Counters for Counters.Counter; using Strings for uint256; bytes32 public constant LORE_SETTER_ROLE = keccak256("LORE_SETTER_ROLE"); address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD; uint256 public immutable MAX_SUPPLY; ERC721 public immutable fantomLords; ArtifactsInterface public immutable artifacts; Counters.Counter public _tokenIdCounter; Counters.Counter[10] private _classTokenIdCounters; Counters.Counter private teamUniqueLordCounter; Counters.Counter private teamCommonLordCounter; uint256 private constant TEAM_COMMON_LORD_ALLOCATION = 50; uint256 private constant TEAM_UNIQUE_LORD_ALLOCATION = 8; uint256 private constant MAX_LORDS_PER_CLASS = 300; uint256 private constant MAX_UNIQUE_LORDS = 30; uint256 private constant MAX_BURNED_LORDS = 10; uint256 private constant UNIQUE_LORDS_PROB = 30; // 3% probability uint256 private constant BURNED_LORDS_PROB = 17; // 1.7% probability uint256 private _nonce; string private _baseTokenURI; bool private _ascensionStarted = false; mapping(uint256 => string) private _lordNames; mapping(uint256 => string) private _lordLores; mapping(uint256 => string) private _lordClasses; mapping(uint256 => uint256) private _lordClassIds; mapping(uint256 => uint256) private _tokenIdToClassTokenId; constructor ( string memory name, string memory symbol, string memory baseURI, ERC721 _fantomLords, ArtifactsInterface _artifacts, uint256 maxSupply, address admin) ERC721(name, symbol) { MAX_SUPPLY = maxSupply; _baseTokenURI = baseURI; fantomLords = _fantomLords; artifacts = _artifacts; _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(LORE_SETTER_ROLE, admin); _setupRole(LORE_SETTER_ROLE, msg.sender); } modifier onlyAdmin() { _checkRole(DEFAULT_ADMIN_ROLE, msg.sender); _; } function setBaseURI(string memory newBaseURI) external onlyAdmin { _baseTokenURI = newBaseURI; } function startAscension() external onlyAdmin { _ascensionStarted = true; } function lordName(uint256 tokenId) external view returns (string memory) { return _lordNames[tokenId]; } function lordLore(uint256 tokenId) external view returns (string memory) { return _lordLores[tokenId]; } function lordClass(uint256 tokenId) external view returns (string memory) { return _lordClasses[tokenId]; } function lordClassId(uint256 tokenId) external view returns (uint256) { return _lordClassIds[tokenId]; } function classTokenId(uint256 tokenId) external view returns (uint256) { return _tokenIdToClassTokenId[tokenId]; } function ascendLord(uint256 ftlTokenId, uint256 artifactTokenId) external { uint256 artifactType = artifacts.artifactType(artifactTokenId); require(_ascensionStarted, "ascension has not started yet"); require(_tokenIdCounter.current() < MAX_SUPPLY, "all tokens have been minted"); require( totalSupplyPerClass(artifactType) < MAX_LORDS_PER_CLASS, "all lords of that class have been ascended" ); artifactType = _uniqueOrBurnedLord(artifactType); artifacts.safeTransferFrom(msg.sender, BURN_ADDRESS, artifactTokenId); fantomLords.safeTransferFrom(msg.sender, BURN_ADDRESS, ftlTokenId); _tokenIdCounter.increment(); _classTokenIdCounters[artifactType].increment(); uint256 _tokenId = _tokenIdCounter.current(); uint256 _classTokenId = _classTokenIdCounters[artifactType].current(); _tokenIdToClassTokenId[_tokenId] = _classTokenId; _lordClasses[_tokenId] = _lordClassName(artifactType); _lordClassIds[_tokenId] = artifactType; _safeMint(msg.sender, _tokenId); } function teamUniqueLordMint(uint256 amount) external onlyAdmin { require( teamUniqueLordCounter.current() + amount <= TEAM_UNIQUE_LORD_ALLOCATION, "amount exceeds team allocation" ); require(_tokenIdCounter.current() < MAX_SUPPLY, "all tokens have been minted"); require( _tokenIdCounter.current() + amount < MAX_SUPPLY + 1, "not enough tokens left to mint" ); require(totalSupplyPerClass(8) < MAX_UNIQUE_LORDS, "all unique lords have been minted"); uint256 lordClass = 8; for (uint256 i = 0; i < amount; ++i) { _tokenIdCounter.increment(); _classTokenIdCounters[lordClass].increment(); uint256 _tokenId = _tokenIdCounter.current(); uint256 _classTokenId = _classTokenIdCounters[lordClass].current(); _tokenIdToClassTokenId[_tokenId] = _classTokenId; _lordClasses[_tokenId] = _lordClassName(lordClass); _lordClassIds[_tokenId] = lordClass; teamUniqueLordCounter.increment(); _safeMint(msg.sender, _tokenId); } } function teamCommonLordMint(uint256 amount, uint256 lordClass) external onlyAdmin { require(lordClass <= 7, "lordClass has to be between 0 and 7"); require( teamCommonLordCounter.current() + amount <= TEAM_COMMON_LORD_ALLOCATION, "amount exceeds team allocation" ); require(_tokenIdCounter.current() < MAX_SUPPLY, "all tokens have been minted"); require( _tokenIdCounter.current() + amount < MAX_SUPPLY + 1, "not enough tokens left to mint" ); require( totalSupplyPerClass(lordClass) + amount < MAX_LORDS_PER_CLASS + 1, "all lords of that class have been ascended" ); for (uint256 i = 0; i < amount; ++i) { _tokenIdCounter.increment(); _classTokenIdCounters[lordClass].increment(); uint256 _tokenId = _tokenIdCounter.current(); uint256 _classTokenId = _classTokenIdCounters[lordClass].current(); _tokenIdToClassTokenId[_tokenId] = _classTokenId; _lordClasses[_tokenId] = _lordClassName(lordClass); _lordClassIds[_tokenId] = lordClass; teamCommonLordCounter.increment(); _safeMint(msg.sender, _tokenId); } } function changeLore(uint256 tokenId, string memory newLore) external onlyRole(LORE_SETTER_ROLE) { require(_exists(tokenId), "token does not exist"); _lordLores[tokenId] = newLore; } function changeName(uint256 tokenId, string memory newName) external onlyRole(LORE_SETTER_ROLE) { require(_exists(tokenId), "token does not exist"); _lordNames[tokenId] = newName; } function totalSupplyPerClass(uint256 lordClassId) public view returns (uint256) { return _classTokenIdCounters[lordClassId].current(); } function _baseURI() internal view override returns (string memory) { return _baseTokenURI; } function _uniqueOrBurnedLord(uint256 artifactType) private returns (uint256) { uint256 randomNb = uint256(keccak256(abi.encodePacked(++_nonce, block.timestamp, msg.sender, blockhash(block.number - 1)))) % 1000; if (randomNb < (UNIQUE_LORDS_PROB + BURNED_LORDS_PROB)) { if (totalSupplyPerClass(8) < MAX_UNIQUE_LORDS) { artifactType = 8; } if (randomNb < BURNED_LORDS_PROB && totalSupplyPerClass(9) < MAX_BURNED_LORDS) { artifactType = 9; } } return artifactType; } function _lordClassName(uint256 artifactType) private pure returns (string memory) { if (artifactType == 0) { return "Exalted Champion"; } else if (artifactType == 1) { return "Feral Stormcaller"; } else if (artifactType == 2) { return "Hallowed Kensai"; } else if (artifactType == 3) { return "Runebinder Magus"; } else if (artifactType == 4) { return "Arcane Pathfinder"; } else if (artifactType == 5) { return "Eldritch Dragonslayer"; } else if (artifactType == 6) { return "Sanguine Sorcerer"; } else if (artifactType == 7) { return "Glintstone Theurge"; } else if (artifactType == 8) { return "Chosen One"; } else if (artifactType == 9) { return "Burnt Offering"; } else { return ""; } } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(AccessControl, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "IERC721.sol"; import "IERC721Receiver.sol"; import "IERC721Metadata.sol"; import "Address.sol"; import "Context.sol"; import "Strings.sol"; import "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 { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: 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 Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "IAccessControl.sol"; import "Context.sol"; import "Strings.sol"; import "ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"contract ERC721","name":"_fantomLords","type":"address"},{"internalType":"contract ArtifactsInterface","name":"_artifacts","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LORE_SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenIdCounter","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artifacts","outputs":[{"internalType":"contract ArtifactsInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ftlTokenId","type":"uint256"},{"internalType":"uint256","name":"artifactTokenId","type":"uint256"}],"name":"ascendLord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newLore","type":"string"}],"name":"changeLore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"classTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fantomLords","outputs":[{"internalType":"contract ERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"lordClass","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lordClassId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lordLore","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lordName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"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":[],"name":"startAscension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lordClass","type":"uint256"}],"name":"teamCommonLordMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"teamUniqueLordMint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lordClassId","type":"uint256"}],"name":"totalSupplyPerClass","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"}]
Contract Creation Code
60e0604052601a805460ff191690553480156200001b57600080fd5b50604051620034d4380380620034d48339810160408190526200003e9162000349565b86518790879062000057906001906020850190620001ab565b5080516200006d906002906020840190620001ab565b505050608082905284516200008a906019906020880190620001ab565b506001600160a01b0380851660a052831660c052620000ab600082620000fb565b620000b8600033620000fb565b620000d3600080516020620034b483398151915282620000fb565b620000ee600080516020620034b483398151915233620000fb565b505050505050506200045f565b6200010782826200010b565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000107576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001673390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620001b99062000422565b90600052602060002090601f016020900481019282620001dd576000855562000228565b82601f10620001f857805160ff191683800117855562000228565b8280016001018555821562000228579182015b82811115620002285782518255916020019190600101906200020b565b50620002369291506200023a565b5090565b5b808211156200023657600081556001016200023b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200027957600080fd5b81516001600160401b038082111562000296576200029662000251565b604051601f8301601f19908116603f01168101908282118183101715620002c157620002c162000251565b81604052838152602092508683858801011115620002de57600080fd5b600091505b83821015620003025785820183015181830184015290820190620002e3565b83821115620003145760008385830101525b9695505050505050565b6001600160a01b03811681146200033457600080fd5b50565b805162000344816200031e565b919050565b600080600080600080600060e0888a0312156200036557600080fd5b87516001600160401b03808211156200037d57600080fd5b6200038b8b838c0162000267565b985060208a0151915080821115620003a257600080fd5b620003b08b838c0162000267565b975060408a0151915080821115620003c757600080fd5b50620003d68a828b0162000267565b9550506060880151620003e9816200031e565b6080890151909450620003fc816200031e565b60a089015190935091506200041460c0890162000337565b905092959891949750929550565b600181811c908216806200043757607f821691505b602082108114156200045957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051612fed620004c76000396000818161034e015281816111df01526113470152600081816105b501526113cd01526000818161039b01528181610bef01528181610c39015281816112a90152818161156c01526115b60152612fed6000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80636402852f11610146578063b8a3b3ac116100c3578063e33f16b911610087578063e33f16b914610561578063e985e9c514610574578063ee957e03146105b0578063f682d055146105d7578063fac812fb146105ea578063fccc2813146105fd57600080fd5b8063b8a3b3ac146104f5578063c39cbef114610508578063c87b56dd1461051b578063d4c63af31461052e578063d547741f1461054e57600080fd5b806395d89b411161010a57806395d89b41146104ac5780639d3fdc93146104b4578063a217fddf146104c7578063a22cb465146104cf578063b88d4fde146104e257600080fd5b80636402852f1461044257806370a082311461046957806384c4bd4b1461047c57806391d1485414610486578063932041c01461049957600080fd5b80632f2ff15d116101d45780634d9700be116101985780634d9700be146103e35780634f6ccce7146103f6578063530586891461040957806355f804b31461041c5780636352211e1461042f57600080fd5b80632f2ff15d146103705780632f745c591461038357806332cb6b0c1461039657806336568abe146103bd57806342842e0e146103d057600080fd5b8063095ea7b31161021b578063095ea7b3146102f857806318160ddd1461030b57806323b872dd14610313578063248a9ca3146103265780632eee9feb1461034957600080fd5b806301ffc9a71461025857806302cf081c1461028057806304911ea7146102ae57806306fdde03146102b8578063081812fc146102cd575b600080fd5b61026b6102663660046128b0565b610606565b60405190151581526020015b60405180910390f35b6102a061028e3660046128cd565b6000908152601e602052604090205490565b604051908152602001610277565b6102b6610617565b005b6102c0610631565b604051610277919061293e565b6102e06102db3660046128cd565b6106c3565b6040516001600160a01b039091168152602001610277565b6102b6610306366004612968565b610750565b6009546102a0565b6102b6610321366004612992565b610866565b6102a06103343660046128cd565b60009081526020819052604090206001015490565b6102e07f000000000000000000000000000000000000000000000000000000000000000081565b6102b661037e3660046129ce565b610897565b6102a0610391366004612968565b6108bd565b6102a07f000000000000000000000000000000000000000000000000000000000000000081565b6102b66103cb3660046129ce565b610953565b6102b66103de366004612992565b6109d1565b6102c06103f13660046128cd565b6109ec565b6102a06104043660046128cd565b610a8e565b6102b66104173660046129fa565b610b21565b6102b661042a366004612ac8565b610ddd565b6102e061043d3660046128cd565b610dfb565b6102a07f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b6420581565b6102a0610477366004612afd565b610e72565b600b546102a09081565b61026b6104943660046129ce565b610ef9565b6102b66104a7366004612b18565b610f22565b6102c0610fbe565b6102c06104c23660046128cd565b610fcd565b6102a0600081565b6102b66104dd366004612b5f565b610fea565b6102b66104f0366004612b9b565b610ff5565b6102a06105033660046128cd565b611027565b6102b6610516366004612b18565b61103f565b6102c06105293660046128cd565b6110d5565b6102a061053c3660046128cd565b6000908152601f602052604090205490565b6102b661055c3660046129ce565b6111a0565b6102b661056f3660046129fa565b6111c6565b61026b610582366004612c17565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6102e07f000000000000000000000000000000000000000000000000000000000000000081565b6102c06105e53660046128cd565b6114de565b6102b66105f83660046128cd565b6114fb565b6102e061dead81565b600061061182611772565b92915050565b610622600033611797565b601a805460ff19166001179055565b60606001805461064090612c41565b80601f016020809104026020016040519081016040528092919081815260200182805461066c90612c41565b80156106b95780601f1061068e576101008083540402835291602001916106b9565b820191906000526020600020905b81548152906001019060200180831161069c57829003601f168201915b5050505050905090565b60006106ce826117fb565b6107345760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061075b82610dfb565b9050806001600160a01b0316836001600160a01b031614156107c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161072b565b336001600160a01b03821614806107e557506107e58133610582565b6108575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161072b565b6108618383611818565b505050565b6108703382611886565b61088c5760405162461bcd60e51b815260040161072b90612c7c565b610861838383611970565b6000828152602081905260409020600101546108b38133611797565b6108618383611b1b565b60006108c883610e72565b821061092a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161072b565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6001600160a01b03811633146109c35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161072b565b6109cd8282611b9f565b5050565b61086183838360405180602001604052806000815250610ff5565b6000818152601d60205260409020805460609190610a0990612c41565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3590612c41565b8015610a825780601f10610a5757610100808354040283529160200191610a82565b820191906000526020600020905b815481529060010190602001808311610a6557829003601f168201915b50505050509050919050565b6000610a9960095490565b8210610afc5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161072b565b60098281548110610b0f57610b0f612ccd565b90600052602060002001549050919050565b610b2c600033611797565b6007811115610b895760405162461bcd60e51b815260206004820152602360248201527f6c6f7264436c6173732068617320746f206265206265747765656e203020616e60448201526264203760e81b606482015260840161072b565b603282610b9560175490565b610b9f9190612cf9565b1115610bed5760405162461bcd60e51b815260206004820152601e60248201527f616d6f756e742065786365656473207465616d20616c6c6f636174696f6e0000604482015260640161072b565b7f0000000000000000000000000000000000000000000000000000000000000000610c17600b5490565b10610c345760405162461bcd60e51b815260040161072b90612d11565b610c5f7f00000000000000000000000000000000000000000000000000000000000000006001612cf9565b82610c69600b5490565b610c739190612cf9565b10610cc05760405162461bcd60e51b815260206004820152601e60248201527f6e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e740000604482015260640161072b565b610ccd61012c6001612cf9565b82610cd783611027565b610ce19190612cf9565b10610cfe5760405162461bcd60e51b815260040161072b90612d48565b60005b8281101561086157610d17600b80546001019055565b610d37600c83600a8110610d2d57610d2d612ccd565b0180546001019055565b6000610d42600b5490565b90506000610d61600c85600a8110610d5c57610d5c612ccd565b015490565b6000838152601f602052604090208190559050610d7d84611c04565b6000838152601d602090815260409091208251610da093919291909101906127fe565b506000828152601e60205260409020849055610dc0601780546001019055565b610dca3383611e2e565b505080610dd690612d92565b9050610d01565b610de8600033611797565b80516109cd9060199060208401906127fe565b6000818152600360205260408120546001600160a01b0316806106115760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161072b565b60006001600160a01b038216610edd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161072b565b506001600160a01b031660009081526004602052604090205490565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b7f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b64205610f4d8133611797565b610f56836117fb565b610f995760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161072b565b6000838152601c602090815260409091208351610fb8928501906127fe565b50505050565b60606002805461064090612c41565b6000818152601b60205260409020805460609190610a0990612c41565b6109cd338383611e48565b610fff3383611886565b61101b5760405162461bcd60e51b815260040161072b90612c7c565b610fb884848484611f17565b6000610611600c83600a8110610d5c57610d5c612ccd565b7f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b6420561106a8133611797565b611073836117fb565b6110b65760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161072b565b6000838152601b602090815260409091208351610fb8928501906127fe565b60606110e0826117fb565b6111445760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161072b565b600061114e611f4a565b9050600081511161116e5760405180602001604052806000815250611199565b8061117884611f59565b604051602001611189929190612dad565b6040516020818303038152906040525b9392505050565b6000828152602081905260409020600101546111bc8133611797565b6108618383611b9f565b604051630b9e0b9760e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630b9e0b9790602401602060405180830381865afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190612ddc565b601a5490915060ff166112a75760405162461bcd60e51b815260206004820152601d60248201527f617363656e73696f6e20686173206e6f74207374617274656420796574000000604482015260640161072b565b7f00000000000000000000000000000000000000000000000000000000000000006112d1600b5490565b106112ee5760405162461bcd60e51b815260040161072b90612d11565b61012c6112fa82611027565b106113175760405162461bcd60e51b815260040161072b90612d48565b61132081612057565b604051632142170760e11b815233600482015261dead6024820152604481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561139357600080fd5b505af11580156113a7573d6000803e3d6000fd5b5050604051632142170760e11b815233600482015261dead6024820152604481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506342842e0e9150606401600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050611441600b80546001019055565b611457600c82600a8110610d2d57610d2d612ccd565b6000611462600b5490565b9050600061147c600c84600a8110610d5c57610d5c612ccd565b6000838152601f60205260409020819055905061149883611c04565b6000838152601d6020908152604090912082516114bb93919291909101906127fe565b506000828152601e602052604090208390556114d73383611e2e565b5050505050565b6000818152601c60205260409020805460609190610a0990612c41565b611506600033611797565b60088161151260165490565b61151c9190612cf9565b111561156a5760405162461bcd60e51b815260206004820152601e60248201527f616d6f756e742065786365656473207465616d20616c6c6f636174696f6e0000604482015260640161072b565b7f0000000000000000000000000000000000000000000000000000000000000000611594600b5490565b106115b15760405162461bcd60e51b815260040161072b90612d11565b6115dc7f00000000000000000000000000000000000000000000000000000000000000006001612cf9565b816115e6600b5490565b6115f09190612cf9565b1061163d5760405162461bcd60e51b815260206004820152601e60248201527f6e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e740000604482015260640161072b565b601e6116496008611027565b106116a05760405162461bcd60e51b815260206004820152602160248201527f616c6c20756e69717565206c6f7264732068617665206265656e206d696e74656044820152601960fa1b606482015260840161072b565b600860005b82811015610861576116bb600b80546001019055565b6116d1600c83600a8110610d2d57610d2d612ccd565b60006116dc600b5490565b905060006116f6600c85600a8110610d5c57610d5c612ccd565b6000838152601f60205260409020819055905061171284611c04565b6000838152601d60209081526040909120825161173593919291909101906127fe565b506000828152601e60205260409020849055611755601680546001019055565b61175f3383611e2e565b50508061176b90612d92565b90506116a5565b60006001600160e01b0319821663780e9d6360e01b148061061157506106118261212a565b6117a18282610ef9565b6109cd576117b9816001600160a01b0316601461216a565b6117c483602061216a565b6040516020016117d5929190612df5565b60408051601f198184030181529082905262461bcd60e51b825261072b9160040161293e565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061184d82610dfb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611891826117fb565b6118f25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161072b565b60006118fd83610dfb565b9050806001600160a01b0316846001600160a01b031614806119385750836001600160a01b031661192d846106c3565b6001600160a01b0316145b8061196857506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661198382610dfb565b6001600160a01b0316146119eb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161072b565b6001600160a01b038216611a4d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161072b565b611a58838383612306565b611a63600082611818565b6001600160a01b0383166000908152600460205260408120805460019290611a8c908490612e6a565b90915550506001600160a01b0382166000908152600460205260408120805460019290611aba908490612cf9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b258282610ef9565b6109cd576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611ba98282610ef9565b156109cd576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606081611c3757505060408051808201909152601081526f22bc30b63a32b21021b430b6b834b7b760811b602082015290565b8160011415611c6d5750506040805180820190915260118152702332b930b61029ba37b936b1b0b63632b960791b602082015290565b8160021415611ca157505060408051808201909152600f81526e48616c6c6f776564204b656e73616960881b602082015290565b8160031415611cd657505060408051808201909152601081526f52756e6562696e646572204d6167757360801b602082015290565b8160041415611d0c57505060408051808201909152601181527020b931b0b732902830ba343334b73232b960791b602082015290565b8160051415611d4657505060408051808201909152601581527422b6323934ba31b410223930b3b7b739b630bcb2b960591b602082015290565b8160061415611d7c57505060408051808201909152601181527029b0b733bab4b7329029b7b931b2b932b960791b602082015290565b8160071415611db3575050604080518082019091526012815271476c696e7473746f6e65205468657572676560701b602082015290565b8160081415611de257505060408051808201909152600a81526943686f73656e204f6e6560b01b602082015290565b8160091415611e1557505060408051808201909152600e81526d4275726e74204f66666572696e6760901b602082015290565b505060408051602081019091526000815290565b919050565b6109cd828260405180602001604052806000815250612311565b816001600160a01b0316836001600160a01b03161415611eaa5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161072b565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611f22848484611970565b611f2e84848484612344565b610fb85760405162461bcd60e51b815260040161072b90612e81565b60606019805461064090612c41565b606081611f7d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611fa75780611f9181612d92565b9150611fa09050600a83612ee9565b9150611f81565b60008167ffffffffffffffff811115611fc257611fc2612a1c565b6040519080825280601f01601f191660200182016040528015611fec576020820181803683370190505b5090505b841561196857612001600183612e6a565b915061200e600a86612efd565b612019906030612cf9565b60f81b81838151811061202e5761202e612ccd565b60200101906001600160f81b031916908160001a905350612050600a86612ee9565b9450611ff0565b6000806103e860186000815461206c90612d92565b9182905550423361207e600143612e6a565b6040805160208101959095528401929092526bffffffffffffffffffffffff19606091821b16908301524060748201526094016040516020818303038152906040528051906020012060001c6120d49190612efd565b90506120e26011601e612cf9565b81101561212357601e6120f56008611027565b101561210057600892505b6011811080156121195750600a6121176009611027565b105b1561212357600992505b5090919050565b60006001600160e01b031982166380ac58cd60e01b148061215b57506001600160e01b03198216635b5e139f60e01b145b80610611575061061182612442565b60606000612179836002612f11565b612184906002612cf9565b67ffffffffffffffff81111561219c5761219c612a1c565b6040519080825280601f01601f1916602001820160405280156121c6576020820181803683370190505b509050600360fc1b816000815181106121e1576121e1612ccd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061221057612210612ccd565b60200101906001600160f81b031916908160001a9053506000612234846002612f11565b61223f906001612cf9565b90505b60018111156122b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061227357612273612ccd565b1a60f81b82828151811061228957612289612ccd565b60200101906001600160f81b031916908160001a90535060049490941c936122b081612f30565b9050612242565b5083156111995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161072b565b610861838383612477565b61231b838361252f565b6123286000848484612344565b6108615760405162461bcd60e51b815260040161072b90612e81565b60006001600160a01b0384163b1561243757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612388903390899088908890600401612f47565b6020604051808303816000875af19250505080156123c3575060408051601f3d908101601f191682019092526123c091810190612f84565b60015b61241d573d8080156123f1576040519150601f19603f3d011682016040523d82523d6000602084013e6123f6565b606091505b5080516124155760405162461bcd60e51b815260040161072b90612e81565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611968565b506001949350505050565b60006001600160e01b03198216637965db0b60e01b148061061157506301ffc9a760e01b6001600160e01b0319831614610611565b6001600160a01b0383166124d2576124cd81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6124f5565b816001600160a01b0316836001600160a01b0316146124f5576124f5838261266e565b6001600160a01b03821661250c576108618161270b565b826001600160a01b0316826001600160a01b0316146108615761086182826127ba565b6001600160a01b0382166125855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161072b565b61258e816117fb565b156125db5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161072b565b6125e760008383612306565b6001600160a01b0382166000908152600460205260408120805460019290612610908490612cf9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161267b84610e72565b6126859190612e6a565b6000838152600860205260409020549091508082146126d8576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061271d90600190612e6a565b6000838152600a60205260408120546009805493945090928490811061274557612745612ccd565b90600052602060002001549050806009838154811061276657612766612ccd565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061279e5761279e612fa1565b6001900381819060005260206000200160009055905550505050565b60006127c583610e72565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805461280a90612c41565b90600052602060002090601f01602090048101928261282c5760008555612872565b82601f1061284557805160ff1916838001178555612872565b82800160010185558215612872579182015b82811115612872578251825591602001919060010190612857565b5061287e929150612882565b5090565b5b8082111561287e5760008155600101612883565b6001600160e01b0319811681146128ad57600080fd5b50565b6000602082840312156128c257600080fd5b813561119981612897565b6000602082840312156128df57600080fd5b5035919050565b60005b838110156129015781810151838201526020016128e9565b83811115610fb85750506000910152565b6000815180845261292a8160208601602086016128e6565b601f01601f19169290920160200192915050565b6020815260006111996020830184612912565b80356001600160a01b0381168114611e2957600080fd5b6000806040838503121561297b57600080fd5b61298483612951565b946020939093013593505050565b6000806000606084860312156129a757600080fd5b6129b084612951565b92506129be60208501612951565b9150604084013590509250925092565b600080604083850312156129e157600080fd5b823591506129f160208401612951565b90509250929050565b60008060408385031215612a0d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612a4d57612a4d612a1c565b604051601f8501601f19908116603f01168101908282118183101715612a7557612a75612a1c565b81604052809350858152868686011115612a8e57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612ab957600080fd5b61119983833560208501612a32565b600060208284031215612ada57600080fd5b813567ffffffffffffffff811115612af157600080fd5b61196884828501612aa8565b600060208284031215612b0f57600080fd5b61119982612951565b60008060408385031215612b2b57600080fd5b82359150602083013567ffffffffffffffff811115612b4957600080fd5b612b5585828601612aa8565b9150509250929050565b60008060408385031215612b7257600080fd5b612b7b83612951565b915060208301358015158114612b9057600080fd5b809150509250929050565b60008060008060808587031215612bb157600080fd5b612bba85612951565b9350612bc860208601612951565b925060408501359150606085013567ffffffffffffffff811115612beb57600080fd5b8501601f81018713612bfc57600080fd5b612c0b87823560208401612a32565b91505092959194509250565b60008060408385031215612c2a57600080fd5b612c3383612951565b91506129f160208401612951565b600181811c90821680612c5557607f821691505b60208210811415612c7657634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612d0c57612d0c612ce3565b500190565b6020808252601b908201527f616c6c20746f6b656e732068617665206265656e206d696e7465640000000000604082015260600190565b6020808252602a908201527f616c6c206c6f726473206f66207468617420636c6173732068617665206265656040820152691b88185cd8d95b99195960b21b606082015260800190565b6000600019821415612da657612da6612ce3565b5060010190565b60008351612dbf8184602088016128e6565b835190830190612dd38183602088016128e6565b01949350505050565b600060208284031215612dee57600080fd5b5051919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612e2d8160178501602088016128e6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e5e8160288401602088016128e6565b01602801949350505050565b600082821015612e7c57612e7c612ce3565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612ef857612ef8612ed3565b500490565b600082612f0c57612f0c612ed3565b500690565b6000816000190483118215151615612f2b57612f2b612ce3565b500290565b600081612f3f57612f3f612ce3565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f7a90830184612912565b9695505050505050565b600060208284031215612f9657600080fd5b815161119981612897565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c433631eaf6cedc08f4ca425bacb2a96fb6e9e325c15e5c8f9611aa37956df264736f6c634300080b0033181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b6420500000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000fee8077c909d956e9036c2d2999723931cefe548000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe1100000000000000000000000000000000000000000000000000000000000004c60000000000000000000000004a03721c829ae3d448bf37cac21527cbe75fc4cb000000000000000000000000000000000000000000000000000000000000000e417363656e646564204c6f72647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045846544c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b68747470733a2f2f66616e746f6d6c6f7264736170692e6865726f6b756170702e636f6d2f6c6f7264732f000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102535760003560e01c80636402852f11610146578063b8a3b3ac116100c3578063e33f16b911610087578063e33f16b914610561578063e985e9c514610574578063ee957e03146105b0578063f682d055146105d7578063fac812fb146105ea578063fccc2813146105fd57600080fd5b8063b8a3b3ac146104f5578063c39cbef114610508578063c87b56dd1461051b578063d4c63af31461052e578063d547741f1461054e57600080fd5b806395d89b411161010a57806395d89b41146104ac5780639d3fdc93146104b4578063a217fddf146104c7578063a22cb465146104cf578063b88d4fde146104e257600080fd5b80636402852f1461044257806370a082311461046957806384c4bd4b1461047c57806391d1485414610486578063932041c01461049957600080fd5b80632f2ff15d116101d45780634d9700be116101985780634d9700be146103e35780634f6ccce7146103f6578063530586891461040957806355f804b31461041c5780636352211e1461042f57600080fd5b80632f2ff15d146103705780632f745c591461038357806332cb6b0c1461039657806336568abe146103bd57806342842e0e146103d057600080fd5b8063095ea7b31161021b578063095ea7b3146102f857806318160ddd1461030b57806323b872dd14610313578063248a9ca3146103265780632eee9feb1461034957600080fd5b806301ffc9a71461025857806302cf081c1461028057806304911ea7146102ae57806306fdde03146102b8578063081812fc146102cd575b600080fd5b61026b6102663660046128b0565b610606565b60405190151581526020015b60405180910390f35b6102a061028e3660046128cd565b6000908152601e602052604090205490565b604051908152602001610277565b6102b6610617565b005b6102c0610631565b604051610277919061293e565b6102e06102db3660046128cd565b6106c3565b6040516001600160a01b039091168152602001610277565b6102b6610306366004612968565b610750565b6009546102a0565b6102b6610321366004612992565b610866565b6102a06103343660046128cd565b60009081526020819052604090206001015490565b6102e07f000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe1181565b6102b661037e3660046129ce565b610897565b6102a0610391366004612968565b6108bd565b6102a07f00000000000000000000000000000000000000000000000000000000000004c681565b6102b66103cb3660046129ce565b610953565b6102b66103de366004612992565b6109d1565b6102c06103f13660046128cd565b6109ec565b6102a06104043660046128cd565b610a8e565b6102b66104173660046129fa565b610b21565b6102b661042a366004612ac8565b610ddd565b6102e061043d3660046128cd565b610dfb565b6102a07f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b6420581565b6102a0610477366004612afd565b610e72565b600b546102a09081565b61026b6104943660046129ce565b610ef9565b6102b66104a7366004612b18565b610f22565b6102c0610fbe565b6102c06104c23660046128cd565b610fcd565b6102a0600081565b6102b66104dd366004612b5f565b610fea565b6102b66104f0366004612b9b565b610ff5565b6102a06105033660046128cd565b611027565b6102b6610516366004612b18565b61103f565b6102c06105293660046128cd565b6110d5565b6102a061053c3660046128cd565b6000908152601f602052604090205490565b6102b661055c3660046129ce565b6111a0565b6102b661056f3660046129fa565b6111c6565b61026b610582366004612c17565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6102e07f000000000000000000000000fee8077c909d956e9036c2d2999723931cefe54881565b6102c06105e53660046128cd565b6114de565b6102b66105f83660046128cd565b6114fb565b6102e061dead81565b600061061182611772565b92915050565b610622600033611797565b601a805460ff19166001179055565b60606001805461064090612c41565b80601f016020809104026020016040519081016040528092919081815260200182805461066c90612c41565b80156106b95780601f1061068e576101008083540402835291602001916106b9565b820191906000526020600020905b81548152906001019060200180831161069c57829003601f168201915b5050505050905090565b60006106ce826117fb565b6107345760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061075b82610dfb565b9050806001600160a01b0316836001600160a01b031614156107c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161072b565b336001600160a01b03821614806107e557506107e58133610582565b6108575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161072b565b6108618383611818565b505050565b6108703382611886565b61088c5760405162461bcd60e51b815260040161072b90612c7c565b610861838383611970565b6000828152602081905260409020600101546108b38133611797565b6108618383611b1b565b60006108c883610e72565b821061092a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161072b565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6001600160a01b03811633146109c35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161072b565b6109cd8282611b9f565b5050565b61086183838360405180602001604052806000815250610ff5565b6000818152601d60205260409020805460609190610a0990612c41565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3590612c41565b8015610a825780601f10610a5757610100808354040283529160200191610a82565b820191906000526020600020905b815481529060010190602001808311610a6557829003601f168201915b50505050509050919050565b6000610a9960095490565b8210610afc5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161072b565b60098281548110610b0f57610b0f612ccd565b90600052602060002001549050919050565b610b2c600033611797565b6007811115610b895760405162461bcd60e51b815260206004820152602360248201527f6c6f7264436c6173732068617320746f206265206265747765656e203020616e60448201526264203760e81b606482015260840161072b565b603282610b9560175490565b610b9f9190612cf9565b1115610bed5760405162461bcd60e51b815260206004820152601e60248201527f616d6f756e742065786365656473207465616d20616c6c6f636174696f6e0000604482015260640161072b565b7f00000000000000000000000000000000000000000000000000000000000004c6610c17600b5490565b10610c345760405162461bcd60e51b815260040161072b90612d11565b610c5f7f00000000000000000000000000000000000000000000000000000000000004c66001612cf9565b82610c69600b5490565b610c739190612cf9565b10610cc05760405162461bcd60e51b815260206004820152601e60248201527f6e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e740000604482015260640161072b565b610ccd61012c6001612cf9565b82610cd783611027565b610ce19190612cf9565b10610cfe5760405162461bcd60e51b815260040161072b90612d48565b60005b8281101561086157610d17600b80546001019055565b610d37600c83600a8110610d2d57610d2d612ccd565b0180546001019055565b6000610d42600b5490565b90506000610d61600c85600a8110610d5c57610d5c612ccd565b015490565b6000838152601f602052604090208190559050610d7d84611c04565b6000838152601d602090815260409091208251610da093919291909101906127fe565b506000828152601e60205260409020849055610dc0601780546001019055565b610dca3383611e2e565b505080610dd690612d92565b9050610d01565b610de8600033611797565b80516109cd9060199060208401906127fe565b6000818152600360205260408120546001600160a01b0316806106115760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161072b565b60006001600160a01b038216610edd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161072b565b506001600160a01b031660009081526004602052604090205490565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b7f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b64205610f4d8133611797565b610f56836117fb565b610f995760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161072b565b6000838152601c602090815260409091208351610fb8928501906127fe565b50505050565b60606002805461064090612c41565b6000818152601b60205260409020805460609190610a0990612c41565b6109cd338383611e48565b610fff3383611886565b61101b5760405162461bcd60e51b815260040161072b90612c7c565b610fb884848484611f17565b6000610611600c83600a8110610d5c57610d5c612ccd565b7f181e4536d3da760e63fbf18d0cd99792c7bd9f59e50a46e1780cae9d23b6420561106a8133611797565b611073836117fb565b6110b65760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161072b565b6000838152601b602090815260409091208351610fb8928501906127fe565b60606110e0826117fb565b6111445760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161072b565b600061114e611f4a565b9050600081511161116e5760405180602001604052806000815250611199565b8061117884611f59565b604051602001611189929190612dad565b6040516020818303038152906040525b9392505050565b6000828152602081905260409020600101546111bc8133611797565b6108618383611b9f565b604051630b9e0b9760e01b8152600481018290526000907f000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe116001600160a01b031690630b9e0b9790602401602060405180830381865afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190612ddc565b601a5490915060ff166112a75760405162461bcd60e51b815260206004820152601d60248201527f617363656e73696f6e20686173206e6f74207374617274656420796574000000604482015260640161072b565b7f00000000000000000000000000000000000000000000000000000000000004c66112d1600b5490565b106112ee5760405162461bcd60e51b815260040161072b90612d11565b61012c6112fa82611027565b106113175760405162461bcd60e51b815260040161072b90612d48565b61132081612057565b604051632142170760e11b815233600482015261dead6024820152604481018490529091507f000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe116001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561139357600080fd5b505af11580156113a7573d6000803e3d6000fd5b5050604051632142170760e11b815233600482015261dead6024820152604481018690527f000000000000000000000000fee8077c909d956e9036c2d2999723931cefe5486001600160a01b031692506342842e0e9150606401600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050611441600b80546001019055565b611457600c82600a8110610d2d57610d2d612ccd565b6000611462600b5490565b9050600061147c600c84600a8110610d5c57610d5c612ccd565b6000838152601f60205260409020819055905061149883611c04565b6000838152601d6020908152604090912082516114bb93919291909101906127fe565b506000828152601e602052604090208390556114d73383611e2e565b5050505050565b6000818152601c60205260409020805460609190610a0990612c41565b611506600033611797565b60088161151260165490565b61151c9190612cf9565b111561156a5760405162461bcd60e51b815260206004820152601e60248201527f616d6f756e742065786365656473207465616d20616c6c6f636174696f6e0000604482015260640161072b565b7f00000000000000000000000000000000000000000000000000000000000004c6611594600b5490565b106115b15760405162461bcd60e51b815260040161072b90612d11565b6115dc7f00000000000000000000000000000000000000000000000000000000000004c66001612cf9565b816115e6600b5490565b6115f09190612cf9565b1061163d5760405162461bcd60e51b815260206004820152601e60248201527f6e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e740000604482015260640161072b565b601e6116496008611027565b106116a05760405162461bcd60e51b815260206004820152602160248201527f616c6c20756e69717565206c6f7264732068617665206265656e206d696e74656044820152601960fa1b606482015260840161072b565b600860005b82811015610861576116bb600b80546001019055565b6116d1600c83600a8110610d2d57610d2d612ccd565b60006116dc600b5490565b905060006116f6600c85600a8110610d5c57610d5c612ccd565b6000838152601f60205260409020819055905061171284611c04565b6000838152601d60209081526040909120825161173593919291909101906127fe565b506000828152601e60205260409020849055611755601680546001019055565b61175f3383611e2e565b50508061176b90612d92565b90506116a5565b60006001600160e01b0319821663780e9d6360e01b148061061157506106118261212a565b6117a18282610ef9565b6109cd576117b9816001600160a01b0316601461216a565b6117c483602061216a565b6040516020016117d5929190612df5565b60408051601f198184030181529082905262461bcd60e51b825261072b9160040161293e565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061184d82610dfb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611891826117fb565b6118f25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161072b565b60006118fd83610dfb565b9050806001600160a01b0316846001600160a01b031614806119385750836001600160a01b031661192d846106c3565b6001600160a01b0316145b8061196857506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661198382610dfb565b6001600160a01b0316146119eb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161072b565b6001600160a01b038216611a4d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161072b565b611a58838383612306565b611a63600082611818565b6001600160a01b0383166000908152600460205260408120805460019290611a8c908490612e6a565b90915550506001600160a01b0382166000908152600460205260408120805460019290611aba908490612cf9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611b258282610ef9565b6109cd576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611ba98282610ef9565b156109cd576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606081611c3757505060408051808201909152601081526f22bc30b63a32b21021b430b6b834b7b760811b602082015290565b8160011415611c6d5750506040805180820190915260118152702332b930b61029ba37b936b1b0b63632b960791b602082015290565b8160021415611ca157505060408051808201909152600f81526e48616c6c6f776564204b656e73616960881b602082015290565b8160031415611cd657505060408051808201909152601081526f52756e6562696e646572204d6167757360801b602082015290565b8160041415611d0c57505060408051808201909152601181527020b931b0b732902830ba343334b73232b960791b602082015290565b8160051415611d4657505060408051808201909152601581527422b6323934ba31b410223930b3b7b739b630bcb2b960591b602082015290565b8160061415611d7c57505060408051808201909152601181527029b0b733bab4b7329029b7b931b2b932b960791b602082015290565b8160071415611db3575050604080518082019091526012815271476c696e7473746f6e65205468657572676560701b602082015290565b8160081415611de257505060408051808201909152600a81526943686f73656e204f6e6560b01b602082015290565b8160091415611e1557505060408051808201909152600e81526d4275726e74204f66666572696e6760901b602082015290565b505060408051602081019091526000815290565b919050565b6109cd828260405180602001604052806000815250612311565b816001600160a01b0316836001600160a01b03161415611eaa5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161072b565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611f22848484611970565b611f2e84848484612344565b610fb85760405162461bcd60e51b815260040161072b90612e81565b60606019805461064090612c41565b606081611f7d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611fa75780611f9181612d92565b9150611fa09050600a83612ee9565b9150611f81565b60008167ffffffffffffffff811115611fc257611fc2612a1c565b6040519080825280601f01601f191660200182016040528015611fec576020820181803683370190505b5090505b841561196857612001600183612e6a565b915061200e600a86612efd565b612019906030612cf9565b60f81b81838151811061202e5761202e612ccd565b60200101906001600160f81b031916908160001a905350612050600a86612ee9565b9450611ff0565b6000806103e860186000815461206c90612d92565b9182905550423361207e600143612e6a565b6040805160208101959095528401929092526bffffffffffffffffffffffff19606091821b16908301524060748201526094016040516020818303038152906040528051906020012060001c6120d49190612efd565b90506120e26011601e612cf9565b81101561212357601e6120f56008611027565b101561210057600892505b6011811080156121195750600a6121176009611027565b105b1561212357600992505b5090919050565b60006001600160e01b031982166380ac58cd60e01b148061215b57506001600160e01b03198216635b5e139f60e01b145b80610611575061061182612442565b60606000612179836002612f11565b612184906002612cf9565b67ffffffffffffffff81111561219c5761219c612a1c565b6040519080825280601f01601f1916602001820160405280156121c6576020820181803683370190505b509050600360fc1b816000815181106121e1576121e1612ccd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061221057612210612ccd565b60200101906001600160f81b031916908160001a9053506000612234846002612f11565b61223f906001612cf9565b90505b60018111156122b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061227357612273612ccd565b1a60f81b82828151811061228957612289612ccd565b60200101906001600160f81b031916908160001a90535060049490941c936122b081612f30565b9050612242565b5083156111995760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161072b565b610861838383612477565b61231b838361252f565b6123286000848484612344565b6108615760405162461bcd60e51b815260040161072b90612e81565b60006001600160a01b0384163b1561243757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612388903390899088908890600401612f47565b6020604051808303816000875af19250505080156123c3575060408051601f3d908101601f191682019092526123c091810190612f84565b60015b61241d573d8080156123f1576040519150601f19603f3d011682016040523d82523d6000602084013e6123f6565b606091505b5080516124155760405162461bcd60e51b815260040161072b90612e81565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611968565b506001949350505050565b60006001600160e01b03198216637965db0b60e01b148061061157506301ffc9a760e01b6001600160e01b0319831614610611565b6001600160a01b0383166124d2576124cd81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6124f5565b816001600160a01b0316836001600160a01b0316146124f5576124f5838261266e565b6001600160a01b03821661250c576108618161270b565b826001600160a01b0316826001600160a01b0316146108615761086182826127ba565b6001600160a01b0382166125855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161072b565b61258e816117fb565b156125db5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161072b565b6125e760008383612306565b6001600160a01b0382166000908152600460205260408120805460019290612610908490612cf9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161267b84610e72565b6126859190612e6a565b6000838152600860205260409020549091508082146126d8576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061271d90600190612e6a565b6000838152600a60205260408120546009805493945090928490811061274557612745612ccd565b90600052602060002001549050806009838154811061276657612766612ccd565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061279e5761279e612fa1565b6001900381819060005260206000200160009055905550505050565b60006127c583610e72565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805461280a90612c41565b90600052602060002090601f01602090048101928261282c5760008555612872565b82601f1061284557805160ff1916838001178555612872565b82800160010185558215612872579182015b82811115612872578251825591602001919060010190612857565b5061287e929150612882565b5090565b5b8082111561287e5760008155600101612883565b6001600160e01b0319811681146128ad57600080fd5b50565b6000602082840312156128c257600080fd5b813561119981612897565b6000602082840312156128df57600080fd5b5035919050565b60005b838110156129015781810151838201526020016128e9565b83811115610fb85750506000910152565b6000815180845261292a8160208601602086016128e6565b601f01601f19169290920160200192915050565b6020815260006111996020830184612912565b80356001600160a01b0381168114611e2957600080fd5b6000806040838503121561297b57600080fd5b61298483612951565b946020939093013593505050565b6000806000606084860312156129a757600080fd5b6129b084612951565b92506129be60208501612951565b9150604084013590509250925092565b600080604083850312156129e157600080fd5b823591506129f160208401612951565b90509250929050565b60008060408385031215612a0d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612a4d57612a4d612a1c565b604051601f8501601f19908116603f01168101908282118183101715612a7557612a75612a1c565b81604052809350858152868686011115612a8e57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612ab957600080fd5b61119983833560208501612a32565b600060208284031215612ada57600080fd5b813567ffffffffffffffff811115612af157600080fd5b61196884828501612aa8565b600060208284031215612b0f57600080fd5b61119982612951565b60008060408385031215612b2b57600080fd5b82359150602083013567ffffffffffffffff811115612b4957600080fd5b612b5585828601612aa8565b9150509250929050565b60008060408385031215612b7257600080fd5b612b7b83612951565b915060208301358015158114612b9057600080fd5b809150509250929050565b60008060008060808587031215612bb157600080fd5b612bba85612951565b9350612bc860208601612951565b925060408501359150606085013567ffffffffffffffff811115612beb57600080fd5b8501601f81018713612bfc57600080fd5b612c0b87823560208401612a32565b91505092959194509250565b60008060408385031215612c2a57600080fd5b612c3383612951565b91506129f160208401612951565b600181811c90821680612c5557607f821691505b60208210811415612c7657634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612d0c57612d0c612ce3565b500190565b6020808252601b908201527f616c6c20746f6b656e732068617665206265656e206d696e7465640000000000604082015260600190565b6020808252602a908201527f616c6c206c6f726473206f66207468617420636c6173732068617665206265656040820152691b88185cd8d95b99195960b21b606082015260800190565b6000600019821415612da657612da6612ce3565b5060010190565b60008351612dbf8184602088016128e6565b835190830190612dd38183602088016128e6565b01949350505050565b600060208284031215612dee57600080fd5b5051919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612e2d8160178501602088016128e6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e5e8160288401602088016128e6565b01602801949350505050565b600082821015612e7c57612e7c612ce3565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612ef857612ef8612ed3565b500490565b600082612f0c57612f0c612ed3565b500690565b6000816000190483118215151615612f2b57612f2b612ce3565b500290565b600081612f3f57612f3f612ce3565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f7a90830184612912565b9695505050505050565b600060208284031215612f9657600080fd5b815161119981612897565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206c433631eaf6cedc08f4ca425bacb2a96fb6e9e325c15e5c8f9611aa37956df264736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000fee8077c909d956e9036c2d2999723931cefe548000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe1100000000000000000000000000000000000000000000000000000000000004c60000000000000000000000004a03721c829ae3d448bf37cac21527cbe75fc4cb000000000000000000000000000000000000000000000000000000000000000e417363656e646564204c6f72647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045846544c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b68747470733a2f2f66616e746f6d6c6f7264736170692e6865726f6b756170702e636f6d2f6c6f7264732f000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): Ascended Lords
Arg [1] : symbol (string): XFTL
Arg [2] : baseURI (string): https://fantomlordsapi.herokuapp.com/lords/
Arg [3] : _fantomLords (address): 0xfee8077c909d956E9036c2d2999723931CeFE548
Arg [4] : _artifacts (address): 0xC021315E4aF3C6cbD2C96E5F7C67d0A4c2F8FE11
Arg [5] : maxSupply (uint256): 1222
Arg [6] : admin (address): 0x4a03721C829Ae3d448bF37Cac21527cbE75fc4Cb
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 000000000000000000000000fee8077c909d956e9036c2d2999723931cefe548
Arg [4] : 000000000000000000000000c021315e4af3c6cbd2c96e5f7c67d0a4c2f8fe11
Arg [5] : 00000000000000000000000000000000000000000000000000000000000004c6
Arg [6] : 0000000000000000000000004a03721c829ae3d448bf37cac21527cbe75fc4cb
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [8] : 417363656e646564204c6f726473000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [10] : 5846544c00000000000000000000000000000000000000000000000000000000
Arg [11] : 000000000000000000000000000000000000000000000000000000000000002b
Arg [12] : 68747470733a2f2f66616e746f6d6c6f7264736170692e6865726f6b75617070
Arg [13] : 2e636f6d2f6c6f7264732f000000000000000000000000000000000000000000
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.