@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
1,240 lines • 57.2 kB
JSON
{
"contractName": "TestCounter",
"abi": [
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"constant": true,
"inputs": [],
"name": "counterFallback",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "counterOne",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "counterThree",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "counterTwo",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "functionOne",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "input",
"type": "uint256"
}
],
"name": "functionTwo",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "input1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "input2",
"type": "uint256"
}
],
"name": "functionThree",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[],\"name\":\"counterFallback\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"counterOne\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counterThree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"counterTwo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"functionOne\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"input1\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"input2\",\"type\":\"uint256\"}],\"name\":\"functionThree\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"input\",\"type\":\"uint256\"}],\"name\":\"functionTwo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"dYdX * Counts function calls for testing\",\"methods\":{},\"title\":\"TestCounter\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestCounter.sol\":\"TestCounter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestCounter.sol\":{\"keccak256\":\"0x5215e59eb6fe272f513aebce3db2ec59877f2b6108e139192e0a801bcc8c2e96\",\"urls\":[\"bzz-raw://3b9a8b4065fbc9bbd1943ffc71bf6a34aaf352ddbeabc8f40517b43c09748026\",\"dweb:/ipfs/QmXBFPsza1oK3uLzX9XJ3nD8QwyUeGu4G8k7G6NxwLytWu\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506102bb806100206000396000f3fe6080604052600436106100705760003560e01c80639c65a4001161004e5780639c65a400146100d2578063c1e19882146100fd578063ced0f9fd1461011d578063d7215e7a1461013257610070565b8063181b3bb31461007b5780638e0137b914610092578063935272a2146100b2575b600080546001019055005b34801561008757600080fd5b50610090610152565b005b34801561009e57600080fd5b506100906100ad366004610207565b61015c565b3480156100be57600080fd5b506100906100cd3660046101e1565b61017e565b3480156100de57600080fd5b506100e7610195565b6040516100f49190610250565b60405180910390f35b34801561010957600080fd5b506100e7610118366004610207565b61019b565b34801561012957600080fd5b506100e76101b8565b34801561013e57600080fd5b506100e761014d3660046101e1565b6101be565b6001805481019055565b6000918252600360209081526040808420928452919052902080546001019055565b600090815260026020526040902080546001019055565b60015481565b600360209081526000928352604080842090915290825290205481565b60005481565b60026020526000908152604090205481565b80356101db81610261565b92915050565b6000602082840312156101f357600080fd5b60006101ff84846101d0565b949350505050565b6000806040838503121561021a57600080fd5b600061022685856101d0565b9250506020610237858286016101d0565b9150509250929050565b61024a8161025e565b82525050565b602081016101db8284610241565b90565b61026a8161025e565b811461027557600080fd5b5056fea365627a7a7231582067faa671d19dac99f62e45ce7d5b9a581fa1030bca3699ba880048e5b65beb2b6c6578706572696d656e74616cf564736f6c63430005100040",
"deployedBytecode": "0x6080604052600436106100705760003560e01c80639c65a4001161004e5780639c65a400146100d2578063c1e19882146100fd578063ced0f9fd1461011d578063d7215e7a1461013257610070565b8063181b3bb31461007b5780638e0137b914610092578063935272a2146100b2575b600080546001019055005b34801561008757600080fd5b50610090610152565b005b34801561009e57600080fd5b506100906100ad366004610207565b61015c565b3480156100be57600080fd5b506100906100cd3660046101e1565b61017e565b3480156100de57600080fd5b506100e7610195565b6040516100f49190610250565b60405180910390f35b34801561010957600080fd5b506100e7610118366004610207565b61019b565b34801561012957600080fd5b506100e76101b8565b34801561013e57600080fd5b506100e761014d3660046101e1565b6101be565b6001805481019055565b6000918252600360209081526040808420928452919052902080546001019055565b600090815260026020526040902080546001019055565b60015481565b600360209081526000928352604080842090915290825290205481565b60005481565b60026020526000908152604090205481565b80356101db81610261565b92915050565b6000602082840312156101f357600080fd5b60006101ff84846101d0565b949350505050565b6000806040838503121561021a57600080fd5b600061022685856101d0565b9250506020610237858286016101d0565b9150509250929050565b61024a8161025e565b82525050565b602081016101db8284610241565b90565b61026a8161025e565b811461027557600080fd5b5056fea365627a7a7231582067faa671d19dac99f62e45ce7d5b9a581fa1030bca3699ba880048e5b65beb2b6c6578706572696d656e74616cf564736f6c63430005100040",
"sourceMap": "749:732:116:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;749:732:116;;;;;;;",
"deployedSourceMap": "749:732:116:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1118:15;:17;;;;;;749:732;1148:71;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1148:71:116;;;:::i;:::-;;1336:143;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1336:143:116;;;;;;;;:::i;1225:105::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1225:105:116;;;;;;;;:::i;855:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;855:25:116;;;:::i;:::-;;;;;;;;;;;;;;;;940:69;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;940:69:116;;;;;;;;:::i;818:30::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;818:30:116;;;:::i;887:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;887:46:116;;;;;;;;:::i;1148:71::-;1200:10;:12;;;;;;1148:71::o;1336:143::-;1442:20;;;;:12;:20;;;;;;;;:28;;;;;;;;:30;;;;;;1336:143::o;1225:105::-;1304:17;;;;:10;:17;;;;;:19;;;;;;1225:105::o;855:25::-;;;;:::o;940:69::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;818:30::-;;;;:::o;887:46::-;;;;;;;;;;;;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;;57:78;;;;;142:241;;246:2;234:9;225:7;221:23;217:32;214:2;;;262:1;259;252:12;214:2;297:1;314:53;359:7;339:9;314:53;;;304:63;208:175;-1:-1;;;;208:175;390:366;;;511:2;499:9;490:7;486:23;482:32;479:2;;;527:1;524;517:12;479:2;562:1;579:53;624:7;604:9;579:53;;;569:63;;541:97;669:2;687:53;732:7;723:6;712:9;708:22;687:53;;;677:63;;648:98;473:283;;;;;;763:113;846:24;864:5;846:24;;;841:3;834:37;828:48;;;883:213;1001:2;986:18;;1015:71;990:9;1059:6;1015:71;;1103:72;1165:5;1148:27;1182:117;1251:24;1269:5;1251:24;;;1244:5;1241:35;1231:2;;1290:1;1287;1280:12;1231:2;1225:74;",
"source": "/*\n\n Copyright 2019 dYdX Trading Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\n\n/**\n * @title TestCounter\n * @author dYdX\n *\n * Counts function calls for testing\n */\ncontract TestCounter\n{\n // ============ Storage ============\n\n uint256 public counterFallback;\n\n uint256 public counterOne;\n\n mapping (uint256 => uint256) public counterTwo;\n\n mapping (uint256 => mapping (uint256 => uint256)) public counterThree;\n\n // ============ Functions ============\n\n function()\n external\n payable\n {\n counterFallback++;\n }\n\n function functionOne()\n public\n {\n counterOne++;\n }\n\n function functionTwo(\n uint256 input\n )\n public\n {\n counterTwo[input]++;\n }\n\n function functionThree(\n uint256 input1,\n uint256 input2\n )\n public\n {\n counterThree[input1][input2]++;\n }\n}\n",
"sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestCounter.sol",
"ast": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestCounter.sol",
"exportedSymbols": {
"TestCounter": [
33256
]
},
"id": 33257,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 33200,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "603:23:116"
},
{
"id": 33201,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "627:33:116"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title TestCounter\n@author dYdX\n * Counts function calls for testing",
"fullyImplemented": true,
"id": 33256,
"linearizedBaseContracts": [
33256
],
"name": "TestCounter",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 33203,
"name": "counterFallback",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "818:30:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33202,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "818:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33205,
"name": "counterOne",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "855:25:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33204,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "855:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33209,
"name": "counterTwo",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "887:46:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 33208,
"keyType": {
"id": 33206,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "896:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "887:28:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 33207,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "907:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33215,
"name": "counterThree",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "940:69:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$",
"typeString": "mapping(uint256 => mapping(uint256 => uint256))"
},
"typeName": {
"id": 33214,
"keyType": {
"id": 33210,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "949:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "940:49:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$",
"typeString": "mapping(uint256 => mapping(uint256 => uint256))"
},
"valueType": {
"id": 33213,
"keyType": {
"id": 33211,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "969:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "960:28:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 33212,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "980:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 33221,
"nodeType": "Block",
"src": "1108:34:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1118:17:116",
"subExpression": {
"argumentTypes": null,
"id": 33218,
"name": "counterFallback",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33203,
"src": "1118:15:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33220,
"nodeType": "ExpressionStatement",
"src": "1118:17:116"
}
]
},
"documentation": null,
"id": 33222,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33216,
"nodeType": "ParameterList",
"parameters": [],
"src": "1068:2:116"
},
"returnParameters": {
"id": 33217,
"nodeType": "ParameterList",
"parameters": [],
"src": "1108:0:116"
},
"scope": 33256,
"src": "1060:82:116",
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 33228,
"nodeType": "Block",
"src": "1190:29:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1200:12:116",
"subExpression": {
"argumentTypes": null,
"id": 33225,
"name": "counterOne",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33205,
"src": "1200:10:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33227,
"nodeType": "ExpressionStatement",
"src": "1200:12:116"
}
]
},
"documentation": null,
"id": 33229,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionOne",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33223,
"nodeType": "ParameterList",
"parameters": [],
"src": "1168:2:116"
},
"returnParameters": {
"id": 33224,
"nodeType": "ParameterList",
"parameters": [],
"src": "1190:0:116"
},
"scope": 33256,
"src": "1148:71:116",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 33239,
"nodeType": "Block",
"src": "1294:36:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1304:19:116",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 33234,
"name": "counterTwo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33209,
"src": "1304:10:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 33236,
"indexExpression": {
"argumentTypes": null,
"id": 33235,
"name": "input",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33231,
"src": "1315:5:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1304:17:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33238,
"nodeType": "ExpressionStatement",
"src": "1304:19:116"
}
]
},
"documentation": null,
"id": 33240,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionTwo",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33232,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 33231,
"name": "input",
"nodeType": "VariableDeclaration",
"scope": 33240,
"src": "1255:13:116",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33230,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1255:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1245:29:116"
},
"returnParameters": {
"id": 33233,
"nodeType": "ParameterList",
"parameters": [],
"src": "1294:0:116"
},
"scope": 33256,
"src": "1225:105:116",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 33254,
"nodeType": "Block",
"src": "1432:47:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33252,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1442:30:116",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 33247,
"name": "counterThree",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33215,
"src": "1442:12:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$",
"typeString": "mapping(uint256 => mapping(uint256 => uint256))"
}
},
"id": 33250,
"indexExpression": {
"argumentTypes": null,
"id": 33248,
"name": "input1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33242,
"src": "1455:6:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1442:20:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 33251,
"indexExpression": {
"argumentTypes": null,
"id": 33249,
"name": "input2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33244,
"src": "1463:6:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1442:28:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33253,
"nodeType": "ExpressionStatement",
"src": "1442:30:116"
}
]
},
"documentation": null,
"id": 33255,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionThree",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33245,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 33242,
"name": "input1",
"nodeType": "VariableDeclaration",
"scope": 33255,
"src": "1368:14:116",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33241,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1368:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 33244,
"name": "input2",
"nodeType": "VariableDeclaration",
"scope": 33255,
"src": "1392:14:116",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33243,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1392:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1358:54:116"
},
"returnParameters": {
"id": 33246,
"nodeType": "ParameterList",
"parameters": [],
"src": "1432:0:116"
},
"scope": 33256,
"src": "1336:143:116",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 33257,
"src": "749:732:116"
}
],
"src": "603:879:116"
},
"legacyAST": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestCounter.sol",
"exportedSymbols": {
"TestCounter": [
33256
]
},
"id": 33257,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 33200,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "603:23:116"
},
{
"id": 33201,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "627:33:116"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title TestCounter\n@author dYdX\n * Counts function calls for testing",
"fullyImplemented": true,
"id": 33256,
"linearizedBaseContracts": [
33256
],
"name": "TestCounter",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 33203,
"name": "counterFallback",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "818:30:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33202,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "818:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33205,
"name": "counterOne",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "855:25:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33204,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "855:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33209,
"name": "counterTwo",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "887:46:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 33208,
"keyType": {
"id": 33206,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "896:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "887:28:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 33207,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "907:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 33215,
"name": "counterThree",
"nodeType": "VariableDeclaration",
"scope": 33256,
"src": "940:69:116",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$",
"typeString": "mapping(uint256 => mapping(uint256 => uint256))"
},
"typeName": {
"id": 33214,
"keyType": {
"id": 33210,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "949:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "940:49:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$",
"typeString": "mapping(uint256 => mapping(uint256 => uint256))"
},
"valueType": {
"id": 33213,
"keyType": {
"id": 33211,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "969:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "960:28:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 33212,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "980:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 33221,
"nodeType": "Block",
"src": "1108:34:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1118:17:116",
"subExpression": {
"argumentTypes": null,
"id": 33218,
"name": "counterFallback",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33203,
"src": "1118:15:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33220,
"nodeType": "ExpressionStatement",
"src": "1118:17:116"
}
]
},
"documentation": null,
"id": 33222,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33216,
"nodeType": "ParameterList",
"parameters": [],
"src": "1068:2:116"
},
"returnParameters": {
"id": 33217,
"nodeType": "ParameterList",
"parameters": [],
"src": "1108:0:116"
},
"scope": 33256,
"src": "1060:82:116",
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 33228,
"nodeType": "Block",
"src": "1190:29:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33226,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1200:12:116",
"subExpression": {
"argumentTypes": null,
"id": 33225,
"name": "counterOne",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33205,
"src": "1200:10:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33227,
"nodeType": "ExpressionStatement",
"src": "1200:12:116"
}
]
},
"documentation": null,
"id": 33229,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionOne",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33223,
"nodeType": "ParameterList",
"parameters": [],
"src": "1168:2:116"
},
"returnParameters": {
"id": 33224,
"nodeType": "ParameterList",
"parameters": [],
"src": "1190:0:116"
},
"scope": 33256,
"src": "1148:71:116",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 33239,
"nodeType": "Block",
"src": "1294:36:116",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 33237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1304:19:116",
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 33234,
"name": "counterTwo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33209,
"src": "1304:10:116",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 33236,
"indexExpression": {
"argumentTypes": null,
"id": 33235,
"name": "input",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 33231,
"src": "1315:5:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1304:17:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33238,
"nodeType": "ExpressionStatement",
"src": "1304:19:116"
}
]
},
"documentation": null,
"id": 33240,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionTwo",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 33232,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 33231,
"name": "input",
"nodeType": "VariableDeclaration",
"scope": 33240,
"src": "1255:13:116",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33230,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1255:7:116",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1245:29:116"
},
"returnParameters": {
"id": 33233,
"nodeType": "ParameterList",
"parameters": [],
"src": "1294:0:116"
},
"scope": 33256,
"src": "1225:105:116",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 33254,
"nodeType":