UNPKG

@etherisc/depeg-contracts

Version:

Etherisc's smart contracts for a depeg insurance for stable coins.

630 lines 20.3 kB
{ "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": { "59": "contracts/registry/IChainNftFacade.sol", "60": "contracts/registry/IChainRegistryFacade.sol" }, "ast": { "absolutePath": "contracts/registry/IChainNftFacade.sol", "exportedSymbols": { "IChainNftFacade": [ 7342 ], "IChainRegistryFacade": [ 7497 ] }, "id": 7343, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 7302, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:59" }, { "absolutePath": "contracts/registry/IChainRegistryFacade.sol", "file": "./IChainRegistryFacade.sol", "id": 7304, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 7343, "sourceUnit": 7498, "src": "540:64:59", "symbolAliases": [ { "foreign": { "id": 7303, "name": "IChainRegistryFacade", "nodeType": "Identifier", "overloadedDeclarations": [], "src": "548:20:59", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 7342, "linearizedBaseContracts": [ 7342 ], "name": "IChainNftFacade", "nameLocation": "616:15:59", "nodeType": "ContractDefinition", "nodes": [ { "functionSelector": "d0def521", "id": 7313, "implemented": false, "kind": "function", "modifiers": [], "name": "mint", "nameLocation": "648:4:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7309, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7306, "mutability": "mutable", "name": "to", "nameLocation": "661:2:59", "nodeType": "VariableDeclaration", "scope": 7313, "src": "653:10:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 7305, "name": "address", "nodeType": "ElementaryTypeName", "src": "653:7:59", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 7308, "mutability": "mutable", "name": "uri", "nameLocation": "679:3:59", "nodeType": "VariableDeclaration", "scope": 7313, "src": "665:17:59", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 7307, "name": "string", "nodeType": "ElementaryTypeName", "src": "665:6:59", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "652:31:59" }, "returnParameters": { "id": 7312, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7311, "mutability": "mutable", "name": "tokenId", "nameLocation": "709:7:59", "nodeType": "VariableDeclaration", "scope": 7313, "src": "701:15:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7310, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "701:7:59", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "700:17:59" }, "scope": 7342, "src": "639:79:59", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "06fdde03", "id": 7318, "implemented": false, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "733:4:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7314, "nodeType": "ParameterList", "parameters": [], "src": "737:2:59" }, "returnParameters": { "id": 7317, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7316, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 7318, "src": "763:13:59", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 7315, "name": "string", "nodeType": "ElementaryTypeName", "src": "763:6:59", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "762:15:59" }, "scope": 7342, "src": "724:54:59", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "95d89b41", "id": 7323, "implemented": false, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "792:6:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7319, "nodeType": "ParameterList", "parameters": [], "src": "798:2:59" }, "returnParameters": { "id": 7322, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7321, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 7323, "src": "824:13:59", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 7320, "name": "string", "nodeType": "ElementaryTypeName", "src": "824:6:59", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "823:15:59" }, "scope": 7342, "src": "783:56:59", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "5ab1bd53", "id": 7329, "implemented": false, "kind": "function", "modifiers": [], "name": "getRegistry", "nameLocation": "853:11:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7324, "nodeType": "ParameterList", "parameters": [], "src": "864:2:59" }, "returnParameters": { "id": 7328, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7327, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 7329, "src": "890:20:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistryFacade_$7497", "typeString": "contract IChainRegistryFacade" }, "typeName": { "id": 7326, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 7325, "name": "IChainRegistryFacade", "nodeType": "IdentifierPath", "referencedDeclaration": 7497, "src": "890:20:59" }, "referencedDeclaration": 7497, "src": "890:20:59", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistryFacade_$7497", "typeString": "contract IChainRegistryFacade" } }, "visibility": "internal" } ], "src": "889:22:59" }, "scope": 7342, "src": "844:68:59", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "4f558e79", "id": 7336, "implemented": false, "kind": "function", "modifiers": [], "name": "exists", "nameLocation": "927:6:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7332, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7331, "mutability": "mutable", "name": "tokenId", "nameLocation": "942:7:59", "nodeType": "VariableDeclaration", "scope": 7336, "src": "934:15:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7330, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "934:7:59", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "933:17:59" }, "returnParameters": { "id": 7335, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7334, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 7336, "src": "973:4:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 7333, "name": "bool", "nodeType": "ElementaryTypeName", "src": "973:4:59", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "972:6:59" }, "scope": 7342, "src": "918:61:59", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "a2309ff8", "id": 7341, "implemented": false, "kind": "function", "modifiers": [], "name": "totalMinted", "nameLocation": "993:11:59", "nodeType": "FunctionDefinition", "parameters": { "id": 7337, "nodeType": "ParameterList", "parameters": [], "src": "1004:2:59" }, "returnParameters": { "id": 7340, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 7339, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 7341, "src": "1029:7:59", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7338, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1029:7:59", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1028:9:59" }, "scope": 7342, "src": "984:54:59", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 7343, "src": "606:434:59" } ], "src": "39:1001:59" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "IChainNftFacade", "coverageMap": { "branches": {}, "statements": {} }, "dependencies": [ "IChainRegistryFacade" ], "deployedBytecode": "", "deployedSourceMap": "", "language": "Solidity", "natspec": { "kind": "dev", "methods": {}, "version": 1 }, "offset": [ 606, 1040 ], "opcodes": "", "pcMap": {}, "sha1": "d4f10f3001b07a940ef0995f85f435323b4431ef", "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\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" }