UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,557 lines (1,556 loc) 772 kB
{ "abi": [ { "inputs": [ { "internalType": "address", "name": "registry", "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": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "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": [ { "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": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "exists", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRegistry", "outputs": [ { "internalType": "contract IChainRegistry", "name": "registry", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "implementsIChainNft", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "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": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "", "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": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "setURI", "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": "index", "type": "uint256" } ], "name": "tokenByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "tokenOfOwnerByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "totalMinted", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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" } ], "allSourcePaths": { "14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol", "15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol", "16": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/ERC721.sol", "17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "19": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/ERC721Enumerable.sol", "20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Enumerable.sol", "21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Metadata.sol", "23": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol", "28": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/ERC165.sol", "29": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol", "31": "contracts/registry/ChainNft.sol", "34": "contracts/registry/IChainNft.sol", "36": "contracts/registry/IChainRegistry.sol", "39": "contracts/registry/IInstanceServiceFacade.sol", "43": "contracts/shared/IBaseTypes.sol", "44": "contracts/shared/IVersionType.sol", "47": "contracts/shared/UFixedMath.sol", "50": "contracts/staking/IStaking.sol" }, "ast": { "absolutePath": "contracts/registry/ChainNft.sol", "exportedSymbols": { "ChainNft": [ 312 ], "ERC721": [ 15797 ], "ERC721Enumerable": [ 12088 ], "IChainNft": [ 3494 ], "IChainRegistry": [ 4025 ] }, "id": 313, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.8", ".19" ], "nodeType": "PragmaDirective", "src": "39:24:31" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/ERC721Enumerable.sol", "file": "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", "id": 4, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 313, "sourceUnit": 12089, "src": "65:110:31", "symbolAliases": [ { "foreign": { "id": 2, "name": "ERC721", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15797, "src": "73:6:31", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 3, "name": "ERC721Enumerable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12088, "src": "81:16:31", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/registry/IChainNft.sol", "file": "./IChainNft.sol", "id": 7, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 313, "sourceUnit": 3495, "src": "177:58:31", "symbolAliases": [ { "foreign": { "id": 5, "name": "IChainNft", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3494, "src": "185:9:31", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 6, "name": "IChainRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4025, "src": "196:14:31", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 8, "name": "ERC721Enumerable", "nameLocations": [ "262:16:31" ], "nodeType": "IdentifierPath", "referencedDeclaration": 12088, "src": "262:16:31" }, "id": 9, "nodeType": "InheritanceSpecifier", "src": "262:16:31" }, { "baseName": { "id": 10, "name": "IChainNft", "nameLocations": [ "284:9:31" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3494, "src": "284:9:31" }, "id": 11, "nodeType": "InheritanceSpecifier", "src": "284:9:31" } ], "canonicalName": "ChainNft", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 312, "linearizedBaseContracts": [ 312, 3494, 12088, 12485, 15797, 17346, 16778, 17700, 17712, 16878 ], "name": "ChainNft", "nameLocation": "246:8:31", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "functionSelector": "a3f4df7e", "id": 14, "mutability": "constant", "name": "NAME", "nameLocation": "323:4:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "300:73:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 12, "name": "string", "nodeType": "ElementaryTypeName", "src": "300:6:31", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "44657a656e7472616c697a656420496e737572616e63652050726f746f636f6c205265676973747279", "id": 13, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "330:43:31", "typeDescriptions": { "typeIdentifier": "t_stringliteral_591a1a16989f013cd6664feccd1652a0ba35b557c08e873f6bb8e00581aea648", "typeString": "literal_string \"Dezentralized Insurance Protocol Registry\"" }, "value": "Dezentralized Insurance Protocol Registry" }, "visibility": "public" }, { "constant": true, "functionSelector": "f76f8d78", "id": 17, "mutability": "constant", "name": "SYMBOL", "nameLocation": "402:6:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "379:38:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 15, "name": "string", "nodeType": "ElementaryTypeName", "src": "379:6:31", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "44495052", "id": 16, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "411:6:31", "typeDescriptions": { "typeIdentifier": "t_stringliteral_10d272bd79797ed977c59af24288b18d45b050c503dd8a40cb7a9696a5018ccb", "typeString": "literal_string \"DIPR\"" }, "value": "DIPR" }, "visibility": "public" }, { "constant": false, "id": 20, "mutability": "mutable", "name": "_registry", "nameLocation": "472:9:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "449:32:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" }, "typeName": { "id": 19, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 18, "name": "IChainRegistry", "nameLocations": [ "449:14:31" ], "nodeType": "IdentifierPath", "referencedDeclaration": 4025, "src": "449:14:31" }, "referencedDeclaration": 4025, "src": "449:14:31", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } }, "visibility": "private" }, { "constant": false, "id": 24, "mutability": "mutable", "name": "_uri", "nameLocation": "561:4:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "514:51:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_string_storage_$", "typeString": "mapping(uint256 => string)" }, "typeName": { "id": 23, "keyName": "tokenId", "keyNameLocation": "530:7:31", "keyType": { "id": 21, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "522:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "514:38:31", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_string_storage_$", "typeString": "mapping(uint256 => string)" }, "valueName": "uri", "valueNameLocation": "548:3:31", "valueType": { "id": 22, "name": "string", "nodeType": "ElementaryTypeName", "src": "541:6:31", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } } }, "visibility": "private" }, { "constant": false, "id": 26, "mutability": "mutable", "name": "_chainIdInt", "nameLocation": "626:11:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "609:28:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 25, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "609:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 28, "mutability": "mutable", "name": "_chainIdDigits", "nameLocation": "661:14:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "644:31:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 27, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "644:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 30, "mutability": "mutable", "name": "_chainIdMultiplier", "nameLocation": "698:18:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "681:35:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 29, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "681:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 32, "mutability": "mutable", "name": "_idNext", "nameLocation": "739:7:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "722:24:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "722:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 34, "mutability": "mutable", "name": "_totalMinted", "nameLocation": "769:12:31", "nodeType": "VariableDeclaration", "scope": 312, "src": "752:29:31", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 33, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "752:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "body": { "id": 48, "nodeType": "Block", "src": "813:106:31", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 43, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 37, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "831:3:31", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 38, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "835:6:31", "memberName": "sender", "nodeType": "MemberAccess", "src": "831:10:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "id": 41, "name": "_registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "853:9:31", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } ], "id": 40, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "845:7:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 39, "name": "address", "nodeType": "ElementaryTypeName", "src": "845:7:31", "typeDescriptions": {} } }, "id": 42, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "845:18:31", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "831:32:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4352472d3030313a43414c4c45525f4e4f545f5245474953545259", "id": 44, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "865:35:31", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f1df48d89d9f8a95375b554168338213e78d7b341f67e2763e366303edd6810f", "typeString": "literal_string \"ERROR:CRG-001:CALLER_NOT_REGISTRY\"" }, "value": "ERROR:CRG-001:CALLER_NOT_REGISTRY" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_f1df48d89d9f8a95375b554168338213e78d7b341f67e2763e366303edd6810f", "typeString": "literal_string \"ERROR:CRG-001:CALLER_NOT_REGISTRY\"" } ], "id": 36, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "823:7:31", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 45, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "823:78:31", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 46, "nodeType": "ExpressionStatement", "src": "823:78:31" }, { "id": 47, "nodeType": "PlaceholderStatement", "src": "911:1:31" } ] }, "id": 49, "name": "onlyRegistry", "nameLocation": "798:12:31", "nodeType": "ModifierDefinition", "parameters": { "id": 35, "nodeType": "ParameterList", "parameters": [], "src": "810:2:31" }, "src": "789:130:31", "virtual": false, "visibility": "internal" }, { "body": { "id": 111, "nodeType": "Block", "src": "989:489:31", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 64, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 59, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 51, "src": "1007:8:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 62, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1027:1:31", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 61, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1019:7:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 60, "name": "address", "nodeType": "ElementaryTypeName", "src": "1019:7:31", "typeDescriptions": {} } }, "id": 63, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1019:10:31", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1007:22:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4352472d3031303a52454749535452595f5a45524f", "id": 65, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1031:29:31", "typeDescriptions": { "typeIdentifier": "t_stringliteral_79f7dd7e647075211f41d5b411569c571942937d1a4b3e2840a9a03abfb00cd2", "typeString": "literal_string \"ERROR:CRG-010:REGISTRY_ZERO\"" }, "value": "ERROR:CRG-010:REGISTRY_ZERO" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_79f7dd7e647075211f41d5b411569c571942937d1a4b3e2840a9a03abfb00cd2", "typeString": "literal_string \"ERROR:CRG-010:REGISTRY_ZERO\"" } ], "id": 58, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "999:7:31", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 66, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "999:62:31", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 67, "nodeType": "ExpressionStatement", "src": "999:62:31" }, { "expression": { "id": 72, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 68, "name": "_registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "1072:9:31", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 70, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 51, "src": "1099:8:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 69, "name": "IChainRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4025, "src": "1084:14:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IChainRegistry_$4025_$", "typeString": "type(contract IChainRegistry)" } }, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1084:24:31", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } }, "src": "1072:36:31", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainRegistry_$4025", "typeString": "contract IChainRegistry" } }, "id": 73, "nodeType": "ExpressionStatement", "src": "1072:36:31" }, { "expression": { "id": 77, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 74, "name": "_chainIdInt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26, "src": "1119:11:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "expression": { "id": 75, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, "src": "1133:5:31", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1139:7:31", "memberName": "chainid", "nodeType": "MemberAccess", "src": "1133:13:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1119:27:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 78, "nodeType": "ExpressionStatement", "src": "1119:27:31" }, { "expression": { "id": 83, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 79, "name": "_chainIdDigits", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 28, "src": "1156:14:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 81, "name": "_chainIdInt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 26, "src": "1186:11:31",