UNPKG

hardlydifficult-eth

Version:

A collection of reusable contracts and Javascript helpers for Ethereum.

1,118 lines (1,117 loc) 72.3 kB
{ "contractName": "CallContractMock", "abi": [ { "inputs": [ { "internalType": "address", "name": "_contract", "type": "address" }, { "internalType": "bytes", "name": "_callData", "type": "bytes" } ], "name": "readUint", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_contract", "type": "address" }, { "internalType": "bytes", "name": "_callData", "type": "bytes" } ], "name": "call", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_contract", "type": "address" }, { "internalType": "bytes", "name": "_callData", "type": "bytes" }, { "internalType": "uint256", "name": "_startPosition", "type": "uint256" }, { "internalType": "uint256", "name": "_length", "type": "uint256" } ], "name": "callByPosition", "outputs": [], "stateMutability": "payable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_callData\",\"type\":\"bytes\"}],\"name\":\"call\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_callData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_startPosition\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_length\",\"type\":\"uint256\"}],\"name\":\"callByPosition\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_callData\",\"type\":\"bytes\"}],\"name\":\"readUint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{},\"title\":\"For testing only.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/test-artifacts/CallContractMock.sol\":\"CallContractMock\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"project:/contracts/proxies/CallContract.sol\":{\"keccak256\":\"0xb30b0e77e31fd3e37b3a2028fb4ebcf7789d4225feb011b921b8a25447a09b68\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ee3c46722099a245797c4116382ba9fbdc338274d4ed440e97d15ff761611efa\",\"dweb:/ipfs/QmU2Zb2vmGeEjPoa6ZbCVGgjw2ogdnuKQeRCSoiv7SK4ro\"]},\"project:/contracts/test-artifacts/CallContractMock.sol\":{\"keccak256\":\"0xf68307e2b880dddb21523bcfe836900040c32995ab3d7ffd9eda17fc1817ad37\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f8a003a7e2eaf1fc8c28730b3241078ad6dbeca7d233996e1ca5b24b055f7374\",\"dweb:/ipfs/QmfWy6cJVSCcp1BJgKcJhMLEcikxFPNnZLKoPWg19o8uab\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506105d6806100206000396000f3fe6080604052600436106100345760003560e01c80631b8b921d146100395780632acdbdd4146100fe57806347e719f6146101e0575b600080fd5b6100fc6004803603604081101561004f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561008757600080fd5b82018360208201111561009957600080fd5b803590602001918460018302840111640100000000831117156100bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102a8945050505050565b005b34801561010a57600080fd5b506101ce6004803603604081101561012157600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561015957600080fd5b82018360208201111561016b57600080fd5b8035906020019184600183028401116401000000008311171561018d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102d3945050505050565b60408051918252519081900360200190f35b6100fc600480360360808110156101f657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561022e57600080fd5b82018360208201111561024057600080fd5b8035906020019184600183028401116401000000008311171561026257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505082359350505060200135610302565b6102cf73ffffffffffffffffffffffffffffffffffffffff8316823463ffffffff61033116565b5050565b60006102fb73ffffffffffffffffffffffffffffffffffffffff84168363ffffffff6103ae16565b9392505050565b61032b73ffffffffffffffffffffffffffffffffffffffff85168484843463ffffffff6104f816565b50505050565b600080600084516020860185885af190508061032b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b60008060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b6020831061041857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016103db565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610478576040519150601f19603f3d011682016040523d82523d6000602084013e61047d565b606091505b5091509150816104d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061057f6022913960400191505060405180910390fd5b8080602001905160208110156104ed57600080fd5b505195945050505050565b600080600084866020018801858a5af190508061057657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b50505050505056fe494e5445524e414c5f434f4e54524143545f524541445f43414c4c5f4641494c4544a264697066735822122011f3523dc8c7960f9edf2cf76d6b0fbf6d2a1a69f634fed2515267f20a4417ca64736f6c634300060a0033", "deployedBytecode": "0x6080604052600436106100345760003560e01c80631b8b921d146100395780632acdbdd4146100fe57806347e719f6146101e0575b600080fd5b6100fc6004803603604081101561004f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561008757600080fd5b82018360208201111561009957600080fd5b803590602001918460018302840111640100000000831117156100bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102a8945050505050565b005b34801561010a57600080fd5b506101ce6004803603604081101561012157600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561015957600080fd5b82018360208201111561016b57600080fd5b8035906020019184600183028401116401000000008311171561018d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102d3945050505050565b60408051918252519081900360200190f35b6100fc600480360360808110156101f657600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561022e57600080fd5b82018360208201111561024057600080fd5b8035906020019184600183028401116401000000008311171561026257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505082359350505060200135610302565b6102cf73ffffffffffffffffffffffffffffffffffffffff8316823463ffffffff61033116565b5050565b60006102fb73ffffffffffffffffffffffffffffffffffffffff84168363ffffffff6103ae16565b9392505050565b61032b73ffffffffffffffffffffffffffffffffffffffff85168484843463ffffffff6104f816565b50505050565b600080600084516020860185885af190508061032b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b60008060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b6020831061041857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016103db565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610478576040519150601f19603f3d011682016040523d82523d6000602084013e61047d565b606091505b5091509150816104d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061057f6022913960400191505060405180910390fd5b8080602001905160208110156104ed57600080fd5b505195945050505050565b600080600084866020018801858a5af190508061057657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e5445524e414c5f434f4e54524143545f43414c4c5f4641494c4544000000604482015290519081900360640190fd5b50505050505056fe494e5445524e414c5f434f4e54524143545f524541445f43414c4c5f4641494c4544a264697066735822122011f3523dc8c7960f9edf2cf76d6b0fbf6d2a1a69f634fed2515267f20a4417ca64736f6c634300060a0033", "immutableReferences": {}, "sourceMap": "133:585:23:-:0;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "133:585:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;356:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;356:134:23;;-1:-1:-1;356:134:23;;-1:-1:-1;;;;;356:134:23:i;:::-;;198:154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;198:154:23;;-1:-1:-1;198:154:23;;-1:-1:-1;;;;;198:154:23:i;:::-;;;;;;;;;;;;;;;;494:222;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;494:222:23;;-1:-1:-1;;494:222:23;;;-1:-1:-1;;;494:222:23;;;;:::i;356:134::-;448:37;:15;;;464:9;475;448:37;:15;:37;:::i;:::-;356:134;;:::o;198:154::-;296:4;317:30;:19;;;337:9;317:30;:19;:30;:::i;:::-;310:37;198:154;-1:-1:-1;;;198:154:23:o;494:222::-;639:72;:25;;;665:9;676:14;692:7;701:9;639:72;:25;:72;:::i;:::-;494:222;;;;:::o;430:481:17:-;537:11;820:1;791;751:9;745:16;699:2;688:9;684:18;665:9;646;631:5;617:230;607:240;;866:6;858:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;138:288;239:4;254:12;268:19;291:9;:20;;312:9;291:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;253:69;;;;336:7;328:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;406:6;395:26;;;;;;;;;;;;;;;-1:-1:-1;395:26:17;;138:288;-1:-1:-1;;;;;138:288:17:o;915:538::-;1081:11;1362:1;1333;1316:7;1257:14;1253:2;1249:23;1232:15;1228:45;1209:9;1190;1175:5;1161:228;1151:238;;1408:6;1400:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;915:538;;;;;;:::o", "source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.0;\n\nimport '../proxies/CallContract.sol';\n\n\n/**\n * @title For testing only.\n */\ncontract CallContractMock\n{\n using CallContract for address;\n\n function readUint(\n address _contract,\n bytes memory _callData\n ) public view\n returns (uint)\n {\n return _contract._readUint(_callData);\n }\n\n function call(\n address _contract,\n bytes memory _callData\n ) public payable\n {\n _contract._call(_callData, msg.value);\n }\n\n function callByPosition(\n address _contract,\n bytes memory _callData,\n uint _startPosition,\n uint _length\n ) public payable\n {\n _contract._callByPosition(_callData, _startPosition, _length, msg.value);\n }\n}\n", "sourcePath": "/home/circleci/repo/contracts/test-artifacts/CallContractMock.sol", "ast": { "absolutePath": "project:/contracts/test-artifacts/CallContractMock.sol", "exportedSymbols": { "CallContractMock": [ 3937 ] }, "id": 3938, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 3878, "literals": [ "solidity", "^", "0.6", ".0" ], "nodeType": "PragmaDirective", "src": "32:23:23" }, { "absolutePath": "project:/contracts/proxies/CallContract.sol", "file": "../proxies/CallContract.sol", "id": 3879, "nodeType": "ImportDirective", "scope": 3938, "sourceUnit": 3731, "src": "57:37:23", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 3880, "nodeType": "StructuredDocumentation", "src": "97:35:23", "text": " @title For testing only." }, "fullyImplemented": true, "id": 3937, "linearizedBaseContracts": [ 3937 ], "name": "CallContractMock", "nodeType": "ContractDefinition", "nodes": [ { "id": 3883, "libraryName": { "contractScope": null, "id": 3881, "name": "CallContract", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3730, "src": "169:12:23", "typeDescriptions": { "typeIdentifier": "t_contract$_CallContract_$3730", "typeString": "library CallContract" } }, "nodeType": "UsingForDirective", "src": "163:31:23", "typeName": { "id": 3882, "name": "address", "nodeType": "ElementaryTypeName", "src": "186:7:23", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, { "body": { "id": 3897, "nodeType": "Block", "src": "304:48:23", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3894, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3887, "src": "337:9:23", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "expression": { "argumentTypes": null, "id": 3892, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3885, "src": "317:9:23", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3893, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_readUint", "nodeType": "MemberAccess", "referencedDeclaration": 3687, "src": "317:19:23", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_address_$", "typeString": "function (address,bytes memory) view returns (uint256)" } }, "id": 3895, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "317:30:23", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 3891, "id": 3896, "nodeType": "Return", "src": "310:37:23" } ] }, "documentation": null, "functionSelector": "2acdbdd4", "id": 3898, "implemented": true, "kind": "function", "modifiers": [], "name": "readUint", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3888, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3885, "mutability": "mutable", "name": "_contract", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3898, "src": "221:17:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3884, "name": "address", "nodeType": "ElementaryTypeName", "src": "221:7:23", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3887, "mutability": "mutable", "name": "_callData", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3898, "src": "244:22:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 3886, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "244:5:23", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "215:55:23" }, "returnParameters": { "id": 3891, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3890, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3898, "src": "296:4:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3889, "name": "uint", "nodeType": "ElementaryTypeName", "src": "296:4:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "295:6:23" }, "scope": 3937, "src": "198:154:23", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 3913, "nodeType": "Block", "src": "442:48:23", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3908, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3902, "src": "464:9:23", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3909, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "475:3:23", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3910, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "475:9:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 3905, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3900, "src": "448:9:23", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3907, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_call", "nodeType": "MemberAccess", "referencedDeclaration": 3706, "src": "448:15:23", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$bound_to$_t_address_$", "typeString": "function (address,bytes memory,uint256)" } }, "id": 3911, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "448:37:23", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3912, "nodeType": "ExpressionStatement", "src": "448:37:23" } ] }, "documentation": null, "functionSelector": "1b8b921d", "id": 3914, "implemented": true, "kind": "function", "modifiers": [], "name": "call", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3903, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3900, "mutability": "mutable", "name": "_contract", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3914, "src": "375:17:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3899, "name": "address", "nodeType": "ElementaryTypeName", "src": "375:7:23", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3902, "mutability": "mutable", "name": "_callData", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3914, "src": "398:22:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 3901, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "398:5:23", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "369:55:23" }, "returnParameters": { "id": 3904, "nodeType": "ParameterList", "parameters": [], "src": "442:0:23" }, "scope": 3937, "src": "356:134:23", "stateMutability": "payable", "virtual": false, "visibility": "public" }, { "body": { "id": 3935, "nodeType": "Block", "src": "633:83:23", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3928, "name": "_callData", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3918, "src": "665:9:23", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "argumentTypes": null, "id": 3929, "name": "_startPosition", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3920, "src": "676:14:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 3930, "name": "_length", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3922, "src": "692:7:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3931, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "701:3:23", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3932, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "701:9:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 3925, "name": "_contract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3916, "src": "639:9:23", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3927, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "_callByPosition", "nodeType": "MemberAccess", "referencedDeclaration": 3729, "src": "639:25:23", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_address_$", "typeString": "function (address,bytes memory,uint256,uint256,uint256)" } }, "id": 3933, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "639:72:23", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3934, "nodeType": "ExpressionStatement", "src": "639:72:23" } ] }, "documentation": null, "functionSelector": "47e719f6", "id": 3936, "implemented": true, "kind": "function", "modifiers": [], "name": "callByPosition", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3923, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3916, "mutability": "mutable", "name": "_contract", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3936, "src": "523:17:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3915, "name": "address", "nodeType": "ElementaryTypeName", "src": "523:7:23", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3918, "mutability": "mutable", "name": "_callData", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3936, "src": "546:22:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 3917, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "546:5:23", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3920, "mutability": "mutable", "name": "_startPosition", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3936, "src": "574:19:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3919, "name": "uint", "nodeType": "ElementaryTypeName", "src": "574:4:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3922, "mutability": "mutable", "name": "_length", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3936, "src": "599:12:23", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3921, "name": "uint", "nodeType": "ElementaryTypeName", "src": "599:4:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "517:98:23" }, "returnParameters": { "id": 3924, "nodeType": "ParameterList", "parameters": [], "src": "633:0:23" }, "scope": 3937, "src": "494:222:23", "stateMutability": "payable", "virtual": false, "visibility": "public" } ], "scope": 3938, "src": "133:585:23" } ], "src": "32:687:23" }, "legacyAST": { "attributes": { "absolutePath": "project:/contracts/test-artifacts/CallContractMock.sol", "exportedSymbols": { "CallContractMock": [ 3937 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.6", ".0" ] }, "id": 3878, "name": "PragmaDirective", "src": "32:23:23" }, { "attributes": { "SourceUnit": 3731, "absolutePath": "project:/contracts/proxies/CallContract.sol", "file": "../proxies/CallContract.sol", "scope": 3938, "symbolAliases": [ null ], "unitAlias": "" }, "id": 3879, "name": "ImportDirective", "src": "57:37:23" }, { "attributes": { "abstract": false, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ 3937 ], "name": "CallContractMock", "scope": 3938 }, "children": [ { "attributes": { "text": " @title For testing only." }, "id": 3880, "name": "StructuredDocumentation", "src": "97:35:23" }, { "children": [ { "attributes": { "contractScope": null, "name": "CallContract", "referencedDeclaration": 3730, "type": "library CallContract" }, "id": 3881, "name": "UserDefinedTypeName", "src": "169:12:23" }, { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3882, "name": "ElementaryTypeName", "src": "186:7:23" } ], "id": 3883, "name": "UsingForDirective", "src": "163:31:23" }, { "attributes": { "documentation": null, "functionSelector": "2acdbdd4", "implemented": true, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "readUint", "overrides": null, "scope": 3937, "stateMutability": "view", "virtual": false, "visibility": "public" }, "children": [ { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "_contract", "overrides": null, "scope": 3898, "stateVariable": false, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "stateMutability": "nonpayable", "type": "address" }, "id": 3884, "name": "ElementaryTypeName", "src": "221:7:23" } ], "id": 3885, "name": "VariableDeclaration", "src": "221:17:23" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "_callData", "overrides": null, "scope": 3898, "stateVariable": false, "storageLocation": "memory", "type": "bytes", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "bytes", "type": "bytes" }, "id": 3886, "name": "ElementaryTypeName", "src": "244:5:23" } ], "id": 3887, "name": "VariableDeclaration", "src": "244:22:23" } ], "id": 3888, "name": "ParameterList", "src": "215:55:23" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "", "overrides": null, "scope": 3898, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "uint", "type": "uint256" }, "id": 3889, "name": "ElementaryTypeName", "src": "296:4:23" } ], "id": 3890, "name": "VariableDeclaration", "src": "296:4:23" } ], "id": 3891, "name": "ParameterList", "src": "295:6:23" }, { "children": [ { "attributes": { "functionReturnParameters": 3891 }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "tryCall": false, "type": "uint256", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "_readUint", "referencedDeclaration": 3687, "type": "function (address,bytes memory) view returns (uint256)" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3885, "type": "address", "value": "_contract" }, "id": 3892, "name": "Identifier", "src": "317:9:23" } ], "id": 3893, "name": "MemberAccess", "src": "317:19:23" }, {