UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,945 lines (1,944 loc) 250 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "NftId", "name": "id", "type": "uint96" }, { "indexed": false, "internalType": "address", "name": "updatedBy", "type": "address" } ], "name": "LogChainRegistryObjectDataUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "NftId", "name": "id", "type": "uint96" }, { "indexed": false, "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "indexed": false, "internalType": "ObjectType", "name": "objectType", "type": "uint8" }, { "indexed": false, "internalType": "enum IChainRegistry.ObjectState", "name": "state", "type": "uint8" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" } ], "name": "LogChainRegistryObjectRegistered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "NftId", "name": "id", "type": "uint96" }, { "indexed": false, "internalType": "enum IChainRegistry.ObjectState", "name": "stateNew", "type": "uint8" }, { "indexed": false, "internalType": "enum IChainRegistry.ObjectState", "name": "stateOld", "type": "uint8" }, { "indexed": false, "internalType": "address", "name": "setBy", "type": "address" } ], "name": "LogChainRegistryObjectStateSet", "type": "event" }, { "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": [], "name": "chains", "outputs": [ { "internalType": "uint256", "name": "numberOfChains", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeBundleData", "outputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "string", "name": "displayName", "type": "string" }, { "internalType": "uint256", "name": "expiryAt", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeComponentData", "outputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "componentId", "type": "uint256" }, { "internalType": "address", "name": "token", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeInstanceData", "outputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "address", "name": "registry", "type": "address" }, { "internalType": "string", "name": "displayName", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeRegistryData", "outputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeStakeData", "outputs": [ { "internalType": "NftId", "name": "target", "type": "uint96" }, { "internalType": "ObjectType", "name": "targetType", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "decodeTokenData", "outputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "exists", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" }, { "internalType": "uint256", "name": "lifetimeExtension", "type": "uint256" } ], "name": "extendBundleLifetime", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "getBundleNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "idx", "type": "uint256" } ], "name": "getChainId", "outputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" } ], "name": "getChainNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "getComponentNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" } ], "name": "getInstanceNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" } ], "name": "getInstanceServiceFacade", "outputs": [ { "internalType": "contract IInstanceServiceFacade", "name": "instanceService", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getNft", "outputs": [ { "internalType": "contract IChainNft", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "ObjectType", "name": "t", "type": "uint8" }, { "internalType": "uint256", "name": "idx", "type": "uint256" } ], "name": "getNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "getNftInfo", "outputs": [ { "components": [ { "internalType": "NftId", "name": "id", "type": "uint96" }, { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "ObjectType", "name": "objectType", "type": "uint8" }, { "internalType": "enum IChainRegistry.ObjectState", "name": "state", "type": "uint8" }, { "internalType": "string", "name": "uri", "type": "string" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "Blocknumber", "name": "mintedIn", "type": "uint32" }, { "internalType": "Blocknumber", "name": "updatedIn", "type": "uint32" }, { "internalType": "Version", "name": "version", "type": "uint48" } ], "internalType": "struct IChainRegistry.NftInfo", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" } ], "name": "getRegistryNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getStaking", "outputs": [ { "internalType": "contract IStaking", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "getTokenNftId", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "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": [], "name": "implementsIChainRegistry", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "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": "chain", "type": "bytes5" }, { "internalType": "ObjectType", "name": "t", "type": "uint8" } ], "name": "objects", "outputs": [ { "internalType": "uint256", "name": "numberOfObjects", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "nftOwner", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "name": "probeInstance", "outputs": [ { "internalType": "bool", "name": "isContract", "type": "bool" }, { "internalType": "uint256", "name": "contractSize", "type": "uint256" }, { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "bytes32", "name": "istanceId", "type": "bytes32" }, { "internalType": "bool", "name": "isValidId", "type": "bool" }, { "internalType": "contract IInstanceServiceFacade", "name": "instanceService", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "string", "name": "displayName", "type": "string" }, { "internalType": "uint256", "name": "expiryAt", "type": "uint256" } ], "name": "registerBundle", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "registerChain", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "instanceId", "type": "bytes32" }, { "internalType": "uint256", "name": "componentId", "type": "uint256" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "registerComponent", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "instanceRegistry", "type": "address" }, { "internalType": "string", "name": "displayName", "type": "string" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "registerInstance", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "address", "name": "registry", "type": "address" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "registerRegistry", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "target", "type": "uint96" }, { "internalType": "address", "name": "staker", "type": "address" } ], "name": "registerStake", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "ChainId", "name": "chain", "type": "bytes5" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "registerToken", "outputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "NftId", "name": "id", "type": "uint96" }, { "internalType": "enum IChainRegistry.ObjectState", "name": "state", "type": "uint8" } ], "name": "setObjectState", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "toChain", "outputs": [ { "internalType": "ChainId", "name": "", "type": "bytes5" } ], "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" }, { "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": { "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", "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" }, "ast": { "absolutePath": "contracts/registry/IChainRegistry.sol", "exportedSymbols": { "Blocknumber": [ 4713 ], "ChainId": [ 4447 ], "IBaseTypes": [ 4753 ], "IChainNft": [ 3494 ], "IChainRegistry": [ 4025 ], "IInstanceServiceFacade": [ 4295 ], "IStaking": [ 6479 ], "IVersionable": [ 4856 ], "NftId": [ 3353 ], "ObjectType": [ 3555 ], "Version": [ 12269 ], "eqObjectType": [ 3582 ], "neObjectType": [ 3604 ] }, "id": 4026, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3538, "literals": [ "solidity", "^", "0.8", ".19" ], "nodeType": "PragmaDirective", "src": "39:24:36" }, { "absolutePath": "contracts/shared/IBaseTypes.sol", "file": "../shared/IBaseTypes.sol", "id": 3542, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 4754, "src": "65:74:36", "symbolAliases": [ { "foreign": { "id": 3539, "name": "IBaseTypes", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4753, "src": "73:10:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 3540, "name": "ChainId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4447, "src": "85:7:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 3541, "name": "Blocknumber", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4713, "src": "94:11:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/shared/IVersionType.sol", "file": "../shared/IVersionType.sol", "id": 3544, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 12455, "src": "140:51:36", "symbolAliases": [ { "foreign": { "id": 3543, "name": "Version", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12269, "src": "148:7:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/shared/IVersionable.sol", "file": "../shared/IVersionable.sol", "id": 3546, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 4857, "src": "192:56:36", "symbolAliases": [ { "foreign": { "id": 3545, "name": "IVersionable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4856, "src": "200:12:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/staking/IStaking.sol", "file": "../staking/IStaking.sol", "id": 3548, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 6480, "src": "250:49:36", "symbolAliases": [ { "foreign": { "id": 3547, "name": "IStaking", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6479, "src": "258:8:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/registry/IChainNft.sol", "file": "./IChainNft.sol", "id": 3551, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 3495, "src": "301:49:36", "symbolAliases": [ { "foreign": { "id": 3549, "name": "IChainNft", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3494, "src": "309:9:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" }, { "foreign": { "id": 3550, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "320:5:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/registry/IInstanceServiceFacade.sol", "file": "./IInstanceServiceFacade.sol", "id": 3553, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 4026, "sourceUnit": 4296, "src": "351:68:36", "symbolAliases": [ { "foreign": { "id": 3552, "name": "IInstanceServiceFacade", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4295, "src": "359:22:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "canonicalName": "ObjectType", "id": 3555, "name": "ObjectType", "nameLocation": "426:10:36", "nodeType": "UserDefinedValueTypeDefinition", "src": "421:25:36", "underlyingType": { "id": 3554, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "440:5:36", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } } }, { "functionList": [ { "definition": { "id": 3556, "name": "eqObjectType", "nameLocations": [ "460:12:36" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3582, "src": "460:12:36" }, "operator": "==" }, { "definition": { "id": 3557, "name": "neObjectType", "nameLocations": [ "484:12:36" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3604, "src": "484:12:36" }, "operator": "!=" } ], "global": true, "id": 3560, "nodeType": "UsingForDirective", "src": "448:83:36", "typeName": { "id": 3559, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3558, "name": "ObjectType", "nameLocations": [ "513:10:36" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3555, "src": "513:10:36" }, "referencedDeclaration": 3555, "src": "513:10:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } } }, { "body": { "id": 3581, "nodeType": "Block", "src": "609:56:36", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "id": 3579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 3573, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3563, "src": "636:1:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } ], "expression": { "id": 3571, "name": "ObjectType", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3555, "src": "618:10:36", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_ObjectType_$3555_$", "typeString": "type(ObjectType)" } }, "id": 3572, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "629:6:36", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "618:17:36", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ObjectType_$3555_$returns$_t_uint8_$", "typeString": "function (ObjectType) pure returns (uint8)" } }, "id": 3574, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "618:20:36", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "id": 3577, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3566, "src": "660:1:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } ], "expression": { "id": 3575, "name": "ObjectType", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3555, "src": "642:10:36", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_ObjectType_$3555_$", "typeString": "type(ObjectType)" } }, "id": 3576, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "653:6:36", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "642:17:36", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ObjectType_$3555_$returns$_t_uint8_$", "typeString": "function (ObjectType) pure returns (uint8)" } }, "id": 3578, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "642:20:36", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "618:44:36", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3570, "id": 3580, "nodeType": "Return", "src": "611:51:36" } ] }, "id": 3582, "implemented": true, "kind": "freeFunction", "modifiers": [], "name": "eqObjectType", "nameLocation": "542:12:36", "nodeType": "FunctionDefinition", "parameters": { "id": 3567, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3563, "mutability": "mutable", "name": "a", "nameLocation": "566:1:36", "nodeType": "VariableDeclaration", "scope": 3582, "src": "555:12:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" }, "typeName": { "id": 3562, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3561, "name": "ObjectType", "nameLocations": [ "555:10:36" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3555, "src": "555:10:36" }, "referencedDeclaration": 3555, "src": "555:10:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } }, "visibility": "internal" }, { "constant": false, "id": 3566, "mutability": "mutable", "name": "b", "nameLocation": "580:1:36", "nodeType": "VariableDeclaration", "scope": 3582, "src": "569:12:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" }, "typeName": { "id": 3565, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3564, "name": "ObjectType", "nameLocations": [ "569:10:36" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3555, "src": "569:10:36" }, "referencedDeclaration": 3555, "src": "569:10:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } }, "visibility": "internal" } ], "src": "554:28:36" }, "returnParameters": { "id": 3570, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3569, "mutability": "mutable", "name": "isSame", "nameLocation": "601:6:36", "nodeType": "VariableDeclaration", "scope": 3582, "src": "596:11:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3568, "name": "bool", "nodeType": "ElementaryTypeName", "src": "596:4:36", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "595:13:36" }, "scope": 4026, "src": "533:132:36", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 3603, "nodeType": "Block", "src": "747:56:36", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "id": 3601, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 3595, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3585, "src": "774:1:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555", "typeString": "ObjectType" } ], "expression": { "id": 3593, "name": "ObjectType", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3555, "src": "756:10:36", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_ObjectType_$3555_$", "typeString": "type(ObjectType)" } }, "id": 3594, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "767:6:36", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "756:17:36", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ObjectType_$3555_$returns$_t_uint8_$", "typeString": "function (ObjectType) pure returns (uint8)" } }, "id": 3596, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "756:20:36", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "id": 3599, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3588, "src": "798:1:36", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_ObjectType_$3555",