@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
1,492 lines • 145 kB
JSON
{
"abi": [
{
"inputs": [],
"name": "blockNumber",
"outputs": [
{
"internalType": "Blocknumber",
"name": "",
"type": "uint32"
}
],
"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": "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"
}
],
"allSourcePaths": {
"43": "contracts/shared/IBaseTypes.sol"
},
"ast": {
"absolutePath": "contracts/shared/IBaseTypes.sol",
"exportedSymbols": {
"Blocknumber": [
4713
],
"ChainId": [
4447
],
"IBaseTypes": [
4753
],
"Timestamp": [
4530
],
"blockTimestamp": [
4700
],
"eqChainId": [
4474
],
"eqTimestamp": [
4649
],
"gtTimestamp": [
4561
],
"gteTimestamp": [
4583
],
"ltTimestamp": [
4605
],
"lteTimestamp": [
4627
],
"neqChainId": [
4496
],
"neqTimestamp": [
4671
],
"thisChainId": [
4528
],
"toChainId": [
4516
],
"toTimestamp": [
4688
],
"zeroTimestamp": [
4711
]
},
"id": 4754,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4445,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:43"
},
{
"canonicalName": "ChainId",
"id": 4447,
"name": "ChainId",
"nameLocation": "205:7:43",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "200:23:43",
"underlyingType": {
"id": 4446,
"name": "bytes5",
"nodeType": "ElementaryTypeName",
"src": "216:6:43",
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
}
},
{
"functionList": [
{
"definition": {
"id": 4448,
"name": "eqChainId",
"nameLocations": [
"237:9:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4474,
"src": "237:9:43"
},
"operator": "=="
},
{
"definition": {
"id": 4449,
"name": "neqChainId",
"nameLocations": [
"258:10:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4496,
"src": "258:10:43"
},
"operator": "!="
}
],
"global": true,
"id": 4452,
"nodeType": "UsingForDirective",
"src": "225:75:43",
"typeName": {
"id": 4451,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4450,
"name": "ChainId",
"nameLocations": [
"285:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "285:7:43"
},
"referencedDeclaration": 4447,
"src": "285:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
}
},
{
"body": {
"id": 4473,
"nodeType": "Block",
"src": "369:50:43",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
},
"id": 4471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 4465,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4455,
"src": "393:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
],
"expression": {
"id": 4463,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "378:7:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "type(ChainId)"
}
},
"id": 4464,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "386:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "378:14:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ChainId_$4447_$returns$_t_bytes5_$",
"typeString": "function (ChainId) pure returns (bytes5)"
}
},
"id": 4466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "378:17:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"id": 4469,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4458,
"src": "414:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
],
"expression": {
"id": 4467,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "399:7:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "type(ChainId)"
}
},
"id": 4468,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "407:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "399:14:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ChainId_$4447_$returns$_t_bytes5_$",
"typeString": "function (ChainId) pure returns (bytes5)"
}
},
"id": 4470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "399:17:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
},
"src": "378:38:43",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 4462,
"id": 4472,
"nodeType": "Return",
"src": "371:45:43"
}
]
},
"id": 4474,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "eqChainId",
"nameLocation": "311:9:43",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4459,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4455,
"mutability": "mutable",
"name": "a",
"nameLocation": "329:1:43",
"nodeType": "VariableDeclaration",
"scope": 4474,
"src": "321:9:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4454,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4453,
"name": "ChainId",
"nameLocations": [
"321:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "321:7:43"
},
"referencedDeclaration": 4447,
"src": "321:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4458,
"mutability": "mutable",
"name": "b",
"nameLocation": "340:1:43",
"nodeType": "VariableDeclaration",
"scope": 4474,
"src": "332:9:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4457,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4456,
"name": "ChainId",
"nameLocations": [
"332:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "332:7:43"
},
"referencedDeclaration": 4447,
"src": "332:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
}
],
"src": "320:22:43"
},
"returnParameters": {
"id": 4462,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4461,
"mutability": "mutable",
"name": "isSame",
"nameLocation": "361:6:43",
"nodeType": "VariableDeclaration",
"scope": 4474,
"src": "356:11:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4460,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "356:4:43",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "355:13:43"
},
"scope": 4754,
"src": "302:117:43",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4495,
"nodeType": "Block",
"src": "493:50:43",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
},
"id": 4493,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 4487,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4477,
"src": "517:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
],
"expression": {
"id": 4485,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "502:7:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "type(ChainId)"
}
},
"id": 4486,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "510:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "502:14:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ChainId_$4447_$returns$_t_bytes5_$",
"typeString": "function (ChainId) pure returns (bytes5)"
}
},
"id": 4488,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "502:17:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"id": 4491,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4480,
"src": "538:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
],
"expression": {
"id": 4489,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "523:7:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "type(ChainId)"
}
},
"id": 4490,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "531:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "523:14:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ChainId_$4447_$returns$_t_bytes5_$",
"typeString": "function (ChainId) pure returns (bytes5)"
}
},
"id": 4492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "523:17:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
},
"src": "502:38:43",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 4484,
"id": 4494,
"nodeType": "Return",
"src": "495:45:43"
}
]
},
"id": 4496,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "neqChainId",
"nameLocation": "429:10:43",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4481,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4477,
"mutability": "mutable",
"name": "a",
"nameLocation": "448:1:43",
"nodeType": "VariableDeclaration",
"scope": 4496,
"src": "440:9:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4476,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4475,
"name": "ChainId",
"nameLocations": [
"440:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "440:7:43"
},
"referencedDeclaration": 4447,
"src": "440:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 4480,
"mutability": "mutable",
"name": "b",
"nameLocation": "459:1:43",
"nodeType": "VariableDeclaration",
"scope": 4496,
"src": "451:9:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4479,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4478,
"name": "ChainId",
"nameLocations": [
"451:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "451:7:43"
},
"referencedDeclaration": 4447,
"src": "451:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
}
],
"src": "439:22:43"
},
"returnParameters": {
"id": 4484,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4483,
"mutability": "mutable",
"name": "isDifferent",
"nameLocation": "480:11:43",
"nodeType": "VariableDeclaration",
"scope": 4496,
"src": "475:16:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4482,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "475:4:43",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "474:18:43"
},
"scope": 4754,
"src": "420:123:43",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4515,
"nodeType": "Block",
"src": "603:48:43",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"id": 4510,
"name": "chainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4498,
"src": "639:7:43",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4509,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "632:6:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint40_$",
"typeString": "type(uint40)"
},
"typeName": {
"id": 4508,
"name": "uint40",
"nodeType": "ElementaryTypeName",
"src": "632:6:43",
"typeDescriptions": {}
}
},
"id": 4511,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "632:15:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
],
"id": 4507,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "625:6:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes5_$",
"typeString": "type(bytes5)"
},
"typeName": {
"id": 4506,
"name": "bytes5",
"nodeType": "ElementaryTypeName",
"src": "625:6:43",
"typeDescriptions": {}
}
},
"id": 4512,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "625:23:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes5",
"typeString": "bytes5"
}
],
"expression": {
"id": 4504,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "612:7:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "type(ChainId)"
}
},
"id": 4505,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "620:4:43",
"memberName": "wrap",
"nodeType": "MemberAccess",
"src": "612:12:43",
"typeDescriptions": {
"typeIdentifier": "t_function_wrap_pure$_t_bytes5_$returns$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "function (bytes5) pure returns (ChainId)"
}
},
"id": 4513,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "612:37:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"functionReturnParameters": 4503,
"id": 4514,
"nodeType": "Return",
"src": "605:44:43"
}
]
},
"id": 4516,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "toChainId",
"nameLocation": "554:9:43",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4499,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4498,
"mutability": "mutable",
"name": "chainId",
"nameLocation": "572:7:43",
"nodeType": "VariableDeclaration",
"scope": 4516,
"src": "564:15:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4497,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "564:7:43",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "563:17:43"
},
"returnParameters": {
"id": 4503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4502,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4516,
"src": "594:7:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4501,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4500,
"name": "ChainId",
"nameLocations": [
"594:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "594:7:43"
},
"referencedDeclaration": 4447,
"src": "594:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
}
],
"src": "593:9:43"
},
"scope": 4754,
"src": "545:106:43",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4527,
"nodeType": "Block",
"src": "697:36:43",
"statements": [
{
"expression": {
"arguments": [
{
"expression": {
"id": 4523,
"name": "block",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -4,
"src": "716:5:43",
"typeDescriptions": {
"typeIdentifier": "t_magic_block",
"typeString": "block"
}
},
"id": 4524,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "722:7:43",
"memberName": "chainid",
"nodeType": "MemberAccess",
"src": "716:13:43",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 4522,
"name": "toChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4516,
"src": "706:9:43",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_userDefinedValueType$_ChainId_$4447_$",
"typeString": "function (uint256) pure returns (ChainId)"
}
},
"id": 4525,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "706:24:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"functionReturnParameters": 4521,
"id": 4526,
"nodeType": "Return",
"src": "699:31:43"
}
]
},
"id": 4528,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "thisChainId",
"nameLocation": "661:11:43",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4517,
"nodeType": "ParameterList",
"parameters": [],
"src": "672:2:43"
},
"returnParameters": {
"id": 4521,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4520,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4528,
"src": "688:7:43",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
},
"typeName": {
"id": 4519,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4518,
"name": "ChainId",
"nameLocations": [
"688:7:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4447,
"src": "688:7:43"
},
"referencedDeclaration": 4447,
"src": "688:7:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_ChainId_$4447",
"typeString": "ChainId"
}
},
"visibility": "internal"
}
],
"src": "687:9:43"
},
"scope": 4754,
"src": "652:81:43",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"canonicalName": "Timestamp",
"id": 4530,
"name": "Timestamp",
"nameLocation": "740:9:43",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "735:25:43",
"underlyingType": {
"id": 4529,
"name": "uint40",
"nodeType": "ElementaryTypeName",
"src": "753:6:43",
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
}
},
{
"functionList": [
{
"definition": {
"id": 4531,
"name": "gtTimestamp",
"nameLocations": [
"774:11:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4561,
"src": "774:11:43"
},
"operator": ">"
},
{
"definition": {
"id": 4532,
"name": "gteTimestamp",
"nameLocations": [
"796:12:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4583,
"src": "796:12:43"
},
"operator": ">="
},
{
"definition": {
"id": 4533,
"name": "ltTimestamp",
"nameLocations": [
"820:11:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4605,
"src": "820:11:43"
},
"operator": "<"
},
{
"definition": {
"id": 4534,
"name": "lteTimestamp",
"nameLocations": [
"842:12:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4627,
"src": "842:12:43"
},
"operator": "<="
},
{
"definition": {
"id": 4535,
"name": "eqTimestamp",
"nameLocations": [
"866:11:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4649,
"src": "866:11:43"
},
"operator": "=="
},
{
"definition": {
"id": 4536,
"name": "neqTimestamp",
"nameLocations": [
"889:12:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4671,
"src": "889:12:43"
},
"operator": "!="
}
],
"global": true,
"id": 4539,
"nodeType": "UsingForDirective",
"src": "762:173:43",
"typeName": {
"id": 4538,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 4537,
"name": "Timestamp",
"nameLocations": [
"918:9:43"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4530,
"src": "918:9:43"
},
"referencedDeclaration": 4530,
"src": "918:9:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Timestamp_$4530",
"typeString": "Timestamp"
}
}
},
{
"body": {
"id": 4560,
"nodeType": "Block",
"src": "1003:53:43",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
},
"id": 4558,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 4552,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4542,
"src": "1029:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Timestamp_$4530",
"typeString": "Timestamp"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_Timestamp_$4530",
"typeString": "Timestamp"
}
],
"expression": {
"id": 4550,
"name": "Timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4530,
"src": "1012:9:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_Timestamp_$4530_$",
"typeString": "type(Timestamp)"
}
},
"id": 4551,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1022:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "1012:16:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_Timestamp_$4530_$returns$_t_uint40_$",
"typeString": "function (Timestamp) pure returns (uint40)"
}
},
"id": 4553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1012:19:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"arguments": [
{
"id": 4556,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4545,
"src": "1051:1:43",
"typeDescriptions": {
"typeIdentifier": "t_userDefinedValueType$_Timestamp_$4530",
"typeString": "Timestamp"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_userDefinedValueType$_Timestamp_$4530",
"typeString": "Timestamp"
}
],
"expression": {
"id": 4554,
"name": "Timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4530,
"src": "1034:9:43",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_userDefinedValueType$_Timestamp_$4530_$",
"typeString": "type(Timestamp)"
}
},
"id": 4555,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1044:6:43",
"memberName": "unwrap",
"nodeType": "MemberAccess",
"src": "1034:16:43",
"typeDescriptions": {
"typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_Timestamp_$4530_$returns$_t_uint40_$",
"typeString": "function (Timestamp) pure returns (uint40)"
}
},
"id": 4557,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1034:19:43",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint40",
"typeString": "uint40"
}
},
"src": "1012:41:43",
"typeDescriptions": {
"typ