@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
637 lines • 20.6 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "exists",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRegistry",
"outputs": [
{
"internalType": "contract IChainRegistryFacade",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "string",
"name": "uri",
"type": "string"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalMinted",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"35": "contracts/registry/IChainNftFacade.sol",
"37": "contracts/registry/IChainRegistryFacade.sol"
},
"ast": {
"absolutePath": "contracts/registry/IChainNftFacade.sol",
"exportedSymbols": {
"IChainNftFacade": [
3536
],
"IChainRegistryFacade": [
4180
]
},
"id": 3537,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3496,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:35"
},
{
"absolutePath": "contracts/registry/IChainRegistryFacade.sol",
"file": "./IChainRegistryFacade.sol",
"id": 3498,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 3537,
"sourceUnit": 4181,
"src": "542:64:35",
"symbolAliases": [
{
"foreign": {
"id": 3497,
"name": "IChainRegistryFacade",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4180,
"src": "550:20:35",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IChainNftFacade",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 3536,
"linearizedBaseContracts": [
3536
],
"name": "IChainNftFacade",
"nameLocation": "618:15:35",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "d0def521",
"id": 3507,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "mint",
"nameLocation": "650:4:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3500,
"mutability": "mutable",
"name": "to",
"nameLocation": "663:2:35",
"nodeType": "VariableDeclaration",
"scope": 3507,
"src": "655:10:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3499,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "655:7:35",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 3502,
"mutability": "mutable",
"name": "uri",
"nameLocation": "681:3:35",
"nodeType": "VariableDeclaration",
"scope": 3507,
"src": "667:17:35",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 3501,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "667:6:35",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "654:31:35"
},
"returnParameters": {
"id": 3506,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3505,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "711:7:35",
"nodeType": "VariableDeclaration",
"scope": 3507,
"src": "703:15:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3504,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "703:7:35",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "702:17:35"
},
"scope": 3536,
"src": "641:79:35",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "06fdde03",
"id": 3512,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "name",
"nameLocation": "735:4:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3508,
"nodeType": "ParameterList",
"parameters": [],
"src": "739:2:35"
},
"returnParameters": {
"id": 3511,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3510,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 3512,
"src": "765:13:35",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 3509,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "765:6:35",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "764:15:35"
},
"scope": 3536,
"src": "726:54:35",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "95d89b41",
"id": 3517,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "symbol",
"nameLocation": "794:6:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3513,
"nodeType": "ParameterList",
"parameters": [],
"src": "800:2:35"
},
"returnParameters": {
"id": 3516,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3515,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 3517,
"src": "826:13:35",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 3514,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "826:6:35",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "825:15:35"
},
"scope": 3536,
"src": "785:56:35",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "5ab1bd53",
"id": 3523,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRegistry",
"nameLocation": "855:11:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3518,
"nodeType": "ParameterList",
"parameters": [],
"src": "866:2:35"
},
"returnParameters": {
"id": 3522,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3521,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 3523,
"src": "892:20:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistryFacade_$4180",
"typeString": "contract IChainRegistryFacade"
},
"typeName": {
"id": 3520,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 3519,
"name": "IChainRegistryFacade",
"nameLocations": [
"892:20:35"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4180,
"src": "892:20:35"
},
"referencedDeclaration": 4180,
"src": "892:20:35",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistryFacade_$4180",
"typeString": "contract IChainRegistryFacade"
}
},
"visibility": "internal"
}
],
"src": "891:22:35"
},
"scope": 3536,
"src": "846:68:35",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "4f558e79",
"id": 3530,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "exists",
"nameLocation": "929:6:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3526,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3525,
"mutability": "mutable",
"name": "tokenId",
"nameLocation": "944:7:35",
"nodeType": "VariableDeclaration",
"scope": 3530,
"src": "936:15:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3524,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "936:7:35",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "935:17:35"
},
"returnParameters": {
"id": 3529,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3528,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 3530,
"src": "975:4:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3527,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "975:4:35",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "974:6:35"
},
"scope": 3536,
"src": "920:61:35",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "a2309ff8",
"id": 3535,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "totalMinted",
"nameLocation": "995:11:35",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3531,
"nodeType": "ParameterList",
"parameters": [],
"src": "1006:2:35"
},
"returnParameters": {
"id": 3534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3533,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 3535,
"src": "1031:7:35",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3532,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1031:7:35",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1030:9:35"
},
"scope": 3536,
"src": "986:54:35",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 3537,
"src": "608:434:35",
"usedErrors": []
}
],
"src": "39:1003:35"
},
"bytecode": "",
"bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"compiler": {
"evm_version": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"version": "0.8.19+commit.7dd6d404"
},
"contractName": "IChainNftFacade",
"coverageMap": {
"branches": {},
"statements": {}
},
"dependencies": [
"IChainRegistryFacade"
],
"deployedBytecode": "",
"deployedSourceMap": "",
"language": "Solidity",
"natspec": {
"kind": "dev",
"methods": {},
"version": 1
},
"offset": [
608,
1042
],
"opcodes": "",
"pcMap": {},
"sha1": "36393f40ef36ef1013080c83141fc43b6191da4a",
"source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.19;\n\n/**\n * @dev this facade is intended for user contracts with limited \n * interactions with the actual contract and that need to work \n * with older solidity versions that do not support user defined \n * types.\n * \n * usage: \n * (1) copy this interface into your repository\n * (2) adapt the pragma to your needsd\n * (3) use it in your contracts, ie. cast actual contract \n * address to this interface, then usd the resulting facade \n * to interact with the actual contract\n */\n\nimport {IChainRegistryFacade} from \"./IChainRegistryFacade.sol\";\n\ninterface IChainNftFacade {\n\n function mint(address to, string memory uri) external returns(uint256 tokenId);\n\n function name() external view returns (string memory);\n function symbol() external view returns (string memory);\n function getRegistry() external view returns (IChainRegistryFacade);\n\n function exists(uint256 tokenId) external view returns(bool);\n function totalMinted() external view returns(uint256);\n}",
"sourceMap": "",
"sourcePath": "contracts/registry/IChainNftFacade.sol",
"type": "interface"
}