UNPKG

@etherisc/registry-contracts

Version:

Etherisc's smart contracts for the registry.

1,624 lines 81.1 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "exists", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "operator", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRegistry", "outputs": [ { "internalType": "contract IChainRegistry", "name": "registry", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "implementsIChainNft", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "mint", "outputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "_approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "string", "name": "uri", "type": "string" } ], "name": "setURI", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "tokenByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "tokenOfOwnerByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalMinted", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol", "15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol", "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", "47": "contracts/shared/UFixedMath.sol", "50": "contracts/staking/IStaking.sol" }, "ast": { "absolutePath": "contracts/registry/IChainNft.sol", "exportedSymbols": { "IChainNft": [ 3494 ], "IChainRegistry": [ 4025 ], "IERC721Enumerable": [ 12485 ], "NftId": [ 3353 ], "eqNftId": [ 3380 ], "gtz": [ 3418 ], "neNftId": [ 3402 ], "toNftId": [ 3447 ], "zeroNftId": [ 3430 ] }, "id": 3495, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3347, "literals": [ "solidity", "^", "0.8", ".19" ], "nodeType": "PragmaDirective", "src": "39:24:34" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Enumerable.sol", "file": "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol", "id": 3349, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3495, "sourceUnit": 12486, "src": "65:104:34", "symbolAliases": [ { "foreign": { "id": 3348, "name": "IERC721Enumerable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12485, "src": "73:17:34", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "absolutePath": "contracts/registry/IChainRegistry.sol", "file": "./IChainRegistry.sol", "id": 3351, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3495, "sourceUnit": 4026, "src": "171:52:34", "symbolAliases": [ { "foreign": { "id": 3350, "name": "IChainRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4025, "src": "179:14:34", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" } ], "unitAlias": "" }, { "canonicalName": "NftId", "id": 3353, "name": "NftId", "nameLocation": "230:5:34", "nodeType": "UserDefinedValueTypeDefinition", "src": "225:21:34", "underlyingType": { "id": 3352, "name": "uint96", "nodeType": "ElementaryTypeName", "src": "239:6:34", "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } } }, { "functionList": [ { "definition": { "id": 3354, "name": "eqNftId", "nameLocations": [ "260:7:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3380, "src": "260:7:34" }, "operator": "==" }, { "definition": { "id": 3355, "name": "neNftId", "nameLocations": [ "279:7:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3402, "src": "279:7:34" }, "operator": "!=" } ], "global": true, "id": 3358, "nodeType": "UsingForDirective", "src": "248:68:34", "typeName": { "id": 3357, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3356, "name": "NftId", "nameLocations": [ "303:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "303:5:34" }, "referencedDeclaration": 3353, "src": "303:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } }, { "body": { "id": 3379, "nodeType": "Block", "src": "379:46:34", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint96", "typeString": "uint96" }, "id": 3377, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 3371, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3361, "src": "401:1:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } ], "expression": { "id": 3369, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "388:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3370, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "394:6:34", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "388:12:34", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_NftId_$3353_$returns$_t_uint96_$", "typeString": "function (NftId) pure returns (uint96)" } }, "id": 3372, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "388:15:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "id": 3375, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3364, "src": "420:1:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } ], "expression": { "id": 3373, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "407:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3374, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "413:6:34", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "407:12:34", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_NftId_$3353_$returns$_t_uint96_$", "typeString": "function (NftId) pure returns (uint96)" } }, "id": 3376, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "407:15:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } }, "src": "388:34:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3368, "id": 3378, "nodeType": "Return", "src": "381:41:34" } ] }, "id": 3380, "implemented": true, "kind": "freeFunction", "modifiers": [], "name": "eqNftId", "nameLocation": "327:7:34", "nodeType": "FunctionDefinition", "parameters": { "id": 3365, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3361, "mutability": "mutable", "name": "a", "nameLocation": "341:1:34", "nodeType": "VariableDeclaration", "scope": 3380, "src": "335:7:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3360, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3359, "name": "NftId", "nameLocations": [ "335:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "335:5:34" }, "referencedDeclaration": 3353, "src": "335:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" }, { "constant": false, "id": 3364, "mutability": "mutable", "name": "b", "nameLocation": "350:1:34", "nodeType": "VariableDeclaration", "scope": 3380, "src": "344:7:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3363, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3362, "name": "NftId", "nameLocations": [ "344:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "344:5:34" }, "referencedDeclaration": 3353, "src": "344:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" } ], "src": "334:18:34" }, "returnParameters": { "id": 3368, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3367, "mutability": "mutable", "name": "isSame", "nameLocation": "371:6:34", "nodeType": "VariableDeclaration", "scope": 3380, "src": "366:11:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3366, "name": "bool", "nodeType": "ElementaryTypeName", "src": "366:4:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "365:13:34" }, "scope": 3495, "src": "318:107:34", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 3401, "nodeType": "Block", "src": "492:46:34", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint96", "typeString": "uint96" }, "id": 3399, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 3393, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3383, "src": "514:1:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } ], "expression": { "id": 3391, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "501:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3392, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "507:6:34", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "501:12:34", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_NftId_$3353_$returns$_t_uint96_$", "typeString": "function (NftId) pure returns (uint96)" } }, "id": 3394, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "501:15:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "id": 3397, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3386, "src": "533:1:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } ], "expression": { "id": 3395, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "520:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3396, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "526:6:34", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "520:12:34", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_NftId_$3353_$returns$_t_uint96_$", "typeString": "function (NftId) pure returns (uint96)" } }, "id": 3398, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "520:15:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } }, "src": "501:34:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3390, "id": 3400, "nodeType": "Return", "src": "494:41:34" } ] }, "id": 3402, "implemented": true, "kind": "freeFunction", "modifiers": [], "name": "neNftId", "nameLocation": "435:7:34", "nodeType": "FunctionDefinition", "parameters": { "id": 3387, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3383, "mutability": "mutable", "name": "a", "nameLocation": "449:1:34", "nodeType": "VariableDeclaration", "scope": 3402, "src": "443:7:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3382, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3381, "name": "NftId", "nameLocations": [ "443:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "443:5:34" }, "referencedDeclaration": 3353, "src": "443:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" }, { "constant": false, "id": 3386, "mutability": "mutable", "name": "b", "nameLocation": "458:1:34", "nodeType": "VariableDeclaration", "scope": 3402, "src": "452:7:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3385, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3384, "name": "NftId", "nameLocations": [ "452:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "452:5:34" }, "referencedDeclaration": 3353, "src": "452:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" } ], "src": "442:18:34" }, "returnParameters": { "id": 3390, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3389, "mutability": "mutable", "name": "isDifferent", "nameLocation": "479:11:34", "nodeType": "VariableDeclaration", "scope": 3402, "src": "474:16:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3388, "name": "bool", "nodeType": "ElementaryTypeName", "src": "474:4:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "473:18:34" }, "scope": 3495, "src": "426:112:34", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 3417, "nodeType": "Block", "src": "580:31:34", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_uint96", "typeString": "uint96" }, "id": 3415, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 3412, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3405, "src": "602:1:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } ], "expression": { "id": 3410, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "589:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3411, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "595:6:34", "memberName": "unwrap", "nodeType": "MemberAccess", "src": "589:12:34", "typeDescriptions": { "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_NftId_$3353_$returns$_t_uint96_$", "typeString": "function (NftId) pure returns (uint96)" } }, "id": 3413, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "589:15:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint96", "typeString": "uint96" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 3414, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "607:1:34", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "589:19:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 3409, "id": 3416, "nodeType": "Return", "src": "582:26:34" } ] }, "id": 3418, "implemented": true, "kind": "freeFunction", "modifiers": [], "name": "gtz", "nameLocation": "548:3:34", "nodeType": "FunctionDefinition", "parameters": { "id": 3406, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3405, "mutability": "mutable", "name": "a", "nameLocation": "558:1:34", "nodeType": "VariableDeclaration", "scope": 3418, "src": "552:7:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3404, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3403, "name": "NftId", "nameLocations": [ "552:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "552:5:34" }, "referencedDeclaration": 3353, "src": "552:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" } ], "src": "551:9:34" }, "returnParameters": { "id": 3409, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3408, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3418, "src": "574:4:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3407, "name": "bool", "nodeType": "ElementaryTypeName", "src": "574:4:34", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "573:6:34" }, "scope": 3495, "src": "539:72:34", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 3429, "nodeType": "Block", "src": "653:25:34", "statements": [ { "expression": { "arguments": [ { "hexValue": "30", "id": 3426, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "673:1:34", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "expression": { "id": 3424, "name": "NftId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3353, "src": "662:5:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "type(NftId)" } }, "id": 3425, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "668:4:34", "memberName": "wrap", "nodeType": "MemberAccess", "src": "662:10:34", "typeDescriptions": { "typeIdentifier": "t_function_wrap_pure$_t_uint96_$returns$_t_userDefinedValueType$_NftId_$3353_$", "typeString": "function (uint96) pure returns (NftId)" } }, "id": 3427, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "662:13:34", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "functionReturnParameters": 3423, "id": 3428, "nodeType": "Return", "src": "655:20:34" } ] }, "id": 3430, "implemented": true, "kind": "freeFunction", "modifiers": [], "name": "zeroNftId", "nameLocation": "621:9:34", "nodeType": "FunctionDefinition", "parameters": { "id": 3419, "nodeType": "ParameterList", "parameters": [], "src": "630:2:34" }, "returnParameters": { "id": 3423, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3422, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3430, "src": "646:5:34", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" }, "typeName": { "id": 3421, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3420, "name": "NftId", "nameLocations": [ "646:5:34" ], "nodeType": "IdentifierPath", "referencedDeclaration": 3353, "src": "646:5:34" }, "referencedDeclaration": 3353, "src": "646:5:34", "typeDescriptions": { "typeIdentifier": "t_userDefinedValueType$_NftId_$3353", "typeString": "NftId" } }, "visibility": "internal" } ], "src": "645:7:34" }, "scope": 3495, "src": "612:66:34", "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "body": { "id": 3446, "nodeType": "Block", "src": "734:39:34", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "id": 3442, "name": "tokenId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3432, "src": "761:7:34", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 3441, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "754:6:34", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint96_$", "typeString": "type(uint96)" }, "typeName": { "id": 3440, "name": "uint96", "nodeType": "ElementaryTypeName", "src": "754:6:34", "typeDescriptions": {} } }, "id": 3443, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "754:15:34", "tryCall": f