Skip to content

Instantly share code, notes, and snippets.

@bshastry
Created October 20, 2018 16:07
Show Gist options
  • Save bshastry/b221ddcfc894c31f13080965119ebd42 to your computer and use it in GitHub Desktop.
Save bshastry/b221ddcfc894c31f13080965119ebd42 to your computer and use it in GitHub Desktop.
solc json io
{
"contracts": {
"": {
"test": {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "f",
"outputs": [
{
"name": "out",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"assembly": " /* \"\":0:117 contract test {... */\n mstore(0x40, 0x80)\n callvalue\n /* \"--CODEGEN--\":8:17 */\n dup1\n /* \"--CODEGEN--\":5:7 */\n iszero\n tag_1\n jumpi\n /* \"--CODEGEN--\":30:31 */\n 0x0\n /* \"--CODEGEN--\":27:28 */\n dup1\n /* \"--CODEGEN--\":20:32 */\n revert\n /* \"--CODEGEN--\":5:7 */\ntag_1:\n /* \"\":0:117 contract test {... */\n pop\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n return\nstop\n\nsub_0: assembly {\n /* \"\":0:117 contract test {... */\n mstore(0x40, 0x80)\n jumpi(tag_1, lt(calldatasize, 0x4))\n and(div(calldataload(0x0), 0x100000000000000000000000000000000000000000000000000000000), 0xffffffff)\n 0xb3de648b\n dup2\n eq\n tag_2\n jumpi\n tag_1:\n 0x0\n dup1\n revert\n /* \"\":42:115 function f(uint256) public returns (uint out) { f(variable); test; out; } */\n tag_2:\n callvalue\n /* \"--CODEGEN--\":8:17 */\n dup1\n /* \"--CODEGEN--\":5:7 */\n iszero\n tag_3\n jumpi\n /* \"--CODEGEN--\":30:31 */\n 0x0\n /* \"--CODEGEN--\":27:28 */\n dup1\n /* \"--CODEGEN--\":20:32 */\n revert\n /* \"--CODEGEN--\":5:7 */\n tag_3:\n /* \"\":42:115 function f(uint256) public returns (uint out) { f(variable); test; out; } */\n pop\n tag_4\n 0x4\n dup1\n calldatasize\n sub\n /* \"--CODEGEN--\":13:15 */\n 0x20\n /* \"--CODEGEN--\":8:11 */\n dup2\n /* \"--CODEGEN--\":5:16 */\n lt\n /* \"--CODEGEN--\":2:4 */\n iszero\n tag_5\n jumpi\n /* \"--CODEGEN--\":29:30 */\n 0x0\n /* \"--CODEGEN--\":26:27 */\n dup1\n /* \"--CODEGEN--\":19:31 */\n revert\n /* \"--CODEGEN--\":2:4 */\n tag_5:\n pop\n /* \"\":42:115 function f(uint256) public returns (uint out) { f(variable); test; out; } */\n calldataload\n jump(tag_6)\n tag_4:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n tag_6:\n /* \"\":78:86 uint out */\n 0x0\n /* \"\":90:101 f(variable) */\n tag_8\n /* \"\":92:100 variable */\n sload(0x0)\n /* \"\":90:91 f */\n tag_6\n /* \"\":90:101 f(variable) */\n jump\t// in\n tag_8:\n pop\n /* \"\":42:115 function f(uint256) public returns (uint out) { f(variable); test; out; } */\n swap2\n swap1\n pop\n jump\t// out\n\n auxdata: 0xa165627a7a72305820f966be61376f906e18465bbb64d12b5241f5e15021b4e74d1a7ab8de40e0a5780029\n}\n",
"bytecode": {
"linkReferences": {},
"object": "608060405234801561001057600080fd5b5060b88061001f6000396000f3fe608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b3de648b81146043575b600080fd5b348015604e57600080fd5b50606960048036036020811015606357600080fd5b5035607b565b60408051918252519081900360200190f35b60006086600054607b565b5091905056fea165627a7a72305820f966be61376f906e18465bbb64d12b5241f5e15021b4e74d1a7ab8de40e0a5780029",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xB8 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0xB3DE648B DUP2 EQ PUSH1 0x43 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH1 0x4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x69 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x63 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x86 PUSH1 0x0 SLOAD PUSH1 0x7B JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xf9 PUSH7 0xBE61376F906E18 0x46 JUMPDEST 0xbb PUSH5 0xD12B5241F5 0xe1 POP 0x21 0xb4 0xe7 0x4d BYTE PUSH27 0xB8DE40E0A578002900000000000000000000000000000000000000 ",
"sourceMap": "0:117:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;0:117:0;;;;;;;"
},
"deployedBytecode": {
"linkReferences": {},
"object": "608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663b3de648b81146043575b600080fd5b348015604e57600080fd5b50606960048036036020811015606357600080fd5b5035607b565b60408051918252519081900360200190f35b60006086600054607b565b5091905056fea165627a7a72305820f966be61376f906e18465bbb64d12b5241f5e15021b4e74d1a7ab8de40e0a5780029",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0xB3DE648B DUP2 EQ PUSH1 0x43 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH1 0x4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x69 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x63 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x86 PUSH1 0x0 SLOAD PUSH1 0x7B JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xf9 PUSH7 0xBE61376F906E18 0x46 JUMPDEST 0xbb PUSH5 0xD12B5241F5 0xe1 POP 0x21 0xb4 0xe7 0x4d BYTE PUSH27 0xB8DE40E0A578002900000000000000000000000000000000000000 ",
"sourceMap": "0:117:0:-;;;;;;;;;;;;;;;;;;;;;;;42:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;42:73:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;42:73:0;;;;;;;;;;;;;;;;;;;;78:8;90:11;92:8;;90:1;:11::i;:::-;;42:73;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "36800",
"executionCost": "87",
"totalCost": "36887"
},
"external": {
"f(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "80"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "40"
},
{
"begin": 0,
"end": 117,
"name": "MSTORE"
},
{
"begin": 0,
"end": 117,
"name": "CALLVALUE"
},
{
"begin": 8,
"end": 17,
"name": "DUP1"
},
{
"begin": 5,
"end": 7,
"name": "ISZERO"
},
{
"begin": 5,
"end": 7,
"name": "PUSH [tag]",
"value": "1"
},
{
"begin": 5,
"end": 7,
"name": "JUMPI"
},
{
"begin": 30,
"end": 31,
"name": "PUSH",
"value": "0"
},
{
"begin": 27,
"end": 28,
"name": "DUP1"
},
{
"begin": 20,
"end": 32,
"name": "REVERT"
},
{
"begin": 5,
"end": 7,
"name": "tag",
"value": "1"
},
{
"begin": 5,
"end": 7,
"name": "JUMPDEST"
},
{
"begin": 0,
"end": 117,
"name": "POP"
},
{
"begin": 0,
"end": 117,
"name": "PUSH #[$]",
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 0,
"end": 117,
"name": "DUP1"
},
{
"begin": 0,
"end": 117,
"name": "PUSH [$]",
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "0"
},
{
"begin": 0,
"end": 117,
"name": "CODECOPY"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "0"
},
{
"begin": 0,
"end": 117,
"name": "RETURN"
}
],
".data": {
"0": {
".auxdata": "a165627a7a72305820f966be61376f906e18465bbb64d12b5241f5e15021b4e74d1a7ab8de40e0a5780029",
".code": [
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "80"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "40"
},
{
"begin": 0,
"end": 117,
"name": "MSTORE"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "4"
},
{
"begin": 0,
"end": 117,
"name": "CALLDATASIZE"
},
{
"begin": 0,
"end": 117,
"name": "LT"
},
{
"begin": 0,
"end": 117,
"name": "PUSH [tag]",
"value": "1"
},
{
"begin": 0,
"end": 117,
"name": "JUMPI"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "FFFFFFFF"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "0"
},
{
"begin": 0,
"end": 117,
"name": "CALLDATALOAD"
},
{
"begin": 0,
"end": 117,
"name": "DIV"
},
{
"begin": 0,
"end": 117,
"name": "AND"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "B3DE648B"
},
{
"begin": 0,
"end": 117,
"name": "DUP2"
},
{
"begin": 0,
"end": 117,
"name": "EQ"
},
{
"begin": 0,
"end": 117,
"name": "PUSH [tag]",
"value": "2"
},
{
"begin": 0,
"end": 117,
"name": "JUMPI"
},
{
"begin": 0,
"end": 117,
"name": "tag",
"value": "1"
},
{
"begin": 0,
"end": 117,
"name": "JUMPDEST"
},
{
"begin": 0,
"end": 117,
"name": "PUSH",
"value": "0"
},
{
"begin": 0,
"end": 117,
"name": "DUP1"
},
{
"begin": 0,
"end": 117,
"name": "REVERT"
},
{
"begin": 42,
"end": 115,
"name": "tag",
"value": "2"
},
{
"begin": 42,
"end": 115,
"name": "JUMPDEST"
},
{
"begin": 42,
"end": 115,
"name": "CALLVALUE"
},
{
"begin": 8,
"end": 17,
"name": "DUP1"
},
{
"begin": 5,
"end": 7,
"name": "ISZERO"
},
{
"begin": 5,
"end": 7,
"name": "PUSH [tag]",
"value": "3"
},
{
"begin": 5,
"end": 7,
"name": "JUMPI"
},
{
"begin": 30,
"end": 31,
"name": "PUSH",
"value": "0"
},
{
"begin": 27,
"end": 28,
"name": "DUP1"
},
{
"begin": 20,
"end": 32,
"name": "REVERT"
},
{
"begin": 5,
"end": 7,
"name": "tag",
"value": "3"
},
{
"begin": 5,
"end": 7,
"name": "JUMPDEST"
},
{
"begin": 42,
"end": 115,
"name": "POP"
},
{
"begin": 42,
"end": 115,
"name": "PUSH [tag]",
"value": "4"
},
{
"begin": 42,
"end": 115,
"name": "PUSH",
"value": "4"
},
{
"begin": 42,
"end": 115,
"name": "DUP1"
},
{
"begin": 42,
"end": 115,
"name": "CALLDATASIZE"
},
{
"begin": 42,
"end": 115,
"name": "SUB"
},
{
"begin": 13,
"end": 15,
"name": "PUSH",
"value": "20"
},
{
"begin": 8,
"end": 11,
"name": "DUP2"
},
{
"begin": 5,
"end": 16,
"name": "LT"
},
{
"begin": 2,
"end": 4,
"name": "ISZERO"
},
{
"begin": 2,
"end": 4,
"name": "PUSH [tag]",
"value": "5"
},
{
"begin": 2,
"end": 4,
"name": "JUMPI"
},
{
"begin": 29,
"end": 30,
"name": "PUSH",
"value": "0"
},
{
"begin": 26,
"end": 27,
"name": "DUP1"
},
{
"begin": 19,
"end": 31,
"name": "REVERT"
},
{
"begin": 2,
"end": 4,
"name": "tag",
"value": "5"
},
{
"begin": 2,
"end": 4,
"name": "JUMPDEST"
},
{
"begin": -1,
"end": -1,
"name": "POP"
},
{
"begin": 42,
"end": 115,
"name": "CALLDATALOAD"
},
{
"begin": 42,
"end": 115,
"name": "PUSH [tag]",
"value": "6"
},
{
"begin": 42,
"end": 115,
"name": "JUMP"
},
{
"begin": 42,
"end": 115,
"name": "tag",
"value": "4"
},
{
"begin": 42,
"end": 115,
"name": "JUMPDEST"
},
{
"begin": 42,
"end": 115,
"name": "PUSH",
"value": "40"
},
{
"begin": 42,
"end": 115,
"name": "DUP1"
},
{
"begin": 42,
"end": 115,
"name": "MLOAD"
},
{
"begin": 42,
"end": 115,
"name": "SWAP2"
},
{
"begin": 42,
"end": 115,
"name": "DUP3"
},
{
"begin": 42,
"end": 115,
"name": "MSTORE"
},
{
"begin": 42,
"end": 115,
"name": "MLOAD"
},
{
"begin": 42,
"end": 115,
"name": "SWAP1"
},
{
"begin": 42,
"end": 115,
"name": "DUP2"
},
{
"begin": 42,
"end": 115,
"name": "SWAP1"
},
{
"begin": 42,
"end": 115,
"name": "SUB"
},
{
"begin": 42,
"end": 115,
"name": "PUSH",
"value": "20"
},
{
"begin": 42,
"end": 115,
"name": "ADD"
},
{
"begin": 42,
"end": 115,
"name": "SWAP1"
},
{
"begin": 42,
"end": 115,
"name": "RETURN"
},
{
"begin": 42,
"end": 115,
"name": "tag",
"value": "6"
},
{
"begin": 42,
"end": 115,
"name": "JUMPDEST"
},
{
"begin": 78,
"end": 86,
"name": "PUSH",
"value": "0"
},
{
"begin": 90,
"end": 101,
"name": "PUSH [tag]",
"value": "8"
},
{
"begin": 92,
"end": 100,
"name": "PUSH",
"value": "0"
},
{
"begin": 92,
"end": 100,
"name": "SLOAD"
},
{
"begin": 90,
"end": 91,
"name": "PUSH [tag]",
"value": "6"
},
{
"begin": 90,
"end": 101,
"name": "JUMP",
"value": "[in]"
},
{
"begin": 90,
"end": 101,
"name": "tag",
"value": "8"
},
{
"begin": 90,
"end": 101,
"name": "JUMPDEST"
},
{
"begin": 90,
"end": 101,
"name": "POP"
},
{
"begin": 42,
"end": 115,
"name": "SWAP2"
},
{
"begin": 42,
"end": 115,
"name": "SWAP1"
},
{
"begin": 42,
"end": 115,
"name": "POP"
},
{
"begin": 42,
"end": 115,
"name": "JUMP",
"value": "[out]"
}
]
}
}
},
"methodIdentifiers": {
"f(uint256)": "b3de648b"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.5.0-develop.2018.10.20+commit.0f102d92.mod\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"f\",\"outputs\":[{\"name\":\"out\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"\":\"test\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"\":{\"keccak256\":\"0x14c0a4244a7e4b1a33d51580fbb7f9c29df545c104cf88dfffa3bab6ddaf49f3\",\"urls\":[\"bzzr://4ff43b6444adf1b17637dfcf61e8d9abd58df18fa4a18e1e6e41e8ce19b63fcc\"]}},\"version\":1}",
"userdoc": {
"methods": {}
}
}
}
},
"errors": [
{
"component": "general",
"formattedMessage": "Warning: This is a pre-release compiler version, please do not use it in production.\n",
"message": "This is a pre-release compiler version, please do not use it in production.",
"severity": "warning",
"type": "Warning"
},
{
"component": "general",
"formattedMessage": ":1:1: Warning: Source file does not specify required compiler version!\ncontract test {\n^ (Relevant source part starts here and spans across multiple lines).\n",
"message": "Source file does not specify required compiler version!",
"severity": "warning",
"sourceLocation": {
"end": 119,
"file": "",
"start": 0
},
"type": "Warning"
}
],
"sources": {
"": {
"ast": {
"absolutePath": "",
"exportedSymbols": {
"test": [
19
]
},
"id": 20,
"nodeType": "SourceUnit",
"nodes": [
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 19,
"linearizedBaseContracts": [
19
],
"name": "test",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 2,
"name": "variable",
"nodeType": "VariableDeclaration",
"scope": 19,
"src": "20:16:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "20:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 17,
"nodeType": "Block",
"src": "88:27:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 10,
"name": "variable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2,
"src": "92:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 9,
"name": "f",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18,
"src": "90:1:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256) returns (uint256)"
}
},
"id": 11,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "90:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12,
"nodeType": "ExpressionStatement",
"src": "90:11:0"
},
{
"expression": {
"argumentTypes": null,
"id": 13,
"name": "test",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 19,
"src": "103:4:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_test_$19_$",
"typeString": "type(contract test)"
}
},
"id": 14,
"nodeType": "ExpressionStatement",
"src": "103:4:0"
},
{
"expression": {
"argumentTypes": null,
"id": 15,
"name": "out",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "109:3:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 16,
"nodeType": "ExpressionStatement",
"src": "109:3:0"
}
]
},
"documentation": null,
"id": 18,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "53:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "53:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "52:9:0"
},
"returnParameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7,
"name": "out",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "78:8:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "78:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "77:10:0"
},
"scope": 19,
"src": "42:73:0",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 20,
"src": "0:117:0"
}
],
"src": "0:119:0"
},
"id": 0,
"legacyAST": {
"attributes": {
"absolutePath": "",
"exportedSymbols": {
"test": [
19
]
}
},
"children": [
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
19
],
"name": "test",
"scope": 20
},
"children": [
{
"attributes": {
"constant": false,
"name": "variable",
"scope": 19,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 1,
"name": "ElementaryTypeName",
"src": "20:7:0"
}
],
"id": 2,
"name": "VariableDeclaration",
"src": "20:16:0"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "f",
"scope": 19,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 18,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint256",
"type": "uint256"
},
"id": 3,
"name": "ElementaryTypeName",
"src": "53:7:0"
}
],
"id": 4,
"name": "VariableDeclaration",
"src": "53:7:0"
}
],
"id": 5,
"name": "ParameterList",
"src": "52:9:0"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "out",
"scope": 18,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 6,
"name": "ElementaryTypeName",
"src": "78:4:0"
}
],
"id": 7,
"name": "VariableDeclaration",
"src": "78:8:0"
}
],
"id": 8,
"name": "ParameterList",
"src": "77:10:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "uint256",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 18,
"type": "function (uint256) returns (uint256)",
"value": "f"
},
"id": 9,
"name": "Identifier",
"src": "90:1:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2,
"type": "uint256",
"value": "variable"
},
"id": 10,
"name": "Identifier",
"src": "92:8:0"
}
],
"id": 11,
"name": "FunctionCall",
"src": "90:11:0"
}
],
"id": 12,
"name": "ExpressionStatement",
"src": "90:11:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 19,
"type": "type(contract test)",
"value": "test"
},
"id": 13,
"name": "Identifier",
"src": "103:4:0"
}
],
"id": 14,
"name": "ExpressionStatement",
"src": "103:4:0"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 7,
"type": "uint256",
"value": "out"
},
"id": 15,
"name": "Identifier",
"src": "109:3:0"
}
],
"id": 16,
"name": "ExpressionStatement",
"src": "109:3:0"
}
],
"id": 17,
"name": "Block",
"src": "88:27:0"
}
],
"id": 18,
"name": "FunctionDefinition",
"src": "42:73:0"
}
],
"id": 19,
"name": "ContractDefinition",
"src": "0:117:0"
}
],
"id": 20,
"name": "SourceUnit",
"src": "0:119:0"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment