@gnosis.pm/util-contracts
Version:
Utility contracts for Gnosis
1,178 lines • 186 kB
JSON
{
"contractName": "ExternalStorageReader",
"abi": [
{
"inputs": [],
"name": "getFoo",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "foo_",
"type": "uint256"
}
],
"name": "setAndGetFoo",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "doRevert",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract StorageAccessible",
"name": "target",
"type": "address"
}
],
"name": "invokeDoRevertViaStorageAccessible",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ViewStorageAccessible",
"name": "target",
"type": "address"
},
{
"internalType": "bytes",
"name": "encodedCall",
"type": "bytes"
}
],
"name": "invokeStaticDelegatecall",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"doRevert\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFoo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract StorageAccessible\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"invokeDoRevertViaStorageAccessible\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ViewStorageAccessible\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"encodedCall\",\"type\":\"bytes\"}],\"name\":\"invokeStaticDelegatecall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"foo_\",\"type\":\"uint256\"}],\"name\":\"setAndGetFoo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Defines reader methods on StorageAccessibleWrapper that can be later executed in the context of a previously deployed instance\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/test/StorageAccessibleWrapper.sol\":\"ExternalStorageReader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol\":{\"keccak256\":\"0xc8b52a0614f7537b65d6db188ffc5b16fd23b71d9174cb29f8020c9bf3ccb333\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://3445810f14c830c1a10f21df9f67014c0a8c110334431f3ac5d9f296234be505\",\"dweb:/ipfs/QmZefwGQd6A1quZZk78e4eTVRjQSwMwFCXTFNkxAvKDFmw\"]},\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/test/StorageAccessibleWrapper.sol\":{\"keccak256\":\"0x3efce0b9c27dbab9e83a61b0c4dd46052473861c85b984c7f96dd1ea946f84ac\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://bfe540d250671147f58993a55af3f129150db108e4be07cd6be0045e448e7391\",\"dweb:/ipfs/QmWrUeXvb4Xbuh12nrmicHdbdqvbPq3br4JmGEeqwYuFQs\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506104d7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100565760003560e01c8062e4b2561461005b5780630557ebe414610083578063243dc8da146100b25780636e76e8aa146100ba578063afc874d21461013a575b600080fd5b6100816004803603602081101561007157600080fd5b50356001600160a01b0316610142565b005b6100a06004803603602081101561009957600080fd5b5035610303565b60408051918252519081900360200190f35b6100a061030b565b6100a0600480360360408110156100d057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100fb57600080fd5b82018360208201111561010d57600080fd5b8035906020019184600183028401116401000000008311171561012f57600080fd5b509092509050610311565b610081610056565b604080516004808252602480830184526020830180516001600160e01b03166357e43a6960e11b178152845163f84436bd60e01b8152309381018481529281019586528451604482015284516001600160a01b0388169663f84436bd96949390926064019180838360005b838110156101c55781810151838201526020016101ad565b50505050905090810190601f1680156101f25780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561021257600080fd5b505af1158015610226573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561024f57600080fd5b810190808051604051939291908464010000000082111561026f57600080fd5b90830190602082018581111561028457600080fd5b825164010000000081118282018810171561029e57600080fd5b82525081516020918201929091019080838360005b838110156102cb5781810151838201526020016102b3565b50505050905090810190601f1680156102f85780820380516001836020036101000a031916815260200191505b506040525050505050565b600081905590565b60005490565b600080846001600160a01b031663f84436bd3086866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060006040518083038186803b15801561039557600080fd5b505afa1580156103a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156103d257600080fd5b81019080805160405193929190846401000000008211156103f257600080fd5b90830190602082018581111561040757600080fd5b825164010000000081118282018810171561042157600080fd5b82525081516020918201929091019080838360005b8381101561044e578181015183820152602001610436565b50505050905090810190601f16801561047b5780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561049657600080fd5b50519594505050505056fea2646970667358221220def6f4b733bb792a8456c7ea34f1ca444d3d1cbb59ec2bd07c5f5944635efe7664736f6c63430007050033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100565760003560e01c8062e4b2561461005b5780630557ebe414610083578063243dc8da146100b25780636e76e8aa146100ba578063afc874d21461013a575b600080fd5b6100816004803603602081101561007157600080fd5b50356001600160a01b0316610142565b005b6100a06004803603602081101561009957600080fd5b5035610303565b60408051918252519081900360200190f35b6100a061030b565b6100a0600480360360408110156100d057600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100fb57600080fd5b82018360208201111561010d57600080fd5b8035906020019184600183028401116401000000008311171561012f57600080fd5b509092509050610311565b610081610056565b604080516004808252602480830184526020830180516001600160e01b03166357e43a6960e11b178152845163f84436bd60e01b8152309381018481529281019586528451604482015284516001600160a01b0388169663f84436bd96949390926064019180838360005b838110156101c55781810151838201526020016101ad565b50505050905090810190601f1680156101f25780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561021257600080fd5b505af1158015610226573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561024f57600080fd5b810190808051604051939291908464010000000082111561026f57600080fd5b90830190602082018581111561028457600080fd5b825164010000000081118282018810171561029e57600080fd5b82525081516020918201929091019080838360005b838110156102cb5781810151838201526020016102b3565b50505050905090810190601f1680156102f85780820380516001836020036101000a031916815260200191505b506040525050505050565b600081905590565b60005490565b600080846001600160a01b031663f84436bd3086866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505094505050505060006040518083038186803b15801561039557600080fd5b505afa1580156103a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156103d257600080fd5b81019080805160405193929190846401000000008211156103f257600080fd5b90830190602082018581111561040757600080fd5b825164010000000081118282018810171561042157600080fd5b82525081516020918201929091019080838360005b8381101561044e578181015183820152602001610436565b50505050905090810190601f16801561047b5780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561049657600080fd5b50519594505050505056fea2646970667358221220def6f4b733bb792a8456c7ea34f1ca444d3d1cbb59ec2bd07c5f5944635efe7664736f6c63430007050033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "1265:923:8:-:0;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "1265:923:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:221;;;;;;;;;;;;;;;;-1:-1:-1;1646:221:8;-1:-1:-1;;;;;1646:221:8;;:::i;:::-;;1469:108;;;;;;;;;;;;;;;;-1:-1:-1;1469:108:8;;:::i;:::-;;;;;;;;;;;;;;;;1388:75;;;:::i;1873:313::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1873:313:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1873:313:8;;-1:-1:-1;1873:313:8;-1:-1:-1;1873:313:8;:::i;1583:57::-;;;:::i;1646:221::-;1813:37;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1813:37:8;-1:-1:-1;;;1813:37:8;;;1745:115;;-1:-1:-1;;;1745:115:8;;1794:4;1745:115;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1745:27:8;;;;;1813:37;1745:115;;;;;;;;1813:37;;1745:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1745:115:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1745:115:8;;;;;;;;;;-1:-1:-1;1745:115:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1646:221;:::o;1469:108::-;1521:7;1540:10;;;;1469:108::o;1388:75::-;1427:7;1453:3;1388:75;:::o;1873:313::-;2008:7;2027:14;2068:6;-1:-1:-1;;;;;2068:27:8;;2104:4;2111:11;;2068:55;;;;;;;;;;;;;-1:-1:-1;;;;;2068:55:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2068:55:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2068:55:8;;;;;;;;;;-1:-1:-1;2068:55:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2044:112;;;;;;;;;;;;;;;-1:-1:-1;2044:112:8;;1873:313;-1:-1:-1;;;;;1873:313:8:o",
"source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.7.0;\nimport \"../StorageAccessible.sol\";\n\ncontract StorageAccessibleWrapper is StorageAccessible {\n struct FooBar {\n uint256 foo;\n uint256 bar;\n }\n\n uint8 public constant SLOT_FOO = 0;\n uint8 public constant SLOT_BAR = 1;\n uint8 public constant SLOT_BAM = 1;\n uint8 public constant SLOT_BAZ = 2;\n uint8 public constant SLOT_QUX = 3;\n uint8 public constant SLOT_FOOBAR = 4;\n\n uint256 foo;\n uint128 bar;\n uint64 bam;\n uint256[] baz;\n mapping(uint256 => uint256) qux;\n FooBar foobar;\n\n constructor() {}\n\n function setFoo(uint256 foo_) public {\n foo = foo_;\n }\n\n function setBar(uint128 bar_) public {\n bar = bar_;\n }\n\n function setBam(uint64 bam_) public {\n bam = bam_;\n }\n\n function setBaz(uint256[] memory baz_) public {\n baz = baz_;\n }\n\n function setQuxKeyValue(uint256 key, uint256 value) public {\n qux[key] = value;\n }\n\n function setFoobar(uint256 foo_, uint256 bar_) public {\n foobar = FooBar({foo: foo_, bar: bar_});\n }\n}\n\n/**\n * Defines reader methods on StorageAccessibleWrapper that can be later executed\n * in the context of a previously deployed instance\n */\ncontract ExternalStorageReader {\n // Needs same storage layout as the contract it is reading from\n uint256 foo;\n\n function getFoo() public view returns (uint256) {\n return foo;\n }\n\n function setAndGetFoo(uint256 foo_) public returns (uint256) {\n foo = foo_;\n return foo;\n }\n\n function doRevert() public pure {\n revert();\n }\n\n function invokeDoRevertViaStorageAccessible(StorageAccessible target)\n public\n {\n target.simulateDelegatecall(\n address(this),\n abi.encodeWithSignature(\"doRevert()\")\n );\n }\n\n function invokeStaticDelegatecall(\n ViewStorageAccessible target,\n bytes calldata encodedCall\n ) public view returns (uint256) {\n uint256 result = abi.decode(\n target.simulateDelegatecall(address(this), encodedCall),\n (uint256)\n );\n return result;\n }\n}\n",
"sourcePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/test/StorageAccessibleWrapper.sol",
"ast": {
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/test/StorageAccessibleWrapper.sol",
"exportedSymbols": {
"ExternalStorageReader": [
2102
],
"StorageAccessible": [
1833
],
"StorageAccessibleWrapper": [
2021
],
"ViewStorageAccessible": [
1681
]
},
"id": 2103,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1905,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "42:23:8"
},
{
"absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol",
"file": "../StorageAccessible.sol",
"id": 1906,
"nodeType": "ImportDirective",
"scope": 2103,
"sourceUnit": 1834,
"src": "66:34:8",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 1907,
"name": "StorageAccessible",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1833,
"src": "139:17:8",
"typeDescriptions": {
"typeIdentifier": "t_contract$_StorageAccessible_$1833",
"typeString": "contract StorageAccessible"
}
},
"id": 1908,
"nodeType": "InheritanceSpecifier",
"src": "139:17:8"
}
],
"contractDependencies": [
1833
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 2021,
"linearizedBaseContracts": [
2021,
1833
],
"name": "StorageAccessibleWrapper",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "StorageAccessibleWrapper.FooBar",
"id": 1913,
"members": [
{
"constant": false,
"id": 1910,
"mutability": "mutable",
"name": "foo",
"nodeType": "VariableDeclaration",
"scope": 1913,
"src": "187:11:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1909,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "187:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1912,
"mutability": "mutable",
"name": "bar",
"nodeType": "VariableDeclaration",
"scope": 1913,
"src": "208:11:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1911,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "208:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "FooBar",
"nodeType": "StructDefinition",
"scope": 2021,
"src": "163:63:8",
"visibility": "public"
},
{
"constant": true,
"functionSelector": "4e78b547",
"id": 1916,
"mutability": "constant",
"name": "SLOT_FOO",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "232:34:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1914,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "232:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "30",
"id": 1915,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "265:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "6334bd13",
"id": 1919,
"mutability": "constant",
"name": "SLOT_BAR",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "272:34:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1917,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "272:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "31",
"id": 1918,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "305:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "9fde4466",
"id": 1922,
"mutability": "constant",
"name": "SLOT_BAM",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "312:34:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1920,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "312:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "31",
"id": 1921,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "345:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "0697a74f",
"id": 1925,
"mutability": "constant",
"name": "SLOT_BAZ",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "352:34:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1923,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "352:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "32",
"id": 1924,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "385:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "7a5d379b",
"id": 1928,
"mutability": "constant",
"name": "SLOT_QUX",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "392:34:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1926,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "392:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "33",
"id": 1927,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "425:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "dc0f3490",
"id": 1931,
"mutability": "constant",
"name": "SLOT_FOOBAR",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "432:37:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1929,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "432:5:8",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "34",
"id": 1930,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "468:1:8",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"visibility": "public"
},
{
"constant": false,
"id": 1933,
"mutability": "mutable",
"name": "foo",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "476:11:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1932,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "476:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1935,
"mutability": "mutable",
"name": "bar",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "493:11:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
},
"typeName": {
"id": 1934,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "493:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1937,
"mutability": "mutable",
"name": "bam",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "510:10:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 1936,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "510:6:8",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1940,
"mutability": "mutable",
"name": "baz",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "526:13:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1938,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "526:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1939,
"nodeType": "ArrayTypeName",
"src": "526:9:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1944,
"mutability": "mutable",
"name": "qux",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "545:31:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"typeName": {
"id": 1943,
"keyType": {
"id": 1941,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "553:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "545:27:8",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
},
"valueType": {
"id": 1942,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "564:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 1946,
"mutability": "mutable",
"name": "foobar",
"nodeType": "VariableDeclaration",
"scope": 2021,
"src": "582:13:8",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FooBar_$1913_storage",
"typeString": "struct StorageAccessibleWrapper.FooBar"
},
"typeName": {
"id": 1945,
"name": "FooBar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1913,
"src": "582:6:8",
"typeDescriptions": {
"typeIdentifier": "t_struct$_FooBar_$1913_storage_ptr",
"typeString": "struct StorageAccessibleWrapper.FooBar"
}
},
"visibility": "internal"
},
{
"body": {
"id": 1949,
"nodeType": "Block",
"src": "616:2:8",
"statements": []
},
"id": 1950,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1947,
"nodeType": "ParameterList",
"parameters": [],
"src": "613:2:8"
},
"returnParameters": {
"id": 1948,
"nodeType": "ParameterList",
"parameters": [],
"src": "616:0:8"
},
"scope": 2021,
"src": "602:16:8",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1959,
"nodeType": "Block",
"src": "661:27:8",
"statements": [
{
"expression": {
"id": 1957,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1955,
"name": "foo",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1933,
"src": "671:3:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 1956,
"name": "foo_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1952,
"src": "677:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "671:10:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1958,
"nodeType": "ExpressionStatement",
"src": "671:10:8"
}
]
},
"functionSelector": "dc80035d",
"id": 1960,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setFoo",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1953,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1952,
"mutability": "mutable",
"name": "foo_",
"nodeType": "VariableDeclaration",
"scope": 1960,
"src": "640:12:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1951,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "640:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "639:14:8"
},
"returnParameters": {
"id": 1954,
"nodeType": "ParameterList",
"parameters": [],
"src": "661:0:8"
},
"scope": 2021,
"src": "624:64:8",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1969,
"nodeType": "Block",
"src": "731:27:8",
"statements": [
{
"expression": {
"id": 1967,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1965,
"name": "bar",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1935,
"src": "741:3:8",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 1966,
"name": "bar_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1962,
"src": "747:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"src": "741:10:8",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"id": 1968,
"nodeType": "ExpressionStatement",
"src": "741:10:8"
}
]
},
"functionSelector": "8e9c68f2",
"id": 1970,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setBar",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1963,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1962,
"mutability": "mutable",
"name": "bar_",
"nodeType": "VariableDeclaration",
"scope": 1970,
"src": "710:12:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
},
"typeName": {
"id": 1961,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "710:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"visibility": "internal"
}
],
"src": "709:14:8"
},
"returnParameters": {
"id": 1964,
"nodeType": "ParameterList",
"parameters": [],
"src": "731:0:8"
},
"scope": 2021,
"src": "694:64:8",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1979,
"nodeType": "Block",
"src": "800:27:8",
"statements": [
{
"expression": {
"id": 1977,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1975,
"name": "bam",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1937,
"src": "810:3:8",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 1976,
"name": "bam_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1972,
"src": "816:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "810:10:8",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"id": 1978,
"nodeType": "ExpressionStatement",
"src": "810:10:8"
}
]
},
"functionSelector": "bd0276fc",
"id": 1980,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setBam",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1973,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1972,
"mutability": "mutable",
"name": "bam_",
"nodeType": "VariableDeclaration",
"scope": 1980,
"src": "780:11:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 1971,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "780:6:8",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "779:13:8"
},
"returnParameters": {
"id": 1974,
"nodeType": "ParameterList",
"parameters": [],
"src": "800:0:8"
},
"scope": 2021,
"src": "764:63:8",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1990,
"nodeType": "Block",
"src": "879:27:8",
"statements": [
{
"expression": {
"id": 1988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 1986,
"name": "baz",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1940,
"src": "889:3:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 1987,
"name": "baz_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1983,
"src": "895:4:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
},
"src": "889:10:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"id": 1989,
"nodeType": "ExpressionStatement",
"src": "889:10:8"
}
]
},
"functionSelector": "38cccf07",
"id": 1991,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setBaz",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1984,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1983,
"mutability": "mutable",
"name": "baz_",
"nodeType": "VariableDeclaration",
"scope": 1991,
"src": "849:21:8",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1981,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "849:7:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1982,
"nodeType": "ArrayTypeName",
"src": "849:9:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
}
],
"src": "848:23:8"
},
"returnParameters": {
"id": 1985,
"nodeType": "ParameterList",
"parameters": [],
"src": "879:0:8"
},
"scope": 2021,
"src": "833:73:8",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 2004,
"nodeType": "Block",
"src": "971:33:8",
"statements": [
{
"expression": {
"id": 2002,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 1998,
"name": "qux",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1944,
"src": "981:3:8",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$",
"typeString": "mapping(uint256 => uint256)"
}
},
"id": 2000,
"indexExpression": {
"id": 1999,
"name": "key",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1993,
"src": "985:3:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "981:8:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 2001,
"