@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,452 lines (1,451 loc) • 385 kB
JSON
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"indexed": false,
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "activatedBy",
"type": "address"
}
],
"name": "LogVersionableActivated",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "address",
"name": "activatedBy",
"type": "address"
}
],
"name": "activate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "blockNumber",
"outputs": [
{
"internalType": "Blocknumber",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getVersion",
"outputs": [
{
"internalType": "Version",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "getVersionInfo",
"outputs": [
{
"components": [
{
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "address",
"name": "activatedBy",
"type": "address"
},
{
"internalType": "Blocknumber",
"name": "activatedIn",
"type": "uint32"
},
{
"internalType": "Timestamp",
"name": "activatedAt",
"type": "uint40"
}
],
"internalType": "struct IVersionable.VersionInfo",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "shift",
"type": "uint8"
}
],
"name": "intToBytes",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "isActivated",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "x",
"type": "bytes5"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Blocknumber",
"name": "x",
"type": "uint32"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Timestamp",
"name": "x",
"type": "uint40"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "toVersionParts",
"outputs": [
{
"internalType": "VersionPart",
"name": "major",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "minor",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "patch",
"type": "uint16"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "Version",
"name": "",
"type": "uint48"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "versionParts",
"outputs": [
{
"internalType": "VersionPart",
"name": "major",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "minor",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "patch",
"type": "uint16"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "versions",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"42": "contracts/shared/BaseTypes.sol",
"43": "contracts/shared/IBaseTypes.sol",
"44": "contracts/shared/IVersionType.sol",
"45": "contracts/shared/IVersionable.sol",
"48": "contracts/shared/Versionable.sol"
},
"ast": {
"absolutePath": "contracts/shared/Versionable.sol",
"exportedSymbols": {
"BaseTypes": [
4443
],
"Blocknumber": [
4713
],
"IVersionable": [
4856
],
"Timestamp": [
4530
],
"Version": [
12269
],
"VersionPart": [
12267
],
"Versionable": [
5891
],
"blockTimestamp": [
4700
],
"toVersionPart": [
12383
],
"versionToInt": [
12369
],
"zeroVersion": [
12454
]
},
"id": 5892,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5593,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:48"
},
{
"absolutePath": "contracts/shared/IBaseTypes.sol",
"file": "./IBaseTypes.sol",
"id": 5597,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5892,
"sourceUnit": 4754,
"src": "65:72:48",
"symbolAliases": [
{
"foreign": {
"id": 5594,
"name": "Blocknumber",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4713,
"src": "73:11:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5595,
"name": "Timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4530,
"src": "86:9:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5596,
"name": "blockTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4700,
"src": "97:14:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/BaseTypes.sol",
"file": "./BaseTypes.sol",
"id": 5599,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5892,
"sourceUnit": 4444,
"src": "138:42:48",
"symbolAliases": [
{
"foreign": {
"id": 5598,
"name": "BaseTypes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4443,
"src": "146:9:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/IVersionType.sol",
"file": "./IVersionType.sol",
"id": 5605,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5892,
"sourceUnit": 12455,
"src": "181:98:48",
"symbolAliases": [
{
"foreign": {
"id": 5600,
"name": "Version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12269,
"src": "189:7:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5601,
"name": "VersionPart",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12267,
"src": "198:11:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5602,
"name": "toVersionPart",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12383,
"src": "211:13:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5603,
"name": "versionToInt",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12369,
"src": "226:12:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 5604,
"name": "zeroVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12454,
"src": "240:11:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/IVersionable.sol",
"file": "./IVersionable.sol",
"id": 5607,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5892,
"sourceUnit": 4857,
"src": "280:48:48",
"symbolAliases": [
{
"foreign": {
"id": 5606,
"name": "IVersionable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4856,
"src": "288:12:48",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 5608,
"name": "BaseTypes",
"nameLocations": [
"359:9:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4443,
"src": "359:9:48"
},
"id": 5609,
"nodeType": "InheritanceSpecifier",
"src": "359:9:48"
},
{
"baseName": {
"id": 5610,
"name": "IVersionable",
"nameLocations": [
"374:12:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4856,
"src": "374:12:48"
},
"id": 5611,
"nodeType": "InheritanceSpecifier",
"src": "374:12:48"
}
],
"canonicalName": "Versionable",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5891,
"linearizedBaseContracts": [
5891,
4856,
4443,
4753
],
"name": "Versionable",
"nameLocation": "339:11:48",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 5617,
"mutability": "mutable",
"name": "_versionHistory",
"nameLocation": "447:15:48",
"nodeType": "VariableDeclaration",
"scope": 5891,
"src": "394:68:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_userDefinedValueType$_Version_$12269_$_t_struct$_VersionInfo_$4775_storage_$",
"typeString": "mapping(Version => struct IVersionable.VersionInfo)"
},
"typeName": {
"id": 5616,
"keyName": "version",
"keyNameLocation": "410:7:48",
"keyType": {
"id": 5613,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 5612,
"name": "Version",
"nameLocations": [
"402:7:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12269,
"src": "402:7:48"
},
"referencedDeclaration": 12269,
"src": "402:7:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"nodeType": "Mapping",
"src": "394:44:48",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_userDefinedValueType$_Version_$12269_$_t_struct$_VersionInfo_$4775_storage_$",
"typeString": "mapping(Version => struct IVersionable.VersionInfo)"
},
"valueName": "info",
"valueNameLocation": "433:4:48",
"valueType": {
"id": 5615,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 5614,
"name": "VersionInfo",
"nameLocations": [
"421:11:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4775,
"src": "421:11:48"
},
"referencedDeclaration": 4775,
"src": "421:11:48",
"typeDescriptions": {
"typeIdentifier": "t_struct$_VersionInfo_$4775_storage_ptr",
"typeString": "struct IVersionable.VersionInfo"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 5621,
"mutability": "mutable",
"name": "_versions",
"nameLocation": "487:9:48",
"nodeType": "VariableDeclaration",
"scope": 5891,
"src": "468:28:48",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_userDefinedValueType$_Version_$12269_$dyn_storage",
"typeString": "Version[]"
},
"typeName": {
"baseType": {
"id": 5619,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 5618,
"name": "Version",
"nameLocations": [
"468:7:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12269,
"src": "468:7:48"
},
"referencedDeclaration": 12269,
"src": "468:7:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"id": 5620,
"nodeType": "ArrayTypeName",
"src": "468:10:48",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_userDefinedValueType$_Version_$12269_$dyn_storage_ptr",
"typeString": "Version[]"
}
},
"visibility": "private"
},
{
"body": {
"id": 5633,
"nodeType": "Block",
"src": "571:53:48",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"id": 5627,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "599:4:48",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Versionable_$5891",
"typeString": "contract Versionable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Versionable_$5891",
"typeString": "contract Versionable"
}
],
"id": 5626,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "591:7:48",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 5625,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "591:7:48",
"typeDescriptions": {}
}
},
"id": 5628,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "591:13:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"expression": {
"id": 5629,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "606:3:48",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 5630,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "610:6:48",
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "606:10:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 5624,
"name": "_activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5719,
"src": "581:9:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 5631,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "581:36:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5632,
"nodeType": "ExpressionStatement",
"src": "581:36:48"
}
]
},
"id": 5634,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5622,
"nodeType": "ParameterList",
"parameters": [],
"src": "568:2:48"
},
"returnParameters": {
"id": 5623,
"nodeType": "ParameterList",
"parameters": [],
"src": "571:0:48"
},
"scope": 5891,
"src": "557:67:48",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
4792
],
"body": {
"id": 5647,
"nodeType": "Block",
"src": "876:56:48",
"statements": [
{
"expression": {
"arguments": [
{
"id": 5643,
"name": "implementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5636,
"src": "897:14:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 5644,
"name": "activatedBy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5638,
"src": "913:11:48",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 5642,
"name": "_activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5719,
"src": "887:9:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 5645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "887:38:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5646,
"nodeType": "ExpressionStatement",
"src": "887:38:48"
}
]
},
"functionSelector": "9555c4db",
"id": 5648,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "activate",
"nameLocation": "775:8:48",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 5640,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "863:8:48"
},
"parameters": {
"id": 5639,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5636,
"mutability": "mutable",
"name": "implementation",
"nameLocation": "792:14:48",
"nodeType": "VariableDeclaration",
"scope": 5648,
"src": "784:22:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5635,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "784:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5638,
"mutability": "mutable",
"name": "activatedBy",
"nameLocation": "816:11:48",
"nodeType": "VariableDeclaration",
"scope": 5648,
"src": "808:19:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5637,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "808:7:48",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "783:45:48"
},
"returnParameters": {
"id": 5641,
"nodeType": "ParameterList",
"parameters": [],
"src": "876:0:48"
},
"scope": 5891,
"src": "766:166:48",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "external"
},
{
"body": {
"id": 5718,
"nodeType": "Block",
"src": "1144:820:48",
"statements": [
{
"assignments": [
5657
],
"declarations": [
{
"constant": false,
"id": 5657,
"mutability": "mutable",
"name": "thisVersion",
"nameLocation": "1162:11:48",
"nodeType": "VariableDeclaration",
"scope": 5718,
"src": "1154:19:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
},
"typeName": {
"id": 5656,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 5655,
"name": "Version",
"nameLocations": [
"1154:7:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12269,
"src": "1154:7:48"
},
"referencedDeclaration": 12269,
"src": "1154:7:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"visibility": "internal"
}
],
"id": 5660,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 5658,
"name": "version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5818,
"src": "1176:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_userDefinedValueType$_Version_$12269_$",
"typeString": "function () pure returns (Version)"
}
},
"id": 5659,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1176:9:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1154:31:48"
},
{
"expression": {
"arguments": [
{
"id": 5665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1217:25:48",
"subExpression": {
"arguments": [
{
"id": 5663,
"name": "thisVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5657,
"src": "1230:11:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
],
"id": 5662,
"name": "isActivated",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5738,
"src": "1218:11:48",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_userDefinedValueType$_Version_$12269_$returns$_t_bool_$",
"typeString": "function (Version) view returns (bool)"
}
},
"id": 5664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1218:24:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a56524e2d3030313a56455253494f4e5f414c52454144595f414354495641544544",
"id": 5666,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1256:41:48",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4cda0349ca0aa76a41409a0fe8cdefe2b44b0ea87abb7a98ffbe6e8de20706e6",
"typeString": "literal_string \"ERROR:VRN-001:VERSION_ALREADY_ACTIVATED\""
},
"value": "ERROR:VRN-001:VERSION_ALREADY_ACTIVATED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4cda0349ca0aa76a41409a0fe8cdefe2b44b0ea87abb7a98ffbe6e8de20706e6",
"typeString": "literal_string \"ERROR:VRN-001:VERSION_ALREADY_ACTIVATED\""
}
],
"id": 5661,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1196:7:48",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 5667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1196:111:48",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5668,
"nodeType": "ExpressionStatement",
"src": "1196:111:48"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5672,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 5669,
"name": "_versions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5621,
"src": "1374:9:48",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_userDefinedValueType$_Version_$12269_$dyn_storage",
"typeString": "Version[] storage ref"
}
},
"id": 5670,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1384:6:48",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1374:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 5671,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1393:1:48",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1374:20:48",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5691,
"nodeType": "IfStatement",
"src": "1371:237:48",
"trueBody": {
"id": 5690,
"nodeType": "Block",
"src": "1396:212:48",
"statements": [
{
"assignments": [
5675
],
"declarations": [
{
"constant": false,
"id": 5675,
"mutability": "mutable",
"name": "lastVersion",
"nameLocation": "1418:11:48",
"nodeType": "VariableDeclaration",
"scope": 5690,
"src": "1410:19:48",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
},
"typeName": {
"id": 5674,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 5673,
"name": "Version",
"nameLocations": [
"1410:7:48"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 12269,
"src": "1410:7:48"
},
"referencedDeclaration": 12269,
"src": "1410:7:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"visibility": "internal"
}
],
"id": 5682,
"initialValue": {
"baseExpression": {
"id": 5676,
"name": "_versions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5621,
"src": "1432:9:48",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_userDefinedValueType$_Version_$12269_$dyn_storage",
"typeString": "Version[] storage ref"
}
},
"id": 5681,
"indexExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5680,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 5677,
"name": "_versions",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5621,
"src": "1442:9:48",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_userDefinedValueType$_Version_$12269_$dyn_storage",
"typeString": "Version[] storage ref"
}
},
"id": 5678,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1452:6:48",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1442:16:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"hexValue": "31",
"id": 5679,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1461:1:48",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1442:20:48",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1432:31:48",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Version_$12269",
"typeString": "Version"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1410:53:48"