924 lines
36 KiB
JSON
924 lines
36 KiB
JSON
{
|
|
"abi": [],
|
|
"bytecode": {
|
|
"object": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea2646970667358221220bf0ddfe91e11913198c1ecf5498e1f03f0e472589cb8e27394f39a0a55b3e22a64736f6c63430008110033",
|
|
"sourceMap": "424:971:25:-:0;;;;;;;;;;;;;;;;;;;;;",
|
|
"linkReferences": {}
|
|
},
|
|
"deployedBytecode": {
|
|
"object": "0x600080fdfea2646970667358221220bf0ddfe91e11913198c1ecf5498e1f03f0e472589cb8e27394f39a0a55b3e22a64736f6c63430008110033",
|
|
"sourceMap": "424:971:25:-:0;;",
|
|
"linkReferences": {}
|
|
},
|
|
"methodIdentifiers": {},
|
|
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Matt Condon (@shrugs)\",\"details\":\"Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number of elements in a mapping, issuing ERC721 ids, or counting request ids. Include with `using Counters for Counters.Counter;`\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Counters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Counters.sol\":\"Counters\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/=node_modules/@ensdomains/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat-deploy/=node_modules/hardhat-deploy/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Counters.sol\":{\"keccak256\":\"0xf0018c2440fbe238dd3a8732fa8e17a0f9dce84d31451dc8a32f6d62b349c9f1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://59e1c62884d55b70f3ae5432b44bb3166ad71ae3acd19c57ab6ddc3c87c325ee\",\"dweb:/ipfs/QmezuXg5GK5oeA4F91EZhozBFekhq5TD966bHPH18cCqhu\"]}},\"version\":1}",
|
|
"metadata": {
|
|
"compiler": {
|
|
"version": "0.8.17+commit.8df45f5f"
|
|
},
|
|
"language": "Solidity",
|
|
"output": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
},
|
|
"settings": {
|
|
"remappings": [
|
|
":@ensdomains/=node_modules/@ensdomains/",
|
|
":@openzeppelin/=node_modules/@openzeppelin/",
|
|
":ds-test/=lib/forge-std/lib/ds-test/src/",
|
|
":eth-gas-reporter/=node_modules/eth-gas-reporter/",
|
|
":forge-std/=lib/forge-std/src/",
|
|
":hardhat-deploy/=node_modules/hardhat-deploy/",
|
|
":hardhat/=node_modules/hardhat/"
|
|
],
|
|
"optimizer": {
|
|
"enabled": true,
|
|
"runs": 200
|
|
},
|
|
"metadata": {
|
|
"bytecodeHash": "ipfs"
|
|
},
|
|
"compilationTarget": {
|
|
"node_modules/@openzeppelin/contracts/utils/Counters.sol": "Counters"
|
|
},
|
|
"libraries": {},
|
|
"viaIR": true
|
|
},
|
|
"sources": {
|
|
"node_modules/@openzeppelin/contracts/utils/Counters.sol": {
|
|
"keccak256": "0xf0018c2440fbe238dd3a8732fa8e17a0f9dce84d31451dc8a32f6d62b349c9f1",
|
|
"urls": [
|
|
"bzz-raw://59e1c62884d55b70f3ae5432b44bb3166ad71ae3acd19c57ab6ddc3c87c325ee",
|
|
"dweb:/ipfs/QmezuXg5GK5oeA4F91EZhozBFekhq5TD966bHPH18cCqhu"
|
|
],
|
|
"license": "MIT"
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"ast": {
|
|
"absolutePath": "node_modules/@openzeppelin/contracts/utils/Counters.sol",
|
|
"id": 27354,
|
|
"exportedSymbols": {
|
|
"Counters": [
|
|
27353
|
|
]
|
|
},
|
|
"nodeType": "SourceUnit",
|
|
"src": "87:1309:25",
|
|
"nodes": [
|
|
{
|
|
"id": 27281,
|
|
"nodeType": "PragmaDirective",
|
|
"src": "87:23:25",
|
|
"nodes": [],
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
]
|
|
},
|
|
{
|
|
"id": 27353,
|
|
"nodeType": "ContractDefinition",
|
|
"src": "424:971:25",
|
|
"nodes": [
|
|
{
|
|
"id": 27285,
|
|
"nodeType": "StructDefinition",
|
|
"src": "447:374:25",
|
|
"nodes": [],
|
|
"canonicalName": "Counters.Counter",
|
|
"members": [
|
|
{
|
|
"constant": false,
|
|
"id": 27284,
|
|
"mutability": "mutable",
|
|
"name": "_value",
|
|
"nameLocation": "794:6:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27285,
|
|
"src": "786:14:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27283,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "786:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"name": "Counter",
|
|
"nameLocation": "454:7:25",
|
|
"scope": 27353,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"id": 27297,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "827:112:25",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27296,
|
|
"nodeType": "Block",
|
|
"src": "901:38:25",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 27293,
|
|
"name": "counter",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27288,
|
|
"src": "918:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter storage pointer"
|
|
}
|
|
},
|
|
"id": 27294,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "926:6:25",
|
|
"memberName": "_value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27284,
|
|
"src": "918:14:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 27292,
|
|
"id": 27295,
|
|
"nodeType": "Return",
|
|
"src": "911:21:25"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "current",
|
|
"nameLocation": "836:7:25",
|
|
"parameters": {
|
|
"id": 27289,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27288,
|
|
"mutability": "mutable",
|
|
"name": "counter",
|
|
"nameLocation": "860:7:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27297,
|
|
"src": "844:23:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
},
|
|
"typeName": {
|
|
"id": 27287,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27286,
|
|
"name": "Counter",
|
|
"nameLocations": [
|
|
"844:7:25"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27285,
|
|
"src": "844:7:25"
|
|
},
|
|
"referencedDeclaration": 27285,
|
|
"src": "844:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "843:25:25"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27292,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27291,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27297,
|
|
"src": "892:7:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27290,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "892:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "891:9:25"
|
|
},
|
|
"scope": 27353,
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27311,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "945:123:25",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27310,
|
|
"nodeType": "Block",
|
|
"src": "998:70:25",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"id": 27309,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1008:54:25",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27307,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 27303,
|
|
"name": "counter",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27300,
|
|
"src": "1032:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter storage pointer"
|
|
}
|
|
},
|
|
"id": 27305,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "1040:6:25",
|
|
"memberName": "_value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27284,
|
|
"src": "1032:14:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "+=",
|
|
"rightHandSide": {
|
|
"hexValue": "31",
|
|
"id": 27306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1050:1:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "1032:19:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27308,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1032:19:25"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "increment",
|
|
"nameLocation": "954:9:25",
|
|
"parameters": {
|
|
"id": 27301,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27300,
|
|
"mutability": "mutable",
|
|
"name": "counter",
|
|
"nameLocation": "980:7:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27311,
|
|
"src": "964:23:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
},
|
|
"typeName": {
|
|
"id": 27299,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27298,
|
|
"name": "Counter",
|
|
"nameLocations": [
|
|
"964:7:25"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27285,
|
|
"src": "964:7:25"
|
|
},
|
|
"referencedDeclaration": 27285,
|
|
"src": "964:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "963:25:25"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27302,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "998:0:25"
|
|
},
|
|
"scope": 27353,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27339,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1074:229:25",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27338,
|
|
"nodeType": "Block",
|
|
"src": "1127:176:25",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
27318
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 27318,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1145:5:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27338,
|
|
"src": "1137:13:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 27317,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1137:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 27321,
|
|
"initialValue": {
|
|
"expression": {
|
|
"id": 27319,
|
|
"name": "counter",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27314,
|
|
"src": "1153:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter storage pointer"
|
|
}
|
|
},
|
|
"id": 27320,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1161:6:25",
|
|
"memberName": "_value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27284,
|
|
"src": "1153:14:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1137:30:25"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27325,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27323,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27318,
|
|
"src": "1185:5:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 27324,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1193:1:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1185:9:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "436f756e7465723a2064656372656d656e74206f766572666c6f77",
|
|
"id": 27326,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1196:29:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_1dfd0d5389474d871b8e8929aab9d4def041f55f90f625754fb5f9a9ba08af6f",
|
|
"typeString": "literal_string \"Counter: decrement overflow\""
|
|
},
|
|
"value": "Counter: decrement overflow"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_1dfd0d5389474d871b8e8929aab9d4def041f55f90f625754fb5f9a9ba08af6f",
|
|
"typeString": "literal_string \"Counter: decrement overflow\""
|
|
}
|
|
],
|
|
"id": 27322,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
-18,
|
|
-18
|
|
],
|
|
"referencedDeclaration": -18,
|
|
"src": "1177:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 27327,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1177:49:25",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 27328,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1177:49:25"
|
|
},
|
|
{
|
|
"id": 27337,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "1236:61:25",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27335,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 27329,
|
|
"name": "counter",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27314,
|
|
"src": "1260:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter storage pointer"
|
|
}
|
|
},
|
|
"id": 27331,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "1268:6:25",
|
|
"memberName": "_value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27284,
|
|
"src": "1260:14:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 27334,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 27332,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27318,
|
|
"src": "1277:5:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"hexValue": "31",
|
|
"id": 27333,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1285:1:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"src": "1277:9:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1260:26:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27336,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1260:26:25"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "decrement",
|
|
"nameLocation": "1083:9:25",
|
|
"parameters": {
|
|
"id": 27315,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27314,
|
|
"mutability": "mutable",
|
|
"name": "counter",
|
|
"nameLocation": "1109:7:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27339,
|
|
"src": "1093:23:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
},
|
|
"typeName": {
|
|
"id": 27313,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27312,
|
|
"name": "Counter",
|
|
"nameLocations": [
|
|
"1093:7:25"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27285,
|
|
"src": "1093:7:25"
|
|
},
|
|
"referencedDeclaration": 27285,
|
|
"src": "1093:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1092:25:25"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27316,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1127:0:25"
|
|
},
|
|
"scope": 27353,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"id": 27352,
|
|
"nodeType": "FunctionDefinition",
|
|
"src": "1309:84:25",
|
|
"nodes": [],
|
|
"body": {
|
|
"id": 27351,
|
|
"nodeType": "Block",
|
|
"src": "1358:35:25",
|
|
"nodes": [],
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 27349,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"expression": {
|
|
"id": 27345,
|
|
"name": "counter",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 27342,
|
|
"src": "1368:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter storage pointer"
|
|
}
|
|
},
|
|
"id": 27347,
|
|
"isConstant": false,
|
|
"isLValue": true,
|
|
"isPure": false,
|
|
"lValueRequested": true,
|
|
"memberLocation": "1376:6:25",
|
|
"memberName": "_value",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 27284,
|
|
"src": "1368:14:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"hexValue": "30",
|
|
"id": 27348,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1385:1:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1368:18:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 27350,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1368:18:25"
|
|
}
|
|
]
|
|
},
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "reset",
|
|
"nameLocation": "1318:5:25",
|
|
"parameters": {
|
|
"id": 27343,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 27342,
|
|
"mutability": "mutable",
|
|
"name": "counter",
|
|
"nameLocation": "1340:7:25",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 27352,
|
|
"src": "1324:23:25",
|
|
"stateVariable": false,
|
|
"storageLocation": "storage",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
},
|
|
"typeName": {
|
|
"id": 27341,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 27340,
|
|
"name": "Counter",
|
|
"nameLocations": [
|
|
"1324:7:25"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 27285,
|
|
"src": "1324:7:25"
|
|
},
|
|
"referencedDeclaration": 27285,
|
|
"src": "1324:7:25",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_struct$_Counter_$27285_storage_ptr",
|
|
"typeString": "struct Counters.Counter"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1323:25:25"
|
|
},
|
|
"returnParameters": {
|
|
"id": 27344,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1358:0:25"
|
|
},
|
|
"scope": 27353,
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Counters",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 27282,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "112:311:25",
|
|
"text": " @title Counters\n @author Matt Condon (@shrugs)\n @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n of elements in a mapping, issuing ERC721 ids, or counting request ids.\n Include with `using Counters for Counters.Counter;`"
|
|
},
|
|
"fullyImplemented": true,
|
|
"linearizedBaseContracts": [
|
|
27353
|
|
],
|
|
"name": "Counters",
|
|
"nameLocation": "432:8:25",
|
|
"scope": 27354,
|
|
"usedErrors": []
|
|
}
|
|
],
|
|
"license": "MIT"
|
|
},
|
|
"id": 25
|
|
} |