Token Mooooooo
Overview ERC721
Total Supply:
1,111 MOO
Holders:
257 addresses
Transfers:
-
Contract:
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Moo
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.1; import "./UserBase.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract Moo is ERC721URIStorage, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenIds; address private _userbase; address private _signer; bool private _active; mapping (uint256 => string) private _usernamesByTokenId; mapping (bytes32 => bool) private _usernameExists; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; uint256 private _royaltyAmount; string private _customBaseURI; address private _cowAddress; constructor(address userbase_, address signer_) ERC721("Mooooooo", "MOO") { _userbase = userbase_; _signer = signer_; _active = true; _royaltyAmount = 500; _customBaseURI = 'https://un.bpi.network/moo/'; _cowAddress = 0x1b676534F9575881ff573dDb411BaDcf0e1E7136; } function mint(string memory username, uint256 characters, bytes memory signature) public payable { require(_active); require(!_usernameExists[keccak256(abi.encodePacked(username))], "Usernames must be unique."); bytes32 hash = keccak256(abi.encodePacked(username, characters, msg.sender)); address signer = hash.toEthSignedMessageHash().recover(signature); require(signer == _signer, "Signature verification failed."); require(characters > 0); require(characters <= 15); IERC721 cows = IERC721(_cowAddress); require(cows.balanceOf(msg.sender) > 0); _tokenIds.increment(); uint256 newItemId = _tokenIds.current(); _mint(msg.sender, newItemId); _usernamesByTokenId[newItemId] = username; _usernameExists[keccak256(abi.encodePacked(username))] = true; payable(owner()).transfer(msg.value); // this should never run, but just in case } function usernameExists(string memory username) public view returns (bool) { return _usernameExists[keccak256(abi.encodePacked(username))]; } function totalSupply() public view returns (uint256) { return _tokenIds.current(); } function addressFor(string memory username) public view returns (address) { UserBase userbase = UserBase(_userbase); return userbase.addressFor(username); } function activate(uint256 tokenId) public { require(ownerOf(tokenId) == msg.sender, "You do not own that username."); UserBase userbase = UserBase(_userbase); userbase.activate(msg.sender, usernameForToken(tokenId)); } function deactivate(uint256 tokenId) public { require(ownerOf(tokenId) == msg.sender, "You do not own that username."); UserBase userbase = UserBase(_userbase); userbase.deactivate(msg.sender, usernameForToken(tokenId)); } function usernameForToken(uint256 tokenId) public view returns (string memory) { return _usernamesByTokenId[tokenId]; } function usernameFor(address account) public view returns (string memory) { UserBase userbase = UserBase(_userbase); return userbase.usernameFor(account); } function setSigner(address signer_) public onlyOwner { _signer = signer_; } function setCowAddress(address cowAddress_) public onlyOwner { _cowAddress = cowAddress_; } function setActive(bool active_) public onlyOwner { _active = active_; } function setUserBase(address userbase_) public onlyOwner { _userbase = userbase_; } function setBaseURI(string memory customBaseURI_) public onlyOwner { _customBaseURI = customBaseURI_; } function _baseURI() internal view virtual override returns (string memory) { return _customBaseURI; } function _beforeTokenTransfer(address from, address _to, uint256 tokenId) internal override { string memory username = usernameForToken(tokenId); UserBase userbase = UserBase(_userbase); if (keccak256(abi.encodePacked(username)) == keccak256(abi.encodePacked(userbase.usernameFor(from)))) { userbase.deactivate(from, usernameForToken(tokenId)); } } function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount) { return (owner(), ((_salePrice * _royaltyAmount) / 10000)); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { if (interfaceId == _INTERFACE_ID_ERC2981) { return true; } return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.1; import "@openzeppelin/contracts/access/Ownable.sol"; contract UserBase is Ownable { mapping (bytes32 => address) private _activatedAddresses; mapping (address => bytes32) private _activatedUsernameHashes; mapping (bytes32 => string) private _activatedUsernames; mapping (address => bool) private _allowed; function addressFor(string memory username) public view returns (address) { return _activatedAddresses[keccak256(abi.encodePacked(username))]; } function usernameFor(address account) public view returns (string memory) { bytes32 usernameHash = _activatedUsernameHashes[account]; return _activatedUsernames[usernameHash]; } function activate(address account, string memory username) public onlyAllowed { string memory oldUsername = usernameFor(account); deactivate(account, oldUsername); bytes32 usernameHash = keccak256(abi.encodePacked(username)); _activatedAddresses[usernameHash] = account; _activatedUsernameHashes[account] = usernameHash; _activatedUsernames[usernameHash] = username; } function deactivate(address account, string memory username) public onlyAllowed { bytes32 usernameHash = keccak256(abi.encodePacked(username)); _activatedAddresses[usernameHash] = address(0); _activatedUsernameHashes[account] = bytes32(0); _activatedUsernames[usernameHash] = ""; } modifier onlyAllowed { require(_allowed[msg.sender]); _; } function setAllowed(address nftNameService, bool allowed_) public onlyOwner { _allowed[nftNameService] = allowed_; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// 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/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 (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 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @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 override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _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 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); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"userbase_","type":"address"},{"internalType":"address","name":"signer_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"uint256","name":"tokenId","type":"uint256"}],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"username","type":"string"}],"name":"addressFor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"deactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"username","type":"string"},{"internalType":"uint256","name":"characters","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"active_","type":"bool"}],"name":"setActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"customBaseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"cowAddress_","type":"address"}],"name":"setCowAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userbase_","type":"address"}],"name":"setUserBase","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":"string","name":"username","type":"string"}],"name":"usernameExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"usernameFor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"usernameForToken","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005253380380620052538339818101604052810190620000379190620003dd565b6040518060400160405280600881526020017f4d6f6f6f6f6f6f6f0000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f4d4f4f00000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000bb92919062000316565b508060019080519060200190620000d492919062000316565b505050620000f7620000eb6200024860201b60201c565b6200025060201b60201c565b81600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600a60146101000a81548160ff0219169083151502179055506101f4600d819055506040518060400160405280601b81526020017f68747470733a2f2f756e2e6270692e6e6574776f726b2f6d6f6f2f0000000000815250600e9080519060200190620001ea92919062000316565b50731b676534f9575881ff573ddb411badcf0e1e7136600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620004d1565b600033905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620003249062000452565b90600052602060002090601f01602090048101928262000348576000855562000394565b82601f106200036357805160ff191683800117855562000394565b8280016001018555821562000394579182015b828111156200039357825182559160200191906001019062000376565b5b509050620003a39190620003a7565b5090565b5b80821115620003c2576000816000905550600101620003a8565b5090565b600081519050620003d781620004b7565b92915050565b60008060408385031215620003f157600080fd5b60006200040185828601620003c6565b92505060206200041485828601620003c6565b9150509250929050565b60006200042b8262000432565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200046b57607f821691505b6020821081141562000482576200048162000488565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b620004c2816200041e565b8114620004ce57600080fd5b50565b614d7280620004e16000396000f3fe6080604052600436106101cd5760003560e01c806370a08231116100f7578063b260c42a11610095578063cd2e341611610064578063cd2e341614610686578063e985e9c5146106c3578063f2fde38b14610700578063f309e3f914610729576101cd565b8063b260c42a146105ba578063b88d4fde146105e3578063c87b56dd1461060c578063c994a39014610649576101cd565b8063916b9bef116100d1578063916b9bef1461051457806395d89b411461053d578063a22cb46514610568578063acec338a14610591576101cd565b806370a0823114610495578063715018a6146104d25780638da5cb5b146104e9576101cd565b80632a55205a1161016f57806355f804b31161013e57806355f804b3146103c95780636261ff15146103f25780636352211e1461042f5780636c19e7831461046c576101cd565b80632a55205a1461031057806330c875301461034e57806342842e0e1461037757806348ccf2b1146103a0576101cd565b8063095ea7b3116101ab578063095ea7b31461027757806310662e91146102a057806318160ddd146102bc57806323b872dd146102e7576101cd565b806301ffc9a7146101d257806306fdde031461020f578063081812fc1461023a575b600080fd5b3480156101de57600080fd5b506101f960048036038101906101f49190613694565b610766565b6040516102069190613e6d565b60405180910390f35b34801561021b57600080fd5b506102246107cf565b6040516102319190613ecd565b60405180910390f35b34801561024657600080fd5b50610261600480360381019061025c91906137e7565b610861565b60405161026e9190613dad565b60405180910390f35b34801561028357600080fd5b5061029e6004803603810190610299919061362f565b6108e6565b005b6102ba60048036038101906102b59190613768565b6109fe565b005b3480156102c857600080fd5b506102d1610d46565b6040516102de91906141ef565b60405180910390f35b3480156102f357600080fd5b5061030e60048036038101906103099190613529565b610d57565b005b34801561031c57600080fd5b5061033760048036038101906103329190613839565b610db7565b604051610345929190613e44565b60405180910390f35b34801561035a57600080fd5b506103756004803603810190610370919061349b565b610de8565b005b34801561038357600080fd5b5061039e60048036038101906103999190613529565b610ea8565b005b3480156103ac57600080fd5b506103c760048036038101906103c2919061349b565b610ec8565b005b3480156103d557600080fd5b506103f060048036038101906103eb91906136e6565b610f88565b005b3480156103fe57600080fd5b50610419600480360381019061041491906137e7565b61101e565b6040516104269190613ecd565b60405180910390f35b34801561043b57600080fd5b50610456600480360381019061045191906137e7565b6110c3565b6040516104639190613dad565b60405180910390f35b34801561047857600080fd5b50610493600480360381019061048e919061349b565b611175565b005b3480156104a157600080fd5b506104bc60048036038101906104b7919061349b565b611235565b6040516104c991906141ef565b60405180910390f35b3480156104de57600080fd5b506104e76112ed565b005b3480156104f557600080fd5b506104fe611375565b60405161050b9190613dad565b60405180910390f35b34801561052057600080fd5b5061053b600480360381019061053691906137e7565b61139f565b005b34801561054957600080fd5b506105526114b5565b60405161055f9190613ecd565b60405180910390f35b34801561057457600080fd5b5061058f600480360381019061058a91906135f3565b611547565b005b34801561059d57600080fd5b506105b860048036038101906105b3919061366b565b61155d565b005b3480156105c657600080fd5b506105e160048036038101906105dc91906137e7565b6115f6565b005b3480156105ef57600080fd5b5061060a60048036038101906106059190613578565b61170c565b005b34801561061857600080fd5b50610633600480360381019061062e91906137e7565b61176e565b6040516106409190613ecd565b60405180910390f35b34801561065557600080fd5b50610670600480360381019061066b91906136e6565b6118c0565b60405161067d9190613dad565b60405180910390f35b34801561069257600080fd5b506106ad60048036038101906106a8919061349b565b611979565b6040516106ba9190613ecd565b60405180910390f35b3480156106cf57600080fd5b506106ea60048036038101906106e591906134ed565b611a38565b6040516106f79190613e6d565b60405180910390f35b34801561070c57600080fd5b506107276004803603810190610722919061349b565b611acc565b005b34801561073557600080fd5b50610750600480360381019061074b91906136e6565b611bc4565b60405161075d9190613e6d565b60405180910390f35b6000632a55205a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156107be57600190506107ca565b6107c782611c14565b90505b919050565b6060600080546107de906144b6565b80601f016020809104026020016040519081016040528092919081815260200182805461080a906144b6565b80156108575780601f1061082c57610100808354040283529160200191610857565b820191906000526020600020905b81548152906001019060200180831161083a57829003601f168201915b5050505050905090565b600061086c82611cf6565b6108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a29061410f565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108f1826110c3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610962576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109599061418f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610981611d62565b73ffffffffffffffffffffffffffffffffffffffff1614806109b057506109af816109aa611d62565b611a38565b5b6109ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e69061404f565b60405180910390fd5b6109f98383611d6a565b505050565b600a60149054906101000a900460ff16610a1757600080fd5b600c600084604051602001610a2c9190613d13565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff1615610a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a959061416f565b60405180910390fd5b6000838333604051602001610ab593929190613d4e565b6040516020818303038152906040528051906020012090506000610aea83610adc84611e23565b611e5390919063ffffffff16565b9050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7390613f0f565b60405180910390fd5b60008411610b8957600080fd5b600f841115610b9757600080fd5b6000600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610bf99190613dad565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c499190613810565b11610c5357600080fd5b610c5d6008611e7a565b6000610c696008611e90565b9050610c753382611e9e565b86600b60008381526020019081526020016000209080519060200190610c9c92919061322d565b506001600c600089604051602001610cb49190613d13565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff021916908315150217905550610cf7611375565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610d3c573d6000803e3d6000fd5b5050505050505050565b6000610d526008611e90565b905090565b610d68610d62611d62565b82612078565b610da7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9e906141af565b60405180910390fd5b610db2838383612156565b505050565b600080610dc2611375565b612710600d5485610dd3919061435b565b610ddd919061432a565b915091509250929050565b610df0611d62565b73ffffffffffffffffffffffffffffffffffffffff16610e0e611375565b73ffffffffffffffffffffffffffffffffffffffff1614610e64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5b9061412f565b60405180910390fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610ec38383836040518060200160405280600081525061170c565b505050565b610ed0611d62565b73ffffffffffffffffffffffffffffffffffffffff16610eee611375565b73ffffffffffffffffffffffffffffffffffffffff1614610f44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3b9061412f565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610f90611d62565b73ffffffffffffffffffffffffffffffffffffffff16610fae611375565b73ffffffffffffffffffffffffffffffffffffffff1614611004576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffb9061412f565b60405180910390fd5b80600e908051906020019061101a92919061322d565b5050565b6060600b6000838152602001908152602001600020805461103e906144b6565b80601f016020809104026020016040519081016040528092919081815260200182805461106a906144b6565b80156110b75780601f1061108c576101008083540402835291602001916110b7565b820191906000526020600020905b81548152906001019060200180831161109a57829003601f168201915b50505050509050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561116c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111639061408f565b60405180910390fd5b80915050919050565b61117d611d62565b73ffffffffffffffffffffffffffffffffffffffff1661119b611375565b73ffffffffffffffffffffffffffffffffffffffff16146111f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e89061412f565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129d9061406f565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112f5611d62565b73ffffffffffffffffffffffffffffffffffffffff16611313611375565b73ffffffffffffffffffffffffffffffffffffffff1614611369576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113609061412f565b60405180910390fd5b61137360006123bd565b565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3373ffffffffffffffffffffffffffffffffffffffff166113bf826110c3565b73ffffffffffffffffffffffffffffffffffffffff1614611415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140c906141cf565b60405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663e4e30e81336114628561101e565b6040518363ffffffff1660e01b815260040161147f929190613e14565b600060405180830381600087803b15801561149957600080fd5b505af11580156114ad573d6000803e3d6000fd5b505050505050565b6060600180546114c4906144b6565b80601f01602080910402602001604051908101604052809291908181526020018280546114f0906144b6565b801561153d5780601f106115125761010080835404028352916020019161153d565b820191906000526020600020905b81548152906001019060200180831161152057829003601f168201915b5050505050905090565b611559611552611d62565b8383612483565b5050565b611565611d62565b73ffffffffffffffffffffffffffffffffffffffff16611583611375565b73ffffffffffffffffffffffffffffffffffffffff16146115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d09061412f565b60405180910390fd5b80600a60146101000a81548160ff02191690831515021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16611616826110c3565b73ffffffffffffffffffffffffffffffffffffffff161461166c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611663906141cf565b60405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16636a3b3cc3336116b98561101e565b6040518363ffffffff1660e01b81526004016116d6929190613e14565b600060405180830381600087803b1580156116f057600080fd5b505af1158015611704573d6000803e3d6000fd5b505050505050565b61171d611717611d62565b83612078565b61175c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611753906141af565b60405180910390fd5b611768848484846125f0565b50505050565b606061177982611cf6565b6117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af906140ef565b60405180910390fd5b60006006600084815260200190815260200160002080546117d8906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054611804906144b6565b80156118515780601f1061182657610100808354040283529160200191611851565b820191906000526020600020905b81548152906001019060200180831161183457829003601f168201915b50505050509050600061186261264c565b90506000815114156118785781925050506118bb565b6000825111156118ad578082604051602001611895929190613d2a565b604051602081830303815290604052925050506118bb565b6118b6846126de565b925050505b919050565b600080600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663c994a390846040518263ffffffff1660e01b81526004016119219190613ecd565b60206040518083038186803b15801561193957600080fd5b505afa15801561194d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197191906134c4565b915050919050565b60606000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663cd2e3416846040518263ffffffff1660e01b81526004016119db9190613dad565b60006040518083038186803b1580156119f357600080fd5b505afa158015611a07573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611a309190613727565b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611ad4611d62565b73ffffffffffffffffffffffffffffffffffffffff16611af2611375565b73ffffffffffffffffffffffffffffffffffffffff1614611b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3f9061412f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611bb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611baf90613f6f565b60405180910390fd5b611bc1816123bd565b50565b6000600c600083604051602001611bdb9190613d13565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611cdf57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611cef5750611cee82612785565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611ddd836110c3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081604051602001611e369190613d87565b604051602081830303815290604052805190602001209050919050565b6000806000611e6285856127ef565b91509150611e6f81612872565b819250505092915050565b6001816000016000828254019250508190555050565b600081600001549050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f05906140cf565b60405180910390fd5b611f1781611cf6565b15611f57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4e90613faf565b60405180910390fd5b611f6360008383612bc3565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611fb391906142d4565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461207460008383612d55565b5050565b600061208382611cf6565b6120c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b99061402f565b60405180910390fd5b60006120cd836110c3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061213c57508373ffffffffffffffffffffffffffffffffffffffff1661212484610861565b73ffffffffffffffffffffffffffffffffffffffff16145b8061214d575061214c8185611a38565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612176826110c3565b73ffffffffffffffffffffffffffffffffffffffff16146121cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c390613f8f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223390613fcf565b60405180910390fd5b612247838383612bc3565b612252600082611d6a565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122a291906143b5565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122f991906142d4565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46123b8838383612d55565b505050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156124f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e990613fef565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516125e39190613e6d565b60405180910390a3505050565b6125fb848484612156565b61260784848484612d5a565b612646576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263d90613f4f565b60405180910390fd5b50505050565b6060600e805461265b906144b6565b80601f0160208091040260200160405190810160405280929190818152602001828054612687906144b6565b80156126d45780601f106126a9576101008083540402835291602001916126d4565b820191906000526020600020905b8154815290600101906020018083116126b757829003601f168201915b5050505050905090565b60606126e982611cf6565b612728576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271f9061414f565b60405180910390fd5b600061273261264c565b90506000815111612752576040518060200160405280600081525061277d565b8061275c84612ef1565b60405160200161276d929190613d2a565b6040516020818303038152906040525b915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000806041835114156128315760008060006020860151925060408601519150606086015160001a90506128258782858561309e565b9450945050505061286b565b6040835114156128625760008060208501519150604085015190506128578683836131ab565b93509350505061286b565b60006002915091505b9250929050565b600060048111156128ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8160048111156128e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156128f057612bc0565b6001600481111561292a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115612963577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156129a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161299b90613eef565b60405180910390fd5b600260048111156129de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115612a17577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4f90613f2f565b60405180910390fd5b60036004811115612a92577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115612acb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612b0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b039061400f565b60405180910390fd5b600480811115612b45577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816004811115612b7e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415612bbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bb6906140af565b60405180910390fd5b5b50565b6000612bce8261101e565b90506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663cd2e3416866040518263ffffffff1660e01b8152600401612c309190613dad565b60006040518083038186803b158015612c4857600080fd5b505afa158015612c5c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190612c859190613727565b604051602001612c959190613d13565b6040516020818303038152906040528051906020012082604051602001612cbc9190613d13565b604051602081830303815290604052805190602001201415612d4e578073ffffffffffffffffffffffffffffffffffffffff1663e4e30e8186612cfe8661101e565b6040518363ffffffff1660e01b8152600401612d1b929190613e14565b600060405180830381600087803b158015612d3557600080fd5b505af1158015612d49573d6000803e3d6000fd5b505050505b5050505050565b505050565b6000612d7b8473ffffffffffffffffffffffffffffffffffffffff1661320a565b15612ee4578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612da4611d62565b8786866040518563ffffffff1660e01b8152600401612dc69493929190613dc8565b602060405180830381600087803b158015612de057600080fd5b505af1925050508015612e1157506040513d601f19601f82011682018060405250810190612e0e91906136bd565b60015b612e94573d8060008114612e41576040519150601f19603f3d011682016040523d82523d6000602084013e612e46565b606091505b50600081511415612e8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e8390613f4f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612ee9565b600190505b949350505050565b60606000821415612f39576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613099565b600082905060005b60008214612f6b578080612f5490614519565b915050600a82612f64919061432a565b9150612f41565b60008167ffffffffffffffff811115612fad577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612fdf5781602001600182028036833780820191505090505b5090505b6000851461309257600182612ff891906143b5565b9150600a85613007919061459a565b603061301391906142d4565b60f81b81838151811061304f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561308b919061432a565b9450612fe3565b8093505050505b919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156130d95760006003915091506131a2565b601b8560ff16141580156130f15750601c8560ff1614155b156131035760006004915091506131a2565b6000600187878787604051600081526020016040526040516131289493929190613e88565b6020604051602081039080840390855afa15801561314a573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613199576000600192509250506131a2565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c6131ee91906142d4565b90506131fc8782888561309e565b935093505050935093915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054613239906144b6565b90600052602060002090601f01602090048101928261325b57600085556132a2565b82601f1061327457805160ff19168380011785556132a2565b828001600101855582156132a2579182015b828111156132a1578251825591602001919060010190613286565b5b5090506132af91906132b3565b5090565b5b808211156132cc5760008160009055506001016132b4565b5090565b60006132e36132de8461422f565b61420a565b9050828152602081018484840111156132fb57600080fd5b613306848285614474565b509392505050565b600061332161331c84614260565b61420a565b90508281526020810184848401111561333957600080fd5b613344848285614474565b509392505050565b600061335f61335a84614260565b61420a565b90508281526020810184848401111561337757600080fd5b613382848285614483565b509392505050565b60008135905061339981614ce0565b92915050565b6000815190506133ae81614ce0565b92915050565b6000813590506133c381614cf7565b92915050565b6000813590506133d881614d0e565b92915050565b6000815190506133ed81614d0e565b92915050565b600082601f83011261340457600080fd5b81356134148482602086016132d0565b91505092915050565b600082601f83011261342e57600080fd5b813561343e84826020860161330e565b91505092915050565b600082601f83011261345857600080fd5b815161346884826020860161334c565b91505092915050565b60008135905061348081614d25565b92915050565b60008151905061349581614d25565b92915050565b6000602082840312156134ad57600080fd5b60006134bb8482850161338a565b91505092915050565b6000602082840312156134d657600080fd5b60006134e48482850161339f565b91505092915050565b6000806040838503121561350057600080fd5b600061350e8582860161338a565b925050602061351f8582860161338a565b9150509250929050565b60008060006060848603121561353e57600080fd5b600061354c8682870161338a565b935050602061355d8682870161338a565b925050604061356e86828701613471565b9150509250925092565b6000806000806080858703121561358e57600080fd5b600061359c8782880161338a565b94505060206135ad8782880161338a565b93505060406135be87828801613471565b925050606085013567ffffffffffffffff8111156135db57600080fd5b6135e7878288016133f3565b91505092959194509250565b6000806040838503121561360657600080fd5b60006136148582860161338a565b9250506020613625858286016133b4565b9150509250929050565b6000806040838503121561364257600080fd5b60006136508582860161338a565b925050602061366185828601613471565b9150509250929050565b60006020828403121561367d57600080fd5b600061368b848285016133b4565b91505092915050565b6000602082840312156136a657600080fd5b60006136b4848285016133c9565b91505092915050565b6000602082840312156136cf57600080fd5b60006136dd848285016133de565b91505092915050565b6000602082840312156136f857600080fd5b600082013567ffffffffffffffff81111561371257600080fd5b61371e8482850161341d565b91505092915050565b60006020828403121561373957600080fd5b600082015167ffffffffffffffff81111561375357600080fd5b61375f84828501613447565b91505092915050565b60008060006060848603121561377d57600080fd5b600084013567ffffffffffffffff81111561379757600080fd5b6137a38682870161341d565b93505060206137b486828701613471565b925050604084013567ffffffffffffffff8111156137d157600080fd5b6137dd868287016133f3565b9150509250925092565b6000602082840312156137f957600080fd5b600061380784828501613471565b91505092915050565b60006020828403121561382257600080fd5b600061383084828501613486565b91505092915050565b6000806040838503121561384c57600080fd5b600061385a85828601613471565b925050602061386b85828601613471565b9150509250929050565b61387e816143e9565b82525050565b613895613890826143e9565b614562565b82525050565b6138a4816143fb565b82525050565b6138b381614407565b82525050565b6138ca6138c582614407565b614574565b82525050565b60006138db82614291565b6138e581856142a7565b93506138f5818560208601614483565b6138fe81614687565b840191505092915050565b60006139148261429c565b61391e81856142b8565b935061392e818560208601614483565b61393781614687565b840191505092915050565b600061394d8261429c565b61395781856142c9565b9350613967818560208601614483565b80840191505092915050565b60006139806018836142b8565b915061398b826146a5565b602082019050919050565b60006139a3601e836142b8565b91506139ae826146ce565b602082019050919050565b60006139c6601f836142b8565b91506139d1826146f7565b602082019050919050565b60006139e9601c836142c9565b91506139f482614720565b601c82019050919050565b6000613a0c6032836142b8565b9150613a1782614749565b604082019050919050565b6000613a2f6026836142b8565b9150613a3a82614798565b604082019050919050565b6000613a526025836142b8565b9150613a5d826147e7565b604082019050919050565b6000613a75601c836142b8565b9150613a8082614836565b602082019050919050565b6000613a986024836142b8565b9150613aa38261485f565b604082019050919050565b6000613abb6019836142b8565b9150613ac6826148ae565b602082019050919050565b6000613ade6022836142b8565b9150613ae9826148d7565b604082019050919050565b6000613b01602c836142b8565b9150613b0c82614926565b604082019050919050565b6000613b246038836142b8565b9150613b2f82614975565b604082019050919050565b6000613b47602a836142b8565b9150613b52826149c4565b604082019050919050565b6000613b6a6029836142b8565b9150613b7582614a13565b604082019050919050565b6000613b8d6022836142b8565b9150613b9882614a62565b604082019050919050565b6000613bb06020836142b8565b9150613bbb82614ab1565b602082019050919050565b6000613bd36031836142b8565b9150613bde82614ada565b604082019050919050565b6000613bf6602c836142b8565b9150613c0182614b29565b604082019050919050565b6000613c196020836142b8565b9150613c2482614b78565b602082019050919050565b6000613c3c602f836142b8565b9150613c4782614ba1565b604082019050919050565b6000613c5f6019836142b8565b9150613c6a82614bf0565b602082019050919050565b6000613c826021836142b8565b9150613c8d82614c19565b604082019050919050565b6000613ca56031836142b8565b9150613cb082614c68565b604082019050919050565b6000613cc8601d836142b8565b9150613cd382614cb7565b602082019050919050565b613ce78161445d565b82525050565b613cfe613cf98261445d565b614590565b82525050565b613d0d81614467565b82525050565b6000613d1f8284613942565b915081905092915050565b6000613d368285613942565b9150613d428284613942565b91508190509392505050565b6000613d5a8286613942565b9150613d668285613ced565b602082019150613d768284613884565b601482019150819050949350505050565b6000613d92826139dc565b9150613d9e82846138b9565b60208201915081905092915050565b6000602082019050613dc26000830184613875565b92915050565b6000608082019050613ddd6000830187613875565b613dea6020830186613875565b613df76040830185613cde565b8181036060830152613e0981846138d0565b905095945050505050565b6000604082019050613e296000830185613875565b8181036020830152613e3b8184613909565b90509392505050565b6000604082019050613e596000830185613875565b613e666020830184613cde565b9392505050565b6000602082019050613e82600083018461389b565b92915050565b6000608082019050613e9d60008301876138aa565b613eaa6020830186613d04565b613eb760408301856138aa565b613ec460608301846138aa565b95945050505050565b60006020820190508181036000830152613ee78184613909565b905092915050565b60006020820190508181036000830152613f0881613973565b9050919050565b60006020820190508181036000830152613f2881613996565b9050919050565b60006020820190508181036000830152613f48816139b9565b9050919050565b60006020820190508181036000830152613f68816139ff565b9050919050565b60006020820190508181036000830152613f8881613a22565b9050919050565b60006020820190508181036000830152613fa881613a45565b9050919050565b60006020820190508181036000830152613fc881613a68565b9050919050565b60006020820190508181036000830152613fe881613a8b565b9050919050565b6000602082019050818103600083015261400881613aae565b9050919050565b6000602082019050818103600083015261402881613ad1565b9050919050565b6000602082019050818103600083015261404881613af4565b9050919050565b6000602082019050818103600083015261406881613b17565b9050919050565b6000602082019050818103600083015261408881613b3a565b9050919050565b600060208201905081810360008301526140a881613b5d565b9050919050565b600060208201905081810360008301526140c881613b80565b9050919050565b600060208201905081810360008301526140e881613ba3565b9050919050565b6000602082019050818103600083015261410881613bc6565b9050919050565b6000602082019050818103600083015261412881613be9565b9050919050565b6000602082019050818103600083015261414881613c0c565b9050919050565b6000602082019050818103600083015261416881613c2f565b9050919050565b6000602082019050818103600083015261418881613c52565b9050919050565b600060208201905081810360008301526141a881613c75565b9050919050565b600060208201905081810360008301526141c881613c98565b9050919050565b600060208201905081810360008301526141e881613cbb565b9050919050565b60006020820190506142046000830184613cde565b92915050565b6000614214614225565b905061422082826144e8565b919050565b6000604051905090565b600067ffffffffffffffff82111561424a57614249614658565b5b61425382614687565b9050602081019050919050565b600067ffffffffffffffff82111561427b5761427a614658565b5b61428482614687565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006142df8261445d565b91506142ea8361445d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561431f5761431e6145cb565b5b828201905092915050565b60006143358261445d565b91506143408361445d565b9250826143505761434f6145fa565b5b828204905092915050565b60006143668261445d565b91506143718361445d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156143aa576143a96145cb565b5b828202905092915050565b60006143c08261445d565b91506143cb8361445d565b9250828210156143de576143dd6145cb565b5b828203905092915050565b60006143f48261443d565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156144a1578082015181840152602081019050614486565b838111156144b0576000848401525b50505050565b600060028204905060018216806144ce57607f821691505b602082108114156144e2576144e1614629565b5b50919050565b6144f182614687565b810181811067ffffffffffffffff821117156145105761450f614658565b5b80604052505050565b60006145248261445d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614557576145566145cb565b5b600182019050919050565b600061456d8261457e565b9050919050565b6000819050919050565b600061458982614698565b9050919050565b6000819050919050565b60006145a58261445d565b91506145b08361445d565b9250826145c0576145bf6145fa565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b7f5369676e617475726520766572696669636174696f6e206661696c65642e0000600082015250565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f45524337323155524953746f726167653a2055524920717565727920666f722060008201527f6e6f6e6578697374656e7420746f6b656e000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f557365726e616d6573206d75737420626520756e697175652e00000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f596f7520646f206e6f74206f776e207468617420757365726e616d652e000000600082015250565b614ce9816143e9565b8114614cf457600080fd5b50565b614d00816143fb565b8114614d0b57600080fd5b50565b614d1781614411565b8114614d2257600080fd5b50565b614d2e8161445d565b8114614d3957600080fd5b5056fea26469706673582212205236db410d71518acf449fd03e17fa2c23c1b5a7afcd797a68d800281078d62c64736f6c634300080100330000000000000000000000005adcd28c08fdc5a913982391cebd866b27c717d40000000000000000000000009eba90e3b2e1cb4f07052e1e8d9313e135c1deb0
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005adcd28c08fdc5a913982391cebd866b27c717d40000000000000000000000009eba90e3b2e1cb4f07052e1e8d9313e135c1deb0
-----Decoded View---------------
Arg [0] : userbase_ (address): 0x5adcd28c08fdc5a913982391cebd866b27c717d4
Arg [1] : signer_ (address): 0x9eba90e3b2e1cb4f07052e1e8d9313e135c1deb0
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005adcd28c08fdc5a913982391cebd866b27c717d4
Arg [1] : 0000000000000000000000009eba90e3b2e1cb4f07052e1e8d9313e135c1deb0