Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
293 eNouns
Holders
291
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 eNounsLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ENouns
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import { ERC721K } from "./ERC721K.sol"; import { ERC721Storage } from "./ERC721Storage.sol"; import { ENounsRender } from "./ENounsRender.sol"; import { NameEncoder } from "./libraries/NameEncoder.sol"; import { IENSReverseRecords } from "./interfaces/IENSReverseRecords.sol"; /** * @title eNouns * @author Kames Geraghty * @notice Ethereum Noun System; one Noun for every Primary ENS Name. */ contract ENouns is ERC721K { using NameEncoder for string; /// @notice ENSReverseRecords instance address private _ensReverseRecords; /// @notice Reverse lookup of a tokenId using the owner address mapping(address => uint256) private _userToTokenId; /// @notice TokenID mapped to ENS domain node i.e. Nouns seedEntropy mapping(uint256 => bytes32) internal _tokenIdToEnsNode; /// @notice ENS node mapped to Owner address mapping(bytes32 => address) internal _ensReverseRecordsMap; event EnsReverseRecordsUpdated(address ensReverseRecords); /** * @notice ENouns Construction * @param name string - Name of ERC721 token * @param symbol string - Symbol of ERC721 token * @param erc721Storage address - ERC721Storage instance * @param ensReverseRecords address - ENSReverseRecords instance */ constructor( string memory name, string memory symbol, address erc721Storage, address ensReverseRecords ) ERC721K(name, symbol, erc721Storage) { _ensReverseRecords = ensReverseRecords; } receive() external payable { _checkAndIssue(_msgSender()); } /* ===================================================================================== */ /* External Functions */ /* ===================================================================================== */ function getEnsReverseRecords() external view returns (address) { return _ensReverseRecords; } function getId(address user) external view returns (uint256) { return _userToTokenId[user]; } function isOwner(address user) external view returns (bool) { return _userToTokenId[user] > 0 ? true : false; } function preview(address user) external view returns (string memory) { return ENounsRender(ERC721Storage(_erc721Storage).getSvgRender()).renderUsingAddress(user); } function previewUsingEnsName(string memory name) external view returns (string memory) { return ENounsRender(ERC721Storage(_erc721Storage).getSvgRender()).renderUsingEnsName(name); } function claim() external payable { _checkAndIssue(_msgSender()); } function setEnsReverseRecords(address _ensReverseRecords) external onlyOwner { _ensReverseRecords = _ensReverseRecords; emit EnsReverseRecordsUpdated(_ensReverseRecords); } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { if (from == address(0)) { _issue(to, ++_idCounter); } else { require(balanceOf(to) == 0, "ENouns:current-holder"); _reissue(from, to, tokenId); } } function withdraw(uint256 amount) external onlyOwner { (bool _success, ) = _msgSender().call{ value: amount }(""); require(_success, "ENouns:uh-oh"); } /* ===================================================================================== */ /* Internal Functions */ /* ===================================================================================== */ function _checkAndIssue(address _sender) internal { if (balanceOf(_sender) == 0) { unchecked { _issue(_sender, ++_idCounter); /// @dev 🤯 } } else { revert("ENouns:prev-issued"); } } function _tokenData(uint256 tokenId) internal view virtual override returns (bytes memory, bytes memory) { bytes memory ensNode = bytes(abi.encode(_tokenIdToEnsNode[tokenId])); bytes memory ownerEncoded_ = bytes(abi.encode(ownerOf(tokenId))); return (ensNode, ownerEncoded_); } function _encodeName(string memory _name) internal pure returns (bytes32) { (, bytes32 _node) = _name.dnsEncodeName(); return _node; } function _reverseName(address _address) internal view returns (string memory) { address[] memory lookup_ = new address[](1); lookup_[0] = _address; return IENSReverseRecords(_ensReverseRecords).getNames(lookup_)[0]; } function _issue(address _to, uint256 _tokenId) internal returns (uint256) { bytes32 node = _encodeName(_reverseName(_to)); require(node != "", "ENouns:invalid-ens-node"); require(_ensReverseRecordsMap[node] == address(0), "eNouns:prev-issued"); _mint(_to, _tokenId); _userToTokenId[_to] = _tokenId; _tokenIdToEnsNode[_tokenId] = node; _ensReverseRecordsMap[node] = _to; return _tokenId; } function _reissue( address _from, address _to, uint256 _tokenId ) internal returns (uint256) { require(_ensReverseRecordsMap[_encodeName(_reverseName(_to))] == _from, "eNouns:invalid-ens"); bytes32 node = _tokenIdToEnsNode[_tokenId]; _transfer(_from, _to, _tokenId); _userToTokenId[_from] = 0; _userToTokenId[_to] = _tokenId; _ensReverseRecordsMap[node] = _to; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * 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; /** * @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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { NameEncoder } from "./libraries/NameEncoder.sol"; import { IENSReverseRecords } from "./interfaces/IENSReverseRecords.sol"; import { INounsDescriptor } from "./interfaces/INounsDescriptor.sol"; import { INounsSeeder } from "./interfaces/INounsSeeder.sol"; contract ENounsRender is Ownable { using NameEncoder for string; string private constant ENCODING = "data:image/svg+xml;base64,"; /// @notice NounsDescriptor instance address private immutable _nounsDescriptor; /// @notice ENSReverseRecords instance address private immutable _ensReverseRecords; constructor(address nounsDescriptor, address ensReverseRecords) public { _nounsDescriptor = nounsDescriptor; _ensReverseRecords = ensReverseRecords; } /* ===================================================================================== */ /* External Functions */ /* ===================================================================================== */ function render(bytes memory input) external view returns (string memory) { bytes32 _seedEntropy = abi.decode(input, (bytes32)); return string.concat( ENCODING, INounsDescriptor(_nounsDescriptor).generateSVGImage(_generateSeed(uint256(_seedEntropy))) ); } function renderUsingAddress(address user) external view returns (string memory) { return string.concat( ENCODING, INounsDescriptor(_nounsDescriptor).generateSVGImage( _generateSeed(_generateInputFromAddress(user)) ) ); } function renderUsingEnsName(string memory ensName) external view returns (string memory) { return string.concat( ENCODING, INounsDescriptor(_nounsDescriptor).generateSVGImage( _generateSeed(_generateInputFromName(ensName)) ) ); } /* ===================================================================================== */ /* Internal Functions */ /* ===================================================================================== */ function _generateInputFromAddress(address _address) internal view returns (uint256) { string memory toEnsName_ = _reverseName(_address); return uint256(_encodeName(toEnsName_)); } function _generateInputFromSeed(bytes32 _seed) internal view returns (uint256) { return uint256(_seed); } function _generateInputFromName(string memory _ensName) internal pure returns (uint256) { return uint256(_encodeName(_ensName)); } function _encodeName(string memory _name) internal pure returns (bytes32) { (, bytes32 _node) = _name.dnsEncodeName(); return _node; } function _reverseName(address _address) internal view returns (string memory) { address[] memory t = new address[](1); t[0] = _address; return IENSReverseRecords(_ensReverseRecords).getNames(t)[0]; } function _generateSeed(uint256 _pseudorandomness) private view returns (INounsSeeder.Seed memory) { uint256 backgroundCount = INounsDescriptor(_nounsDescriptor).backgroundCount(); uint256 bodyCount = INounsDescriptor(_nounsDescriptor).bodyCount(); uint256 accessoryCount = INounsDescriptor(_nounsDescriptor).accessoryCount(); uint256 headCount = INounsDescriptor(_nounsDescriptor).headCount(); uint256 glassesCount = INounsDescriptor(_nounsDescriptor).glassesCount(); return INounsSeeder.Seed({ background: uint48(uint48(_pseudorandomness) % backgroundCount), body: uint48(uint48(_pseudorandomness >> 48) % bodyCount), accessory: uint48(uint48(_pseudorandomness >> 96) % accessoryCount), head: uint48(uint48(_pseudorandomness >> 144) % headCount), glasses: uint48(uint48(_pseudorandomness >> 192) % glassesCount) }); } function generate(uint256 _tokenId, string memory _alias) public view returns (string memory) { return string(""); } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { ERC721Storage } from "./ERC721Storage.sol"; /** * @title ERC721K * @author Kames Geraghty */ abstract contract ERC721K is ERC721, Ownable { /// @notice ID counter for ERC721 tokens uint256 internal _idCounter; /// @notice ENSReverseRecords instance address internal _erc721Storage; event ERC721StorageUpdated(address erc721Storage); /** * @notice ERC721K Construction * @param name_ string - Name of ERC721 token * @param symbol_ string - Symbol of ERC721 token * @param _erc721Storage_ address - Metadata instance */ constructor( string memory name_, string memory symbol_, address _erc721Storage_ ) ERC721(name_, symbol_) { _erc721Storage = _erc721Storage_; } /* ===================================================================================== */ /* Virtual Functions */ /* ===================================================================================== */ function _tokenData(uint256 tokenId) internal view virtual returns (bytes memory output0_, bytes memory output1_); /* ===================================================================================== */ /* External Functions */ /* ===================================================================================== */ function contractURI() external view returns (string memory) { return ERC721Storage(_erc721Storage).constructContractURI(); } function totalSupply() external view returns (uint256) { return _idCounter; } function getERC721Storage() external view returns (address) { return _erc721Storage; } function tokenURI(uint256 tokenId) public view override returns (string memory) { (bytes memory input0, bytes memory input1) = _tokenData(tokenId); return ERC721Storage(_erc721Storage).constructTokenURI(tokenId, input0, input1); } function setStorage(address erc721Storage) external onlyOwner { _erc721Storage = erc721Storage; emit ERC721StorageUpdated(erc721Storage); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import { Base64 } from "base64-sol/base64.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ISVGRender } from "./interfaces/ISVGRender.sol"; import { ITraitsFetch } from "./interfaces/ITraitsFetch.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; /** * @title ERC721Storage * @author Kames Geraghty */ abstract contract ERC721Storage is Ownable { address internal _svgRender; address internal _traitsFetch; ContractURI internal _contractURI; struct ContractURI { string name; string description; string image; string externalLink; string sellerFeeBasisPoints; string feeRecipient; } event SvgRenderUpdated(address svgRender); event TraitsFetchUpdated(address traitsFetch); event ContractURIUpdated(ContractURI contractURI); constructor( address _svgRender_, address _traitsFetch_, ContractURI memory _contractURI_ ) { _svgRender = _svgRender_; _traitsFetch = _traitsFetch_; _contractURI = _contractURI_; } /* ===================================================================================== */ /* Virtual Functions */ /* ===================================================================================== */ function _parseName(uint256 _tokenId) internal view virtual returns (string memory); function _parseDescription(uint256 _tokenId) internal view virtual returns (string memory); /* ===================================================================================== */ /* External Functions */ /* ===================================================================================== */ function getSvgRender() external view returns (address) { return _svgRender; } function getTraitsFetch() external view returns (address) { return _traitsFetch; } function getContractDescription() external view returns (ContractURI memory) { return _contractURI; } function preview(bytes memory input) external view returns (string memory) { return ISVGRender(_svgRender).render(input); } function constructTokenURI( uint256 tokenId, bytes memory input0, bytes memory input1 ) external view returns (string memory uri) { string memory image_ = ISVGRender(_svgRender).render(input0); string memory traits_ = ITraitsFetch(_traitsFetch).fetch(input1); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( string.concat( '{"name":', '"', _parseName(tokenId), '",', '"description":', '"', _parseDescription(tokenId), '",', '"image":', '"', image_, '",', '"attributes": [', traits_, "]", "}" ) ) ) ) ); } function constructContractURI() external view returns (string memory uri) { return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( string.concat( '{"name":', '"', _contractURI.name, '",', '"description":', '"', _contractURI.description, '",', '"image":', '"', _contractURI.image, '",', '"externalLink":', '"', _contractURI.externalLink, '",', '"sellerFeeBasisPoints":', '"', _contractURI.sellerFeeBasisPoints, '",', '"feeRecipient":', '"', _contractURI.feeRecipient, '"', "}" ) ) ) ) ); } function setSvgRender(address svgRender) external onlyOwner { _svgRender = svgRender; emit SvgRenderUpdated(svgRender); } function setTraitsFetch(address traitsFetch) external onlyOwner { _traitsFetch = traitsFetch; emit TraitsFetchUpdated(traitsFetch); } function setContractURI(ContractURI memory contractURI) external onlyOwner { _contractURI = contractURI; emit ContractURIUpdated(contractURI); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; abstract contract IENSReverseRecords { function getNames(address[] calldata addresses) external view virtual returns (string[] memory r); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for NounsDescriptor /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; import { INounsSeeder } from './INounsSeeder.sol'; interface INounsDescriptor { event PartsLocked(); event DataURIToggled(bool enabled); event BaseURIUpdated(string baseURI); function arePartsLocked() external returns (bool); function isDataURIEnabled() external returns (bool); function baseURI() external returns (string memory); function palettes(uint8 paletteIndex, uint256 colorIndex) external view returns (string memory); function backgrounds(uint256 index) external view returns (string memory); function bodies(uint256 index) external view returns (bytes memory); function accessories(uint256 index) external view returns (bytes memory); function heads(uint256 index) external view returns (bytes memory); function glasses(uint256 index) external view returns (bytes memory); function backgroundCount() external view returns (uint256); function bodyCount() external view returns (uint256); function accessoryCount() external view returns (uint256); function headCount() external view returns (uint256); function glassesCount() external view returns (uint256); function addManyColorsToPalette(uint8 paletteIndex, string[] calldata newColors) external; function addManyBackgrounds(string[] calldata backgrounds) external; function addManyBodies(bytes[] calldata bodies) external; function addManyAccessories(bytes[] calldata accessories) external; function addManyHeads(bytes[] calldata heads) external; function addManyGlasses(bytes[] calldata glasses) external; function addColorToPalette(uint8 paletteIndex, string calldata color) external; function addBackground(string calldata background) external; function addBody(bytes calldata body) external; function addAccessory(bytes calldata accessory) external; function addHead(bytes calldata head) external; function addGlasses(bytes calldata glasses) external; function lockParts() external; function toggleDataURIEnabled() external; function setBaseURI(string calldata baseURI) external; function tokenURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory); function dataURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory); function genericDataURI( string calldata name, string calldata description, INounsSeeder.Seed memory seed ) external view returns (string memory); function generateSVGImage(INounsSeeder.Seed memory seed) external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for NounsSeeder /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; import { INounsDescriptor } from './INounsDescriptor.sol'; interface INounsSeeder { struct Seed { uint48 background; uint48 body; uint48 accessory; uint48 head; uint48 glasses; } function generateSeed(uint256 nounId, INounsDescriptor descriptor) external view returns (Seed memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface ISVGRender { function render(bytes memory input) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; interface ITraitsFetch { function fetch(bytes memory input) external view returns (string memory); }
//SPDX-License-Identifier: MIT pragma solidity >=0.8.4; library BytesUtils { /* * @dev Returns the keccak-256 hash of a byte range. * @param self The byte string to hash. * @param offset The position to start hashing at. * @param len The number of bytes to hash. * @return The hash of the byte range. */ function keccak( bytes memory self, uint256 offset, uint256 len ) internal pure returns (bytes32 ret) { require(offset + len <= self.length); assembly { ret := keccak256(add(add(self, 32), offset), len) } } /** * @dev Returns the ENS namehash of a DNS-encoded name. * @param self The DNS-encoded name to hash. * @param offset The offset at which to start hashing. * @return The namehash of the name. */ function namehash(bytes memory self, uint256 offset) internal pure returns (bytes32) { (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset); if (labelhash == bytes32(0)) { require(offset == self.length - 1, "namehash: Junk at end of name"); return bytes32(0); } return keccak256(abi.encodePacked(namehash(self, newOffset), labelhash)); } /** * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label. * @param self The byte string to read a label from. * @param idx The index to read a label at. * @return labelhash The hash of the label at the specified index, or 0 if it is the last label. * @return newIdx The index of the start of the next label. */ function readLabel(bytes memory self, uint256 idx) internal pure returns (bytes32 labelhash, uint256 newIdx) { require(idx < self.length, "readLabel: Index out of bounds"); uint256 len = uint256(uint8(self[idx])); if (len > 0) { labelhash = keccak(self, idx + 1, len); } else { labelhash = bytes32(0); } newIdx = idx + len + 1; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "./BytesUtils.sol"; library NameEncoder { using BytesUtils for bytes; function dnsEncodeName(string memory name) internal pure returns (bytes memory dnsName, bytes32 node) { uint8 labelLength = 0; bytes memory bytesName = bytes(name); uint256 length = bytesName.length; dnsName = new bytes(length + 2); node = 0; if (length == 0) { dnsName[0] = 0; return (dnsName, node); } // use unchecked to save gas since we check for an underflow // and we check for the length before the loop unchecked { for (uint256 i = length - 1; i >= 0; i--) { if (bytesName[i] == ".") { dnsName[i + 1] = bytes1(labelLength); node = keccak256(abi.encodePacked(node, bytesName.keccak(i + 1, labelLength))); labelLength = 0; } else { labelLength += 1; dnsName[i + 1] = bytesName[i]; } if (i == 0) { break; } } } node = keccak256(abi.encodePacked(node, bytesName.keccak(0, labelLength))); dnsName[0] = bytes1(labelLength); return (dnsName, node); } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"erc721Storage","type":"address"},{"internalType":"address","name":"ensReverseRecords","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc721Storage","type":"address"}],"name":"ERC721StorageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ensReverseRecords","type":"address"}],"name":"EnsReverseRecordsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getERC721Storage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEnsReverseRecords","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"preview","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"previewUsingEnsName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ensReverseRecords","type":"address"}],"name":"setEnsReverseRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Storage","type":"address"}],"name":"setStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002699380380620026998339810160408190526200003491620001ef565b838383828260006200004783826200030d565b5060016200005682826200030d565b505050620000736200006d620000af60201b60201c565b620000b3565b600880546001600160a01b039283166001600160a01b031991821617909155600980549590921694169390931790925550620003d99350505050565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200012d57600080fd5b81516001600160401b03808211156200014a576200014a62000105565b604051601f8301601f19908116603f0116810190828211818310171562000175576200017562000105565b816040528381526020925086838588010111156200019257600080fd5b600091505b83821015620001b6578582018301518183018401529082019062000197565b83821115620001c85760008385830101525b9695505050505050565b80516001600160a01b0381168114620001ea57600080fd5b919050565b600080600080608085870312156200020657600080fd5b84516001600160401b03808211156200021e57600080fd5b6200022c888389016200011b565b955060208701519150808211156200024357600080fd5b5062000252878288016200011b565b9350506200026360408601620001d2565b91506200027360608601620001d2565b905092959194509250565b600181811c908216806200029357607f821691505b602082108103620002b457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200030857600081815260208120601f850160051c81016020861015620002e35750805b601f850160051c820191505b818110156200030457828155600101620002ef565b5050505b505050565b81516001600160401b0381111562000329576200032962000105565b62000341816200033a84546200027e565b84620002ba565b602080601f831160018114620003795760008415620003605750858301515b600019600386901b1c1916600185901b17855562000304565b600085815260208120601f198616915b82811015620003aa5788860151825594840194600190910190840162000389565b5085821015620003c95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6122b080620003e96000396000f3fe6080604052600436106101bb5760003560e01c806365f68c89116100ec578063a22cb4651161008a578063c87b56dd11610064578063c87b56dd146104e0578063e8a3d48514610500578063e985e9c514610515578063f2fde38b1461055e57600080fd5b8063a22cb46514610482578063b88d4fde146104a2578063bb636388146104c257600080fd5b806387a89ee6116100c657806387a89ee6146104115780638da5cb5b1461042f5780639137c1a71461044d57806395d89b411461046d57600080fd5b806365f68c89146103a657806370a08231146103dc578063715018a6146103fc57600080fd5b80632e1a7d4d116101595780634e71d92d116101335780634e71d92d1461033e5780634f53c4e2146103465780635ad0ca9d146103665780636352211e1461038657600080fd5b80632e1a7d4d146102de5780632f54bf6e146102fe57806342842e0e1461031e57600080fd5b8063095ea7b311610195578063095ea7b31461025f57806313a69df91461027f57806318160ddd1461029f57806323b872dd146102be57600080fd5b806301ffc9a7146101d057806306fdde0314610205578063081812fc1461022757600080fd5b366101cb576101c93361057e565b005b600080fd5b3480156101dc57600080fd5b506101f06101eb366004611bf0565b6105ed565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6105fe565b6040516101fc9190611c6c565b34801561023357600080fd5b50610247610242366004611c7f565b610690565b6040516001600160a01b0390911681526020016101fc565b34801561026b57600080fd5b506101c961027a366004611cad565b610725565b34801561028b57600080fd5b5061021a61029a366004611cd9565b61083a565b3480156102ab57600080fd5b506007545b6040519081526020016101fc565b3480156102ca57600080fd5b506101c96102d9366004611cf6565b610919565b3480156102ea57600080fd5b506101c96102f9366004611c7f565b6109a3565b34801561030a57600080fd5b506101f0610319366004611cd9565b610a54565b34801561032a57600080fd5b506101c9610339366004611cf6565b610a80565b6101c9610a9b565b34801561035257600080fd5b506101c9610361366004611cd9565b610aa6565b34801561037257600080fd5b5061021a610381366004611de4565b610b10565b34801561039257600080fd5b506102476103a1366004611c7f565b610ba9565b3480156103b257600080fd5b506102b06103c1366004611cd9565b6001600160a01b03166000908152600a602052604090205490565b3480156103e857600080fd5b506102b06103f7366004611cd9565b610c20565b34801561040857600080fd5b506101c9610ca7565b34801561041d57600080fd5b506008546001600160a01b0316610247565b34801561043b57600080fd5b506006546001600160a01b0316610247565b34801561045957600080fd5b506101c9610468366004611cd9565b610cdb565b34801561047957600080fd5b5061021a610d53565b34801561048e57600080fd5b506101c961049d366004611e2d565b610d62565b3480156104ae57600080fd5b506101c96104bd366004611e6b565b610d6d565b3480156104ce57600080fd5b506009546001600160a01b0316610247565b3480156104ec57600080fd5b5061021a6104fb366004611c7f565b610de9565b34801561050c57600080fd5b5061021a610e7c565b34801561052157600080fd5b506101f0610530366004611eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561056a57600080fd5b506101c9610579366004611cd9565b610ef3565b61058781610c20565b6000036105a85760078054600101908190556105a4908290610f8b565b5050565b60405162461bcd60e51b815260206004820152601260248201527111539bdd5b9cce9c1c995d8b5a5cdcdd595960721b60448201526064015b60405180910390fd5b50565b60006105f8826110a4565b92915050565b60606000805461060d90611f19565b80601f016020809104026020016040519081016040528092919081815260200182805461063990611f19565b80156106865780601f1061065b57610100808354040283529160200191610686565b820191906000526020600020905b81548152906001019060200180831161066957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e1565b506000908152600460205260409020546001600160a01b031690565b600061073082610ba9565b9050806001600160a01b0316836001600160a01b03160361079d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e1565b336001600160a01b03821614806107b957506107b98133610530565b61082b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e1565b61083583836110f4565b505050565b60085460408051634d0b849560e11b815290516060926001600160a01b031691639a17092a9160048083019260209291908290030181865afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a89190611f53565b6040516315084f9960e31b81526001600160a01b038481166004830152919091169063a8427cc8906024015b600060405180830381865afa1580156108f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f89190810190611fb5565b6001600160a01b03831661094a576109448260076000815461093a90612000565b9182905550610f8b565b50505050565b61095382610c20565b156109985760405162461bcd60e51b815260206004820152601560248201527422a737bab7399d31bab93932b73a16b437b63232b960591b60448201526064016105e1565b610944838383611162565b6006546001600160a01b031633146109cd5760405162461bcd60e51b81526004016105e190612019565b604051600090339083908381818185875af1925050503d8060008114610a0f576040519150601f19603f3d011682016040523d82523d6000602084013e610a14565b606091505b50509050806105a45760405162461bcd60e51b815260206004820152600c60248201526b08a9cdeeadce674ead05aded60a31b60448201526064016105e1565b6001600160a01b0381166000908152600a6020526040812054610a785760006105f8565b600192915050565b61083583838360405180602001604052806000815250610d6d565b610aa43361057e565b565b6006546001600160a01b03163314610ad05760405162461bcd60e51b81526004016105e190612019565b6040516001600160a01b03821681527f848a8875b475d071d046367618487f37b45ec544f8c70982fb4917f128ee232b906020015b60405180910390a150565b60085460408051634d0b849560e11b815290516060926001600160a01b031691639a17092a9160048083019260209291908290030181865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e9190611f53565b6001600160a01b031663a53344e7836040518263ffffffff1660e01b81526004016108d49190611c6c565b6000818152600260205260408120546001600160a01b0316806105f85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e1565b60006001600160a01b038216610c8b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e1565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610cd15760405162461bcd60e51b81526004016105e190612019565b610aa46000611242565b6006546001600160a01b03163314610d055760405162461bcd60e51b81526004016105e190612019565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527fd833c7cea3bce2562e201bf7e85016d0bc1173580c719f63378cc5d0457552b690602001610b05565b60606001805461060d90611f19565b6105a4338383611294565b610d773383611362565b610ddd5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016105e1565b61094484848484611458565b6060600080610df78461148b565b600854604051637833cb0b60e11b81529294509092506001600160a01b03169063f067961690610e2f9087908690869060040161204e565b600060405180830381865afa158015610e4c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e749190810190611fb5565b949350505050565b60085460408051631c97e82760e21b815290516060926001600160a01b03169163725fa09c9160048083019260009291908290030181865afa158015610ec6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eee9190810190611fb5565b905090565b6006546001600160a01b03163314610f1d5760405162461bcd60e51b81526004016105e190612019565b6001600160a01b038116610f825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e1565b6105ea81611242565b600080610f9f610f9a856114f8565b6115d6565b905080600003610ff15760405162461bcd60e51b815260206004820152601760248201527f454e6f756e733a696e76616c69642d656e732d6e6f646500000000000000000060448201526064016105e1565b6000818152600c60205260409020546001600160a01b03161561104b5760405162461bcd60e51b815260206004820152601260248201527119539bdd5b9cce9c1c995d8b5a5cdcdd595960721b60448201526064016105e1565b61105584846115e2565b6001600160a01b0384166000818152600a60209081526040808320879055868352600b8252808320859055938252600c90529190912080546001600160a01b0319169091179055508092915050565b60006001600160e01b031982166380ac58cd60e01b14806110d557506001600160e01b03198216635b5e139f60e01b145b806105f857506301ffc9a760e01b6001600160e01b03198316146105f8565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061112982610ba9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000836001600160a01b0316600c600061117e610f9a876114f8565b81526020810191909152604001600020546001600160a01b0316146111da5760405162461bcd60e51b8152602060048201526012602482015271654e6f756e733a696e76616c69642d656e7360701b60448201526064016105e1565b6000828152600b60205260409020546111f4858585611724565b6001600160a01b039485166000908152600a602090815260408083208390559590961680825285822094909455908152600c9094529190922080546001600160a01b03191690921790915590565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036112f55760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e1565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000818152600260205260408120546001600160a01b03166113db5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e1565b60006113e683610ba9565b9050806001600160a01b0316846001600160a01b0316148061142d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610e745750836001600160a01b031661144684610690565b6001600160a01b031614949350505050565b611463848484611724565b61146f848484846118c0565b6109445760405162461bcd60e51b81526004016105e190612083565b6000818152600b60209081526040808320548151928301526060928392909101604051602081830303815290604052905060006114c785610ba9565b604080516001600160a01b0390921660208301520160408051601f1981840301815291905291959194509092505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611532576115326120d5565b6001600160a01b0392831660209182029290920101526009546040516332fe2d9b60e21b815291169063cbf8b66c9061156f9084906004016120eb565b600060405180830381865afa15801561158c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115b49190810190612138565b6000815181106115c6576115c66120d5565b6020026020010151915050919050565b600080610e74836119c1565b6001600160a01b0382166116385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e1565b6000818152600260205260409020546001600160a01b03161561169d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e1565b6001600160a01b03821660009081526003602052604081208054600192906116c69084906121fb565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b826001600160a01b031661173782610ba9565b6001600160a01b03161461179b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e1565b6001600160a01b0382166117fd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e1565b6118086000826110f4565b6001600160a01b0383166000908152600360205260408120805460019290611831908490612213565b90915550506001600160a01b038216600090815260036020526040812080546001929061185f9084906121fb565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b156119b657604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061190490339089908890889060040161222a565b6020604051808303816000875af192505050801561193f575060408051601f3d908101601f1916820190925261193c9181019061225d565b60015b61199c573d80801561196d576040519150601f19603f3d011682016040523d82523d6000602084013e611972565b606091505b5080516000036119945760405162461bcd60e51b81526004016105e190612083565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610e74565b506001949350505050565b8051606090600090819084906119d88160026121fb565b67ffffffffffffffff8111156119f0576119f0611d37565b6040519080825280601f01601f191660200182016040528015611a1a576020820181803683370190505b50945060009350808403611a5f57600060f81b85600081518110611a4057611a406120d5565b60200101906001600160f81b031916908160001a905350505050915091565b60001981015b828181518110611a7757611a776120d5565b01602001516001600160f81b031916601760f91b03611b05578360f81b868260010181518110611aa957611aa96120d5565b60200101906001600160f81b031916908160001a90535084611ad2846001840160ff8816611bb6565b60408051602081019390935282015260600160405160208183030381529060405280519060200120945060009350611b55565b600184019350828181518110611b1d57611b1d6120d5565b602001015160f81c60f81b868260010181518110611b3d57611b3d6120d5565b60200101906001600160f81b031916908160001a9053505b8015611b645760001901611a65565b5083611b7583600060ff8716611bb6565b6040805160208101939093528201526060016040516020818303038152906040528051906020012093508260f81b85600081518110611a4057611a406120d5565b8251600090611bc583856121fb565b1115611bd057600080fd5b5091016020012090565b6001600160e01b0319811681146105ea57600080fd5b600060208284031215611c0257600080fd5b8135611c0d81611bda565b9392505050565b60005b83811015611c2f578181015183820152602001611c17565b838111156109445750506000910152565b60008151808452611c58816020860160208601611c14565b601f01601f19169290920160200192915050565b602081526000611c0d6020830184611c40565b600060208284031215611c9157600080fd5b5035919050565b6001600160a01b03811681146105ea57600080fd5b60008060408385031215611cc057600080fd5b8235611ccb81611c98565b946020939093013593505050565b600060208284031215611ceb57600080fd5b8135611c0d81611c98565b600080600060608486031215611d0b57600080fd5b8335611d1681611c98565b92506020840135611d2681611c98565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d7657611d76611d37565b604052919050565b600067ffffffffffffffff821115611d9857611d98611d37565b50601f01601f191660200190565b6000611db9611db484611d7e565b611d4d565b9050828152838383011115611dcd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215611df657600080fd5b813567ffffffffffffffff811115611e0d57600080fd5b8201601f81018413611e1e57600080fd5b610e7484823560208401611da6565b60008060408385031215611e4057600080fd5b8235611e4b81611c98565b915060208301358015158114611e6057600080fd5b809150509250929050565b60008060008060808587031215611e8157600080fd5b8435611e8c81611c98565b93506020850135611e9c81611c98565b925060408501359150606085013567ffffffffffffffff811115611ebf57600080fd5b8501601f81018713611ed057600080fd5b611edf87823560208401611da6565b91505092959194509250565b60008060408385031215611efe57600080fd5b8235611f0981611c98565b91506020830135611e6081611c98565b600181811c90821680611f2d57607f821691505b602082108103611f4d57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611f6557600080fd5b8151611c0d81611c98565b600082601f830112611f8157600080fd5b8151611f8f611db482611d7e565b818152846020838601011115611fa457600080fd5b610e74826020830160208701611c14565b600060208284031215611fc757600080fd5b815167ffffffffffffffff811115611fde57600080fd5b610e7484828501611f70565b634e487b7160e01b600052601160045260246000fd5b60006001820161201257612012611fea565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8381526060602082015260006120676060830185611c40565b82810360408401526120798185611c40565b9695505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561212c5783516001600160a01b031683529284019291840191600101612107565b50909695505050505050565b6000602080838503121561214b57600080fd5b825167ffffffffffffffff8082111561216357600080fd5b818501915085601f83011261217757600080fd5b81518181111561218957612189611d37565b8060051b612198858201611d4d565b91825283810185019185810190898411156121b257600080fd5b86860192505b838310156121ee578251858111156121d05760008081fd5b6121de8b89838a0101611f70565b83525091860191908601906121b8565b9998505050505050505050565b6000821982111561220e5761220e611fea565b500190565b60008282101561222557612225611fea565b500390565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061207990830184611c40565b60006020828403121561226f57600080fd5b8151611c0d81611bda56fea26469706673582212205711976da822060db6f13c6d87891a29fb5b7512618e62305ea8f8f7b347169664736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000a3895005c766dbf9c3aef8c953a156f4a0a09880000000000000000000000003671ae578e63fdf66ad4f3e12cc0c0d71ac7510c0000000000000000000000000000000000000000000000000000000000000015457468657265756d204e6f756e732053797374656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000006654e6f756e730000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101bb5760003560e01c806365f68c89116100ec578063a22cb4651161008a578063c87b56dd11610064578063c87b56dd146104e0578063e8a3d48514610500578063e985e9c514610515578063f2fde38b1461055e57600080fd5b8063a22cb46514610482578063b88d4fde146104a2578063bb636388146104c257600080fd5b806387a89ee6116100c657806387a89ee6146104115780638da5cb5b1461042f5780639137c1a71461044d57806395d89b411461046d57600080fd5b806365f68c89146103a657806370a08231146103dc578063715018a6146103fc57600080fd5b80632e1a7d4d116101595780634e71d92d116101335780634e71d92d1461033e5780634f53c4e2146103465780635ad0ca9d146103665780636352211e1461038657600080fd5b80632e1a7d4d146102de5780632f54bf6e146102fe57806342842e0e1461031e57600080fd5b8063095ea7b311610195578063095ea7b31461025f57806313a69df91461027f57806318160ddd1461029f57806323b872dd146102be57600080fd5b806301ffc9a7146101d057806306fdde0314610205578063081812fc1461022757600080fd5b366101cb576101c93361057e565b005b600080fd5b3480156101dc57600080fd5b506101f06101eb366004611bf0565b6105ed565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6105fe565b6040516101fc9190611c6c565b34801561023357600080fd5b50610247610242366004611c7f565b610690565b6040516001600160a01b0390911681526020016101fc565b34801561026b57600080fd5b506101c961027a366004611cad565b610725565b34801561028b57600080fd5b5061021a61029a366004611cd9565b61083a565b3480156102ab57600080fd5b506007545b6040519081526020016101fc565b3480156102ca57600080fd5b506101c96102d9366004611cf6565b610919565b3480156102ea57600080fd5b506101c96102f9366004611c7f565b6109a3565b34801561030a57600080fd5b506101f0610319366004611cd9565b610a54565b34801561032a57600080fd5b506101c9610339366004611cf6565b610a80565b6101c9610a9b565b34801561035257600080fd5b506101c9610361366004611cd9565b610aa6565b34801561037257600080fd5b5061021a610381366004611de4565b610b10565b34801561039257600080fd5b506102476103a1366004611c7f565b610ba9565b3480156103b257600080fd5b506102b06103c1366004611cd9565b6001600160a01b03166000908152600a602052604090205490565b3480156103e857600080fd5b506102b06103f7366004611cd9565b610c20565b34801561040857600080fd5b506101c9610ca7565b34801561041d57600080fd5b506008546001600160a01b0316610247565b34801561043b57600080fd5b506006546001600160a01b0316610247565b34801561045957600080fd5b506101c9610468366004611cd9565b610cdb565b34801561047957600080fd5b5061021a610d53565b34801561048e57600080fd5b506101c961049d366004611e2d565b610d62565b3480156104ae57600080fd5b506101c96104bd366004611e6b565b610d6d565b3480156104ce57600080fd5b506009546001600160a01b0316610247565b3480156104ec57600080fd5b5061021a6104fb366004611c7f565b610de9565b34801561050c57600080fd5b5061021a610e7c565b34801561052157600080fd5b506101f0610530366004611eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561056a57600080fd5b506101c9610579366004611cd9565b610ef3565b61058781610c20565b6000036105a85760078054600101908190556105a4908290610f8b565b5050565b60405162461bcd60e51b815260206004820152601260248201527111539bdd5b9cce9c1c995d8b5a5cdcdd595960721b60448201526064015b60405180910390fd5b50565b60006105f8826110a4565b92915050565b60606000805461060d90611f19565b80601f016020809104026020016040519081016040528092919081815260200182805461063990611f19565b80156106865780601f1061065b57610100808354040283529160200191610686565b820191906000526020600020905b81548152906001019060200180831161066957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e1565b506000908152600460205260409020546001600160a01b031690565b600061073082610ba9565b9050806001600160a01b0316836001600160a01b03160361079d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e1565b336001600160a01b03821614806107b957506107b98133610530565b61082b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e1565b61083583836110f4565b505050565b60085460408051634d0b849560e11b815290516060926001600160a01b031691639a17092a9160048083019260209291908290030181865afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a89190611f53565b6040516315084f9960e31b81526001600160a01b038481166004830152919091169063a8427cc8906024015b600060405180830381865afa1580156108f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105f89190810190611fb5565b6001600160a01b03831661094a576109448260076000815461093a90612000565b9182905550610f8b565b50505050565b61095382610c20565b156109985760405162461bcd60e51b815260206004820152601560248201527422a737bab7399d31bab93932b73a16b437b63232b960591b60448201526064016105e1565b610944838383611162565b6006546001600160a01b031633146109cd5760405162461bcd60e51b81526004016105e190612019565b604051600090339083908381818185875af1925050503d8060008114610a0f576040519150601f19603f3d011682016040523d82523d6000602084013e610a14565b606091505b50509050806105a45760405162461bcd60e51b815260206004820152600c60248201526b08a9cdeeadce674ead05aded60a31b60448201526064016105e1565b6001600160a01b0381166000908152600a6020526040812054610a785760006105f8565b600192915050565b61083583838360405180602001604052806000815250610d6d565b610aa43361057e565b565b6006546001600160a01b03163314610ad05760405162461bcd60e51b81526004016105e190612019565b6040516001600160a01b03821681527f848a8875b475d071d046367618487f37b45ec544f8c70982fb4917f128ee232b906020015b60405180910390a150565b60085460408051634d0b849560e11b815290516060926001600160a01b031691639a17092a9160048083019260209291908290030181865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e9190611f53565b6001600160a01b031663a53344e7836040518263ffffffff1660e01b81526004016108d49190611c6c565b6000818152600260205260408120546001600160a01b0316806105f85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e1565b60006001600160a01b038216610c8b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e1565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610cd15760405162461bcd60e51b81526004016105e190612019565b610aa46000611242565b6006546001600160a01b03163314610d055760405162461bcd60e51b81526004016105e190612019565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527fd833c7cea3bce2562e201bf7e85016d0bc1173580c719f63378cc5d0457552b690602001610b05565b60606001805461060d90611f19565b6105a4338383611294565b610d773383611362565b610ddd5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016105e1565b61094484848484611458565b6060600080610df78461148b565b600854604051637833cb0b60e11b81529294509092506001600160a01b03169063f067961690610e2f9087908690869060040161204e565b600060405180830381865afa158015610e4c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e749190810190611fb5565b949350505050565b60085460408051631c97e82760e21b815290516060926001600160a01b03169163725fa09c9160048083019260009291908290030181865afa158015610ec6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eee9190810190611fb5565b905090565b6006546001600160a01b03163314610f1d5760405162461bcd60e51b81526004016105e190612019565b6001600160a01b038116610f825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e1565b6105ea81611242565b600080610f9f610f9a856114f8565b6115d6565b905080600003610ff15760405162461bcd60e51b815260206004820152601760248201527f454e6f756e733a696e76616c69642d656e732d6e6f646500000000000000000060448201526064016105e1565b6000818152600c60205260409020546001600160a01b03161561104b5760405162461bcd60e51b815260206004820152601260248201527119539bdd5b9cce9c1c995d8b5a5cdcdd595960721b60448201526064016105e1565b61105584846115e2565b6001600160a01b0384166000818152600a60209081526040808320879055868352600b8252808320859055938252600c90529190912080546001600160a01b0319169091179055508092915050565b60006001600160e01b031982166380ac58cd60e01b14806110d557506001600160e01b03198216635b5e139f60e01b145b806105f857506301ffc9a760e01b6001600160e01b03198316146105f8565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061112982610ba9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000836001600160a01b0316600c600061117e610f9a876114f8565b81526020810191909152604001600020546001600160a01b0316146111da5760405162461bcd60e51b8152602060048201526012602482015271654e6f756e733a696e76616c69642d656e7360701b60448201526064016105e1565b6000828152600b60205260409020546111f4858585611724565b6001600160a01b039485166000908152600a602090815260408083208390559590961680825285822094909455908152600c9094529190922080546001600160a01b03191690921790915590565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036112f55760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e1565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000818152600260205260408120546001600160a01b03166113db5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e1565b60006113e683610ba9565b9050806001600160a01b0316846001600160a01b0316148061142d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610e745750836001600160a01b031661144684610690565b6001600160a01b031614949350505050565b611463848484611724565b61146f848484846118c0565b6109445760405162461bcd60e51b81526004016105e190612083565b6000818152600b60209081526040808320548151928301526060928392909101604051602081830303815290604052905060006114c785610ba9565b604080516001600160a01b0390921660208301520160408051601f1981840301815291905291959194509092505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611532576115326120d5565b6001600160a01b0392831660209182029290920101526009546040516332fe2d9b60e21b815291169063cbf8b66c9061156f9084906004016120eb565b600060405180830381865afa15801561158c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115b49190810190612138565b6000815181106115c6576115c66120d5565b6020026020010151915050919050565b600080610e74836119c1565b6001600160a01b0382166116385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e1565b6000818152600260205260409020546001600160a01b03161561169d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e1565b6001600160a01b03821660009081526003602052604081208054600192906116c69084906121fb565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b826001600160a01b031661173782610ba9565b6001600160a01b03161461179b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e1565b6001600160a01b0382166117fd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e1565b6118086000826110f4565b6001600160a01b0383166000908152600360205260408120805460019290611831908490612213565b90915550506001600160a01b038216600090815260036020526040812080546001929061185f9084906121fb565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b156119b657604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061190490339089908890889060040161222a565b6020604051808303816000875af192505050801561193f575060408051601f3d908101601f1916820190925261193c9181019061225d565b60015b61199c573d80801561196d576040519150601f19603f3d011682016040523d82523d6000602084013e611972565b606091505b5080516000036119945760405162461bcd60e51b81526004016105e190612083565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610e74565b506001949350505050565b8051606090600090819084906119d88160026121fb565b67ffffffffffffffff8111156119f0576119f0611d37565b6040519080825280601f01601f191660200182016040528015611a1a576020820181803683370190505b50945060009350808403611a5f57600060f81b85600081518110611a4057611a406120d5565b60200101906001600160f81b031916908160001a905350505050915091565b60001981015b828181518110611a7757611a776120d5565b01602001516001600160f81b031916601760f91b03611b05578360f81b868260010181518110611aa957611aa96120d5565b60200101906001600160f81b031916908160001a90535084611ad2846001840160ff8816611bb6565b60408051602081019390935282015260600160405160208183030381529060405280519060200120945060009350611b55565b600184019350828181518110611b1d57611b1d6120d5565b602001015160f81c60f81b868260010181518110611b3d57611b3d6120d5565b60200101906001600160f81b031916908160001a9053505b8015611b645760001901611a65565b5083611b7583600060ff8716611bb6565b6040805160208101939093528201526060016040516020818303038152906040528051906020012093508260f81b85600081518110611a4057611a406120d5565b8251600090611bc583856121fb565b1115611bd057600080fd5b5091016020012090565b6001600160e01b0319811681146105ea57600080fd5b600060208284031215611c0257600080fd5b8135611c0d81611bda565b9392505050565b60005b83811015611c2f578181015183820152602001611c17565b838111156109445750506000910152565b60008151808452611c58816020860160208601611c14565b601f01601f19169290920160200192915050565b602081526000611c0d6020830184611c40565b600060208284031215611c9157600080fd5b5035919050565b6001600160a01b03811681146105ea57600080fd5b60008060408385031215611cc057600080fd5b8235611ccb81611c98565b946020939093013593505050565b600060208284031215611ceb57600080fd5b8135611c0d81611c98565b600080600060608486031215611d0b57600080fd5b8335611d1681611c98565b92506020840135611d2681611c98565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d7657611d76611d37565b604052919050565b600067ffffffffffffffff821115611d9857611d98611d37565b50601f01601f191660200190565b6000611db9611db484611d7e565b611d4d565b9050828152838383011115611dcd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215611df657600080fd5b813567ffffffffffffffff811115611e0d57600080fd5b8201601f81018413611e1e57600080fd5b610e7484823560208401611da6565b60008060408385031215611e4057600080fd5b8235611e4b81611c98565b915060208301358015158114611e6057600080fd5b809150509250929050565b60008060008060808587031215611e8157600080fd5b8435611e8c81611c98565b93506020850135611e9c81611c98565b925060408501359150606085013567ffffffffffffffff811115611ebf57600080fd5b8501601f81018713611ed057600080fd5b611edf87823560208401611da6565b91505092959194509250565b60008060408385031215611efe57600080fd5b8235611f0981611c98565b91506020830135611e6081611c98565b600181811c90821680611f2d57607f821691505b602082108103611f4d57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611f6557600080fd5b8151611c0d81611c98565b600082601f830112611f8157600080fd5b8151611f8f611db482611d7e565b818152846020838601011115611fa457600080fd5b610e74826020830160208701611c14565b600060208284031215611fc757600080fd5b815167ffffffffffffffff811115611fde57600080fd5b610e7484828501611f70565b634e487b7160e01b600052601160045260246000fd5b60006001820161201257612012611fea565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8381526060602082015260006120676060830185611c40565b82810360408401526120798185611c40565b9695505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561212c5783516001600160a01b031683529284019291840191600101612107565b50909695505050505050565b6000602080838503121561214b57600080fd5b825167ffffffffffffffff8082111561216357600080fd5b818501915085601f83011261217757600080fd5b81518181111561218957612189611d37565b8060051b612198858201611d4d565b91825283810185019185810190898411156121b257600080fd5b86860192505b838310156121ee578251858111156121d05760008081fd5b6121de8b89838a0101611f70565b83525091860191908601906121b8565b9998505050505050505050565b6000821982111561220e5761220e611fea565b500190565b60008282101561222557612225611fea565b500390565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061207990830184611c40565b60006020828403121561226f57600080fd5b8151611c0d81611bda56fea26469706673582212205711976da822060db6f13c6d87891a29fb5b7512618e62305ea8f8f7b347169664736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000a3895005c766dbf9c3aef8c953a156f4a0a09880000000000000000000000003671ae578e63fdf66ad4f3e12cc0c0d71ac7510c0000000000000000000000000000000000000000000000000000000000000015457468657265756d204e6f756e732053797374656d00000000000000000000000000000000000000000000000000000000000000000000000000000000000006654e6f756e730000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): Ethereum Nouns System
Arg [1] : symbol (string): eNouns
Arg [2] : erc721Storage (address): 0x0A3895005C766DBF9c3aef8c953a156F4a0A0988
Arg [3] : ensReverseRecords (address): 0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000a3895005c766dbf9c3aef8c953a156f4a0a0988
Arg [3] : 0000000000000000000000003671ae578e63fdf66ad4f3e12cc0c0d71ac7510c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [5] : 457468657265756d204e6f756e732053797374656d0000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 654e6f756e730000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.