@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,470 lines (1,469 loc) • 439 kB
JSON
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "bundleNftId",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "lifetimeExtension",
"type": "uint256"
}
],
"name": "extendBundleLifetime",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "getBundle",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "enum IInstanceServiceFacade.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lockedCapital",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct IInstanceServiceFacade.Bundle",
"name": "bundle",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getChainId",
"outputs": [
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getComponent",
"outputs": [
{
"internalType": "contract IComponent",
"name": "component",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getComponentState",
"outputs": [
{
"internalType": "enum IInstanceServiceFacade.ComponentState",
"name": "componentState",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getComponentToken",
"outputs": [
{
"internalType": "contract IERC20Metadata",
"name": "token",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getComponentType",
"outputs": [
{
"internalType": "enum IInstanceServiceFacade.ComponentType",
"name": "componentType",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getInstanceId",
"outputs": [
{
"internalType": "bytes32",
"name": "instanceId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getInstanceOperator",
"outputs": [
{
"internalType": "address",
"name": "instanceOperator",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRegistry",
"outputs": [
{
"internalType": "contract MockInstanceRegistry",
"name": "registry",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "enum IInstanceServiceFacade.BundleState",
"name": "state",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "capital",
"type": "uint256"
}
],
"name": "setBundleInfo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "chainRegistryAddress",
"type": "address"
}
],
"name": "setChainRegistry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "enum IInstanceServiceFacade.ComponentType",
"name": "t",
"type": "uint8"
},
{
"internalType": "enum IInstanceServiceFacade.ComponentState",
"name": "state",
"type": "uint8"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "setComponentInfo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"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",
"17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol",
"20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Enumerable.sol",
"23": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
"29": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.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",
"45": "contracts/shared/IVersionable.sol",
"47": "contracts/shared/UFixedMath.sol",
"50": "contracts/staking/IStaking.sol",
"6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
"61": "contracts/test/MockInstance.sol",
"62": "contracts/test/MockInstanceRegistry.sol"
},
"ast": {
"absolutePath": "contracts/test/MockInstance.sol",
"exportedSymbols": {
"IChainRegistry": [
4025
],
"IComponent": [
4200
],
"IERC20Metadata": [
12510
],
"IInstanceServiceFacade": [
4295
],
"MockInstance": [
10904
],
"MockInstanceRegistry": [
10943
],
"NftId": [
3353
],
"Ownable": [
12623
]
},
"id": 10905,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10549,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:61"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol",
"file": "@openzeppelin/contracts/access/Ownable.sol",
"id": 10551,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 12624,
"src": "65:67:61",
"symbolAliases": [
{
"foreign": {
"id": 10550,
"name": "Ownable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12623,
"src": "73:7:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"id": 10553,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 12511,
"src": "133:97:61",
"symbolAliases": [
{
"foreign": {
"id": 10552,
"name": "IERC20Metadata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12510,
"src": "141:14:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/registry/IChainNft.sol",
"file": "../registry/IChainNft.sol",
"id": 10555,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 3495,
"src": "232:48:61",
"symbolAliases": [
{
"foreign": {
"id": 10554,
"name": "NftId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3353,
"src": "240:5:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/registry/IChainRegistry.sol",
"file": "../registry/IChainRegistry.sol",
"id": 10557,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 4026,
"src": "281:62:61",
"symbolAliases": [
{
"foreign": {
"id": 10556,
"name": "IChainRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4025,
"src": "289:14:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/registry/IInstanceServiceFacade.sol",
"file": "../registry/IInstanceServiceFacade.sol",
"id": 10560,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 4296,
"src": "344:90:61",
"symbolAliases": [
{
"foreign": {
"id": 10558,
"name": "IInstanceServiceFacade",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4295,
"src": "352:22:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 10559,
"name": "IComponent",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4200,
"src": "376:10:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/test/MockInstanceRegistry.sol",
"file": "./MockInstanceRegistry.sol",
"id": 10562,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10905,
"sourceUnit": 10944,
"src": "435:64:61",
"symbolAliases": [
{
"foreign": {
"id": 10561,
"name": "MockInstanceRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10943,
"src": "443:20:61",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 10563,
"name": "Ownable",
"nameLocations": [
"531:7:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12623,
"src": "531:7:61"
},
"id": 10564,
"nodeType": "InheritanceSpecifier",
"src": "531:7:61"
},
{
"baseName": {
"id": 10565,
"name": "IInstanceServiceFacade",
"nameLocations": [
"544:22:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4295,
"src": "544:22:61"
},
"id": 10566,
"nodeType": "InheritanceSpecifier",
"src": "544:22:61"
}
],
"canonicalName": "MockInstance",
"contractDependencies": [
10943
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 10904,
"linearizedBaseContracts": [
10904,
4295,
12623,
16878
],
"name": "MockInstance",
"nameLocation": "510:12:61",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "MockInstance.ComponentInfo",
"id": 10577,
"members": [
{
"constant": false,
"id": 10568,
"mutability": "mutable",
"name": "id",
"nameLocation": "613:2:61",
"nodeType": "VariableDeclaration",
"scope": 10577,
"src": "605:10:61",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10567,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "605:7:61",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10571,
"mutability": "mutable",
"name": "t",
"nameLocation": "639:1:61",
"nodeType": "VariableDeclaration",
"scope": 10577,
"src": "625:15:61",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$4204",
"typeString": "enum IInstanceServiceFacade.ComponentType"
},
"typeName": {
"id": 10570,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10569,
"name": "ComponentType",
"nameLocations": [
"625:13:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4204,
"src": "625:13:61"
},
"referencedDeclaration": 4204,
"src": "625:13:61",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$4204",
"typeString": "enum IInstanceServiceFacade.ComponentType"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10574,
"mutability": "mutable",
"name": "state",
"nameLocation": "665:5:61",
"nodeType": "VariableDeclaration",
"scope": 10577,
"src": "650:20:61",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$4212",
"typeString": "enum IInstanceServiceFacade.ComponentState"
},
"typeName": {
"id": 10573,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10572,
"name": "ComponentState",
"nameLocations": [
"650:14:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4212,
"src": "650:14:61"
},
"referencedDeclaration": 4212,
"src": "650:14:61",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$4212",
"typeString": "enum IInstanceServiceFacade.ComponentState"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10576,
"mutability": "mutable",
"name": "token",
"nameLocation": "688:5:61",
"nodeType": "VariableDeclaration",
"scope": 10577,
"src": "680:13:61",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10575,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "680:7:61",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"name": "ComponentInfo",
"nameLocation": "581:13:61",
"nodeType": "StructDefinition",
"scope": 10904,
"src": "574:126:61",
"visibility": "public"
},
{
"constant": false,
"id": 10582,
"mutability": "mutable",
"name": "_component",
"nameLocation": "765:10:61",
"nodeType": "VariableDeclaration",
"scope": 10904,
"src": "706:69:61",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ComponentInfo_$10577_storage_$",
"typeString": "mapping(uint256 => struct MockInstance.ComponentInfo)"
},
"typeName": {
"id": 10581,
"keyName": "componentId",
"keyNameLocation": "722:11:61",
"keyType": {
"id": 10578,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "714:7:61",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "706:50:61",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ComponentInfo_$10577_storage_$",
"typeString": "mapping(uint256 => struct MockInstance.ComponentInfo)"
},
"valueName": "info",
"valueNameLocation": "751:4:61",
"valueType": {
"id": 10580,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10579,
"name": "ComponentInfo",
"nameLocations": [
"737:13:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10577,
"src": "737:13:61"
},
"referencedDeclaration": 10577,
"src": "737:13:61",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ComponentInfo_$10577_storage_ptr",
"typeString": "struct MockInstance.ComponentInfo"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 10587,
"mutability": "mutable",
"name": "_bundle",
"nameLocation": "832:7:61",
"nodeType": "VariableDeclaration",
"scope": 10904,
"src": "781:58:61",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Bundle_$4239_storage_$",
"typeString": "mapping(uint256 => struct IInstanceServiceFacade.Bundle)"
},
"typeName": {
"id": 10586,
"keyName": "bundleId",
"keyNameLocation": "797:8:61",
"keyType": {
"id": 10583,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "789:7:61",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "781:42:61",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Bundle_$4239_storage_$",
"typeString": "mapping(uint256 => struct IInstanceServiceFacade.Bundle)"
},
"valueName": "bundle",
"valueNameLocation": "816:6:61",
"valueType": {
"id": 10585,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10584,
"name": "Bundle",
"nameLocations": [
"809:6:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4239,
"src": "809:6:61"
},
"referencedDeclaration": 4239,
"src": "809:6:61",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Bundle_$4239_storage_ptr",
"typeString": "struct IInstanceServiceFacade.Bundle"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 10590,
"mutability": "mutable",
"name": "_registry",
"nameLocation": "874:9:61",
"nodeType": "VariableDeclaration",
"scope": 10904,
"src": "845:38:61",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
},
"typeName": {
"id": 10589,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10588,
"name": "MockInstanceRegistry",
"nameLocations": [
"845:20:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10943,
"src": "845:20:61"
},
"referencedDeclaration": 10943,
"src": "845:20:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 10593,
"mutability": "mutable",
"name": "_chainRegistry",
"nameLocation": "912:14:61",
"nodeType": "VariableDeclaration",
"scope": 10904,
"src": "889:37:61",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistry_$4025",
"typeString": "contract IChainRegistry"
},
"typeName": {
"id": 10592,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10591,
"name": "IChainRegistry",
"nameLocations": [
"889:14:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4025,
"src": "889:14:61"
},
"referencedDeclaration": 4025,
"src": "889:14:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistry_$4025",
"typeString": "contract IChainRegistry"
}
},
"visibility": "private"
},
{
"body": {
"id": 10614,
"nodeType": "Block",
"src": "958:116:61",
"statements": [
{
"expression": {
"id": 10603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 10598,
"name": "_registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10590,
"src": "969:9:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 10601,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "981:24:61",
"typeDescriptions": {
"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_MockInstanceRegistry_$10943_$",
"typeString": "function () returns (contract MockInstanceRegistry)"
},
"typeName": {
"id": 10600,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10599,
"name": "MockInstanceRegistry",
"nameLocations": [
"985:20:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10943,
"src": "985:20:61"
},
"referencedDeclaration": 10943,
"src": "985:20:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
}
},
"id": 10602,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "981:26:61",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
},
"src": "969:38:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
},
"id": 10604,
"nodeType": "ExpressionStatement",
"src": "969:38:61"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 10610,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "1061:4:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstance_$10904",
"typeString": "contract MockInstance"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_MockInstance_$10904",
"typeString": "contract MockInstance"
}
],
"id": 10609,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1053:7:61",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 10608,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1053:7:61",
"typeDescriptions": {}
}
},
"id": 10611,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1053:13:61",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 10605,
"name": "_registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10590,
"src": "1017:9:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_MockInstanceRegistry_$10943",
"typeString": "contract MockInstanceRegistry"
}
},
"id": 10607,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1027:25:61",
"memberName": "setInstanceServiceAddress",
"nodeType": "MemberAccess",
"referencedDeclaration": 10922,
"src": "1017:35:61",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 10612,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1017:50:61",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 10613,
"nodeType": "ExpressionStatement",
"src": "1017:50:61"
}
]
},
"id": 10615,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [],
"id": 10596,
"kind": "baseConstructorSpecifier",
"modifierName": {
"id": 10595,
"name": "Ownable",
"nameLocations": [
"948:7:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12623,
"src": "948:7:61"
},
"nodeType": "ModifierInvocation",
"src": "948:9:61"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 10594,
"nodeType": "ParameterList",
"parameters": [],
"src": "945:2:61"
},
"returnParameters": {
"id": 10597,
"nodeType": "ParameterList",
"parameters": [],
"src": "958:0:61"
},
"scope": 10904,
"src": "934:140:61",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 10626,
"nodeType": "Block",
"src": "1146:70:61",
"statements": [
{
"expression": {
"id": 10624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 10620,
"name": "_chainRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10593,
"src": "1156:14:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistry_$4025",
"typeString": "contract IChainRegistry"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"id": 10622,
"name": "chainRegistryAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10617,
"src": "1188:20:61",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 10621,
"name": "IChainRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4025,
"src": "1173:14:61",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IChainRegistry_$4025_$",
"typeString": "type(contract IChainRegistry)"
}
},
"id": 10623,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1173:36:61",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistry_$4025",
"typeString": "contract IChainRegistry"
}
},
"src": "1156:53:61",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainRegistry_$4025",
"typeString": "contract IChainRegistry"
}
},
"id": 10625,
"nodeType": "ExpressionStatement",
"src": "1156:53:61"
}
]
},
"functionSelector": "6e5ec296",
"id": 10627,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setChainRegistry",
"nameLocation": "1090:16:61",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 10618,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10617,
"mutability": "mutable",
"name": "chainRegistryAddress",
"nameLocation": "1115:20:61",
"nodeType": "VariableDeclaration",
"scope": 10627,
"src": "1107:28:61",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10616,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1107:7:61",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1106:30:61"
},
"returnParameters": {
"id": 10619,
"nodeType": "ParameterList",
"parameters": [],
"src": "1146:0:61"
},
"scope": 10904,
"src": "1081:135:61",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": {
"id": 10673,
"nodeType": "Block",
"src": "1401:176:61",
"statements": [
{
"assignments": [
10644
],
"declarations": [
{
"constant": false,
"id": 10644,
"mutability": "mutable",
"name": "info",
"nameLocation": "1433:4:61",
"nodeType": "VariableDeclaration",
"scope": 10673,
"src": "1411:26:61",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ComponentInfo_$10577_storage_ptr",
"typeString": "struct MockInstance.ComponentInfo"
},
"typeName": {
"id": 10643,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 10642,
"name": "ComponentInfo",
"nameLocations": [
"1411:13:61"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10577,
"src": "1411:13:61"
},
"referencedDeclaration": 10577,
"src": "1411:13:61",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ComponentInfo_$10577_storage_ptr",
"typeString": "struct MockInstance.ComponentInfo"
}
},
"visibility": "internal"
}
],
"id": 10648,
"initialValue": {
"baseExpression": {
"id": 10645,
"name": "_component",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10582,
"src": "1440:10:61",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ComponentInfo_$10577_storage_$",
"typeString": "mapping(uint256 => struct MockInstance.ComponentInfo storage ref)"
}
},
"id": 10647,
"indexExpression": {
"id": 10646,
"name": "componentId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10629,
"src": "1451:11:61",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1440:23:61",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ComponentInfo_$10577_storage",
"typeString": "struct MockInstance.ComponentInfo storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1411:52:61"
},
{
"expression": {
"id": 10653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"expression": {
"id": 10649,
"name": "info",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10644,
"src": "1473:4:61",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ComponentInfo_$10577_storage_ptr",
"typeString": "struct MockInstance.ComponentInfo storage pointer"
}
},
"id": 10651,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberLocation": "1478:2:61",
"memberName": "id",
"nodeType": "MemberAccess",
"referencedDeclaration": 10568,
"src": "1473:7:61",
"typeDescriptions": {