UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

728 lines 23.3 kB
{ "abi": [ { "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": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "operator", "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": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "_approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "tokenURI", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Metadata.sol", "29": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Metadata.sol", "exportedSymbols": { "IERC165": [ 17712 ], "IERC721": [ 16778 ], "IERC721Metadata": [ 17346 ] }, "id": 17347, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 17321, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "112:23:21" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "file": "../IERC721.sol", "id": 17322, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 17347, "sourceUnit": 16779, "src": "137:24:21", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 17324, "name": "IERC721", "nameLocations": [ "326:7:21" ], "nodeType": "IdentifierPath", "referencedDeclaration": 16778, "src": "326:7:21" }, "id": 17325, "nodeType": "InheritanceSpecifier", "src": "326:7:21" } ], "canonicalName": "IERC721Metadata", "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 17323, "nodeType": "StructuredDocumentation", "src": "163:133:21", "text": " @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n @dev See https://eips.ethereum.org/EIPS/eip-721" }, "fullyImplemented": false, "id": 17346, "linearizedBaseContracts": [ 17346, 16778, 17712 ], "name": "IERC721Metadata", "nameLocation": "307:15:21", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 17326, "nodeType": "StructuredDocumentation", "src": "340:58:21", "text": " @dev Returns the token collection name." }, "functionSelector": "06fdde03", "id": 17331, "implemented": false, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "412:4:21", "nodeType": "FunctionDefinition", "parameters": { "id": 17327, "nodeType": "ParameterList", "parameters": [], "src": "416:2:21" }, "returnParameters": { "id": 17330, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17329, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17331, "src": "442:13:21", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 17328, "name": "string", "nodeType": "ElementaryTypeName", "src": "442:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "441:15:21" }, "scope": 17346, "src": "403:54:21", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 17332, "nodeType": "StructuredDocumentation", "src": "463:60:21", "text": " @dev Returns the token collection symbol." }, "functionSelector": "95d89b41", "id": 17337, "implemented": false, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "537:6:21", "nodeType": "FunctionDefinition", "parameters": { "id": 17333, "nodeType": "ParameterList", "parameters": [], "src": "543:2:21" }, "returnParameters": { "id": 17336, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17335, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17337, "src": "569:13:21", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 17334, "name": "string", "nodeType": "ElementaryTypeName", "src": "569:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "568:15:21" }, "scope": 17346, "src": "528:56:21", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 17338, "nodeType": "StructuredDocumentation", "src": "590:90:21", "text": " @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token." }, "functionSelector": "c87b56dd", "id": 17345, "implemented": false, "kind": "function", "modifiers": [], "name": "tokenURI", "nameLocation": "694:8:21", "nodeType": "FunctionDefinition", "parameters": { "id": 17341, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17340, "mutability": "mutable", "name": "tokenId", "nameLocation": "711:7:21", "nodeType": "VariableDeclaration", "scope": 17345, "src": "703:15:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 17339, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "703:7:21", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "702:17:21" }, "returnParameters": { "id": 17344, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17343, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 17345, "src": "743:13:21", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 17342, "name": "string", "nodeType": "ElementaryTypeName", "src": "743:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "742:15:21" }, "scope": 17346, "src": "685:73:21", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 17347, "src": "297:463:21", "usedErrors": [] } ], "src": "112:649:21" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.19+commit.7dd6d404" }, "contractName": "IERC721Metadata", "coverageMap": { "branches": {}, "statements": {} }, "dependencies": [ "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC165", "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC721" ], "deployedBytecode": "", "deployedSourceMap": "", "language": "Solidity", "natspec": { "details": "See https://eips.ethereum.org/EIPS/eip-721", "events": { "Approval(address,address,uint256)": { "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." }, "ApprovalForAll(address,address,bool)": { "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." }, "Transfer(address,address,uint256)": { "details": "Emitted when `tokenId` token is transferred from `from` to `to`." } }, "kind": "dev", "methods": { "approve(address,uint256)": { "details": "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." }, "balanceOf(address)": { "details": "Returns the number of tokens in ``owner``'s account." }, "getApproved(uint256)": { "details": "Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist." }, "isApprovedForAll(address,address)": { "details": "Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll}" }, "name()": { "details": "Returns the token collection name." }, "ownerOf(uint256)": { "details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist." }, "safeTransferFrom(address,address,uint256)": { "details": "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 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." }, "safeTransferFrom(address,address,uint256,bytes)": { "details": "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." }, "setApprovalForAll(address,bool)": { "details": "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." }, "supportsInterface(bytes4)": { "details": "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." }, "symbol()": { "details": "Returns the token collection symbol." }, "tokenURI(uint256)": { "details": "Returns the Uniform Resource Identifier (URI) for `tokenId` token." }, "transferFrom(address,address,uint256)": { "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. 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." } }, "title": "ERC-721 Non-Fungible Token Standard, optional metadata extension", "version": 1 }, "offset": [ 297, 760 ], "opcodes": "", "pcMap": {}, "sha1": "f2961c701500b017eb65f22ae6a5bc46486b959a", "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", "sourceMap": "", "sourcePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Metadata.sol", "type": "interface" }