Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
13316054 | 1201 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FNDNFT721
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 1337 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* ・ * ★ ・ 。 ・ ゚☆ 。 * ★ ゚・。 * 。 * ☆ 。・゚*.。 ゚ *.。☆。★ ・ ` .-:::::-.` `-::---...``` `-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo: .--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy `-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy `------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy .--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy `-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy .------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy .--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy `----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy .------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy `.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy .--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo .------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo ````` * ・ 。 ・ ゚☆ 。 * ★ ゚・。 * 。 * ☆ 。・゚*.。 ゚ *.。☆。★ ・ * ゚。·*・。 ゚* ☆゚・。°*. ゚ ・ ゚*。・゚★。 ・ *゚。 * ・゚*。★・ ☆∴。 * ・ 。 */ // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "./mixins/OZ/ERC165.sol"; import "./mixins/OZ/ERC721Upgradeable.sol"; import "./mixins/FoundationTreasuryNode.sol"; import "./mixins/roles/FoundationAdminRole.sol"; import "./mixins/roles/FoundationOperatorRole.sol"; import "./mixins/HasSecondarySaleFees.sol"; import "./mixins/NFT721Core.sol"; import "./mixins/NFT721Market.sol"; import "./mixins/NFT721Creator.sol"; import "./mixins/NFT721Metadata.sol"; import "./mixins/NFT721Mint.sol"; import "./mixins/AccountMigration.sol"; import "./mixins/NFT721ProxyCall.sol"; import "./mixins/ERC165UpgradeableGap.sol"; /** * @title Foundation NFTs implemented using the ERC-721 standard. * @dev This top level file holds no data directly to ease future upgrades. */ contract FNDNFT721 is FoundationTreasuryNode, FoundationAdminRole, FoundationOperatorRole, AccountMigration, ERC165UpgradeableGap, ERC165, HasSecondarySaleFees, ERC721Upgradeable, NFT721Core, NFT721ProxyCall, NFT721Creator, NFT721Market, NFT721Metadata, NFT721Mint { /** * @notice Called once to configure the contract after the initial deployment. * @dev This farms the initialize call out to inherited contracts as needed. */ function initialize(address payable treasury) public initializer { FoundationTreasuryNode._initializeFoundationTreasuryNode(treasury); ERC721Upgradeable.__ERC721_init(); NFT721Mint._initializeNFT721Mint(); } /** * @notice Allows a Foundation admin to update NFT config variables. * @dev This must be called right after the initial call to `initialize`. */ function adminUpdateConfig( address _nftMarket, string memory baseURI, address proxyCallContract ) public onlyFoundationAdmin { _updateNFTMarket(_nftMarket); _updateBaseURI(baseURI); _updateProxyCall(proxyCallContract); } /** * @dev This is a no-op, just an explicit override to address compile errors due to inheritance. */ function _burn(uint256 tokenId) internal override(ERC721Upgradeable, NFT721Creator, NFT721Metadata, NFT721Mint) { super._burn(tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, HasSecondarySaleFees, NFT721Mint, ERC721Upgradeable, NFT721Creator, NFT721Market) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT /** * From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/introspection/ERC165.sol * Modified to support Solidity 0.7 */ pragma solidity ^0.7.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 // solhint-disable /** * From https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.0/contracts/token/ERC721/ERC721Upgradeable.sol * Modified in order to: * - make `_tokenURIs` internal instead of private. * - replace ERC165Upgradeable with ERC165. * - set the name/symbol with constants. */ pragma solidity >=0.6.0 <0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721MetadataUpgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/EnumerableMapUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "./ERC165.sol"; import "../ERC165UpgradeableGap.sol"; /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165UpgradeableGap, ERC165, IERC721Upgradeable, IERC721MetadataUpgradeable, IERC721EnumerableUpgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; using EnumerableMapUpgradeable for EnumerableMapUpgradeable.UintToAddressMap; using StringsUpgradeable for uint256; // Mapping from holder address to their (enumerable) set of owned tokens mapping(address => EnumerableSetUpgradeable.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMapUpgradeable.UintToAddressMap private _tokenOwners; // 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; // Token name string private ____gap_was_name; // Token symbol string private ____gap_was_symbol; // Optional mapping for token URIs mapping(uint256 => string) internal _tokenURIs; // Base URI string private _baseURI; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init() internal initializer { __Context_init_unchained(); } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { if ( interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || interfaceId == type(IERC721EnumerableUpgradeable).interfaceId ) { return true; } return super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); } /** * @dev See {IERC721Metadata-name}. */ function name() public pure override returns (string memory) { return "Foundation"; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public pure override returns (string memory) { return "FND"; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; // If there is no base URI, return the token URI. if (bytes(_baseURI).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(_baseURI, _tokenURI)); } // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(_baseURI, tokenId.toString())); } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view returns (string memory) { return _baseURI; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { (uint256 tokenId, ) = _tokenOwners.at(index); return tokenId; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = 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 override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view 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 returns (bool) { return _tokenOwners.contains(tokenId); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: d* * - `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); _holderTokens[to].add(tokenId); _tokenOwners.set(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 = ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } _holderTokens[owner].remove(tokenId); _tokenOwners.remove(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(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); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } /** * @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()) { return true; } bytes memory returndata = to.functionCall( abi.encodeWithSelector( IERC721ReceiverUpgradeable(to).onERC721Received.selector, _msgSender(), from, tokenId, _data ), "ERC721: transfer to non ERC721Receiver implementer" ); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == type(IERC721ReceiverUpgradeable).interfaceId); } function _approve(address to, uint256 tokenId) private { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @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 {} uint256[41] private __gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; /** * @notice A mixin that stores a reference to the Foundation treasury contract. */ abstract contract FoundationTreasuryNode is Initializable { using AddressUpgradeable for address payable; address payable private treasury; /** * @dev Called once after the initial deployment to set the Foundation treasury address. */ function _initializeFoundationTreasuryNode(address payable _treasury) internal initializer { require(_treasury.isContract(), "FoundationTreasuryNode: Address is not a contract"); treasury = _treasury; } /** * @notice Returns the address of the Foundation treasury. */ function getFoundationTreasury() public view returns (address payable) { return treasury; } // `______gap` is added to each mixin to allow adding new data slots or additional mixins in an upgrade-safe way. uint256[2000] private __gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "../../interfaces/IAdminRole.sol"; import "../FoundationTreasuryNode.sol"; /** * @notice Allows a contract to leverage the admin role defined by the Foundation treasury. */ abstract contract FoundationAdminRole is FoundationTreasuryNode { // This file uses 0 data slots (other than what's included via FoundationTreasuryNode) modifier onlyFoundationAdmin() { require(_isFoundationAdmin(), "FoundationAdminRole: caller does not have the Admin role"); _; } function _isFoundationAdmin() internal view returns (bool) { return IAdminRole(getFoundationTreasury()).isAdmin(msg.sender); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "../../interfaces/IOperatorRole.sol"; import "../FoundationTreasuryNode.sol"; /** * @notice Allows a contract to leverage the operator role defined by the Foundation treasury. */ abstract contract FoundationOperatorRole is FoundationTreasuryNode { // This file uses 0 data slots (other than what's included via FoundationTreasuryNode) function _isFoundationOperator() internal view returns (bool) { return IOperatorRole(getFoundationTreasury()).isOperator(msg.sender); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "./OZ/ERC165.sol"; import "../interfaces/IHasSecondarySaleFees.sol"; /** * @notice An interface for communicating fees to 3rd party marketplaces. * @dev Originally implemented in mainnet contract 0x44d6e8933f8271abcf253c72f9ed7e0e4c0323b3 */ abstract contract HasSecondarySaleFees is Initializable, ERC165, IHasSecondarySaleFees { function getFeeRecipients(uint256 id) public view virtual override returns (address payable[] memory); function getFeeBps(uint256 id) public view virtual override returns (uint256[] memory); function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { if (interfaceId == type(IHasSecondarySaleFees).interfaceId) { return true; } return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice A place for common modifiers and functions used by various NFT721 mixins, if any. * @dev This also leaves a gap which can be used to add a new mixin to the top of the inheritance tree. */ abstract contract NFT721Core { // 100 slots used when adding NFT721ProxyCall uint256[900] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "../interfaces/IFNDNFTMarket.sol"; import "../interfaces/IGetRoyalties.sol"; import "./FoundationTreasuryNode.sol"; import "./HasSecondarySaleFees.sol"; import "./NFT721Creator.sol"; /** * @notice Holds a reference to the Foundation Market and communicates fees to 3rd party marketplaces. */ abstract contract NFT721Market is FoundationTreasuryNode, HasSecondarySaleFees, NFT721Creator { using AddressUpgradeable for address; event NFTMarketUpdated(address indexed nftMarket); IFNDNFTMarket private nftMarket; function supportsInterface(bytes4 interfaceId) public view virtual override(HasSecondarySaleFees, NFT721Creator) returns (bool) { if (interfaceId == type(IGetRoyalties).interfaceId) { return true; } return super.supportsInterface(interfaceId); } /** * @notice Returns the address of the Foundation NFTMarket contract. */ function getNFTMarket() public view returns (address) { return address(nftMarket); } function _updateNFTMarket(address _nftMarket) internal { require(_nftMarket.isContract(), "NFT721Market: Market address is not a contract"); nftMarket = IFNDNFTMarket(_nftMarket); emit NFTMarketUpdated(_nftMarket); } /** * @notice Returns an array of recipient addresses to which fees should be sent. * The expected fee amount is communicated with `getFeeBps`. */ function getFeeRecipients(uint256 id) public view override returns (address payable[] memory) { require(_exists(id), "ERC721Metadata: Query for nonexistent token"); address payable[] memory result = new address payable[](2); result[0] = getFoundationTreasury(); result[1] = getTokenCreatorPaymentAddress(id); return result; } /** * @notice Returns an array of fees in basis points. * The expected recipients is communicated with `getFeeRecipients`. */ function getFeeBps( uint256 /* id */ ) public view override returns (uint256[] memory) { (, uint256 secondaryF8nFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints) = nftMarket.getFeeConfig(); uint256[] memory result = new uint256[](2); result[0] = secondaryF8nFeeBasisPoints; result[1] = secondaryCreatorFeeBasisPoints; return result; } /** * @notice Get fee recipients and fees in a single call. * The data is the same as when calling getFeeRecipients and getFeeBps separately. */ function getRoyalties(uint256 tokenId) public view returns (address payable[2] memory recipients, uint256[2] memory feesInBasisPoints) { require(_exists(tokenId), "ERC721Metadata: Query for nonexistent token"); recipients[0] = getFoundationTreasury(); recipients[1] = getTokenCreatorPaymentAddress(tokenId); (, uint256 secondaryF8nFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints) = nftMarket.getFeeConfig(); feesInBasisPoints[0] = secondaryF8nFeeBasisPoints; feesInBasisPoints[1] = secondaryCreatorFeeBasisPoints; } uint256[1000] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "./OZ/ERC721Upgradeable.sol"; import "./AccountMigration.sol"; import "../libraries/BytesLibrary.sol"; import "./NFT721ProxyCall.sol"; import "../interfaces/ITokenCreator.sol"; import "../interfaces/ITokenCreatorPaymentAddress.sol"; /** * @notice Allows each token to be associated with a creator. */ abstract contract NFT721Creator is Initializable, AccountMigration, ERC721Upgradeable, ITokenCreator, ITokenCreatorPaymentAddress, NFT721ProxyCall { using BytesLibrary for bytes; mapping(uint256 => address payable) private tokenIdToCreator; /** * @dev Stores an optional alternate address to receive creator revenue and royalty payments. */ mapping(uint256 => address payable) private tokenIdToCreatorPaymentAddress; event TokenCreatorUpdated(address indexed fromCreator, address indexed toCreator, uint256 indexed tokenId); event TokenCreatorPaymentAddressSet( address indexed fromPaymentAddress, address indexed toPaymentAddress, uint256 indexed tokenId ); event NFTCreatorMigrated(uint256 indexed tokenId, address indexed originalAddress, address indexed newAddress); event NFTOwnerMigrated(uint256 indexed tokenId, address indexed originalAddress, address indexed newAddress); event PaymentAddressMigrated( uint256 indexed tokenId, address indexed originalAddress, address indexed newAddress, address originalPaymentAddress, address newPaymentAddress ); modifier onlyCreatorAndOwner(uint256 tokenId) { require(tokenIdToCreator[tokenId] == msg.sender, "NFT721Creator: Caller is not creator"); require(ownerOf(tokenId) == msg.sender, "NFT721Creator: Caller does not own the NFT"); _; } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { if ( interfaceId == type(ITokenCreator).interfaceId || interfaceId == type(ITokenCreatorPaymentAddress).interfaceId ) { return true; } return super.supportsInterface(interfaceId); } /** * @notice Returns the creator's address for a given tokenId. */ function tokenCreator(uint256 tokenId) public view override returns (address payable) { return tokenIdToCreator[tokenId]; } /** * @notice Returns the payment address for a given tokenId. * @dev If an alternate address was not defined, the creator is returned instead. */ function getTokenCreatorPaymentAddress(uint256 tokenId) public view override returns (address payable tokenCreatorPaymentAddress) { tokenCreatorPaymentAddress = tokenIdToCreatorPaymentAddress[tokenId]; if (tokenCreatorPaymentAddress == address(0)) { tokenCreatorPaymentAddress = tokenIdToCreator[tokenId]; } } function _updateTokenCreator(uint256 tokenId, address payable creator) internal { emit TokenCreatorUpdated(tokenIdToCreator[tokenId], creator, tokenId); tokenIdToCreator[tokenId] = creator; } /** * @dev Allow setting a different address to send payments to for both primary sale revenue * and secondary sales royalties. */ function _setTokenCreatorPaymentAddress(uint256 tokenId, address payable tokenCreatorPaymentAddress) internal { emit TokenCreatorPaymentAddressSet(tokenIdToCreatorPaymentAddress[tokenId], tokenCreatorPaymentAddress, tokenId); tokenIdToCreatorPaymentAddress[tokenId] = tokenCreatorPaymentAddress; } /** * @notice Allows the creator to burn if they currently own the NFT. */ function burn(uint256 tokenId) public onlyCreatorAndOwner(tokenId) { _burn(tokenId); } /** * @notice Allows an NFT owner or creator and Foundation to work together in order to update the creator * to a new account and/or transfer NFTs to that account. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. * @dev This will gracefully skip any NFTs that have been burned or transferred. */ function adminAccountMigration( uint256[] calldata createdTokenIds, uint256[] calldata ownedTokenIds, address originalAddress, address payable newAddress, bytes calldata signature ) public onlyAuthorizedAccountMigration(originalAddress, newAddress, signature) { for (uint256 i = 0; i < ownedTokenIds.length; i++) { uint256 tokenId = ownedTokenIds[i]; // Check that the token exists and still owned by the originalAddress // so that frontrunning a burn or transfer will not cause the entire tx to revert if (_exists(tokenId) && ownerOf(tokenId) == originalAddress) { _transfer(originalAddress, newAddress, tokenId); emit NFTOwnerMigrated(tokenId, originalAddress, newAddress); } } for (uint256 i = 0; i < createdTokenIds.length; i++) { uint256 tokenId = createdTokenIds[i]; // The creator would be 0 if the token was burned before this call if (tokenIdToCreator[tokenId] != address(0)) { require( tokenIdToCreator[tokenId] == originalAddress, "NFT721Creator: Token was not created by the given address" ); _updateTokenCreator(tokenId, newAddress); emit NFTCreatorMigrated(tokenId, originalAddress, newAddress); } } } /** * @notice Allows a split recipient and Foundation to work together in order to update the payment address * to a new account. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. */ function adminAccountMigrationForPaymentAddresses( uint256[] calldata paymentAddressTokenIds, address paymentAddressFactory, bytes memory paymentAddressCallData, uint256 addressLocationInCallData, address originalAddress, address payable newAddress, bytes calldata signature ) public onlyAuthorizedAccountMigration(originalAddress, newAddress, signature) { _adminAccountRecoveryForPaymentAddresses( paymentAddressTokenIds, paymentAddressFactory, paymentAddressCallData, addressLocationInCallData, originalAddress, newAddress ); } /** * @dev Split into a second function to avoid stack too deep errors */ function _adminAccountRecoveryForPaymentAddresses( uint256[] calldata paymentAddressTokenIds, address paymentAddressFactory, bytes memory paymentAddressCallData, uint256 addressLocationInCallData, address originalAddress, address payable newAddress ) private { // Call the factory and get the originalPaymentAddress address payable originalPaymentAddress = _proxyCallAndReturnContractAddress( paymentAddressFactory, paymentAddressCallData ); // Confirm the original address and swap with the new address paymentAddressCallData.replaceAtIf(addressLocationInCallData, originalAddress, newAddress); // Call the factory and get the newPaymentAddress address payable newPaymentAddress = _proxyCallAndReturnContractAddress( paymentAddressFactory, paymentAddressCallData ); // For each token, confirm the expected payment address and then update to the new one for (uint256 i = 0; i < paymentAddressTokenIds.length; i++) { uint256 tokenId = paymentAddressTokenIds[i]; require( tokenIdToCreatorPaymentAddress[tokenId] == originalPaymentAddress, "NFT721Creator: Payment address is not the expected value" ); _setTokenCreatorPaymentAddress(tokenId, newPaymentAddress); emit PaymentAddressMigrated(tokenId, originalAddress, newAddress, originalPaymentAddress, newPaymentAddress); } } /** * @dev Remove the creator record when burned. */ function _burn(uint256 tokenId) internal virtual override { delete tokenIdToCreator[tokenId]; super._burn(tokenId); } uint256[999] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "./NFT721Core.sol"; import "./NFT721Creator.sol"; /** * @notice A mixin to extend the OpenZeppelin metadata implementation. */ abstract contract NFT721Metadata is NFT721Creator { using StringsUpgradeable for uint256; /** * @dev Stores hashes minted by a creator to prevent duplicates. */ mapping(address => mapping(string => bool)) private creatorToIPFSHashToMinted; event BaseURIUpdated(string baseURI); event TokenIPFSPathUpdated(uint256 indexed tokenId, string indexed indexedTokenIPFSPath, string tokenIPFSPath); // This event was used in an order version of the contract event NFTMetadataUpdated(string name, string symbol, string baseURI); /** * @notice Returns the IPFSPath to the metadata JSON file for a given NFT. */ function getTokenIPFSPath(uint256 tokenId) public view returns (string memory) { return _tokenURIs[tokenId]; } /** * @notice Checks if the creator has already minted a given NFT. */ function getHasCreatorMintedIPFSHash(address creator, string memory tokenIPFSPath) public view returns (bool) { return creatorToIPFSHashToMinted[creator][tokenIPFSPath]; } function _updateBaseURI(string memory _baseURI) internal { _setBaseURI(_baseURI); emit BaseURIUpdated(_baseURI); } /** * @dev The IPFS path should be the CID + file.extension, e.g. * `QmfPsfGwLhiJrU8t9HpG4wuyjgPo9bk8go4aQqSu9Qg4h7/metadata.json` */ function _setTokenIPFSPath(uint256 tokenId, string memory _tokenIPFSPath) internal { // 46 is the minimum length for an IPFS content hash, it may be longer if paths are used require(bytes(_tokenIPFSPath).length >= 46, "NFT721Metadata: Invalid IPFS path"); require(!creatorToIPFSHashToMinted[msg.sender][_tokenIPFSPath], "NFT721Metadata: NFT was already minted"); creatorToIPFSHashToMinted[msg.sender][_tokenIPFSPath] = true; _setTokenURI(tokenId, _tokenIPFSPath); } /** * @dev When a token is burned, remove record of it allowing that creator to re-mint the same NFT again in the future. */ function _burn(uint256 tokenId) internal virtual override { delete creatorToIPFSHashToMinted[msg.sender][_tokenURIs[tokenId]]; super._burn(tokenId); } uint256[999] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "./OZ/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "./NFT721Creator.sol"; import "./NFT721Market.sol"; import "./NFT721Metadata.sol"; import "./NFT721ProxyCall.sol"; /** * @notice Allows creators to mint NFTs. */ abstract contract NFT721Mint is Initializable, ERC721Upgradeable, NFT721ProxyCall, NFT721Creator, NFT721Market, NFT721Metadata { uint256 private nextTokenId; event Minted( address indexed creator, uint256 indexed tokenId, string indexed indexedTokenIPFSPath, string tokenIPFSPath ); /** * @notice Gets the tokenId of the next NFT minted. */ function getNextTokenId() public view returns (uint256) { return nextTokenId; } /** * @dev Called once after the initial deployment to set the initial tokenId. */ function _initializeNFT721Mint() internal initializer { // Use ID 1 for the first NFT tokenId nextTokenId = 1; } /** * @notice Allows a creator to mint an NFT. */ function mint(string memory tokenIPFSPath) public returns (uint256 tokenId) { tokenId = nextTokenId++; _mint(msg.sender, tokenId); _updateTokenCreator(tokenId, msg.sender); _setTokenIPFSPath(tokenId, tokenIPFSPath); emit Minted(msg.sender, tokenId, tokenIPFSPath, tokenIPFSPath); } /** * @notice Allows a creator to mint an NFT and set approval for the Foundation marketplace. * This can be used by creators the first time they mint an NFT to save having to issue a separate * approval transaction before starting an auction. */ function mintAndApproveMarket(string memory tokenIPFSPath) public returns (uint256 tokenId) { tokenId = mint(tokenIPFSPath); setApprovalForAll(getNFTMarket(), true); } /** * @notice Allows a creator to mint an NFT and have creator revenue/royalties sent to an alternate address. */ function mintWithCreatorPaymentAddress(string memory tokenIPFSPath, address payable tokenCreatorPaymentAddress) public returns (uint256 tokenId) { require(tokenCreatorPaymentAddress != address(0), "NFT721Mint: tokenCreatorPaymentAddress is required"); tokenId = mint(tokenIPFSPath); _setTokenCreatorPaymentAddress(tokenId, tokenCreatorPaymentAddress); } /** * @notice Allows a creator to mint an NFT and have creator revenue/royalties sent to an alternate address. * Also sets approval for the Foundation marketplace. This can be used by creators the first time they mint an NFT to * save having to issue a separate approval transaction before starting an auction. */ function mintWithCreatorPaymentAddressAndApproveMarket( string memory tokenIPFSPath, address payable tokenCreatorPaymentAddress ) public returns (uint256 tokenId) { tokenId = mintWithCreatorPaymentAddress(tokenIPFSPath, tokenCreatorPaymentAddress); setApprovalForAll(getNFTMarket(), true); } /** * @notice Allows a creator to mint an NFT and have creator revenue/royalties sent to an alternate address * which is defined by a contract call, typically a proxy contract address representing the payment terms. */ function mintWithCreatorPaymentFactory( string memory tokenIPFSPath, address paymentAddressFactory, bytes memory paymentAddressCallData ) public returns (uint256 tokenId) { address payable tokenCreatorPaymentAddress = _proxyCallAndReturnContractAddress( paymentAddressFactory, paymentAddressCallData ); tokenId = mintWithCreatorPaymentAddress(tokenIPFSPath, tokenCreatorPaymentAddress); } /** * @notice Allows a creator to mint an NFT and have creator revenue/royalties sent to an alternate address * which is defined by a contract call, typically a proxy contract address representing the payment terms. * Also sets approval for the Foundation marketplace. This can be used by creators the first time they mint an NFT to * save having to issue a separate approval transaction before starting an auction. */ function mintWithCreatorPaymentFactoryAndApproveMarket( string memory tokenIPFSPath, address paymentAddressFactory, bytes memory paymentAddressCallData ) public returns (uint256 tokenId) { tokenId = mintWithCreatorPaymentFactory(tokenIPFSPath, paymentAddressFactory, paymentAddressCallData); setApprovalForAll(getNFTMarket(), true); } /** * @dev Explicit override to address compile errors. */ function _burn(uint256 tokenId) internal virtual override(ERC721Upgradeable, NFT721Creator, NFT721Metadata) { super._burn(tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, NFT721Creator, NFT721Market) returns (bool) { return super.supportsInterface(interfaceId); } uint256[1000] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./roles/FoundationOperatorRole.sol"; import "../interfaces/IERC1271.sol"; /** * @notice Checks for a valid signature authorizing the migration of an account to a new address. * @dev This is shared by both the FNDNFT721 and FNDNFTMarket, and the same signature authorizes both. */ abstract contract AccountMigration is FoundationOperatorRole { // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.1.0/contracts/utils/cryptography function _isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) private view returns (bool) { if (Address.isContract(signer)) { try IERC1271(signer).isValidSignature(hash, signature) returns (bytes4 magicValue) { return magicValue == IERC1271(signer).isValidSignature.selector; } catch { return false; } } else { return ECDSA.recover(hash, signature) == signer; } } // From https://ethereum.stackexchange.com/questions/8346/convert-address-to-string function _toAsciiString(address x) private pure returns (string memory) { bytes memory s = new bytes(42); s[0] = "0"; s[1] = "x"; for (uint256 i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2 * i + 2] = _char(hi); s[2 * i + 3] = _char(lo); } return string(s); } function _char(bytes1 b) private pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.1.0/contracts/utils/cryptography/ECDSA.sol // Modified to accept messages (instead of the message hash) function _toEthSignedMessage(bytes memory message) private pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(message.length), message)); } /** * @dev Confirms the msg.sender is a Foundation operator and that the signature provided is valid. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. */ modifier onlyAuthorizedAccountMigration( address originalAddress, address newAddress, bytes memory signature ) { require(_isFoundationOperator(), "AccountMigration: Caller is not an operator"); require(originalAddress != newAddress, "AccountMigration: Cannot migrate to the same account"); bytes32 hash = _toEthSignedMessage( abi.encodePacked("I authorize Foundation to migrate my account to ", _toAsciiString(newAddress)) ); require( _isValidSignatureNow(originalAddress, hash, signature), "AccountMigration: Signature must be from the original account" ); _; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "../interfaces/IProxyCall.sol"; /** * @notice Forwards arbitrary calls to an external contract to be processed. * @dev This is used so that the from address of the calling contract does not have * any special permissions (e.g. ERC-20 transfer). */ abstract contract NFT721ProxyCall { using AddressUpgradeable for address payable; IProxyCall private proxyCall; event ProxyCallContractUpdated(address indexed proxyCallContract); /** * @dev Called by the adminUpdateConfig function to set the address of the proxy call contract. */ function _updateProxyCall(address proxyCallContract) internal { proxyCall = IProxyCall(proxyCallContract); emit ProxyCallContractUpdated(proxyCallContract); } /** * @notice Returns the address of the current proxy call contract. */ function proxyCallAddress() external view returns (address) { return address(proxyCall); } /** * @dev Used by other mixins to make external calls through the proxy contract. * This will fail if the proxyCall address is address(0). */ function _proxyCallAndReturnContractAddress(address externalContract, bytes memory callData) internal returns (address payable result) { result = proxyCall.proxyCallAndReturnAddress(externalContract, callData); require(result.isContract(), "NFT721ProxyCall: address returned is not a contract"); } // This mixin uses a total of 100 slots uint256[99] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @dev A gap to represent the space previously consumed by the use of ERC165Upgradeable. */ abstract contract ERC165UpgradeableGap { uint256[50] private ______gap; }
// SPDX-License-Identifier: MIT /** * From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.2.0/contracts/utils/introspection/IERC165.sol * Modified to support Solidity 0.7 */ pragma solidity ^0.7.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 /** * From https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.0/contracts/token/ERC721 * Modified in order to: * - replace ERC165Upgradeable with ERC165. */ pragma solidity ^0.7.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} * or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which * is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called * upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * From https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.0/contracts/token/ERC721 * Modified in order to: * - Only include metadata functions */ /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable { /** * @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 /** * From https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.0/contracts/token/ERC721 * Modified in order to: * - Only include Enumerable functions */ pragma solidity ^0.7.0; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ 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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMapUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping (bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({ _key: key, _value: value })); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {_tryGet}. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint160(uint256(value)))); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. * * _Available since v3.4._ */ function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); return (success, address(uint160(uint256(value)))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev String operations. */ library StringsUpgradeable { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice Interface for AdminRole which wraps the default admin role from * OpenZeppelin's AccessControl for easy integration. */ interface IAdminRole { function isAdmin(address account) external view returns (bool); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice Interface for OperatorRole which wraps a role from * OpenZeppelin's AccessControl for easy integration. */ interface IOperatorRole { function isOperator(address account) external view returns (bool); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice An interface for communicating fees to 3rd party marketplaces. * @dev Originally implemented in mainnet contract 0x44d6e8933f8271abcf253c72f9ed7e0e4c0323b3 */ interface IHasSecondarySaleFees { function getFeeRecipients(uint256 id) external view returns (address payable[] memory); function getFeeBps(uint256 id) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT OR Apache-2.0 // solhint-disable pragma solidity ^0.7.0; interface IFNDNFTMarket { function getFeeConfig() external view returns ( uint256 primaryFoundationFeeBasisPoints, uint256 secondaryFoundationFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints ); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; interface IGetRoyalties { function getRoyalties(uint256 tokenId) external view returns (address payable[] memory recipients, uint256[] memory feesInBasisPoints); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; library BytesLibrary { function replaceAtIf( bytes memory data, uint256 startLocation, address expectedAddress, address newAddress ) internal pure { bytes memory expectedData = abi.encodePacked(expectedAddress); bytes memory newData = abi.encodePacked(newAddress); // An address is 20 bytes long for (uint256 i = 0; i < 20; i++) { uint256 dataLocation = startLocation + i; require(data[dataLocation] == expectedData[i], "Bytes: Data provided does not include the expectedAddress"); data[dataLocation] = newData[i]; } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; interface ITokenCreator { function tokenCreator(uint256 tokenId) external view returns (address payable); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; interface ITokenCreatorPaymentAddress { function getTokenCreatorPaymentAddress(uint256 tokenId) external view returns (address payable tokenCreatorPaymentAddress); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { revert("ECDSA: invalid signature length"); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return recover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value"); require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.1.0/contracts/interfaces/IERC1271.sol */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; interface IProxyCall { function proxyCallAndReturnAddress(address externalContract, bytes calldata callData) external returns (address payable result); }
{ "optimizer": { "enabled": true, "runs": 1337 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"indexedTokenIPFSPath","type":"string"},{"indexed":false,"internalType":"string","name":"tokenIPFSPath","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"NFTCreatorMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nftMarket","type":"address"}],"name":"NFTMarketUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"NFTMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"NFTOwnerMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"address","name":"originalPaymentAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newPaymentAddress","type":"address"}],"name":"PaymentAddressMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"proxyCallContract","type":"address"}],"name":"ProxyCallContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromPaymentAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toPaymentAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreatorPaymentAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromCreator","type":"address"},{"indexed":true,"internalType":"address","name":"toCreator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"indexedTokenIPFSPath","type":"string"},{"indexed":false,"internalType":"string","name":"tokenIPFSPath","type":"string"}],"name":"TokenIPFSPathUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"createdTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"ownedTokenIds","type":"uint256[]"},{"internalType":"address","name":"originalAddress","type":"address"},{"internalType":"address payable","name":"newAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"adminAccountMigration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"paymentAddressTokenIds","type":"uint256[]"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"},{"internalType":"uint256","name":"addressLocationInCallData","type":"uint256"},{"internalType":"address","name":"originalAddress","type":"address"},{"internalType":"address payable","name":"newAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"adminAccountMigrationForPaymentAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftMarket","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"address","name":"proxyCallContract","type":"address"}],"name":"adminUpdateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFoundationTreasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"tokenIPFSPath","type":"string"}],"name":"getHasCreatorMintedIPFSHash","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNFTMarket","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[2]","name":"recipients","type":"address[2]"},{"internalType":"uint256[2]","name":"feesInBasisPoints","type":"uint256[2]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenCreatorPaymentAddress","outputs":[{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenIPFSPath","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"}],"name":"mintAndApproveMarket","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"name":"mintWithCreatorPaymentAddress","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"name":"mintWithCreatorPaymentAddressAndApproveMarket","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"}],"name":"mintWithCreatorPaymentFactory","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenIPFSPath","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"}],"name":"mintWithCreatorPaymentFactoryAndApproveMarket","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyCallAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenCreator","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506150ca806100206000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c80636c0360eb1161017b578063c4d66de8116100d8578063dac28cce1161008c578063ec5f752e11610071578063ec5f752e14610fb8578063edf9f57d14610fd5578063f7a2da2314611113576102ad565b8063dac28cce14610f6d578063e985e9c514610f8a576102ad565b8063caa0f92a116100bd578063caa0f92a14610e0e578063d2c0fa5a14610e16578063d85d3d2714610ec7576102ad565b8063c4d66de814610dcb578063c87b56dd14610df1576102ad565b8063a22cb4651161012f578063b88d4fde11610114578063b88d4fde14610c86578063b9c4d9fb14610d4c578063bb3bafd614610d69576102ad565b8063a22cb46514610b97578063a2805dcb14610bc5576102ad565b806384f4e5c01161016057806384f4e5c0146109ac57806389ca8b7114610ad957806395d89b4114610b8f576102ad565b80636c0360eb1461097e57806370a0823114610986576102ad565b80633d78bede116102295780634f6ccce7116101dd57806358f05b93116101c257806358f05b93146108a8578063605eb5f5146109595780636352211e14610961576102ad565b80634f6ccce7146107e55780635174e85314610802576102ad565b806340c1a0641161020e57806340c1a0641461077557806342842e0e1461079257806342966c68146107c8576102ad565b80633d78bede146105f85780633fd7ca411461076d576102ad565b80630ebd4c7f1161028057806323b872dd1161026557806323b872dd1461045857806329f87c381461048e5780632f745c59146105cc576102ad565b80630ebd4c7f146103d157806318160ddd1461043e576102ad565b806301ffc9a7146102b257806306fdde03146102ed578063081812fc1461036a578063095ea7b3146103a3575b600080fd5b6102d9600480360360208110156102c857600080fd5b50356001600160e01b03191661111b565b604080519115158252519081900360200190f35b6102f561112e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032f578181015183820152602001610317565b50505050905090810190601f16801561035c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103876004803603602081101561038057600080fd5b5035611165565b604080516001600160a01b039092168252519081900360200190f35b6103cf600480360360408110156103b957600080fd5b506001600160a01b0381351690602001356111c8565b005b6103ee600480360360208110156103e757600080fd5b50356112a3565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561042a578181015183820152602001610412565b505050509050019250505060405180910390f35b610446611390565b60408051918252519081900360200190f35b6103cf6004803603606081101561046e57600080fd5b506001600160a01b038135811691602081013590911690604001356113a2565b610446600480360360608110156104a457600080fd5b8101906020810181356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b0385351695909490935060408101925060200135905064010000000081111561055757600080fd5b82018360208201111561056957600080fd5b8035906020019184600183028401116401000000008311171561058b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506113f9945050505050565b610446600480360360408110156105e257600080fd5b506001600160a01b03813516906020013561141b565b6103cf600480360360e081101561060e57600080fd5b81019060208101813564010000000081111561062957600080fd5b82018360208201111561063b57600080fd5b8035906020019184602083028401116401000000008311171561065d57600080fd5b919390926001600160a01b038335169260408101906020013564010000000081111561068857600080fd5b82018360208201111561069a57600080fd5b803590602001918460018302840111640100000000831117156106bc57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435956001600160a01b03602087013581169660408101359091169550919350915060808101906060013564010000000081111561072e57600080fd5b82018360208201111561074057600080fd5b8035906020019184600183028401116401000000008311171561076257600080fd5b509092509050611447565b6103876115fe565b6103876004803603602081101561078b57600080fd5b503561160e565b6103cf600480360360608110156107a857600080fd5b506001600160a01b0381358116916020810135909116906040013561162a565b6103cf600480360360208110156107de57600080fd5b5035611645565b610446600480360360208110156107fb57600080fd5b50356116f9565b6104466004803603602081101561081857600080fd5b81019060208101813564010000000081111561083357600080fd5b82018360208201111561084557600080fd5b8035906020019184600183028401116401000000008311171561086757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611710945050505050565b610446600480360360408110156108be57600080fd5b8101906020810181356401000000008111156108d957600080fd5b8201836020820111156108eb57600080fd5b8035906020019184600183028401116401000000008311171561090d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061172f9050565b610387611748565b6103876004803603602081101561097757600080fd5b5035611758565b6102f5611781565b6104466004803603602081101561099c57600080fd5b50356001600160a01b0316611818565b6103cf600480360360a08110156109c257600080fd5b8101906020810181356401000000008111156109dd57600080fd5b8201836020820111156109ef57600080fd5b80359060200191846020830284011164010000000083111715610a1157600080fd5b919390929091602081019035640100000000811115610a2f57600080fd5b820183602082011115610a4157600080fd5b80359060200191846020830284011164010000000083111715610a6357600080fd5b919390926001600160a01b0383358116936020810135909116929190606081019060400135640100000000811115610a9a57600080fd5b820183602082011115610aac57600080fd5b80359060200191846001830284011164010000000083111715610ace57600080fd5b509092509050611881565b6102d960048036036040811015610aef57600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610b1a57600080fd5b820183602082011115610b2c57600080fd5b80359060200191846001830284011164010000000083111715610b4e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611b45945050505050565b6102f5611bc9565b6103cf60048036036040811015610bad57600080fd5b506001600160a01b0381351690602001351515611c00565b6103cf60048036036060811015610bdb57600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846001830284011164010000000083111715610c3a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611d069050565b6103cf60048036036080811015610c9c57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610cd757600080fd5b820183602082011115610ce957600080fd5b80359060200191846001830284011164010000000083111715610d0b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d64945050505050565b6103ee60048036036020811015610d6257600080fd5b5035611dc2565b610d8660048036036020811015610d7f57600080fd5b5035611e93565b6040518083600260200280838360005b83811015610dae578181015183820152602001610d96565b505086519290940191825250915083905060408083836020610412565b6103cf60048036036020811015610de157600080fd5b50356001600160a01b0316611fb3565b6102f560048036036020811015610e0757600080fd5b503561206e565b610446612317565b61044660048036036040811015610e2c57600080fd5b810190602081018135640100000000811115610e4757600080fd5b820183602082011115610e5957600080fd5b80359060200191846001830284011164010000000083111715610e7b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061231e9050565b61044660048036036020811015610edd57600080fd5b810190602081018135640100000000811115610ef857600080fd5b820183602082011115610f0a57600080fd5b80359060200191846001830284011164010000000083111715610f2c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061237a945050505050565b6102f560048036036020811015610f8357600080fd5b503561249b565b6102d960048036036040811015610fa057600080fd5b506001600160a01b038135811691602001351661253d565b61038760048036036020811015610fce57600080fd5b503561256c565b61044660048036036060811015610feb57600080fd5b81019060208101813564010000000081111561100657600080fd5b82018360208201111561101857600080fd5b8035906020019184600183028401116401000000008311171561103a57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b0385351695909490935060408101925060200135905064010000000081111561109e57600080fd5b8201836020820111156110b057600080fd5b803590602001918460018302840111640100000000831117156110d257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506125a7945050505050565b6103876125c8565b6000611126826125dd565b90505b919050565b60408051808201909152600a81527f466f756e646174696f6e00000000000000000000000000000000000000000000602082015290565b6000611170826125e8565b6111ab5760405162461bcd60e51b815260040180806020018281038252602c815260200180614e78602c913960400191505060405180910390fd5b50600090815261083860205260409020546001600160a01b031690565b60006111d382611758565b9050806001600160a01b0316836001600160a01b031614156112265760405162461bcd60e51b8152600401808060200182810382526021815260200180614f496021913960400191505060405180910390fd5b806001600160a01b03166112386125f6565b6001600160a01b031614806112595750611259816112546125f6565b61253d565b6112945760405162461bcd60e51b8152600401808060200182810382526038815260200180614d1b6038913960400191505060405180910390fd5b61129e83836125fa565b505050565b606060008061103860009054906101000a90046001600160a01b03166001600160a01b0316635fbbc0d26040518163ffffffff1660e01b815260040160606040518083038186803b1580156112f757600080fd5b505afa15801561130b573d6000803e3d6000fd5b505050506040513d606081101561132157600080fd5b50602081015160409182015182516002808252606082019094529194509250600091816020016020820280368337019050509050828160008151811061136357fe5b602002602001018181525050818160018151811061137d57fe5b6020908102919091010152949350505050565b600061139d610836612676565b905090565b6113b36113ad6125f6565b82612681565b6113ee5760405162461bcd60e51b8152600401808060200182810382526031815260200180614fa26031913960400191505060405180910390fd5b61129e838383612725565b6000806114068484612874565b9050611412858261231e565b95945050505050565b6001600160a01b03821660009081526108356020526040812061143e90836129c3565b90505b92915050565b838383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061148992506129cf915050565b6114c45760405162461bcd60e51b815260040180806020018281038252602b81526020018061506a602b913960400191505060405180910390fd5b816001600160a01b0316836001600160a01b031614156115155760405162461bcd60e51b8152600401808060200182810382526034815260200180614ffd6034913960400191505060405180910390fd5b600061159861152384612a56565b604051602001806030614b93823960300182805190602001908083835b6020831061155f5780518252601f199092019160209182019101611540565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052612bbc565b90506115a5848284612cae565b6115e05760405162461bcd60e51b815260040180806020018281038252603d815260200180614afe603d913960400191505060405180910390fd5b6115ef8d8d8d8d8d8d8d612ddd565b50505050505050505050505050565b611038546001600160a01b031690565b6000908152610c4f60205260409020546001600160a01b031690565b61129e83838360405180602001604052806000815250611d64565b6000818152610c4f602052604090205481906001600160a01b0316331461169d5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bf46024913960400191505060405180910390fd5b336116a782611758565b6001600160a01b0316146116ec5760405162461bcd60e51b815260040180806020018281038252602a815260200180614fd3602a913960400191505060405180910390fd5b6116f582612ef3565b5050565b60008061170861083684612eff565b509392505050565b600061171b8261237a565b90506111296117286115fe565b6001611c00565b600061173b838361231e565b90506114416117286115fe565b610beb546001600160a01b031690565b600061112682604051806060016040528060298152602001614dab602991396108369190612f1b565b61083d8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561180e5780601f106117e35761010080835404028352916020019161180e565b820191906000526020600020905b8154815290600101906020018083116117f157829003601f168201915b5050505050905090565b60006001600160a01b03821661185f5760405162461bcd60e51b815260040180806020018281038252602a815260200180614d81602a913960400191505060405180910390fd5b6001600160a01b03821660009081526108356020526040902061112690612676565b838383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118c392506129cf915050565b6118fe5760405162461bcd60e51b815260040180806020018281038252602b81526020018061506a602b913960400191505060405180910390fd5b816001600160a01b0316836001600160a01b0316141561194f5760405162461bcd60e51b8152600401808060200182810382526034815260200180614ffd6034913960400191505060405180910390fd5b600061195d61152384612a56565b905061196a848284612cae565b6119a55760405162461bcd60e51b815260040180806020018281038252603d815260200180614afe603d913960400191505060405180910390fd5b60005b89811015611a505760008b8b838181106119be57fe5b9050602002013590506119d0816125e8565b80156119f55750896001600160a01b03166119ea82611758565b6001600160a01b0316145b15611a4757611a058a8a83612725565b886001600160a01b03168a6001600160a01b0316827fde55f075ebd46256cd6bd57d8fb53e0406f687db372e90ae8c18e72be46f5c1660405160405180910390a45b506001016119a8565b5060005b8b8110156115ef5760008d8d83818110611a6a57fe5b602090810292909201356000818152610c4f909352604090922054919250506001600160a01b031615611b3c576000818152610c4f60205260409020546001600160a01b038b8116911614611af05760405162461bcd60e51b8152600401808060200182810382526039815260200180614a9a6039913960400191505060405180910390fd5b611afa818a612f28565b886001600160a01b03168a6001600160a01b0316827f58120fb31972ff9fad76eb87119474a58fc38d6b9b842bb3067a4a329eaa64f660405160405180910390a45b50600101611a54565b6001600160a01b038216600090815261142160209081526040808320905184519192859282918401908083835b60208310611b915780518252601f199092019160209182019101611b72565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff1695945050505050565b60408051808201909152600381527f464e440000000000000000000000000000000000000000000000000000000000602082015290565b611c086125f6565b6001600160a01b0316826001600160a01b03161415611c6e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806108396000611c7c6125f6565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611cc06125f6565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b611d0e612fab565b611d495760405162461bcd60e51b8152600401808060200182810382526038815260200180614ce36038913960400191505060405180910390fd5b611d5283613001565b611d5b826130a6565b61129e8161314b565b611d75611d6f6125f6565b83612681565b611db05760405162461bcd60e51b8152600401808060200182810382526031815260200180614fa26031913960400191505060405180910390fd5b611dbc848484846131a3565b50505050565b6060611dcd826125e8565b611e085760405162461bcd60e51b815260040180806020018281038252602b815260200180614ad3602b913960400191505060405180910390fd5b604080516002808252606082018352600092602083019080368337019050509050611e316125c8565b81600081518110611e3e57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611e678361256c565b81600181518110611e7457fe5b6001600160a01b03909216602092830291909101909101529050919050565b611e9b614978565b611ea3614978565b611eac836125e8565b611ee75760405162461bcd60e51b815260040180806020018281038252602b815260200180614ad3602b913960400191505060405180910390fd5b611eef6125c8565b6001600160a01b03168252611f038361256c565b6001600160a01b03908116602084015261103854604080517f5fbbc0d2000000000000000000000000000000000000000000000000000000008152905160009384931691635fbbc0d2916004808301926060929190829003018186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d6060811015611f9657600080fd5b506020818101516040909201519185528401525091939092509050565b600054610100900460ff1680611fcc5750611fcc6131f5565b80611fda575060005460ff16155b6120155760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015612040576000805460ff1961ff0019909116610100171660011790555b61204982613206565b61205161332d565b6120596133d6565b80156116f5576000805461ff00191690555050565b6060612079826125e8565b6120b45760405162461bcd60e51b815260040180806020018281038252602f815260200180614ef9602f913960400191505060405180910390fd5b600082815261083c602090815260408083208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156121485780601f1061211d57610100808354040283529160200191612148565b820191906000526020600020905b81548152906001019060200180831161212b57829003601f168201915b505061083d5493945050505060026000196101006001841615020190911604612172579050611129565b8051156122445761083d8160405160200180838054600181600116156101000203166002900480156121db5780601f106121b95761010080835404028352918201916121db565b820191906000526020600020905b8154815290600101906020018083116121c7575b5050825160208401908083835b602083106122075780518252601f1990920191602091820191016121e8565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050611129565b61083d6122508461347d565b60405160200180838054600181600116156101000203166002900480156122ae5780601f1061228c5761010080835404028352918201916122ae565b820191906000526020600020905b81548152906001019060200180831161229a575b5050825160208401908083835b602083106122da5780518252601f1990920191602091820191016122bb565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b6118095490565b60006001600160a01b0382166123655760405162461bcd60e51b8152600401808060200182810382526032815260200180614e466032913960400191505060405180910390fd5b61236e8361237a565b90506114418183613558565b61180980546001810190915561239033826135db565b61239a8133612f28565b6123a4818361370b565b816040518082805190602001908083835b602083106123d45780518252601f1990920191602091820191016123b5565b51815160209384036101000a600019018019909216911617905260408051929094018290038220818352885183830152885190965087955033947fe2406cfd356cfbe4e42d452bde96d27f48c423e5f02b5d78695893308399519d94508993928392918301919085019080838360005b8381101561245c578181015183820152602001612444565b50505050905090810190601f1680156124895780820380516001836020036101000a031916815260200191505b509250505060405180910390a4919050565b600081815261083c602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156125315780601f1061250657610100808354040283529160200191612531565b820191906000526020600020905b81548152906001019060200180831161251457829003601f168201915b50505050509050919050565b6001600160a01b0391821660009081526108396020908152604080832093909416825291909152205460ff1690565b6000818152610c5060205260409020546001600160a01b03168061112957506000908152610c4f60205260409020546001600160a01b031690565b60006125b48484846113f9565b90506125c16117286115fe565b9392505050565b6000546201000090046001600160a01b031690565b60006111268261389e565b6000611126610836836138e3565b3390565b600081815261083860205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061263d82611758565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611126826138ef565b600061268c826125e8565b6126c75760405162461bcd60e51b815260040180806020018281038252602c815260200180614cb7602c913960400191505060405180910390fd5b60006126d283611758565b9050806001600160a01b0316846001600160a01b0316148061270d5750836001600160a01b031661270284611165565b6001600160a01b0316145b8061271d575061271d818561253d565b949350505050565b826001600160a01b031661273882611758565b6001600160a01b03161461277d5760405162461bcd60e51b8152600401808060200182810382526029815260200180614ed06029913960400191505060405180910390fd5b6001600160a01b0382166127c25760405162461bcd60e51b8152600401808060200182810382526024815260200180614c4b6024913960400191505060405180910390fd5b6127cd83838361129e565b6127d86000826125fa565b6001600160a01b0383166000908152610835602052604090206127fb90826138f3565b506001600160a01b03821660009081526108356020526040902061281f90826138ff565b5061282d610836828461390b565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b610beb54604080517fa1453b0e0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830190815260248301938452855160448401528551600095929092169363a1453b0e938893889392916064019060208501908083838c5b838110156128fb5781810151838201526020016128e3565b50505050905090810190601f1680156129285780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561294857600080fd5b505af115801561295c573d6000803e3d6000fd5b505050506040513d602081101561297257600080fd5b505190506129886001600160a01b038216613921565b6114415760405162461bcd60e51b8152600401808060200182810382526033815260200180614c186033913960400191505060405180910390fd5b600061143e8383613927565b60006129d96125c8565b6001600160a01b0316636d70f7ae336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a2557600080fd5b505afa158015612a39573d6000803e3d6000fd5b505050506040513d6020811015612a4f57600080fd5b5051905090565b60408051602a808252606082810190935260009190602082018180368337019050509050600360fc1b81600081518110612a8c57fe5b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ad157fe5b60200101906001600160f81b031916908160001a90535060005b6014811015612bb55760008160130360080260020a856001600160a01b031681612b1157fe5b0460f81b9050600060108260f81c60ff1681612b2957fe5b0460f81b905060008160f81c6010028360f81c0360f81b9050612b4b8261398b565b858560020260020181518110612b5d57fe5b60200101906001600160f81b031916908160001a905350612b7d8161398b565b858560020260030181518110612b8f57fe5b60200101906001600160f81b031916908160001a9053505060019092019150612aeb9050565b5092915050565b6000612bc882516139bc565b8260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310612c235780518252601f199092019160209182019101612c04565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612c6b5780518252601f199092019160209182019101612c4c565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000612cb984613921565b15612db85760408051630b135d3f60e11b815260048101858152602482019283528451604483015284516001600160a01b03881693631626ba7e938893889390929160640190602085019080838360005b83811015612d22578181015183820152602001612d0a565b50505050905090810190601f168015612d4f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612d6d57600080fd5b505afa925050508015612d9257506040513d6020811015612d8d57600080fd5b505160015b612d9e575060006125c1565b6001600160e01b031916630b135d3f60e11b1490506125c1565b836001600160a01b0316612dcc8484613a8e565b6001600160a01b03161490506125c1565b6000612de98686612874565b9050612df785858585613b0e565b6000612e038787612874565b905060005b88811015612ee75760008a8a83818110612e1e57fe5b602090810292909201356000818152610c50909352604090922054919250506001600160a01b03858116911614612e865760405162461bcd60e51b8152600401808060200182810382526038815260200180614f6a6038913960400191505060405180910390fd5b612e908184613558565b604080516001600160a01b0386811682528581166020830152825181891693918a169285927f806ccd3ad4c360726b134c8c9d1ce9842006fbcf915e66449802d74b608bed8492918290030190a450600101612e08565b50505050505050505050565b612efc81613c5b565b50565b6000808080612f0e8686613c64565b9097909650945050505050565b600061271d848484613cdf565b6000828152610c4f602052604080822054905184926001600160a01b038086169316917febd529444fe852bfccb40075e8f8cae7612ea20edebdf5143c72718ccb157f759190a46000918252610c4f6020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6000612fb56125c8565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a2557600080fd5b613013816001600160a01b0316613921565b61304e5760405162461bcd60e51b815260040180806020018281038252602e815260200180614d53602e913960400191505060405180910390fd5b611038805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f07e7630580d612127ff5f3bd98a1ef992bb87b379fef3b98f2e2ca1ad8e27dd890600090a250565b6130af81613da9565b7f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b610beb805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f7213e3d637e4ef4968f947d5f602103307355f708bfd5bfce9d87da7c78f852190600090a250565b6131ae848484612725565b6131ba84848484613dbd565b611dbc5760405162461bcd60e51b8152600401808060200182810382526032815260200180614b3b6032913960400191505060405180910390fd5b600061320030613921565b15905090565b600054610100900460ff168061321f575061321f6131f5565b8061322d575060005460ff16155b6132685760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015613293576000805460ff1961ff0019909116610100171660011790555b6132a5826001600160a01b0316613921565b6132e05760405162461bcd60e51b8152600401808060200182810382526031815260200180614bc36031913960400191505060405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b0385160217905580156116f5576000805461ff00191690555050565b600054610100900460ff168061334657506133466131f5565b80613354575060005460ff16155b61338f5760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff161580156133ba576000805460ff1961ff0019909116610100171660011790555b6133c2613f4f565b8015612efc576000805461ff001916905550565b600054610100900460ff16806133ef57506133ef6131f5565b806133fd575060005460ff16155b6134385760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015613463576000805460ff1961ff0019909116610100171660011790555b6001611809558015612efc576000805461ff001916905550565b6060816134a257506040805180820190915260018152600360fc1b6020820152611129565b8160005b81156134ba57600101600a820491506134a6565b60008167ffffffffffffffff811180156134d357600080fd5b506040519080825280601f01601f1916602001820160405280156134fe576020820181803683370190505b50859350905060001982015b831561354f57600a840660300160f81b8282806001900393508151811061352d57fe5b60200101906001600160f81b031916908160001a905350600a8404935061350a565b50949350505050565b6000828152610c50602052604080822054905184926001600160a01b038086169316917f296490d14aadeb9208962e029edf126e34fe835b4ed9dc8c91602df4d04766959190a46000918252610c506020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6001600160a01b038216613636576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61363f816125e8565b15613691576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61369d6000838361129e565b6001600160a01b0382166000908152610835602052604090206136c090826138ff565b506136ce610836828461390b565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b602e8151101561374c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614f286021913960400191505060405180910390fd5b33600090815261142160209081526040918290209151835184928291908401908083835b6020831061378f5780518252601f199092019160209182019101613770565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506137fe90505760405162461bcd60e51b8152600401808060200182810382526026815260200180614b6d6026913960400191505060405180910390fd5b60016114216000336001600160a01b03166001600160a01b03168152602001908152602001600020826040518082805190602001908083835b602083106138565780518252601f199092019160209182019101613837565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff191693151593909317909255506116f590508282613fef565b60006001600160e01b031982167fbb3bafd60000000000000000000000000000000000000000000000000000000014156138da57506001611129565b61112682614053565b600061143e83836140cc565b5490565b600061143e83836140e4565b600061143e83836141aa565b600061271d84846001600160a01b0385166141f4565b3b151590565b815460009082106139695760405162461bcd60e51b8152600401808060200182810382526022815260200180614a786022913960400191505060405180910390fd5b82600001828154811061397857fe5b9060005260206000200154905092915050565b6000600a60f883901c10156139ab578160f81c60300160f81b9050611129565b8160f81c60570160f81b9050611129565b6060816139e157506040805180820190915260018152600360fc1b6020820152611129565b8160005b81156139f957600101600a820491506139e5565b60008167ffffffffffffffff81118015613a1257600080fd5b506040519080825280601f01601f191660200182016040528015613a3d576020820181803683370190505b50859350905060001982015b831561354f57600a840660300160f81b82828060019003935081518110613a6c57fe5b60200101906001600160f81b031916908160001a905350600a84049350613a49565b60008151604114613ae6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a613b048682858561428b565b9695505050505050565b60408051606084811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020840152835160148185030181526034840185529185901b16605483015282518083036048018152606890920190925260005b6014811015613c525760008187019050838281518110613b8b57fe5b602001015160f81c60f81b6001600160f81b031916888281518110613bac57fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001614613c0f5760405162461bcd60e51b81526004018080602001828103825260398152602001806150316039913960400191505060405180910390fd5b828281518110613c1b57fe5b602001015160f81c60f81b888281518110613c3257fe5b60200101906001600160f81b031916908160001a90535050600101613b6f565b50505050505050565b612efc81614400565b815460009081908310613ca85760405162461bcd60e51b8152600401808060200182810382526022815260200180614e246022913960400191505060405180910390fd5b6000846000018481548110613cb957fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281613d7a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613d3f578181015183820152602001613d27565b50505050905090810190601f168015613d6c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110613d8d57fe5b9060005260206000209060020201600101549150509392505050565b80516116f59061083d906020840190614996565b6000613dd1846001600160a01b0316613921565b613ddd5750600161271d565b6000613f15630a85bd0160e11b613df26125f6565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613e59578181015183820152602001613e41565b50505050905090810190601f168015613e865780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001614b3b603291396001600160a01b03881691906144a5565b90506000818060200190516020811015613f2e57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b600054610100900460ff1680613f685750613f686131f5565b80613f76575060005460ff16155b613fb15760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff161580156133c2576000805460ff1961ff0019909116610100171660011790558015612efc576000805461ff001916905550565b613ff8826125e8565b6140335760405162461bcd60e51b815260040180806020018281038252602c815260200180614ea4602c913960400191505060405180910390fd5b600082815261083c60209081526040909120825161129e92840190614996565b60006001600160e01b031982167f40c1a0640000000000000000000000000000000000000000000000000000000014806140b657506001600160e01b031982167fec5f752e00000000000000000000000000000000000000000000000000000000145b156140c357506001611129565b611126826144b4565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156141a0578354600019808301919081019060009087908390811061411757fe5b906000526020600020015490508087600001848154811061413457fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061416457fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611441565b6000915050611441565b60006141b683836140cc565b6141ec57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611441565b506000611441565b6000828152600184016020526040812054806142595750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556125c1565b8285600001600183038154811061426c57fe5b90600052602060002090600202016001018190555060009150506125c1565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156142ec5760405162461bcd60e51b8152600401808060200182810382526022815260200180614c6f6022913960400191505060405180910390fd5b8360ff16601b148061430157508360ff16601c145b61433c5760405162461bcd60e51b8152600401808060200182810382526022815260200180614e026022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614398573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611412576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b3360009081526114216020908152604080832084845261083c9092529182902091518254919291819083906002600019610100600184161502019091160480156144815780601f1061445f576101008083540402835291820191614481565b820191906000526020600020905b81548152906001019060200180831161446d575b50509283525050604051908190036020019020805460ff19169055612efc81614561565b606061271d8484600085614594565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061451757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061454b57506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b1561455857506001611129565b611126826146ef565b6000818152610c4f60205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055612efc81614734565b6060824710156145d55760405162461bcd60e51b8152600401808060200182810382526026815260200180614c916026913960400191505060405180910390fd5b6145de85613921565b61462f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061466d5780518252601f19909201916020918201910161464e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146146cf576040519150601f19603f3d011682016040523d82523d6000602084013e6146d4565b606091505b50915091506146e4828286614805565b979650505050505050565b60006001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000141561472b57506001611129565b6111268261486b565b600061473f82611758565b905061474d8160008461129e565b6147586000836125fa565b600082815261083c6020526040902054600260001961010060018416150201909116041561479857600082815261083c6020526040812061479891614a22565b6001600160a01b0381166000908152610835602052604090206147bb90836138f3565b506147c86108368361489d565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606083156148145750816125c1565b8251156148245782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315613d3f578181015183820152602001613d27565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b600061143e8383600081815260018301602052604081205480156141a057835460001980830191908101906000908790839081106148d757fe5b90600052602060002090600202019050808760000184815481106148f757fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061493657fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506114419350505050565b60405180604001604052806002906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826149cc5760008555614a12565b82601f106149e557805160ff1916838001178555614a12565b82800160010185558215614a12579182015b82811115614a125782518255916020019190600101906149f7565b50614a1e929150614a62565b5090565b50805460018160011615610100020316600290046000825580601f10614a485750612efc565b601f016020900490600052602060002090810190612efc91905b5b80821115614a1e5760008155600101614a6356fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734e465437323143726561746f723a20546f6b656e20776173206e6f7420637265617465642062792074686520676976656e20616464726573734552433732314d657461646174613a20517565727920666f72206e6f6e6578697374656e7420746f6b656e4163636f756e744d6967726174696f6e3a205369676e6174757265206d7573742062652066726f6d20746865206f726967696e616c206163636f756e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724e46543732314d657461646174613a204e46542077617320616c7265616479206d696e7465644920617574686f72697a6520466f756e646174696f6e20746f206d696772617465206d79206163636f756e7420746f20466f756e646174696f6e54726561737572794e6f64653a2041646472657373206973206e6f74206120636f6e74726163744e465437323143726561746f723a2043616c6c6572206973206e6f742063726561746f724e465437323150726f787943616c6c3a20616464726573732072657475726e6564206973206e6f74206120636f6e74726163744552433732313a207472616e7366657220746f20746865207a65726f206164647265737345434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e466f756e646174696f6e41646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4e46543732314d61726b65743a204d61726b65742061646472657373206973206e6f74206120636f6e74726163744552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656445434453413a20696e76616c6964207369676e6174757265202776272076616c7565456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734e46543732314d696e743a20746f6b656e43726561746f725061796d656e74416464726573732069732072657175697265644552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4e46543732314d657461646174613a20496e76616c6964204950465320706174684552433732313a20617070726f76616c20746f2063757272656e74206f776e65724e465437323143726561746f723a205061796d656e742061646472657373206973206e6f74207468652065787065637465642076616c75654552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644e465437323143726561746f723a2043616c6c657220646f6573206e6f74206f776e20746865204e46544163636f756e744d6967726174696f6e3a2043616e6e6f74206d69677261746520746f207468652073616d65206163636f756e7442797465733a20446174612070726f766964656420646f6573206e6f7420696e636c75646520746865206578706563746564416464726573734163636f756e744d6967726174696f6e3a2043616c6c6572206973206e6f7420616e206f70657261746f72a26469706673582212202be8644bcaed4b289e16092fec449207e74e38ac37f3e1d6fac99428a94e804464736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c80636c0360eb1161017b578063c4d66de8116100d8578063dac28cce1161008c578063ec5f752e11610071578063ec5f752e14610fb8578063edf9f57d14610fd5578063f7a2da2314611113576102ad565b8063dac28cce14610f6d578063e985e9c514610f8a576102ad565b8063caa0f92a116100bd578063caa0f92a14610e0e578063d2c0fa5a14610e16578063d85d3d2714610ec7576102ad565b8063c4d66de814610dcb578063c87b56dd14610df1576102ad565b8063a22cb4651161012f578063b88d4fde11610114578063b88d4fde14610c86578063b9c4d9fb14610d4c578063bb3bafd614610d69576102ad565b8063a22cb46514610b97578063a2805dcb14610bc5576102ad565b806384f4e5c01161016057806384f4e5c0146109ac57806389ca8b7114610ad957806395d89b4114610b8f576102ad565b80636c0360eb1461097e57806370a0823114610986576102ad565b80633d78bede116102295780634f6ccce7116101dd57806358f05b93116101c257806358f05b93146108a8578063605eb5f5146109595780636352211e14610961576102ad565b80634f6ccce7146107e55780635174e85314610802576102ad565b806340c1a0641161020e57806340c1a0641461077557806342842e0e1461079257806342966c68146107c8576102ad565b80633d78bede146105f85780633fd7ca411461076d576102ad565b80630ebd4c7f1161028057806323b872dd1161026557806323b872dd1461045857806329f87c381461048e5780632f745c59146105cc576102ad565b80630ebd4c7f146103d157806318160ddd1461043e576102ad565b806301ffc9a7146102b257806306fdde03146102ed578063081812fc1461036a578063095ea7b3146103a3575b600080fd5b6102d9600480360360208110156102c857600080fd5b50356001600160e01b03191661111b565b604080519115158252519081900360200190f35b6102f561112e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032f578181015183820152602001610317565b50505050905090810190601f16801561035c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103876004803603602081101561038057600080fd5b5035611165565b604080516001600160a01b039092168252519081900360200190f35b6103cf600480360360408110156103b957600080fd5b506001600160a01b0381351690602001356111c8565b005b6103ee600480360360208110156103e757600080fd5b50356112a3565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561042a578181015183820152602001610412565b505050509050019250505060405180910390f35b610446611390565b60408051918252519081900360200190f35b6103cf6004803603606081101561046e57600080fd5b506001600160a01b038135811691602081013590911690604001356113a2565b610446600480360360608110156104a457600080fd5b8101906020810181356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b0385351695909490935060408101925060200135905064010000000081111561055757600080fd5b82018360208201111561056957600080fd5b8035906020019184600183028401116401000000008311171561058b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506113f9945050505050565b610446600480360360408110156105e257600080fd5b506001600160a01b03813516906020013561141b565b6103cf600480360360e081101561060e57600080fd5b81019060208101813564010000000081111561062957600080fd5b82018360208201111561063b57600080fd5b8035906020019184602083028401116401000000008311171561065d57600080fd5b919390926001600160a01b038335169260408101906020013564010000000081111561068857600080fd5b82018360208201111561069a57600080fd5b803590602001918460018302840111640100000000831117156106bc57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435956001600160a01b03602087013581169660408101359091169550919350915060808101906060013564010000000081111561072e57600080fd5b82018360208201111561074057600080fd5b8035906020019184600183028401116401000000008311171561076257600080fd5b509092509050611447565b6103876115fe565b6103876004803603602081101561078b57600080fd5b503561160e565b6103cf600480360360608110156107a857600080fd5b506001600160a01b0381358116916020810135909116906040013561162a565b6103cf600480360360208110156107de57600080fd5b5035611645565b610446600480360360208110156107fb57600080fd5b50356116f9565b6104466004803603602081101561081857600080fd5b81019060208101813564010000000081111561083357600080fd5b82018360208201111561084557600080fd5b8035906020019184600183028401116401000000008311171561086757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611710945050505050565b610446600480360360408110156108be57600080fd5b8101906020810181356401000000008111156108d957600080fd5b8201836020820111156108eb57600080fd5b8035906020019184600183028401116401000000008311171561090d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061172f9050565b610387611748565b6103876004803603602081101561097757600080fd5b5035611758565b6102f5611781565b6104466004803603602081101561099c57600080fd5b50356001600160a01b0316611818565b6103cf600480360360a08110156109c257600080fd5b8101906020810181356401000000008111156109dd57600080fd5b8201836020820111156109ef57600080fd5b80359060200191846020830284011164010000000083111715610a1157600080fd5b919390929091602081019035640100000000811115610a2f57600080fd5b820183602082011115610a4157600080fd5b80359060200191846020830284011164010000000083111715610a6357600080fd5b919390926001600160a01b0383358116936020810135909116929190606081019060400135640100000000811115610a9a57600080fd5b820183602082011115610aac57600080fd5b80359060200191846001830284011164010000000083111715610ace57600080fd5b509092509050611881565b6102d960048036036040811015610aef57600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610b1a57600080fd5b820183602082011115610b2c57600080fd5b80359060200191846001830284011164010000000083111715610b4e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611b45945050505050565b6102f5611bc9565b6103cf60048036036040811015610bad57600080fd5b506001600160a01b0381351690602001351515611c00565b6103cf60048036036060811015610bdb57600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846001830284011164010000000083111715610c3a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611d069050565b6103cf60048036036080811015610c9c57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610cd757600080fd5b820183602082011115610ce957600080fd5b80359060200191846001830284011164010000000083111715610d0b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d64945050505050565b6103ee60048036036020811015610d6257600080fd5b5035611dc2565b610d8660048036036020811015610d7f57600080fd5b5035611e93565b6040518083600260200280838360005b83811015610dae578181015183820152602001610d96565b505086519290940191825250915083905060408083836020610412565b6103cf60048036036020811015610de157600080fd5b50356001600160a01b0316611fb3565b6102f560048036036020811015610e0757600080fd5b503561206e565b610446612317565b61044660048036036040811015610e2c57600080fd5b810190602081018135640100000000811115610e4757600080fd5b820183602082011115610e5957600080fd5b80359060200191846001830284011164010000000083111715610e7b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061231e9050565b61044660048036036020811015610edd57600080fd5b810190602081018135640100000000811115610ef857600080fd5b820183602082011115610f0a57600080fd5b80359060200191846001830284011164010000000083111715610f2c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061237a945050505050565b6102f560048036036020811015610f8357600080fd5b503561249b565b6102d960048036036040811015610fa057600080fd5b506001600160a01b038135811691602001351661253d565b61038760048036036020811015610fce57600080fd5b503561256c565b61044660048036036060811015610feb57600080fd5b81019060208101813564010000000081111561100657600080fd5b82018360208201111561101857600080fd5b8035906020019184600183028401116401000000008311171561103a57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b0385351695909490935060408101925060200135905064010000000081111561109e57600080fd5b8201836020820111156110b057600080fd5b803590602001918460018302840111640100000000831117156110d257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506125a7945050505050565b6103876125c8565b6000611126826125dd565b90505b919050565b60408051808201909152600a81527f466f756e646174696f6e00000000000000000000000000000000000000000000602082015290565b6000611170826125e8565b6111ab5760405162461bcd60e51b815260040180806020018281038252602c815260200180614e78602c913960400191505060405180910390fd5b50600090815261083860205260409020546001600160a01b031690565b60006111d382611758565b9050806001600160a01b0316836001600160a01b031614156112265760405162461bcd60e51b8152600401808060200182810382526021815260200180614f496021913960400191505060405180910390fd5b806001600160a01b03166112386125f6565b6001600160a01b031614806112595750611259816112546125f6565b61253d565b6112945760405162461bcd60e51b8152600401808060200182810382526038815260200180614d1b6038913960400191505060405180910390fd5b61129e83836125fa565b505050565b606060008061103860009054906101000a90046001600160a01b03166001600160a01b0316635fbbc0d26040518163ffffffff1660e01b815260040160606040518083038186803b1580156112f757600080fd5b505afa15801561130b573d6000803e3d6000fd5b505050506040513d606081101561132157600080fd5b50602081015160409182015182516002808252606082019094529194509250600091816020016020820280368337019050509050828160008151811061136357fe5b602002602001018181525050818160018151811061137d57fe5b6020908102919091010152949350505050565b600061139d610836612676565b905090565b6113b36113ad6125f6565b82612681565b6113ee5760405162461bcd60e51b8152600401808060200182810382526031815260200180614fa26031913960400191505060405180910390fd5b61129e838383612725565b6000806114068484612874565b9050611412858261231e565b95945050505050565b6001600160a01b03821660009081526108356020526040812061143e90836129c3565b90505b92915050565b838383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061148992506129cf915050565b6114c45760405162461bcd60e51b815260040180806020018281038252602b81526020018061506a602b913960400191505060405180910390fd5b816001600160a01b0316836001600160a01b031614156115155760405162461bcd60e51b8152600401808060200182810382526034815260200180614ffd6034913960400191505060405180910390fd5b600061159861152384612a56565b604051602001806030614b93823960300182805190602001908083835b6020831061155f5780518252601f199092019160209182019101611540565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052612bbc565b90506115a5848284612cae565b6115e05760405162461bcd60e51b815260040180806020018281038252603d815260200180614afe603d913960400191505060405180910390fd5b6115ef8d8d8d8d8d8d8d612ddd565b50505050505050505050505050565b611038546001600160a01b031690565b6000908152610c4f60205260409020546001600160a01b031690565b61129e83838360405180602001604052806000815250611d64565b6000818152610c4f602052604090205481906001600160a01b0316331461169d5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bf46024913960400191505060405180910390fd5b336116a782611758565b6001600160a01b0316146116ec5760405162461bcd60e51b815260040180806020018281038252602a815260200180614fd3602a913960400191505060405180910390fd5b6116f582612ef3565b5050565b60008061170861083684612eff565b509392505050565b600061171b8261237a565b90506111296117286115fe565b6001611c00565b600061173b838361231e565b90506114416117286115fe565b610beb546001600160a01b031690565b600061112682604051806060016040528060298152602001614dab602991396108369190612f1b565b61083d8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561180e5780601f106117e35761010080835404028352916020019161180e565b820191906000526020600020905b8154815290600101906020018083116117f157829003601f168201915b5050505050905090565b60006001600160a01b03821661185f5760405162461bcd60e51b815260040180806020018281038252602a815260200180614d81602a913960400191505060405180910390fd5b6001600160a01b03821660009081526108356020526040902061112690612676565b838383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118c392506129cf915050565b6118fe5760405162461bcd60e51b815260040180806020018281038252602b81526020018061506a602b913960400191505060405180910390fd5b816001600160a01b0316836001600160a01b0316141561194f5760405162461bcd60e51b8152600401808060200182810382526034815260200180614ffd6034913960400191505060405180910390fd5b600061195d61152384612a56565b905061196a848284612cae565b6119a55760405162461bcd60e51b815260040180806020018281038252603d815260200180614afe603d913960400191505060405180910390fd5b60005b89811015611a505760008b8b838181106119be57fe5b9050602002013590506119d0816125e8565b80156119f55750896001600160a01b03166119ea82611758565b6001600160a01b0316145b15611a4757611a058a8a83612725565b886001600160a01b03168a6001600160a01b0316827fde55f075ebd46256cd6bd57d8fb53e0406f687db372e90ae8c18e72be46f5c1660405160405180910390a45b506001016119a8565b5060005b8b8110156115ef5760008d8d83818110611a6a57fe5b602090810292909201356000818152610c4f909352604090922054919250506001600160a01b031615611b3c576000818152610c4f60205260409020546001600160a01b038b8116911614611af05760405162461bcd60e51b8152600401808060200182810382526039815260200180614a9a6039913960400191505060405180910390fd5b611afa818a612f28565b886001600160a01b03168a6001600160a01b0316827f58120fb31972ff9fad76eb87119474a58fc38d6b9b842bb3067a4a329eaa64f660405160405180910390a45b50600101611a54565b6001600160a01b038216600090815261142160209081526040808320905184519192859282918401908083835b60208310611b915780518252601f199092019160209182019101611b72565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff1695945050505050565b60408051808201909152600381527f464e440000000000000000000000000000000000000000000000000000000000602082015290565b611c086125f6565b6001600160a01b0316826001600160a01b03161415611c6e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806108396000611c7c6125f6565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611cc06125f6565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b611d0e612fab565b611d495760405162461bcd60e51b8152600401808060200182810382526038815260200180614ce36038913960400191505060405180910390fd5b611d5283613001565b611d5b826130a6565b61129e8161314b565b611d75611d6f6125f6565b83612681565b611db05760405162461bcd60e51b8152600401808060200182810382526031815260200180614fa26031913960400191505060405180910390fd5b611dbc848484846131a3565b50505050565b6060611dcd826125e8565b611e085760405162461bcd60e51b815260040180806020018281038252602b815260200180614ad3602b913960400191505060405180910390fd5b604080516002808252606082018352600092602083019080368337019050509050611e316125c8565b81600081518110611e3e57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611e678361256c565b81600181518110611e7457fe5b6001600160a01b03909216602092830291909101909101529050919050565b611e9b614978565b611ea3614978565b611eac836125e8565b611ee75760405162461bcd60e51b815260040180806020018281038252602b815260200180614ad3602b913960400191505060405180910390fd5b611eef6125c8565b6001600160a01b03168252611f038361256c565b6001600160a01b03908116602084015261103854604080517f5fbbc0d2000000000000000000000000000000000000000000000000000000008152905160009384931691635fbbc0d2916004808301926060929190829003018186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d6060811015611f9657600080fd5b506020818101516040909201519185528401525091939092509050565b600054610100900460ff1680611fcc5750611fcc6131f5565b80611fda575060005460ff16155b6120155760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015612040576000805460ff1961ff0019909116610100171660011790555b61204982613206565b61205161332d565b6120596133d6565b80156116f5576000805461ff00191690555050565b6060612079826125e8565b6120b45760405162461bcd60e51b815260040180806020018281038252602f815260200180614ef9602f913960400191505060405180910390fd5b600082815261083c602090815260408083208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156121485780601f1061211d57610100808354040283529160200191612148565b820191906000526020600020905b81548152906001019060200180831161212b57829003601f168201915b505061083d5493945050505060026000196101006001841615020190911604612172579050611129565b8051156122445761083d8160405160200180838054600181600116156101000203166002900480156121db5780601f106121b95761010080835404028352918201916121db565b820191906000526020600020905b8154815290600101906020018083116121c7575b5050825160208401908083835b602083106122075780518252601f1990920191602091820191016121e8565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050611129565b61083d6122508461347d565b60405160200180838054600181600116156101000203166002900480156122ae5780601f1061228c5761010080835404028352918201916122ae565b820191906000526020600020905b81548152906001019060200180831161229a575b5050825160208401908083835b602083106122da5780518252601f1990920191602091820191016122bb565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b6118095490565b60006001600160a01b0382166123655760405162461bcd60e51b8152600401808060200182810382526032815260200180614e466032913960400191505060405180910390fd5b61236e8361237a565b90506114418183613558565b61180980546001810190915561239033826135db565b61239a8133612f28565b6123a4818361370b565b816040518082805190602001908083835b602083106123d45780518252601f1990920191602091820191016123b5565b51815160209384036101000a600019018019909216911617905260408051929094018290038220818352885183830152885190965087955033947fe2406cfd356cfbe4e42d452bde96d27f48c423e5f02b5d78695893308399519d94508993928392918301919085019080838360005b8381101561245c578181015183820152602001612444565b50505050905090810190601f1680156124895780820380516001836020036101000a031916815260200191505b509250505060405180910390a4919050565b600081815261083c602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156125315780601f1061250657610100808354040283529160200191612531565b820191906000526020600020905b81548152906001019060200180831161251457829003601f168201915b50505050509050919050565b6001600160a01b0391821660009081526108396020908152604080832093909416825291909152205460ff1690565b6000818152610c5060205260409020546001600160a01b03168061112957506000908152610c4f60205260409020546001600160a01b031690565b60006125b48484846113f9565b90506125c16117286115fe565b9392505050565b6000546201000090046001600160a01b031690565b60006111268261389e565b6000611126610836836138e3565b3390565b600081815261083860205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061263d82611758565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611126826138ef565b600061268c826125e8565b6126c75760405162461bcd60e51b815260040180806020018281038252602c815260200180614cb7602c913960400191505060405180910390fd5b60006126d283611758565b9050806001600160a01b0316846001600160a01b0316148061270d5750836001600160a01b031661270284611165565b6001600160a01b0316145b8061271d575061271d818561253d565b949350505050565b826001600160a01b031661273882611758565b6001600160a01b03161461277d5760405162461bcd60e51b8152600401808060200182810382526029815260200180614ed06029913960400191505060405180910390fd5b6001600160a01b0382166127c25760405162461bcd60e51b8152600401808060200182810382526024815260200180614c4b6024913960400191505060405180910390fd5b6127cd83838361129e565b6127d86000826125fa565b6001600160a01b0383166000908152610835602052604090206127fb90826138f3565b506001600160a01b03821660009081526108356020526040902061281f90826138ff565b5061282d610836828461390b565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b610beb54604080517fa1453b0e0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830190815260248301938452855160448401528551600095929092169363a1453b0e938893889392916064019060208501908083838c5b838110156128fb5781810151838201526020016128e3565b50505050905090810190601f1680156129285780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561294857600080fd5b505af115801561295c573d6000803e3d6000fd5b505050506040513d602081101561297257600080fd5b505190506129886001600160a01b038216613921565b6114415760405162461bcd60e51b8152600401808060200182810382526033815260200180614c186033913960400191505060405180910390fd5b600061143e8383613927565b60006129d96125c8565b6001600160a01b0316636d70f7ae336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a2557600080fd5b505afa158015612a39573d6000803e3d6000fd5b505050506040513d6020811015612a4f57600080fd5b5051905090565b60408051602a808252606082810190935260009190602082018180368337019050509050600360fc1b81600081518110612a8c57fe5b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ad157fe5b60200101906001600160f81b031916908160001a90535060005b6014811015612bb55760008160130360080260020a856001600160a01b031681612b1157fe5b0460f81b9050600060108260f81c60ff1681612b2957fe5b0460f81b905060008160f81c6010028360f81c0360f81b9050612b4b8261398b565b858560020260020181518110612b5d57fe5b60200101906001600160f81b031916908160001a905350612b7d8161398b565b858560020260030181518110612b8f57fe5b60200101906001600160f81b031916908160001a9053505060019092019150612aeb9050565b5092915050565b6000612bc882516139bc565b8260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310612c235780518252601f199092019160209182019101612c04565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612c6b5780518252601f199092019160209182019101612c4c565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000612cb984613921565b15612db85760408051630b135d3f60e11b815260048101858152602482019283528451604483015284516001600160a01b03881693631626ba7e938893889390929160640190602085019080838360005b83811015612d22578181015183820152602001612d0a565b50505050905090810190601f168015612d4f5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612d6d57600080fd5b505afa925050508015612d9257506040513d6020811015612d8d57600080fd5b505160015b612d9e575060006125c1565b6001600160e01b031916630b135d3f60e11b1490506125c1565b836001600160a01b0316612dcc8484613a8e565b6001600160a01b03161490506125c1565b6000612de98686612874565b9050612df785858585613b0e565b6000612e038787612874565b905060005b88811015612ee75760008a8a83818110612e1e57fe5b602090810292909201356000818152610c50909352604090922054919250506001600160a01b03858116911614612e865760405162461bcd60e51b8152600401808060200182810382526038815260200180614f6a6038913960400191505060405180910390fd5b612e908184613558565b604080516001600160a01b0386811682528581166020830152825181891693918a169285927f806ccd3ad4c360726b134c8c9d1ce9842006fbcf915e66449802d74b608bed8492918290030190a450600101612e08565b50505050505050505050565b612efc81613c5b565b50565b6000808080612f0e8686613c64565b9097909650945050505050565b600061271d848484613cdf565b6000828152610c4f602052604080822054905184926001600160a01b038086169316917febd529444fe852bfccb40075e8f8cae7612ea20edebdf5143c72718ccb157f759190a46000918252610c4f6020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6000612fb56125c8565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a2557600080fd5b613013816001600160a01b0316613921565b61304e5760405162461bcd60e51b815260040180806020018281038252602e815260200180614d53602e913960400191505060405180910390fd5b611038805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f07e7630580d612127ff5f3bd98a1ef992bb87b379fef3b98f2e2ca1ad8e27dd890600090a250565b6130af81613da9565b7f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561310e5781810151838201526020016130f6565b50505050905090810190601f16801561313b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b610beb805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f7213e3d637e4ef4968f947d5f602103307355f708bfd5bfce9d87da7c78f852190600090a250565b6131ae848484612725565b6131ba84848484613dbd565b611dbc5760405162461bcd60e51b8152600401808060200182810382526032815260200180614b3b6032913960400191505060405180910390fd5b600061320030613921565b15905090565b600054610100900460ff168061321f575061321f6131f5565b8061322d575060005460ff16155b6132685760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015613293576000805460ff1961ff0019909116610100171660011790555b6132a5826001600160a01b0316613921565b6132e05760405162461bcd60e51b8152600401808060200182810382526031815260200180614bc36031913960400191505060405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b0385160217905580156116f5576000805461ff00191690555050565b600054610100900460ff168061334657506133466131f5565b80613354575060005460ff16155b61338f5760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff161580156133ba576000805460ff1961ff0019909116610100171660011790555b6133c2613f4f565b8015612efc576000805461ff001916905550565b600054610100900460ff16806133ef57506133ef6131f5565b806133fd575060005460ff16155b6134385760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff16158015613463576000805460ff1961ff0019909116610100171660011790555b6001611809558015612efc576000805461ff001916905550565b6060816134a257506040805180820190915260018152600360fc1b6020820152611129565b8160005b81156134ba57600101600a820491506134a6565b60008167ffffffffffffffff811180156134d357600080fd5b506040519080825280601f01601f1916602001820160405280156134fe576020820181803683370190505b50859350905060001982015b831561354f57600a840660300160f81b8282806001900393508151811061352d57fe5b60200101906001600160f81b031916908160001a905350600a8404935061350a565b50949350505050565b6000828152610c50602052604080822054905184926001600160a01b038086169316917f296490d14aadeb9208962e029edf126e34fe835b4ed9dc8c91602df4d04766959190a46000918252610c506020526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b6001600160a01b038216613636576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61363f816125e8565b15613691576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61369d6000838361129e565b6001600160a01b0382166000908152610835602052604090206136c090826138ff565b506136ce610836828461390b565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b602e8151101561374c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614f286021913960400191505060405180910390fd5b33600090815261142160209081526040918290209151835184928291908401908083835b6020831061378f5780518252601f199092019160209182019101613770565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff161591506137fe90505760405162461bcd60e51b8152600401808060200182810382526026815260200180614b6d6026913960400191505060405180910390fd5b60016114216000336001600160a01b03166001600160a01b03168152602001908152602001600020826040518082805190602001908083835b602083106138565780518252601f199092019160209182019101613837565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff191693151593909317909255506116f590508282613fef565b60006001600160e01b031982167fbb3bafd60000000000000000000000000000000000000000000000000000000014156138da57506001611129565b61112682614053565b600061143e83836140cc565b5490565b600061143e83836140e4565b600061143e83836141aa565b600061271d84846001600160a01b0385166141f4565b3b151590565b815460009082106139695760405162461bcd60e51b8152600401808060200182810382526022815260200180614a786022913960400191505060405180910390fd5b82600001828154811061397857fe5b9060005260206000200154905092915050565b6000600a60f883901c10156139ab578160f81c60300160f81b9050611129565b8160f81c60570160f81b9050611129565b6060816139e157506040805180820190915260018152600360fc1b6020820152611129565b8160005b81156139f957600101600a820491506139e5565b60008167ffffffffffffffff81118015613a1257600080fd5b506040519080825280601f01601f191660200182016040528015613a3d576020820181803683370190505b50859350905060001982015b831561354f57600a840660300160f81b82828060019003935081518110613a6c57fe5b60200101906001600160f81b031916908160001a905350600a84049350613a49565b60008151604114613ae6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a613b048682858561428b565b9695505050505050565b60408051606084811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020840152835160148185030181526034840185529185901b16605483015282518083036048018152606890920190925260005b6014811015613c525760008187019050838281518110613b8b57fe5b602001015160f81c60f81b6001600160f81b031916888281518110613bac57fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001614613c0f5760405162461bcd60e51b81526004018080602001828103825260398152602001806150316039913960400191505060405180910390fd5b828281518110613c1b57fe5b602001015160f81c60f81b888281518110613c3257fe5b60200101906001600160f81b031916908160001a90535050600101613b6f565b50505050505050565b612efc81614400565b815460009081908310613ca85760405162461bcd60e51b8152600401808060200182810382526022815260200180614e246022913960400191505060405180910390fd5b6000846000018481548110613cb957fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281613d7a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613d3f578181015183820152602001613d27565b50505050905090810190601f168015613d6c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110613d8d57fe5b9060005260206000209060020201600101549150509392505050565b80516116f59061083d906020840190614996565b6000613dd1846001600160a01b0316613921565b613ddd5750600161271d565b6000613f15630a85bd0160e11b613df26125f6565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613e59578181015183820152602001613e41565b50505050905090810190601f168015613e865780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001614b3b603291396001600160a01b03881691906144a5565b90506000818060200190516020811015613f2e57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b600054610100900460ff1680613f685750613f686131f5565b80613f76575060005460ff16155b613fb15760405162461bcd60e51b815260040180806020018281038252602e815260200180614dd4602e913960400191505060405180910390fd5b600054610100900460ff161580156133c2576000805460ff1961ff0019909116610100171660011790558015612efc576000805461ff001916905550565b613ff8826125e8565b6140335760405162461bcd60e51b815260040180806020018281038252602c815260200180614ea4602c913960400191505060405180910390fd5b600082815261083c60209081526040909120825161129e92840190614996565b60006001600160e01b031982167f40c1a0640000000000000000000000000000000000000000000000000000000014806140b657506001600160e01b031982167fec5f752e00000000000000000000000000000000000000000000000000000000145b156140c357506001611129565b611126826144b4565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156141a0578354600019808301919081019060009087908390811061411757fe5b906000526020600020015490508087600001848154811061413457fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061416457fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611441565b6000915050611441565b60006141b683836140cc565b6141ec57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611441565b506000611441565b6000828152600184016020526040812054806142595750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556125c1565b8285600001600183038154811061426c57fe5b90600052602060002090600202016001018190555060009150506125c1565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156142ec5760405162461bcd60e51b8152600401808060200182810382526022815260200180614c6f6022913960400191505060405180910390fd5b8360ff16601b148061430157508360ff16601c145b61433c5760405162461bcd60e51b8152600401808060200182810382526022815260200180614e026022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614398573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611412576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b3360009081526114216020908152604080832084845261083c9092529182902091518254919291819083906002600019610100600184161502019091160480156144815780601f1061445f576101008083540402835291820191614481565b820191906000526020600020905b81548152906001019060200180831161446d575b50509283525050604051908190036020019020805460ff19169055612efc81614561565b606061271d8484600085614594565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061451757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061454b57506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b1561455857506001611129565b611126826146ef565b6000818152610c4f60205260409020805473ffffffffffffffffffffffffffffffffffffffff19169055612efc81614734565b6060824710156145d55760405162461bcd60e51b8152600401808060200182810382526026815260200180614c916026913960400191505060405180910390fd5b6145de85613921565b61462f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061466d5780518252601f19909201916020918201910161464e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146146cf576040519150601f19603f3d011682016040523d82523d6000602084013e6146d4565b606091505b50915091506146e4828286614805565b979650505050505050565b60006001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000141561472b57506001611129565b6111268261486b565b600061473f82611758565b905061474d8160008461129e565b6147586000836125fa565b600082815261083c6020526040902054600260001961010060018416150201909116041561479857600082815261083c6020526040812061479891614a22565b6001600160a01b0381166000908152610835602052604090206147bb90836138f3565b506147c86108368361489d565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606083156148145750816125c1565b8251156148245782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315613d3f578181015183820152602001613d27565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b600061143e8383600081815260018301602052604081205480156141a057835460001980830191908101906000908790839081106148d757fe5b90600052602060002090600202019050808760000184815481106148f757fe5b60009182526020808320845460029093020191825560019384015491840191909155835482528983019052604090209084019055865487908061493657fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506114419350505050565b60405180604001604052806002906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826149cc5760008555614a12565b82601f106149e557805160ff1916838001178555614a12565b82800160010185558215614a12579182015b82811115614a125782518255916020019190600101906149f7565b50614a1e929150614a62565b5090565b50805460018160011615610100020316600290046000825580601f10614a485750612efc565b601f016020900490600052602060002090810190612efc91905b5b80821115614a1e5760008155600101614a6356fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734e465437323143726561746f723a20546f6b656e20776173206e6f7420637265617465642062792074686520676976656e20616464726573734552433732314d657461646174613a20517565727920666f72206e6f6e6578697374656e7420746f6b656e4163636f756e744d6967726174696f6e3a205369676e6174757265206d7573742062652066726f6d20746865206f726967696e616c206163636f756e744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724e46543732314d657461646174613a204e46542077617320616c7265616479206d696e7465644920617574686f72697a6520466f756e646174696f6e20746f206d696772617465206d79206163636f756e7420746f20466f756e646174696f6e54726561737572794e6f64653a2041646472657373206973206e6f74206120636f6e74726163744e465437323143726561746f723a2043616c6c6572206973206e6f742063726561746f724e465437323150726f787943616c6c3a20616464726573732072657475726e6564206973206e6f74206120636f6e74726163744552433732313a207472616e7366657220746f20746865207a65726f206164647265737345434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e466f756e646174696f6e41646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c654552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4e46543732314d61726b65743a204d61726b65742061646472657373206973206e6f74206120636f6e74726163744552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656445434453413a20696e76616c6964207369676e6174757265202776272076616c7565456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734e46543732314d696e743a20746f6b656e43726561746f725061796d656e74416464726573732069732072657175697265644552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4e46543732314d657461646174613a20496e76616c6964204950465320706174684552433732313a20617070726f76616c20746f2063757272656e74206f776e65724e465437323143726561746f723a205061796d656e742061646472657373206973206e6f74207468652065787065637465642076616c75654552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644e465437323143726561746f723a2043616c6c657220646f6573206e6f74206f776e20746865204e46544163636f756e744d6967726174696f6e3a2043616e6e6f74206d69677261746520746f207468652073616d65206163636f756e7442797465733a20446174612070726f766964656420646f6573206e6f7420696e636c75646520746865206578706563746564416464726573734163636f756e744d6967726174696f6e3a2043616c6c6572206973206e6f7420616e206f70657261746f72a26469706673582212202be8644bcaed4b289e16092fec449207e74e38ac37f3e1d6fac99428a94e804464736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.