diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json index d72a25ee2e..0ea28a3a0c 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json @@ -1,417 +1,4449 @@ { - "contractName": "HelloWorld", - "abi": [ + "contractName": "HelloWorld", + "abi": [ + { + "inputs": [], + "name": "sayHello", + "outputs": [ { - "inputs": [], - "name": "getName", - "outputs": [ + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getNameByIndex", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNameByIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":{\"keccak256\":\"0x85a10a53e3c11ce13143c98f27058be05811a2a3261f2aad3fbb2dd02126543f\",\"urls\":[\"bzz-raw://4073bdb91b678b93a5c6481e4e20fb47576f6ad65b0ca58bb2aa67f1746e8d8d\",\"dweb:/ipfs/QmXQx3uf9p1bvAR797H7SzoPE8R3uuARwXk3rQqZMWijwv\"]}},\"version\":1}", + "bytecode": "60806040526040518060400160405280600d81526020017f4361707461696e436163747573000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b610670806101756000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806317d7de7c1461005157806359c293f11461006f578063c47f00271461009f578063ef5fb05b146100bb575b600080fd5b6100596100d9565b6040516100669190610497565b60405180910390f35b61008960048036038101906100849190610435565b61016b565b6040516100969190610497565b60405180910390f35b6100b960048036038101906100b491906103f4565b610241565b005b6100c3610297565b6040516100d09190610497565b60405180910390f35b6060600080546100e890610582565b80601f016020809104026020016040519081016040528092919081815260200182805461011490610582565b80156101615780601f1061013657610100808354040283529160200191610161565b820191906000526020600020905b81548152906001019060200180831161014457829003601f168201915b5050505050905090565b6060600182815481106101a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101bc90610582565b80601f01602080910402602001604051908101604052809291908181526020018280546101e890610582565b80156102355780601f1061020a57610100808354040283529160200191610235565b820191906000526020600020905b81548152906001019060200180831161021857829003601f168201915b50505050509050919050565b80600090805190602001906102579291906102d4565b506001819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102939291906102d4565b5050565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546102e090610582565b90600052602060002090601f0160209004810192826103025760008555610349565b82601f1061031b57805160ff1916838001178555610349565b82800160010185558215610349579182015b8281111561034857825182559160200191906001019061032d565b5b509050610356919061035a565b5090565b5b8082111561037357600081600090555060010161035b565b5090565b600061038a610385846104ea565b6104b9565b9050828152602081018484840111156103a257600080fd5b6103ad848285610540565b509392505050565b600082601f8301126103c657600080fd5b81356103d6848260208601610377565b91505092915050565b6000813590506103ee81610623565b92915050565b60006020828403121561040657600080fd5b600082013567ffffffffffffffff81111561042057600080fd5b61042c848285016103b5565b91505092915050565b60006020828403121561044757600080fd5b6000610455848285016103df565b91505092915050565b60006104698261051a565b6104738185610525565b935061048381856020860161054f565b61048c81610612565b840191505092915050565b600060208201905081810360008301526104b1818461045e565b905092915050565b6000604051905081810181811067ffffffffffffffff821117156104e0576104df6105e3565b5b8060405250919050565b600067ffffffffffffffff821115610505576105046105e3565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b82818337600083830152505050565b60005b8381101561056d578082015181840152602081019050610552565b8381111561057c576000848401525b50505050565b6000600282049050600182168061059a57607f821691505b602082108114156105ae576105ad6105b4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61062c81610536565b811461063757600080fd5b5056fea2646970667358221220c9934d53136ab6541d23237612f126b1ab087a7e071e69352f31f1a8ab1def7364736f6c63430008000033", + "deployedBytecode": "608060405234801561001057600080fd5b506004361061004c5760003560e01c806317d7de7c1461005157806359c293f11461006f578063c47f00271461009f578063ef5fb05b146100bb575b600080fd5b6100596100d9565b6040516100669190610497565b60405180910390f35b61008960048036038101906100849190610435565b61016b565b6040516100969190610497565b60405180910390f35b6100b960048036038101906100b491906103f4565b610241565b005b6100c3610297565b6040516100d09190610497565b60405180910390f35b6060600080546100e890610582565b80601f016020809104026020016040519081016040528092919081815260200182805461011490610582565b80156101615780601f1061013657610100808354040283529160200191610161565b820191906000526020600020905b81548152906001019060200180831161014457829003601f168201915b5050505050905090565b6060600182815481106101a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101bc90610582565b80601f01602080910402602001604051908101604052809291908181526020018280546101e890610582565b80156102355780601f1061020a57610100808354040283529160200191610235565b820191906000526020600020905b81548152906001019060200180831161021857829003601f168201915b50505050509050919050565b80600090805190602001906102579291906102d4565b506001819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102939291906102d4565b5050565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546102e090610582565b90600052602060002090601f0160209004810192826103025760008555610349565b82601f1061031b57805160ff1916838001178555610349565b82800160010185558215610349579182015b8281111561034857825182559160200191906001019061032d565b5b509050610356919061035a565b5090565b5b8082111561037357600081600090555060010161035b565b5090565b600061038a610385846104ea565b6104b9565b9050828152602081018484840111156103a257600080fd5b6103ad848285610540565b509392505050565b600082601f8301126103c657600080fd5b81356103d6848260208601610377565b91505092915050565b6000813590506103ee81610623565b92915050565b60006020828403121561040657600080fd5b600082013567ffffffffffffffff81111561042057600080fd5b61042c848285016103b5565b91505092915050565b60006020828403121561044757600080fd5b6000610455848285016103df565b91505092915050565b60006104698261051a565b6104738185610525565b935061048381856020860161054f565b61048c81610612565b840191505092915050565b600060208201905081810360008301526104b1818461045e565b905092915050565b6000604051905081810181811067ffffffffffffffff821117156104e0576104df6105e3565b5b8060405250919050565b600067ffffffffffffffff821115610505576105046105e3565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b82818337600083830152505050565b60005b8381101561056d578082015181840152602081019050610552565b8381111561057c576000848401525b50505050565b6000600282049050600182168061059a57607f821691505b602082108114156105ae576105ad6105b4565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61062c81610536565b811461063757600080fd5b5056fea2646970667358221220c9934d53136ab6541d23237612f126b1ab087a7e071e69352f31f1a8ab1def7364736f6c63430008000033", + "immutableReferences": {}, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:516:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "58:269:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "68:22:1", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "82:4:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "88:1:1", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "78:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "78:12:1" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "68:6:1" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "99:38:1", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "129:4:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "135:1:1", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "125:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "125:12:1" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "103:18:1", + "type": "" + } + ] + }, { - "internalType": "string", - "name": "", - "type": "string" + "body": { + "nodeType": "YulBlock", + "src": "176:51:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "190:27:1", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "204:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "212:4:1", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "200:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "200:17:1" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "190:6:1" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "156:18:1" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "149:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "149:26:1" + }, + "nodeType": "YulIf", + "src": "146:2:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "279:42:1", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "293:16:1" + }, + "nodeType": "YulFunctionCall", + "src": "293:18:1" + }, + "nodeType": "YulExpressionStatement", + "src": "293:18:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "243:18:1" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "266:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "274:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "263:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "263:14:1" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "240:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "240:38:1" + }, + "nodeType": "YulIf", + "src": "237:2:1" } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "42:4:1", + "type": "" + } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sayHello", - "outputs": [ + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "51:6:1", + "type": "" + } + ], + "src": "7:320:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "361:152:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "378:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "381:77:1", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "371:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "371:88:1" + }, + "nodeType": "YulExpressionStatement", + "src": "371:88:1" + }, { - "internalType": "string", - "name": "", - "type": "string" + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "475:1:1", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "478:4:1", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "468:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "468:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "468:15:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "499:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "502:4:1", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "492:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "492:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "492:15:1" } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "333:180:1" + } + ] + }, + "contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", + "id": 1, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:4527:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "91:260:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "101:74:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "167:6:1" + } + ], + "functionName": { + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "125:41:1" + }, + "nodeType": "YulFunctionCall", + "src": "125:49:1" + } + ], + "functionName": { + "name": "allocateMemory", + "nodeType": "YulIdentifier", + "src": "110:14:1" + }, + "nodeType": "YulFunctionCall", + "src": "110:65:1" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "101:5:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "191:5:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "198:6:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "184:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "184:21:1" + }, + "nodeType": "YulExpressionStatement", + "src": "184:21:1" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "214:27:1", + "value": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "229:5:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "236:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "225:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "225:16:1" + }, + "variables": [ + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "218:3:1", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "279:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "288:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "291:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "281:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "281:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "281:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "260:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "265:6:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "256:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "256:16:1" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "274:3:1" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "253:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "253:25:1" + }, + "nodeType": "YulIf", + "src": "250:2:1" + }, + { + "expression": { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "328:3:1" + }, + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "333:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "338:6:1" + } + ], + "functionName": { + "name": "copy_calldata_to_memory", + "nodeType": "YulIdentifier", + "src": "304:23:1" + }, + "nodeType": "YulFunctionCall", + "src": "304:41:1" + }, + "nodeType": "YulExpressionStatement", + "src": "304:41:1" + } + ] + }, + "name": "abi_decode_available_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "64:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "69:6:1", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "77:3:1", + "type": "" + } ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "85:5:1", + "type": "" + } + ], + "src": "7:344:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "433:211:1", + "statements": [ { - "internalType": "string", - "name": "newName", - "type": "string" + "body": { + "nodeType": "YulBlock", + "src": "482:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "491:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "494:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "484:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "484:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "484:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "461:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "469:4:1", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "457:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "457:17:1" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "476:3:1" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "453:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "453:27:1" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "446:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "446:35:1" + }, + "nodeType": "YulIf", + "src": "443:2:1" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "507:34:1", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "534:6:1" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "521:12:1" + }, + "nodeType": "YulFunctionCall", + "src": "521:20:1" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "511:6:1", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "550:88:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "611:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "619:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "607:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "607:17:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "626:6:1" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "634:3:1" + } + ], + "functionName": { + "name": "abi_decode_available_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "559:47:1" + }, + "nodeType": "YulFunctionCall", + "src": "559:79:1" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "550:5:1" + } + ] } + ] + }, + "name": "abi_decode_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "411:6:1", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "419:3:1", + "type": "" + } ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":{\"keccak256\":\"0x0b78fa11f33f7936a80da194c49f04198e38947e3f98f3a7b765b4adb4c455c1\",\"urls\":[\"bzz-raw://12697aa12341c70ed7a411a27a17398dcb2d4336a14dac51845e2123acf174c7\",\"dweb:/ipfs/QmPhH1UbHtUeeen9W2qMDwEVVWAtVJSMN29Nch5q8Gax1D\"]}},\"version\":1}", - "bytecode": "60c0604052600d60808190526c4361707461696e43616374757360981b60a090815261002e9160009190610041565b5034801561003b57600080fd5b506100d4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061008257805160ff19168380011785556100af565b828001600101855582156100af579182015b828111156100af578251825591602001919060010190610094565b506100bb9291506100bf565b5090565b5b808211156100bb57600081556001016100c0565b61030f806100e36000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "sourceMap": "463:37:0:-:0;439:322;463:37;;439:322;463:37;;;-1:-1:-1;;;463:37:0;;;;;;-1:-1:-1;;463:37:0;;:::i;:::-;;439:322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;439:322:0;;;-1:-1:-1;439:322:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "439:322:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;683:76:0;;-1:-1:-1;683:76:0;;-1:-1:-1;;;;;683:76:0:i;:::-;;505:89;;;:::i;598:81::-;670:4;663:11;;;;;;;;-1:-1:-1;;663:11:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:13;;663:11;;670:4;;663:11;;670:4;663:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;:::o;683:76::-;740:14;;;;:4;;:14;;;;;:::i;:::-;;683:76;:::o;505:89::-;568:21;;;;;;;;;;;;-1:-1:-1;;;568:21:0;;;;505:89;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;", - "sourcePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "ast": { - "absolutePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 31 - ] - }, - "id": 32, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 31, - "linearizedBaseContracts": [ - 31 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "427:5:1", + "type": "" + } + ], + "src": "371:273:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "702:87:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "712:29:1", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "734:6:1" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "721:12:1" + }, + "nodeType": "YulFunctionCall", + "src": "721:20:1" + }, + "variableNames": [ { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "name": "value", + "nodeType": "YulIdentifier", + "src": "712:5:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "777:5:1" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "750:26:1" + }, + "nodeType": "YulFunctionCall", + "src": "750:33:1" + }, + "nodeType": "YulExpressionStatement", + "src": "750:33:1" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "680:6:1", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "688:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "696:5:1", + "type": "" + } + ], + "src": "650:139:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "871:299:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "917:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "926:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "929:1:1", + "type": "", + "value": "0" } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "919:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "919:12:1" }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" + "nodeType": "YulExpressionStatement", + "src": "919:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "892:7:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "901:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "888:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "888:23:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "913:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "884:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "884:32:1" + }, + "nodeType": "YulIf", + "src": "881:2:1" + }, + { + "nodeType": "YulBlock", + "src": "943:220:1", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "958:45:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "989:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1000:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "985:3:1" }, - "value": "CaptainCactus" + "nodeType": "YulFunctionCall", + "src": "985:17:1" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "972:12:1" }, - "visibility": "private" + "nodeType": "YulFunctionCall", + "src": "972:31:1" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "962:6:1", + "type": "" + } + ] }, { - "body": { - "id": 11, - "nodeType": "Block", - "src": "562:32:0", - "statements": [ + "body": { + "nodeType": "YulBlock", + "src": "1050:16:1", + "statements": [ + { + "expression": { + "arguments": [ { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "575:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 8, - "id": 10, - "nodeType": "Return", - "src": "568:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 12, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [], - "src": "523:2:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ + "kind": "number", + "nodeType": "YulLiteral", + "src": "1059:1:1", + "type": "", + "value": "0" + }, { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12, - "src": "547:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "547:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" + "kind": "number", + "nodeType": "YulLiteral", + "src": "1062:1:1", + "type": "", + "value": "0" } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1052:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1052:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1052:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1022:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1030:18:1", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1019:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "1019:30:1" + }, + "nodeType": "YulIf", + "src": "1016:2:1" + }, + { + "nodeType": "YulAssignment", + "src": "1080:73:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1125:9:1" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1136:6:1" + } ], - "src": "546:15:0" + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1121:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1121:22:1" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1145:7:1" + } + ], + "functionName": { + "name": "abi_decode_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "1090:30:1" + }, + "nodeType": "YulFunctionCall", + "src": "1090:63:1" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1080:6:1" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "841:9:1", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "852:7:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "864:6:1", + "type": "" + } + ], + "src": "795:375:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1242:196:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1288:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1297:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1300:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1290:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1290:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1290:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1263:7:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1272:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1259:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1259:23:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1284:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "1255:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1255:32:1" + }, + "nodeType": "YulIf", + "src": "1252:2:1" + }, + { + "nodeType": "YulBlock", + "src": "1314:117:1", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1329:15:1", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1343:1:1", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1333:6:1", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1358:63:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1393:9:1" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1404:6:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1389:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1389:22:1" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1413:7:1" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1368:20:1" + }, + "nodeType": "YulFunctionCall", + "src": "1368:53:1" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1358:6:1" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1212:9:1", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1223:7:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1235:6:1", + "type": "" + } + ], + "src": "1176:262:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1536:272:1", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1546:53:1", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1593:5:1" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "1560:32:1" + }, + "nodeType": "YulFunctionCall", + "src": "1560:39:1" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1550:6:1", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1608:78:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1674:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1679:6:1" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1615:58:1" + }, + "nodeType": "YulFunctionCall", + "src": "1615:71:1" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1608:3:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1721:5:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1728:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1717:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1717:16:1" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1735:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1740:6:1" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "1695:21:1" + }, + "nodeType": "YulFunctionCall", + "src": "1695:52:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1695:52:1" + }, + { + "nodeType": "YulAssignment", + "src": "1756:46:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1767:3:1" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1794:6:1" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "1772:21:1" + }, + "nodeType": "YulFunctionCall", + "src": "1772:29:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1763:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1763:39:1" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1756:3:1" + } + ] + } + ] + }, + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1517:5:1", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1524:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1532:3:1", + "type": "" + } + ], + "src": "1444:364:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1932:195:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1942:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1954:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1965:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1950:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1950:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1942:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1989:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2000:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1985:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1985:17:1" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2008:4:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2014:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2004:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2004:20:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1978:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1978:47:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1978:47:1" + }, + { + "nodeType": "YulAssignment", + "src": "2034:86:1", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2106:6:1" + }, + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2115:4:1" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2042:63:1" + }, + "nodeType": "YulFunctionCall", + "src": "2042:78:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2034:4:1" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1904:9:1", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1916:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1927:4:1", + "type": "" + } + ], + "src": "1814:313:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2173:243:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2183:19:1", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2199:2:1", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "2193:5:1" + }, + "nodeType": "YulFunctionCall", + "src": "2193:9:1" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2183:6:1" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2211:35:1", + "value": { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2233:6:1" + }, + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "2241:4:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2229:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2229:17:1" + }, + "variables": [ + { + "name": "newFreePtr", + "nodeType": "YulTypedName", + "src": "2215:10:1", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2357:22:1", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "2359:16:1" + }, + "nodeType": "YulFunctionCall", + "src": "2359:18:1" }, - "scope": 31, - "src": "505:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" + "nodeType": "YulExpressionStatement", + "src": "2359:18:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "2300:10:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2312:18:1", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "2297:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "2297:34:1" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "2336:10:1" + }, + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2348:6:1" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2333:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "2333:22:1" + } + ], + "functionName": { + "name": "or", + "nodeType": "YulIdentifier", + "src": "2294:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "2294:62:1" + }, + "nodeType": "YulIf", + "src": "2291:2:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2395:2:1", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "2399:10:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2388:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "2388:22:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2388:22:1" + } + ] + }, + "name": "allocateMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "2157:4:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2166:6:1", + "type": "" + } + ], + "src": "2133:283:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2489:265:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2594:22:1", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "2596:16:1" + }, + "nodeType": "YulFunctionCall", + "src": "2596:18:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2596:18:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2566:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2574:18:1", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "2563:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "2563:30:1" + }, + "nodeType": "YulIf", + "src": "2560:2:1" + }, + { + "nodeType": "YulAssignment", + "src": "2646:41:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2662:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2670:4:1", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2658:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2658:17:1" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2681:4:1", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "2677:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2677:9:1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "2654:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2654:33:1" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "2646:4:1" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2724:23:1", + "value": { + "arguments": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "2736:4:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2742:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2732:3:1" }, + "nodeType": "YulFunctionCall", + "src": "2732:15:1" + }, + "variableNames": [ { - "body": { - "id": 19, - "nodeType": "Block", - "src": "655:24:0", - "statements": [ + "name": "size", + "nodeType": "YulIdentifier", + "src": "2724:4:1" + } + ] + } + ] + }, + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2473:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "2484:4:1", + "type": "" + } + ], + "src": "2422:332:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2819:40:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2830:22:1", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2846:5:1" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "2840:5:1" + }, + "nodeType": "YulFunctionCall", + "src": "2840:12:1" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2830:6:1" + } + ] + } + ] + }, + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2802:5:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2812:6:1", + "type": "" + } + ], + "src": "2760:99:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2961:73:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2978:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2983:6:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2971:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "2971:19:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2971:19:1" + }, + { + "nodeType": "YulAssignment", + "src": "2999:29:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3018:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3023:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3014:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3014:14:1" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "2999:11:1" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2933:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2938:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "2949:11:1", + "type": "" + } + ], + "src": "2865:169:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3085:32:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3095:16:1", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3106:5:1" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "3095:7:1" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3067:5:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "3077:7:1", + "type": "" + } + ], + "src": "3040:77:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3174:103:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "3197:3:1" + }, + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "3202:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3207:6:1" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "3184:12:1" + }, + "nodeType": "YulFunctionCall", + "src": "3184:30:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3184:30:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "3255:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3260:6:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3251:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3251:16:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3269:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3244:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3244:27:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3244:27:1" + } + ] + }, + "name": "copy_calldata_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "3156:3:1", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "3161:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3166:6:1", + "type": "" + } + ], + "src": "3123:154:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3332:258:1", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "3342:10:1", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3351:1:1", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nodeType": "YulTypedName", + "src": "3346:1:1", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3411:63:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ { - "expression": { - "id": 17, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "670:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 16, - "id": 18, - "nodeType": "Return", - "src": "663:11:0" + "name": "dst", + "nodeType": "YulIdentifier", + "src": "3436:3:1" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3441:1:1" } - ] - }, - "functionSelector": "17d7de7c", - "id": 20, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "614:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3432:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3432:11:1" + }, + { + "arguments": [ { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 20, - "src": "638:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "3455:3:1" }, - "visibility": "internal" + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3460:1:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3451:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3451:11:1" } - ], - "src": "637:15:0" + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "3445:5:1" + }, + "nodeType": "YulFunctionCall", + "src": "3445:18:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3425:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3425:39:1" }, - "scope": 31, - "src": "598:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" + "nodeType": "YulExpressionStatement", + "src": "3425:39:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3372:1:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3375:6:1" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3369:2:1" }, - { - "body": { - "id": 29, - "nodeType": "Block", - "src": "732:27:0", - "statements": [ + "nodeType": "YulFunctionCall", + "src": "3369:13:1" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "3383:19:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3385:15:1", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3394:1:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3397:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3390:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3390:10:1" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3385:1:1" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "3365:3:1", + "statements": [] + }, + "src": "3361:113:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3508:76:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ { - "expression": { - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 25, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "740:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 26, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "747:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "740:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "740:14:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ + "name": "dst", + "nodeType": "YulIdentifier", + "src": "3558:3:1" + }, { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "700:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "700:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" + "name": "length", + "nodeType": "YulIdentifier", + "src": "3563:6:1" } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3554:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3554:16:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3572:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3547:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3547:27:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3547:27:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "3489:1:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3492:6:1" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3486:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "3486:13:1" + }, + "nodeType": "YulIf", + "src": "3483:2:1" + } + ] + }, + "name": "copy_memory_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "3314:3:1", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "3319:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3324:6:1", + "type": "" + } + ], + "src": "3283:307:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3647:269:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3657:22:1", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "3671:4:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3677:1:1", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "3667:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3667:12:1" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3657:6:1" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "3688:38:1", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "3718:4:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3724:1:1", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "3714:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3714:12:1" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "3692:18:1", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3765:51:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3779:27:1", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3793:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3801:4:1", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "3789:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3789:17:1" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3779:6:1" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "3745:18:1" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "3738:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3738:26:1" + }, + "nodeType": "YulIf", + "src": "3735:2:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3868:42:1", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "3882:16:1" + }, + "nodeType": "YulFunctionCall", + "src": "3882:18:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3882:18:1" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "3832:18:1" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3855:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3863:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3852:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "3852:14:1" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "3829:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "3829:38:1" + }, + "nodeType": "YulIf", + "src": "3826:2:1" + } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "3631:4:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3640:6:1", + "type": "" + } + ], + "src": "3596:320:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3950:152:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3967:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3970:77:1", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3960:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3960:88:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3960:88:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4064:1:1", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4067:4:1", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4057:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4057:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4057:15:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4088:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4091:4:1", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4081:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4081:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4081:15:1" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "3922:180:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4136:152:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4153:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4156:77:1", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4146:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4146:88:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4146:88:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4250:1:1", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4253:4:1", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4243:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4243:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4243:15:1" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4274:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4277:4:1", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4267:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4267:15:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4267:15:1" + } + ] + }, + "name": "panic_error_0x41", + "nodeType": "YulFunctionDefinition", + "src": "4108:180:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4342:54:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4352:38:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4370:5:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4377:2:1", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4366:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "4366:14:1" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4386:2:1", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "4382:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "4382:7:1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4362:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "4362:28:1" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4352:6:1" + } + ] + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "4325:5:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "4335:6:1", + "type": "" + } + ], + "src": "4294:102:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4445:79:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4502:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4511:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4514:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4504:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4504:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "4504:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4468:5:1" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4493:5:1" + } ], - "src": "699:23:0" - }, - "returnParameters": { - "id": 24, - "nodeType": "ParameterList", - "parameters": [], - "src": "732:0:0" - }, - "scope": 31, - "src": "683:76:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 32, - "src": "439:322:0" - } - ], - "src": "413:349:0" + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "4475:17:1" + }, + "nodeType": "YulFunctionCall", + "src": "4475:24:1" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "4465:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "4465:35:1" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4458:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "4458:43:1" + }, + "nodeType": "YulIf", + "src": "4455:2:1" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "4438:5:1", + "type": "" + } + ], + "src": "4402:122:1" + } + ] + }, + "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", + "id": 1, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "439:490:0:-:0;;;463:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;439:490;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:1:-;;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;439:490:0;;;;;;;", + "deployedSourceMap": "439:490:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:81;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;710:109;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;823:103;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;532:89;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;625:81;665:13;697:4;690:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;625:81;:::o;710:109::-;770:13;802:5;808;802:12;;;;;;;;;;;;;;;;;;;;;;;795:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;710:109;;;:::o;823:103::-;887:7;880:4;:14;;;;;;;;;;;;:::i;:::-;;902:5;913:7;902:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;823:103;:::o;532:89::-;574:13;595:21;;;;;;;;;;;;;;;;;;;532:89;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:344:1:-;;110:65;125:49;167:6;125:49;:::i;:::-;110:65;:::i;:::-;101:74;;198:6;191:5;184:21;236:4;229:5;225:16;274:3;265:6;260:3;256:16;253:25;250:2;;;291:1;288;281:12;250:2;304:41;338:6;333:3;328;304:41;:::i;:::-;91:260;;;;;;:::o;371:273::-;;476:3;469:4;461:6;457:17;453:27;443:2;;494:1;491;484:12;443:2;534:6;521:20;559:79;634:3;626:6;619:4;611:6;607:17;559:79;:::i;:::-;550:88;;433:211;;;;;:::o;650:139::-;;734:6;721:20;712:29;;750:33;777:5;750:33;:::i;:::-;702:87;;;;:::o;795:375::-;;913:2;901:9;892:7;888:23;884:32;881:2;;;929:1;926;919:12;881:2;1000:1;989:9;985:17;972:31;1030:18;1022:6;1019:30;1016:2;;;1062:1;1059;1052:12;1016:2;1090:63;1145:7;1136:6;1125:9;1121:22;1090:63;:::i;:::-;1080:73;;943:220;871:299;;;;:::o;1176:262::-;;1284:2;1272:9;1263:7;1259:23;1255:32;1252:2;;;1300:1;1297;1290:12;1252:2;1343:1;1368:53;1413:7;1404:6;1393:9;1389:22;1368:53;:::i;:::-;1358:63;;1314:117;1242:196;;;;:::o;1444:364::-;;1560:39;1593:5;1560:39;:::i;:::-;1615:71;1679:6;1674:3;1615:71;:::i;:::-;1608:78;;1695:52;1740:6;1735:3;1728:4;1721:5;1717:16;1695:52;:::i;:::-;1772:29;1794:6;1772:29;:::i;:::-;1767:3;1763:39;1756:46;;1536:272;;;;;:::o;1814:313::-;;1965:2;1954:9;1950:18;1942:26;;2014:9;2008:4;2004:20;2000:1;1989:9;1985:17;1978:47;2042:78;2115:4;2106:6;2042:78;:::i;:::-;2034:86;;1932:195;;;;:::o;2133:283::-;;2199:2;2193:9;2183:19;;2241:4;2233:6;2229:17;2348:6;2336:10;2333:22;2312:18;2300:10;2297:34;2294:62;2291:2;;;2359:18;;:::i;:::-;2291:2;2399:10;2395:2;2388:22;2173:243;;;;:::o;2422:332::-;;2574:18;2566:6;2563:30;2560:2;;;2596:18;;:::i;:::-;2560:2;2681:4;2677:9;2670:4;2662:6;2658:17;2654:33;2646:41;;2742:4;2736;2732:15;2724:23;;2489:265;;;:::o;2760:99::-;;2846:5;2840:12;2830:22;;2819:40;;;:::o;2865:169::-;;2983:6;2978:3;2971:19;3023:4;3018:3;3014:14;2999:29;;2961:73;;;;:::o;3040:77::-;;3106:5;3095:16;;3085:32;;;:::o;3123:154::-;3207:6;3202:3;3197;3184:30;3269:1;3260:6;3255:3;3251:16;3244:27;3174:103;;;:::o;3283:307::-;3351:1;3361:113;3375:6;3372:1;3369:13;3361:113;;;3460:1;3455:3;3451:11;3445:18;3441:1;3436:3;3432:11;3425:39;3397:2;3394:1;3390:10;3385:15;;3361:113;;;3492:6;3489:1;3486:13;3483:2;;;3572:1;3563:6;3558:3;3554:16;3547:27;3483:2;3332:258;;;;:::o;3596:320::-;;3677:1;3671:4;3667:12;3657:22;;3724:1;3718:4;3714:12;3745:18;3735:2;;3801:4;3793:6;3789:17;3779:27;;3735:2;3863;3855:6;3852:14;3832:18;3829:38;3826:2;;;3882:18;;:::i;:::-;3826:2;3647:269;;;;:::o;3922:180::-;3970:77;3967:1;3960:88;4067:4;4064:1;4057:15;4091:4;4088:1;4081:15;4108:180;4156:77;4153:1;4146:88;4253:4;4250:1;4243:15;4277:4;4274:1;4267:15;4294:102;;4386:2;4382:7;4377:2;4370:5;4366:14;4362:28;4352:38;;4342:54;;;:::o;4402:122::-;4475:24;4493:5;4475:24;:::i;:::-;4468:5;4465:35;4455:2;;4514:1;4511;4504:12;4455:2;4445:79;:::o", + "source": "// *****************************************************************************\n// IMPORTANT: If you update this code then make sure to recompile\n// it and update the .json file as well so that they\n// remain in sync for consistent test executions.\n// With that said, there shouldn't be any reason to recompile this, like ever...\n// *****************************************************************************\n\npragma solidity >=0.7.0;\n\ncontract HelloWorld {\n string private name = \"CaptainCactus\";\n string[] private names; \n\n function sayHello () public pure returns (string memory) {\n return 'Hello World!';\n }\n\n function getName() public view returns (string memory)\n {\n return name;\n }\n\n function getNameByIndex(uint256 index) public view returns (string memory)\n {\n return names[index];\n }\n\n function setName(string memory newName) public\n {\n name = newName;\n names.push(newName);\n }\n\n}\n", + "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "ast": { + "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "exportedSymbols": { + "HelloWorld": [ + 52 + ] }, - "functionHashes": { - "getName()": "17d7de7c", - "sayHello()": "ef5fb05b", - "setName(string)": "c47f0027" + "id": 53, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "413:24:0" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 52, + "linearizedBaseContracts": [ + 52 + ], + "name": "HelloWorld", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "463:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "463:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "4361707461696e436163747573", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:15:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", + "typeString": "literal_string \"CaptainCactus\"" + }, + "value": "CaptainCactus" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 7, + "mutability": "mutable", + "name": "names", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "504:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 5, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "504:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 6, + "nodeType": "ArrayTypeName", + "src": "504:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "589:32:0", + "statements": [ + { + "expression": { + "hexValue": "48656c6c6f20576f726c6421", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "602:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", + "typeString": "literal_string \"Hello World!\"" + }, + "value": "Hello World!" + }, + "functionReturnParameters": 11, + "id": 13, + "nodeType": "Return", + "src": "595:21:0" + } + ] + }, + "functionSelector": "ef5fb05b", + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sayHello", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "550:2:0" + }, + "returnParameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "574:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 9, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "574:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "573:15:0" + }, + "scope": 52, + "src": "532:89:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "682:24:0", + "statements": [ + { + "expression": { + "id": 20, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "697:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 19, + "id": 21, + "nodeType": "Return", + "src": "690:11:0" + } + ] + }, + "functionSelector": "17d7de7c", + "id": 23, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "641:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 23, + "src": "665:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 17, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "665:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "664:15:0" + }, + "scope": 52, + "src": "625:81:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "787:32:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 30, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "802:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 32, + "indexExpression": { + "id": 31, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "802:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 29, + "id": 33, + "nodeType": "Return", + "src": "795:19:0" + } + ] + }, + "functionSelector": "59c293f1", + "id": 35, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNameByIndex", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "734:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "733:15:0" + }, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 28, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "770:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "770:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "769:15:0" + }, + "scope": 52, + "src": "710:109:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "872:54:0", + "statements": [ + { + "expression": { + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 40, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "880:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 41, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "887:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "880:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "880:14:0" + }, + { + "expression": { + "arguments": [ + { + "id": 47, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "913:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 44, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "902:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "902:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "902:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "902:19:0" + } + ] + }, + "functionSelector": "c47f0027", + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "840:21:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 36, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "840:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "839:23:0" + }, + "returnParameters": { + "id": 39, + "nodeType": "ParameterList", + "parameters": [], + "src": "872:0:0" + }, + "scope": 52, + "src": "823:103:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 53, + "src": "439:490:0" + } + ], + "src": "413:517:0" + }, + "legacyAST": { + "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "exportedSymbols": { + "HelloWorld": [ + 52 + ] }, - "gasEstimates": { - "creation": { - "codeDepositCost": "156600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "getName()": "infinite", - "sayHello()": "infinite", - "setName(string)": "infinite" - } - } + "id": 53, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "413:24:0" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 52, + "linearizedBaseContracts": [ + 52 + ], + "name": "HelloWorld", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "463:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "463:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "4361707461696e436163747573", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:15:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", + "typeString": "literal_string \"CaptainCactus\"" + }, + "value": "CaptainCactus" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 7, + "mutability": "mutable", + "name": "names", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "504:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 5, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "504:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 6, + "nodeType": "ArrayTypeName", + "src": "504:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "589:32:0", + "statements": [ + { + "expression": { + "hexValue": "48656c6c6f20576f726c6421", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "602:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", + "typeString": "literal_string \"Hello World!\"" + }, + "value": "Hello World!" + }, + "functionReturnParameters": 11, + "id": 13, + "nodeType": "Return", + "src": "595:21:0" + } + ] + }, + "functionSelector": "ef5fb05b", + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sayHello", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "550:2:0" + }, + "returnParameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "574:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 9, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "574:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "573:15:0" + }, + "scope": 52, + "src": "532:89:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22, + "nodeType": "Block", + "src": "682:24:0", + "statements": [ + { + "expression": { + "id": 20, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "697:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 19, + "id": 21, + "nodeType": "Return", + "src": "690:11:0" + } + ] + }, + "functionSelector": "17d7de7c", + "id": 23, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 16, + "nodeType": "ParameterList", + "parameters": [], + "src": "641:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 23, + "src": "665:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 17, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "665:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "664:15:0" + }, + "scope": 52, + "src": "625:81:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 34, + "nodeType": "Block", + "src": "787:32:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 30, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "802:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 32, + "indexExpression": { + "id": 31, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "802:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 29, + "id": 33, + "nodeType": "Return", + "src": "795:19:0" + } + ] + }, + "functionSelector": "59c293f1", + "id": 35, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNameByIndex", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "734:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "733:15:0" + }, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 28, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 35, + "src": "770:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "770:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "769:15:0" + }, + "scope": 52, + "src": "710:109:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 50, + "nodeType": "Block", + "src": "872:54:0", + "statements": [ + { + "expression": { + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 40, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "880:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 41, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "887:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "880:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "880:14:0" + }, + { + "expression": { + "arguments": [ + { + "id": 47, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "913:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 44, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "902:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "902:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "902:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 49, + "nodeType": "ExpressionStatement", + "src": "902:19:0" + } + ] + }, + "functionSelector": "c47f0027", + "id": 51, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "840:21:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 36, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "840:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "839:23:0" + }, + "returnParameters": { + "id": 39, + "nodeType": "ParameterList", + "parameters": [], + "src": "872:0:0" + }, + "scope": 52, + "src": "823:103:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 53, + "src": "439:490:0" + } + ], + "src": "413:517:0" + }, + "compiler": { + "name": "solc", + "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.3", + "updatedAt": "2021-02-09T14:53:15.855Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } } \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol index befd843936..eee63d1229 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol @@ -9,6 +9,7 @@ pragma solidity >=0.7.0; contract HelloWorld { string private name = "CaptainCactus"; + string[] private names; function sayHello () public pure returns (string memory) { return 'Hello World!'; @@ -19,8 +20,15 @@ contract HelloWorld { return name; } + function getNameByIndex(uint256 index) public view returns (string memory) + { + return names[index]; + } + function setName(string memory newName) public { name = newName; + names.push(newName); } + } diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts index bfbd2cd673..d98fb6243c 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts @@ -202,6 +202,25 @@ test("deploys contract via .json file", async (t: Test) => { }); t2.ok(getNameOut2, "getName() invocation #2 output is truthy OK"); + const { callOutput } = await connector.invokeContract({ + contractAddress, + contractAbi: HelloWorldContractJson.abi, + invocationType: EthContractInvocationType.CALL, + methodName: "getNameByIndex", + params: [0], + gas: 1000000, + web3SigningCredential: { + ethAccount: testEthAccount.address, + secret: testEthAccount.privateKey, + type: Web3SigningCredentialType.PRIVATEKEYHEX, + }, + }); + t2.equal( + callOutput, + newName, + `getNameByIndex() output reflects the update OK`, + ); + t2.end(); }); @@ -248,6 +267,21 @@ test("deploys contract via .json file", async (t: Test) => { }); t2.ok(getNameOut2, "getName() invocation #2 output is truthy OK"); + const { callOutput } = await connector.invokeContract({ + contractAddress, + contractAbi: HelloWorldContractJson.abi, + invocationType: EthContractInvocationType.CALL, + methodName: "getNameByIndex", + params: [1], + gas: 1000000, + web3SigningCredential, + }); + t2.equal( + callOutput, + newName, + `getNameByIndex() output reflects the update OK`, + ); + t2.end(); });