{
  "contractName": "StorageAccessible",
  "abi": [
    {
      "inputs": [],
      "name": "SIMULATE_DELEGATECALL_INTERNAL_SELECTOR",
      "outputs": [
        {
          "internalType": "bytes4",
          "name": "",
          "type": "bytes4"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "offset",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "length",
          "type": "uint256"
        }
      ],
      "name": "getStorageAt",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "",
          "type": "bytes"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "targetContract",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "calldataPayload",
          "type": "bytes"
        }
      ],
      "name": "simulateDelegatecall",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "response",
          "type": "bytes"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "targetContract",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "calldataPayload",
          "type": "bytes"
        }
      ],
      "name": "simulateDelegatecallInternal",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "response",
          "type": "bytes"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "response",
          "type": "bytes"
        }
      ],
      "name": "revertWith",
      "outputs": [],
      "stateMutability": "pure",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "buffer",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "length",
          "type": "uint256"
        }
      ],
      "name": "setLength",
      "outputs": [],
      "stateMutability": "pure",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"SIMULATE_DELEGATECALL_INTERNAL_SELECTOR\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"getStorageAt\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"name\":\"revertWith\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"buffer\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"setLength\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"targetContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"calldataPayload\",\"type\":\"bytes\"}],\"name\":\"simulateDelegatecall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"targetContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"calldataPayload\",\"type\":\"bytes\"}],\"name\":\"simulateDelegatecallInternal\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getStorageAt(uint256,uint256)\":{\"details\":\"Reads `length` bytes of storage in the currents contract\",\"params\":{\"length\":\"- the number of words (32 bytes) of data to read\",\"offset\":\"- the offset in the current contract's storage in words to start reading from\"},\"returns\":{\"_0\":\"the bytes that were read.\"}},\"simulateDelegatecall(address,bytes)\":{\"details\":\"Performs a delegetecall on a targetContract in the context of self. Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\",\"params\":{\"calldataPayload\":\"Calldata that should be sent to the target contract (encoded method name and arguments).\",\"targetContract\":\"Address of the contract containing the code to execute.\"}},\"simulateDelegatecallInternal(address,bytes)\":{\"details\":\"Performs a delegetecall on a targetContract in the context of self. Internally reverts execution to avoid side effects (making it static). Returns encoded result as revert message concatenated with the success flag of the inner call as a last byte.\",\"params\":{\"calldataPayload\":\"Calldata that should be sent to the target contract (encoded method name and arguments).\",\"targetContract\":\"Address of the contract containing the code to execute.\"}}},\"title\":\"StorageAccessible - generic base contract that allows callers to access all internal storage.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol\":\"StorageAccessible\"},\"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\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b506107b5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80633a1b407a1461006757806343218e191461008c57806352b8dfc5146101b55780635624b25b1461025d57806365906ca314610280578063f84436bd14610324575b600080fd5b61006f6103d8565b604080516001600160e01b03199092168252519081900360200190f35b610140600480360360408110156100a257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156100cc57600080fd5b8201836020820111156100de57600080fd5b803590602001918460018302840111600160201b831117156100ff57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103fc945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017a578181015183820152602001610162565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025b600480360360408110156101cb57600080fd5b810190602081018135600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061052b915050565b005b6101406004803603604081101561027357600080fd5b508035906020013561052f565b61025b6004803603602081101561029657600080fd5b810190602081018135600160201b8111156102b057600080fd5b8201836020820111156102c257600080fd5b803590602001918460018302840111600160201b831117156102e357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105a4945050505050565b6101406004803603604081101561033a57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036457600080fd5b82018360208201111561037657600080fd5b803590602001918460018302840111600160201b8311171561039757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105ac945050505050565b7f43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc6481565b60606000836001600160a01b0316836040518082805190602001908083835b6020831061043a5780518252601f19909201916020918201910161041b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461049a576040519150601f19603f3d011682016040523d82523d6000602084013e61049f565b606091505b50809350819250505061052482826040516020018083805190602001908083835b602083106104df5780518252601f1990920191602091820191016104c0565b6001836020036101000a03801982511681845116808217855250505050505090500182151560f81b8152600101925050506040516020818303038152906040526105a4565b5092915050565b9052565b6060808260200267ffffffffffffffff8111801561054c57600080fd5b506040519080825280601f01601f191660200182016040528015610577576020820181803683370190505b50905060005b8381101561059a578481015460208083028401015260010161057d565b5090505b92915050565b805160208201fd5b6060807f43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64848460405160240180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610621578181015183820152602001610609565b50505050905090810190601f16801561064e5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909816979097178752518151919750309688965090945084935091508083835b602083106106b65780518252601f199092019160209182019101610697565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610718576040519150601f19603f3d011682016040523d82523d6000602084013e61071d565b606091505b5090508092505060008260018451038151811061073657fe5b602001015160f81c60f81b6001600160f81b031916600160f81b14905061076183600185510361052b565b801561076e57505061059e565b610777836105a4565b50509291505056fea26469706673582212202217fb0630b4d9378ac9c879fd9d3a9717ebd36dbb38c3924392851e9a189fea64736f6c63430007050033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c80633a1b407a1461006757806343218e191461008c57806352b8dfc5146101b55780635624b25b1461025d57806365906ca314610280578063f84436bd14610324575b600080fd5b61006f6103d8565b604080516001600160e01b03199092168252519081900360200190f35b610140600480360360408110156100a257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156100cc57600080fd5b8201836020820111156100de57600080fd5b803590602001918460018302840111600160201b831117156100ff57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103fc945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017a578181015183820152602001610162565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025b600480360360408110156101cb57600080fd5b810190602081018135600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061052b915050565b005b6101406004803603604081101561027357600080fd5b508035906020013561052f565b61025b6004803603602081101561029657600080fd5b810190602081018135600160201b8111156102b057600080fd5b8201836020820111156102c257600080fd5b803590602001918460018302840111600160201b831117156102e357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105a4945050505050565b6101406004803603604081101561033a57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561036457600080fd5b82018360208201111561037657600080fd5b803590602001918460018302840111600160201b8311171561039757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506105ac945050505050565b7f43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc6481565b60606000836001600160a01b0316836040518082805190602001908083835b6020831061043a5780518252601f19909201916020918201910161041b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461049a576040519150601f19603f3d011682016040523d82523d6000602084013e61049f565b606091505b50809350819250505061052482826040516020018083805190602001908083835b602083106104df5780518252601f1990920191602091820191016104c0565b6001836020036101000a03801982511681845116808217855250505050505090500182151560f81b8152600101925050506040516020818303038152906040526105a4565b5092915050565b9052565b6060808260200267ffffffffffffffff8111801561054c57600080fd5b506040519080825280601f01601f191660200182016040528015610577576020820181803683370190505b50905060005b8381101561059a578481015460208083028401015260010161057d565b5090505b92915050565b805160208201fd5b6060807f43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64848460405160240180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610621578181015183820152602001610609565b50505050905090810190601f16801561064e5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909816979097178752518151919750309688965090945084935091508083835b602083106106b65780518252601f199092019160209182019101610697565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610718576040519150601f19603f3d011682016040523d82523d6000602084013e61071d565b606091505b5090508092505060008260018451038151811061073657fe5b602001015160f81c60f81b6001600160f81b031916600160f81b14905061076183600185510361052b565b801561076e57505061059e565b610777836105a4565b50509291505056fea26469706673582212202217fb0630b4d9378ac9c879fd9d3a9717ebd36dbb38c3924392851e9a189fea64736f6c63430007050033",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "755:3103:6:-:0;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "755:3103:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;788:143;;;:::i;:::-;;;;-1:-1:-1;;;;;;788:143:6;;;;;;;;;;;;;;3220:337;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3220:337:6;;;;;;;;;;;;;;;-1:-1:-1;;;3220:337:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3220:337:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3220:337:6;;-1:-1:-1;3220:337:6;;-1:-1:-1;;;;;3220:337:6:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3717:139;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3717:139:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3717:139:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3717:139:6;;-1:-1:-1;;3717:139:6;;;-1:-1:-1;3717:139:6;;-1:-1:-1;;3717:139:6:i;:::-;;1233:432;;;;;;;;;;;;;;;;-1:-1:-1;1233:432:6;;;;;;;:::i;3563:148::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3563:148:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3563:148:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3563:148:6;;-1:-1:-1;3563:148:6;;-1:-1:-1;;;;;3563:148:6:i;2101:618::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2101:618:6;;;;;;;;;;;;;;;-1:-1:-1;;;2101:618:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2101:618:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2101:618:6;;-1:-1:-1;2101:618:6;;-1:-1:-1;;;;;2101:618:6:i;788:143::-;869:56;788:143;:::o;3220:337::-;3350:21;3383:12;3427:14;-1:-1:-1;;;;;3427:27:6;3468:15;3427:66;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3427:66:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3405:88;;;;;;;;3503:47;3531:8;3541:7;3514:35;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3514:35:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3503:10;:47::i;:::-;3220:337;;;;;:::o;3717:139::-;3818:22;;3804:46::o;1233:432::-;1332:12;1360:19;1392:6;1401:2;1392:11;1382:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1382:22:6;;1360:44;;1419:13;1414:222;1446:6;1438:5;:14;1414:222;;;1522:18;;;1516:25;1599:4;1588:16;;;1565:40;;;1558:54;1454:7;;1414:222;;;-1:-1:-1;1652:6:6;-1:-1:-1;1233:432:6;;;;;:::o;3563:148::-;3685:8;3679:15;3672:4;3662:8;3658:19;3651:44;2101:618;2223:21;2256:22;869:56;2370:14;2398:15;2281:142;;;;;;-1:-1:-1;;;;;2281:142:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2281:142:6;;;-1:-1:-1;;2281:142:6;;;;;;;;;;;;;;-1:-1:-1;;;;;2281:142:6;-1:-1:-1;;;;;;2281:142:6;;;;;;;;;2448:29;;;2281:142;;-1:-1:-1;2456:4:6;;2281:142;;-1:-1:-1;2448:29:6;;-1:-1:-1;2448:29:6;;-1:-1:-1;2281:142:6;-1:-1:-1;2448:29:6;;2281:142;2448:29;;;;;;;;;;-1:-1:-1;;2448:29:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2433:44;;;;;;2487:17;2507:8;2534:1;2516:8;:15;:19;2507:29;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2507:37:6;;2540:4;2507:37;;;2487:57;;2554:40;2564:8;2592:1;2574:8;:15;:19;2554:9;:40::i;:::-;2608:12;2604:109;;;2636:15;;;;2604:109;2682:20;2693:8;2682:10;:20::i;:::-;2101:618;;;;;;:::o",
  "source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.7.0;\n\n/// @title ViewStorageAccessible - Interface on top of StorageAccessible base class to allow simulations from view functions\ninterface ViewStorageAccessible {\n    /**\n     * @dev Same as `simulateDelegatecall` on StorageAccessible. Marked as view so that it can be called from external contracts\n     * that want to run simulations from within view functions. Will revert if the invoked simulation attempts to change state.\n     */\n    function simulateDelegatecall(\n        address targetContract,\n        bytes memory calldataPayload\n    ) external view returns (bytes memory);\n}\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\ncontract StorageAccessible {\n    bytes4 public constant SIMULATE_DELEGATECALL_INTERNAL_SELECTOR = bytes4(\n        keccak256(\"simulateDelegatecallInternal(address,bytes)\")\n    );\n\n    /**\n     * @dev Reads `length` bytes of storage in the currents contract\n     * @param offset - the offset in the current contract's storage in words to start reading from\n     * @param length - the number of words (32 bytes) of data to read\n     * @return the bytes that were read.\n     */\n    function getStorageAt(uint256 offset, uint256 length)\n        public\n        view\n        returns (bytes memory)\n    {\n        bytes memory result = new bytes(length * 32);\n        for (uint256 index = 0; index < length; index++) {\n            assembly {\n                let word := sload(add(offset, index))\n                mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Performs a delegetecall on a targetContract in the context of self.\n     * Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n     * @param targetContract Address of the contract containing the code to execute.\n     * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n     */\n    function simulateDelegatecall(\n        address targetContract,\n        bytes memory calldataPayload\n    ) public returns (bytes memory response) {\n        bytes memory innerCall = abi.encodeWithSelector(\n            SIMULATE_DELEGATECALL_INTERNAL_SELECTOR,\n            targetContract,\n            calldataPayload\n        );\n        (, response) = address(this).call(innerCall);\n        bool innerSuccess = response[response.length - 1] == 0x01;\n        setLength(response, response.length - 1);\n        if (innerSuccess) {\n            return response;\n        } else {\n            revertWith(response);\n        }\n    }\n\n    /**\n     * @dev Performs a delegetecall on a targetContract in the context of self.\n     * Internally reverts execution to avoid side effects (making it static). Returns encoded result as revert message\n     * concatenated with the success flag of the inner call as a last byte.\n     * @param targetContract Address of the contract containing the code to execute.\n     * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n     */\n    function simulateDelegatecallInternal(\n        address targetContract,\n        bytes memory calldataPayload\n    ) public returns (bytes memory response) {\n        bool success;\n        (success, response) = targetContract.delegatecall(\n            calldataPayload\n        );\n        revertWith(abi.encodePacked(response, success));\n    }\n\n    function revertWith(bytes memory response) public pure {\n        assembly {\n            revert(add(response, 0x20), mload(response))\n        }\n    }\n\n    function setLength(bytes memory buffer, uint256 length) public pure {\n        assembly {\n            mstore(buffer, length)\n        }\n    }\n}\n",
  "sourcePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol",
  "ast": {
    "absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol",
    "exportedSymbols": {
      "StorageAccessible": [
        1833
      ],
      "ViewStorageAccessible": [
        1681
      ]
    },
    "id": 1834,
    "license": "LGPL-3.0-only",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1669,
        "literals": [
          "solidity",
          "^",
          "0.7",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "42:23:6"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": {
          "id": 1670,
          "nodeType": "StructuredDocumentation",
          "src": "67:125:6",
          "text": "@title ViewStorageAccessible - Interface on top of StorageAccessible base class to allow simulations from view functions"
        },
        "fullyImplemented": false,
        "id": 1681,
        "linearizedBaseContracts": [
          1681
        ],
        "name": "ViewStorageAccessible",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "documentation": {
              "id": 1671,
              "nodeType": "StructuredDocumentation",
              "src": "230:268:6",
              "text": " @dev Same as `simulateDelegatecall` on StorageAccessible. Marked as view so that it can be called from external contracts\n that want to run simulations from within view functions. Will revert if the invoked simulation attempts to change state."
            },
            "functionSelector": "f84436bd",
            "id": 1680,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecall",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1676,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1673,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "542:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1672,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "542:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1675,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "574:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1674,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "574:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "532:76:6"
            },
            "returnParameters": {
              "id": 1679,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1678,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "632:12:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1677,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "632:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "631:14:6"
            },
            "scope": 1681,
            "src": "503:143:6",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 1834,
        "src": "192:456:6"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 1682,
          "nodeType": "StructuredDocumentation",
          "src": "650:105:6",
          "text": "@title StorageAccessible - generic base contract that allows callers to access all internal storage."
        },
        "fullyImplemented": true,
        "id": 1833,
        "linearizedBaseContracts": [
          1833
        ],
        "name": "StorageAccessible",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "functionSelector": "3a1b407a",
            "id": 1690,
            "mutability": "constant",
            "name": "SIMULATE_DELEGATECALL_INTERNAL_SELECTOR",
            "nodeType": "VariableDeclaration",
            "scope": 1833,
            "src": "788:143:6",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes4",
              "typeString": "bytes4"
            },
            "typeName": {
              "id": 1683,
              "name": "bytes4",
              "nodeType": "ElementaryTypeName",
              "src": "788:6:6",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "value": {
              "arguments": [
                {
                  "arguments": [
                    {
                      "hexValue": "73696d756c61746544656c656761746563616c6c496e7465726e616c28616464726573732c627974657329",
                      "id": 1687,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "string",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "879:45:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_stringliteral_43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64",
                        "typeString": "literal_string \"simulateDelegatecallInternal(address,bytes)\""
                      },
                      "value": "simulateDelegatecallInternal(address,bytes)"
                    }
                  ],
                  "expression": {
                    "argumentTypes": [
                      {
                        "typeIdentifier": "t_stringliteral_43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64",
                        "typeString": "literal_string \"simulateDelegatecallInternal(address,bytes)\""
                      }
                    ],
                    "id": 1686,
                    "name": "keccak256",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": -8,
                    "src": "869:9:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                      "typeString": "function (bytes memory) pure returns (bytes32)"
                    }
                  },
                  "id": 1688,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "functionCall",
                  "lValueRequested": false,
                  "names": [],
                  "nodeType": "FunctionCall",
                  "src": "869:56:6",
                  "tryCall": false,
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                ],
                "id": 1685,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "853:6:6",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_bytes4_$",
                  "typeString": "type(bytes4)"
                },
                "typeName": {
                  "id": 1684,
                  "name": "bytes4",
                  "nodeType": "ElementaryTypeName",
                  "src": "853:6:6",
                  "typeDescriptions": {}
                }
              },
              "id": 1689,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "853:78:6",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 1724,
              "nodeType": "Block",
              "src": "1350:315:6",
              "statements": [
                {
                  "assignments": [
                    1701
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1701,
                      "mutability": "mutable",
                      "name": "result",
                      "nodeType": "VariableDeclaration",
                      "scope": 1724,
                      "src": "1360:19:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1700,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1360:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1708,
                  "initialValue": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1706,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1704,
                          "name": "length",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1695,
                          "src": "1392:6:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "*",
                        "rightExpression": {
                          "hexValue": "3332",
                          "id": 1705,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1401:2:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_32_by_1",
                            "typeString": "int_const 32"
                          },
                          "value": "32"
                        },
                        "src": "1392:11:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1703,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "1382:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (uint256) pure returns (bytes memory)"
                      },
                      "typeName": {
                        "id": 1702,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1386:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      }
                    },
                    "id": 1707,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1382:22:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1360:44:6"
                },
                {
                  "body": {
                    "id": 1720,
                    "nodeType": "Block",
                    "src": "1463:173:6",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1486:140:6",
                          "statements": [
                            {
                              "nodeType": "YulVariableDeclaration",
                              "src": "1504:37:6",
                              "value": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "name": "offset",
                                        "nodeType": "YulIdentifier",
                                        "src": "1526:6:6"
                                      },
                                      {
                                        "name": "index",
                                        "nodeType": "YulIdentifier",
                                        "src": "1534:5:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "1522:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1522:18:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "sload",
                                  "nodeType": "YulIdentifier",
                                  "src": "1516:5:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1516:25:6"
                              },
                              "variables": [
                                {
                                  "name": "word",
                                  "nodeType": "YulTypedName",
                                  "src": "1508:4:6",
                                  "type": ""
                                }
                              ]
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [
                                          {
                                            "name": "result",
                                            "nodeType": "YulIdentifier",
                                            "src": "1573:6:6"
                                          },
                                          {
                                            "kind": "number",
                                            "nodeType": "YulLiteral",
                                            "src": "1581:4:6",
                                            "type": "",
                                            "value": "0x20"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "add",
                                          "nodeType": "YulIdentifier",
                                          "src": "1569:3:6"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "1569:17:6"
                                      },
                                      {
                                        "arguments": [
                                          {
                                            "name": "index",
                                            "nodeType": "YulIdentifier",
                                            "src": "1592:5:6"
                                          },
                                          {
                                            "kind": "number",
                                            "nodeType": "YulLiteral",
                                            "src": "1599:4:6",
                                            "type": "",
                                            "value": "0x20"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "mul",
                                          "nodeType": "YulIdentifier",
                                          "src": "1588:3:6"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "1588:16:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "1565:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1565:40:6"
                                  },
                                  {
                                    "name": "word",
                                    "nodeType": "YulIdentifier",
                                    "src": "1607:4:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "1558:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1558:54:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "1558:54:6"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 1710,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1534:5:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1710,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1592:5:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1693,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1526:6:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1701,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1573:6:6",
                            "valueSize": 1
                          }
                        ],
                        "id": 1719,
                        "nodeType": "InlineAssembly",
                        "src": "1477:149:6"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1715,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1713,
                      "name": "index",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1710,
                      "src": "1438:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "id": 1714,
                      "name": "length",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1695,
                      "src": "1446:6:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1438:14:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1721,
                  "initializationExpression": {
                    "assignments": [
                      1710
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 1710,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 1721,
                        "src": "1419:13:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1709,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1419:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 1712,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 1711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1435:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "1419:17:6"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 1717,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1454:7:6",
                      "subExpression": {
                        "id": 1716,
                        "name": "index",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1710,
                        "src": "1454:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1718,
                    "nodeType": "ExpressionStatement",
                    "src": "1454:7:6"
                  },
                  "nodeType": "ForStatement",
                  "src": "1414:222:6"
                },
                {
                  "expression": {
                    "id": 1722,
                    "name": "result",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1701,
                    "src": "1652:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "functionReturnParameters": 1699,
                  "id": 1723,
                  "nodeType": "Return",
                  "src": "1645:13:6"
                }
              ]
            },
            "documentation": {
              "id": 1691,
              "nodeType": "StructuredDocumentation",
              "src": "938:290:6",
              "text": " @dev Reads `length` bytes of storage in the currents contract\n @param offset - the offset in the current contract's storage in words to start reading from\n @param length - the number of words (32 bytes) of data to read\n @return the bytes that were read."
            },
            "functionSelector": "5624b25b",
            "id": 1725,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getStorageAt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1696,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1693,
                  "mutability": "mutable",
                  "name": "offset",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1255:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1692,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1255:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1695,
                  "mutability": "mutable",
                  "name": "length",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1271:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1694,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1271:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1254:32:6"
            },
            "returnParameters": {
              "id": 1699,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1698,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1332:12:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1697,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1332:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1331:14:6"
            },
            "scope": 1833,
            "src": "1233:432:6",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1784,
              "nodeType": "Block",
              "src": "2246:473:6",
              "statements": [
                {
                  "assignments": [
                    1736
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1736,
                      "mutability": "mutable",
                      "name": "innerCall",
                      "nodeType": "VariableDeclaration",
                      "scope": 1784,
                      "src": "2256:22:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1735,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "2256:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1743,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 1739,
                        "name": "SIMULATE_DELEGATECALL_INTERNAL_SELECTOR",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1690,
                        "src": "2317:39:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "id": 1740,
                        "name": "targetContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1728,
                        "src": "2370:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "id": 1741,
                        "name": "calldataPayload",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1730,
                        "src": "2398:15:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "expression": {
                        "id": 1737,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": -1,
                        "src": "2281:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 1738,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "src": "2281:22:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 1742,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2281:142:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2256:167:6"
                },
                {
                  "expression": {
                    "id": 1753,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "components": [
                        null,
                        {
                          "id": 1744,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1733,
                          "src": "2436:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "id": 1745,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "2433:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(,bytes memory)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 1751,
                          "name": "innerCall",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1736,
                          "src": "2467:9:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        ],
                        "expression": {
                          "arguments": [
                            {
                              "id": 1748,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -28,
                              "src": "2456:4:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StorageAccessible_$1833",
                                "typeString": "contract StorageAccessible"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_StorageAccessible_$1833",
                                "typeString": "contract StorageAccessible"
                              }
                            ],
                            "id": 1747,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2448:7:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 1746,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2448:7:6",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 1749,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2448:13:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 1750,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "call",
                        "nodeType": "MemberAccess",
                        "src": "2448:18:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                        }
                      },
                      "id": 1752,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2448:29:6",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "src": "2433:44:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1754,
                  "nodeType": "ExpressionStatement",
                  "src": "2433:44:6"
                },
                {
                  "assignments": [
                    1756
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1756,
                      "mutability": "mutable",
                      "name": "innerSuccess",
                      "nodeType": "VariableDeclaration",
                      "scope": 1784,
                      "src": "2487:17:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1755,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2487:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1765,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_bytes1",
                      "typeString": "bytes1"
                    },
                    "id": 1764,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "baseExpression": {
                        "id": 1757,
                        "name": "response",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1733,
                        "src": "2507:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 1762,
                      "indexExpression": {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1761,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 1758,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1733,
                            "src": "2516:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 1759,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2516:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "hexValue": "31",
                          "id": 1760,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2534:1:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        },
                        "src": "2516:19:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "2507:29:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes1",
                        "typeString": "bytes1"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30783031",
                      "id": 1763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2540:4:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "0x01"
                    },
                    "src": "2507:37:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2487:57:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1767,
                        "name": "response",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1733,
                        "src": "2564:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 1768,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1733,
                            "src": "2574:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 1769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2574:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "hexValue": "31",
                          "id": 1770,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2592:1:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        },
                        "src": "2574:19:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1766,
                      "name": "setLength",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1832,
                      "src": "2554:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$__$",
                        "typeString": "function (bytes memory,uint256) pure"
                      }
                    },
                    "id": 1772,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2554:40:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1773,
                  "nodeType": "ExpressionStatement",
                  "src": "2554:40:6"
                },
                {
                  "condition": {
                    "id": 1774,
                    "name": "innerSuccess",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1756,
                    "src": "2608:12:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 1782,
                    "nodeType": "Block",
                    "src": "2668:45:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1779,
                              "name": "response",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1733,
                              "src": "2693:8:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 1778,
                            "name": "revertWith",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1823,
                            "src": "2682:10:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (bytes memory) pure"
                            }
                          },
                          "id": 1780,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2682:20:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1781,
                        "nodeType": "ExpressionStatement",
                        "src": "2682:20:6"
                      }
                    ]
                  },
                  "id": 1783,
                  "nodeType": "IfStatement",
                  "src": "2604:109:6",
                  "trueBody": {
                    "id": 1777,
                    "nodeType": "Block",
                    "src": "2622:40:6",
                    "statements": [
                      {
                        "expression": {
                          "id": 1775,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1733,
                          "src": "2643:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "functionReturnParameters": 1734,
                        "id": 1776,
                        "nodeType": "Return",
                        "src": "2636:15:6"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 1726,
              "nodeType": "StructuredDocumentation",
              "src": "1671:425:6",
              "text": " @dev Performs a delegetecall on a targetContract in the context of self.\n Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n @param targetContract Address of the contract containing the code to execute.\n @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments)."
            },
            "functionSelector": "f84436bd",
            "id": 1785,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecall",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1731,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1728,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2140:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1727,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2140:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1730,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2172:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1729,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2172:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2130:76:6"
            },
            "returnParameters": {
              "id": 1734,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1733,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2223:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1732,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2223:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2222:23:6"
            },
            "scope": 1833,
            "src": "2101:618:6",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1815,
              "nodeType": "Block",
              "src": "3373:184:6",
              "statements": [
                {
                  "assignments": [
                    1796
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1796,
                      "mutability": "mutable",
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 1815,
                      "src": "3383:12:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1795,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "3383:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1797,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3383:12:6"
                },
                {
                  "expression": {
                    "id": 1805,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "components": [
                        {
                          "id": 1798,
                          "name": "success",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1796,
                          "src": "3406:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        {
                          "id": 1799,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1793,
                          "src": "3415:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "id": 1800,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "3405:19:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 1803,
                          "name": "calldataPayload",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1790,
                          "src": "3468:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        ],
                        "expression": {
                          "id": 1801,
                          "name": "targetContract",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1788,
                          "src": "3427:14:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 1802,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "delegatecall",
                        "nodeType": "MemberAccess",
                        "src": "3427:27:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) returns (bool,bytes memory)"
                        }
                      },
                      "id": 1804,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3427:66:6",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "src": "3405:88:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1806,
                  "nodeType": "ExpressionStatement",
                  "src": "3405:88:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1810,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1793,
                            "src": "3531:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "id": 1811,
                            "name": "success",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1796,
                            "src": "3541:7:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "expression": {
                            "id": 1808,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -1,
                            "src": "3514:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 1809,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "src": "3514:16:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 1812,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3514:35:6",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 1807,
                      "name": "revertWith",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1823,
                      "src": "3503:10:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (bytes memory) pure"
                      }
                    },
                    "id": 1813,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3503:47:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1814,
                  "nodeType": "ExpressionStatement",
                  "src": "3503:47:6"
                }
              ]
            },
            "documentation": {
              "id": 1786,
              "nodeType": "StructuredDocumentation",
              "src": "2725:490:6",
              "text": " @dev Performs a delegetecall on a targetContract in the context of self.\n Internally reverts execution to avoid side effects (making it static). Returns encoded result as revert message\n concatenated with the success flag of the inner call as a last byte.\n @param targetContract Address of the contract containing the code to execute.\n @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments)."
            },
            "functionSelector": "43218e19",
            "id": 1816,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecallInternal",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1791,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1788,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3267:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1787,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3267:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1790,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3299:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1789,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3299:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3257:76:6"
            },
            "returnParameters": {
              "id": 1794,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1793,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3350:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1792,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3350:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3349:23:6"
            },
            "scope": 1833,
            "src": "3220:337:6",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1822,
              "nodeType": "Block",
              "src": "3618:93:6",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3637:68:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "response",
                                  "nodeType": "YulIdentifier",
                                  "src": "3662:8:6"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "3672:4:6",
                                  "type": "",
                                  "value": "0x20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3658:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3658:19:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "response",
                                  "nodeType": "YulIdentifier",
                                  "src": "3685:8:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "3679:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3679:15:6"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "3651:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3651:44:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "3651:44:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1818,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3662:8:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1818,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3685:8:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1821,
                  "nodeType": "InlineAssembly",
                  "src": "3628:77:6"
                }
              ]
            },
            "functionSelector": "65906ca3",
            "id": 1823,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "revertWith",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1819,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1818,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1823,
                  "src": "3583:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1817,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3583:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3582:23:6"
            },
            "returnParameters": {
              "id": 1820,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3618:0:6"
            },
            "scope": 1833,
            "src": "3563:148:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1831,
              "nodeType": "Block",
              "src": "3785:71:6",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3804:46:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "buffer",
                              "nodeType": "YulIdentifier",
                              "src": "3825:6:6"
                            },
                            {
                              "name": "length",
                              "nodeType": "YulIdentifier",
                              "src": "3833:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "3818:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3818:22:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "3818:22:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1825,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3825:6:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1827,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3833:6:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1830,
                  "nodeType": "InlineAssembly",
                  "src": "3795:55:6"
                }
              ]
            },
            "functionSelector": "52b8dfc5",
            "id": 1832,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1828,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1825,
                  "mutability": "mutable",
                  "name": "buffer",
                  "nodeType": "VariableDeclaration",
                  "scope": 1832,
                  "src": "3736:19:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1824,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3736:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1827,
                  "mutability": "mutable",
                  "name": "length",
                  "nodeType": "VariableDeclaration",
                  "scope": 1832,
                  "src": "3757:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1826,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3757:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3735:37:6"
            },
            "returnParameters": {
              "id": 1829,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3785:0:6"
            },
            "scope": 1833,
            "src": "3717:139:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 1834,
        "src": "755:3103:6"
      }
    ],
    "src": "42:3817:6"
  },
  "legacyAST": {
    "absolutePath": "/Users/bensniff/Projects/gnosis/util-contracts/contracts/StorageAccessible.sol",
    "exportedSymbols": {
      "StorageAccessible": [
        1833
      ],
      "ViewStorageAccessible": [
        1681
      ]
    },
    "id": 1834,
    "license": "LGPL-3.0-only",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1669,
        "literals": [
          "solidity",
          "^",
          "0.7",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "42:23:6"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": {
          "id": 1670,
          "nodeType": "StructuredDocumentation",
          "src": "67:125:6",
          "text": "@title ViewStorageAccessible - Interface on top of StorageAccessible base class to allow simulations from view functions"
        },
        "fullyImplemented": false,
        "id": 1681,
        "linearizedBaseContracts": [
          1681
        ],
        "name": "ViewStorageAccessible",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "documentation": {
              "id": 1671,
              "nodeType": "StructuredDocumentation",
              "src": "230:268:6",
              "text": " @dev Same as `simulateDelegatecall` on StorageAccessible. Marked as view so that it can be called from external contracts\n that want to run simulations from within view functions. Will revert if the invoked simulation attempts to change state."
            },
            "functionSelector": "f84436bd",
            "id": 1680,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecall",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1676,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1673,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "542:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1672,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "542:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1675,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "574:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1674,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "574:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "532:76:6"
            },
            "returnParameters": {
              "id": 1679,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1678,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1680,
                  "src": "632:12:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1677,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "632:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "631:14:6"
            },
            "scope": 1681,
            "src": "503:143:6",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 1834,
        "src": "192:456:6"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 1682,
          "nodeType": "StructuredDocumentation",
          "src": "650:105:6",
          "text": "@title StorageAccessible - generic base contract that allows callers to access all internal storage."
        },
        "fullyImplemented": true,
        "id": 1833,
        "linearizedBaseContracts": [
          1833
        ],
        "name": "StorageAccessible",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "functionSelector": "3a1b407a",
            "id": 1690,
            "mutability": "constant",
            "name": "SIMULATE_DELEGATECALL_INTERNAL_SELECTOR",
            "nodeType": "VariableDeclaration",
            "scope": 1833,
            "src": "788:143:6",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes4",
              "typeString": "bytes4"
            },
            "typeName": {
              "id": 1683,
              "name": "bytes4",
              "nodeType": "ElementaryTypeName",
              "src": "788:6:6",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "value": {
              "arguments": [
                {
                  "arguments": [
                    {
                      "hexValue": "73696d756c61746544656c656761746563616c6c496e7465726e616c28616464726573732c627974657329",
                      "id": 1687,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "string",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "879:45:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_stringliteral_43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64",
                        "typeString": "literal_string \"simulateDelegatecallInternal(address,bytes)\""
                      },
                      "value": "simulateDelegatecallInternal(address,bytes)"
                    }
                  ],
                  "expression": {
                    "argumentTypes": [
                      {
                        "typeIdentifier": "t_stringliteral_43218e198a5f5c70ca65adf1973b6285a79c4d29a39cc2a8bb67b912f447dc64",
                        "typeString": "literal_string \"simulateDelegatecallInternal(address,bytes)\""
                      }
                    ],
                    "id": 1686,
                    "name": "keccak256",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": -8,
                    "src": "869:9:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                      "typeString": "function (bytes memory) pure returns (bytes32)"
                    }
                  },
                  "id": 1688,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "functionCall",
                  "lValueRequested": false,
                  "names": [],
                  "nodeType": "FunctionCall",
                  "src": "869:56:6",
                  "tryCall": false,
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  }
                ],
                "id": 1685,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "853:6:6",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_bytes4_$",
                  "typeString": "type(bytes4)"
                },
                "typeName": {
                  "id": 1684,
                  "name": "bytes4",
                  "nodeType": "ElementaryTypeName",
                  "src": "853:6:6",
                  "typeDescriptions": {}
                }
              },
              "id": 1689,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "853:78:6",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes4",
                "typeString": "bytes4"
              }
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 1724,
              "nodeType": "Block",
              "src": "1350:315:6",
              "statements": [
                {
                  "assignments": [
                    1701
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1701,
                      "mutability": "mutable",
                      "name": "result",
                      "nodeType": "VariableDeclaration",
                      "scope": 1724,
                      "src": "1360:19:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1700,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1360:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1708,
                  "initialValue": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1706,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1704,
                          "name": "length",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1695,
                          "src": "1392:6:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "*",
                        "rightExpression": {
                          "hexValue": "3332",
                          "id": 1705,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1401:2:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_32_by_1",
                            "typeString": "int_const 32"
                          },
                          "value": "32"
                        },
                        "src": "1392:11:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1703,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "1382:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (uint256) pure returns (bytes memory)"
                      },
                      "typeName": {
                        "id": 1702,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1386:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      }
                    },
                    "id": 1707,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1382:22:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1360:44:6"
                },
                {
                  "body": {
                    "id": 1720,
                    "nodeType": "Block",
                    "src": "1463:173:6",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1486:140:6",
                          "statements": [
                            {
                              "nodeType": "YulVariableDeclaration",
                              "src": "1504:37:6",
                              "value": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "name": "offset",
                                        "nodeType": "YulIdentifier",
                                        "src": "1526:6:6"
                                      },
                                      {
                                        "name": "index",
                                        "nodeType": "YulIdentifier",
                                        "src": "1534:5:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "1522:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1522:18:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "sload",
                                  "nodeType": "YulIdentifier",
                                  "src": "1516:5:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1516:25:6"
                              },
                              "variables": [
                                {
                                  "name": "word",
                                  "nodeType": "YulTypedName",
                                  "src": "1508:4:6",
                                  "type": ""
                                }
                              ]
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [
                                          {
                                            "name": "result",
                                            "nodeType": "YulIdentifier",
                                            "src": "1573:6:6"
                                          },
                                          {
                                            "kind": "number",
                                            "nodeType": "YulLiteral",
                                            "src": "1581:4:6",
                                            "type": "",
                                            "value": "0x20"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "add",
                                          "nodeType": "YulIdentifier",
                                          "src": "1569:3:6"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "1569:17:6"
                                      },
                                      {
                                        "arguments": [
                                          {
                                            "name": "index",
                                            "nodeType": "YulIdentifier",
                                            "src": "1592:5:6"
                                          },
                                          {
                                            "kind": "number",
                                            "nodeType": "YulLiteral",
                                            "src": "1599:4:6",
                                            "type": "",
                                            "value": "0x20"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "mul",
                                          "nodeType": "YulIdentifier",
                                          "src": "1588:3:6"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "1588:16:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "1565:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1565:40:6"
                                  },
                                  {
                                    "name": "word",
                                    "nodeType": "YulIdentifier",
                                    "src": "1607:4:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "1558:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1558:54:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "1558:54:6"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 1710,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1534:5:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1710,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1592:5:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1693,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1526:6:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1701,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1573:6:6",
                            "valueSize": 1
                          }
                        ],
                        "id": 1719,
                        "nodeType": "InlineAssembly",
                        "src": "1477:149:6"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1715,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1713,
                      "name": "index",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1710,
                      "src": "1438:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "id": 1714,
                      "name": "length",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1695,
                      "src": "1446:6:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1438:14:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1721,
                  "initializationExpression": {
                    "assignments": [
                      1710
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 1710,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 1721,
                        "src": "1419:13:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1709,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1419:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 1712,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 1711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1435:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "1419:17:6"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 1717,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1454:7:6",
                      "subExpression": {
                        "id": 1716,
                        "name": "index",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1710,
                        "src": "1454:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1718,
                    "nodeType": "ExpressionStatement",
                    "src": "1454:7:6"
                  },
                  "nodeType": "ForStatement",
                  "src": "1414:222:6"
                },
                {
                  "expression": {
                    "id": 1722,
                    "name": "result",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1701,
                    "src": "1652:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "functionReturnParameters": 1699,
                  "id": 1723,
                  "nodeType": "Return",
                  "src": "1645:13:6"
                }
              ]
            },
            "documentation": {
              "id": 1691,
              "nodeType": "StructuredDocumentation",
              "src": "938:290:6",
              "text": " @dev Reads `length` bytes of storage in the currents contract\n @param offset - the offset in the current contract's storage in words to start reading from\n @param length - the number of words (32 bytes) of data to read\n @return the bytes that were read."
            },
            "functionSelector": "5624b25b",
            "id": 1725,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getStorageAt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1696,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1693,
                  "mutability": "mutable",
                  "name": "offset",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1255:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1692,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1255:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1695,
                  "mutability": "mutable",
                  "name": "length",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1271:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1694,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1271:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1254:32:6"
            },
            "returnParameters": {
              "id": 1699,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1698,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1725,
                  "src": "1332:12:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1697,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1332:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1331:14:6"
            },
            "scope": 1833,
            "src": "1233:432:6",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1784,
              "nodeType": "Block",
              "src": "2246:473:6",
              "statements": [
                {
                  "assignments": [
                    1736
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1736,
                      "mutability": "mutable",
                      "name": "innerCall",
                      "nodeType": "VariableDeclaration",
                      "scope": 1784,
                      "src": "2256:22:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1735,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "2256:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1743,
                  "initialValue": {
                    "arguments": [
                      {
                        "id": 1739,
                        "name": "SIMULATE_DELEGATECALL_INTERNAL_SELECTOR",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1690,
                        "src": "2317:39:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        }
                      },
                      {
                        "id": 1740,
                        "name": "targetContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1728,
                        "src": "2370:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "id": 1741,
                        "name": "calldataPayload",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1730,
                        "src": "2398:15:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "expression": {
                        "id": 1737,
                        "name": "abi",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": -1,
                        "src": "2281:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_abi",
                          "typeString": "abi"
                        }
                      },
                      "id": 1738,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "encodeWithSelector",
                      "nodeType": "MemberAccess",
                      "src": "2281:22:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                        "typeString": "function (bytes4) pure returns (bytes memory)"
                      }
                    },
                    "id": 1742,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2281:142:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2256:167:6"
                },
                {
                  "expression": {
                    "id": 1753,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "components": [
                        null,
                        {
                          "id": 1744,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1733,
                          "src": "2436:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "id": 1745,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "2433:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(,bytes memory)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 1751,
                          "name": "innerCall",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1736,
                          "src": "2467:9:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        ],
                        "expression": {
                          "arguments": [
                            {
                              "id": 1748,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -28,
                              "src": "2456:4:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StorageAccessible_$1833",
                                "typeString": "contract StorageAccessible"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_StorageAccessible_$1833",
                                "typeString": "contract StorageAccessible"
                              }
                            ],
                            "id": 1747,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2448:7:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 1746,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2448:7:6",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 1749,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2448:13:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 1750,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "call",
                        "nodeType": "MemberAccess",
                        "src": "2448:18:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                        }
                      },
                      "id": 1752,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2448:29:6",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "src": "2433:44:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1754,
                  "nodeType": "ExpressionStatement",
                  "src": "2433:44:6"
                },
                {
                  "assignments": [
                    1756
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1756,
                      "mutability": "mutable",
                      "name": "innerSuccess",
                      "nodeType": "VariableDeclaration",
                      "scope": 1784,
                      "src": "2487:17:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1755,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2487:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1765,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_bytes1",
                      "typeString": "bytes1"
                    },
                    "id": 1764,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "baseExpression": {
                        "id": 1757,
                        "name": "response",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1733,
                        "src": "2507:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 1762,
                      "indexExpression": {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1761,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 1758,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1733,
                            "src": "2516:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 1759,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2516:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "hexValue": "31",
                          "id": 1760,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2534:1:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        },
                        "src": "2516:19:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "2507:29:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes1",
                        "typeString": "bytes1"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30783031",
                      "id": 1763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2540:4:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "0x01"
                    },
                    "src": "2507:37:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2487:57:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1767,
                        "name": "response",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1733,
                        "src": "2564:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 1768,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1733,
                            "src": "2574:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 1769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2574:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "hexValue": "31",
                          "id": 1770,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2592:1:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        },
                        "src": "2574:19:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1766,
                      "name": "setLength",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1832,
                      "src": "2554:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$__$",
                        "typeString": "function (bytes memory,uint256) pure"
                      }
                    },
                    "id": 1772,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2554:40:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1773,
                  "nodeType": "ExpressionStatement",
                  "src": "2554:40:6"
                },
                {
                  "condition": {
                    "id": 1774,
                    "name": "innerSuccess",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1756,
                    "src": "2608:12:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 1782,
                    "nodeType": "Block",
                    "src": "2668:45:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1779,
                              "name": "response",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1733,
                              "src": "2693:8:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 1778,
                            "name": "revertWith",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1823,
                            "src": "2682:10:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (bytes memory) pure"
                            }
                          },
                          "id": 1780,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2682:20:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1781,
                        "nodeType": "ExpressionStatement",
                        "src": "2682:20:6"
                      }
                    ]
                  },
                  "id": 1783,
                  "nodeType": "IfStatement",
                  "src": "2604:109:6",
                  "trueBody": {
                    "id": 1777,
                    "nodeType": "Block",
                    "src": "2622:40:6",
                    "statements": [
                      {
                        "expression": {
                          "id": 1775,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1733,
                          "src": "2643:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "functionReturnParameters": 1734,
                        "id": 1776,
                        "nodeType": "Return",
                        "src": "2636:15:6"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 1726,
              "nodeType": "StructuredDocumentation",
              "src": "1671:425:6",
              "text": " @dev Performs a delegetecall on a targetContract in the context of self.\n Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n @param targetContract Address of the contract containing the code to execute.\n @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments)."
            },
            "functionSelector": "f84436bd",
            "id": 1785,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecall",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1731,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1728,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2140:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1727,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2140:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1730,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2172:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1729,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2172:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2130:76:6"
            },
            "returnParameters": {
              "id": 1734,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1733,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1785,
                  "src": "2223:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1732,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2223:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2222:23:6"
            },
            "scope": 1833,
            "src": "2101:618:6",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1815,
              "nodeType": "Block",
              "src": "3373:184:6",
              "statements": [
                {
                  "assignments": [
                    1796
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1796,
                      "mutability": "mutable",
                      "name": "success",
                      "nodeType": "VariableDeclaration",
                      "scope": 1815,
                      "src": "3383:12:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1795,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "3383:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1797,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3383:12:6"
                },
                {
                  "expression": {
                    "id": 1805,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "components": [
                        {
                          "id": 1798,
                          "name": "success",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1796,
                          "src": "3406:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        {
                          "id": 1799,
                          "name": "response",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1793,
                          "src": "3415:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "id": 1800,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "3405:19:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 1803,
                          "name": "calldataPayload",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1790,
                          "src": "3468:15:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        ],
                        "expression": {
                          "id": 1801,
                          "name": "targetContract",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1788,
                          "src": "3427:14:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 1802,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "delegatecall",
                        "nodeType": "MemberAccess",
                        "src": "3427:27:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                          "typeString": "function (bytes memory) returns (bool,bytes memory)"
                        }
                      },
                      "id": 1804,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3427:66:6",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "tuple(bool,bytes memory)"
                      }
                    },
                    "src": "3405:88:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1806,
                  "nodeType": "ExpressionStatement",
                  "src": "3405:88:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1810,
                            "name": "response",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1793,
                            "src": "3531:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          {
                            "id": 1811,
                            "name": "success",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1796,
                            "src": "3541:7:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            },
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "expression": {
                            "id": 1808,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -1,
                            "src": "3514:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 1809,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodePacked",
                          "nodeType": "MemberAccess",
                          "src": "3514:16:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 1812,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3514:35:6",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 1807,
                      "name": "revertWith",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1823,
                      "src": "3503:10:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (bytes memory) pure"
                      }
                    },
                    "id": 1813,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3503:47:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1814,
                  "nodeType": "ExpressionStatement",
                  "src": "3503:47:6"
                }
              ]
            },
            "documentation": {
              "id": 1786,
              "nodeType": "StructuredDocumentation",
              "src": "2725:490:6",
              "text": " @dev Performs a delegetecall on a targetContract in the context of self.\n Internally reverts execution to avoid side effects (making it static). Returns encoded result as revert message\n concatenated with the success flag of the inner call as a last byte.\n @param targetContract Address of the contract containing the code to execute.\n @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments)."
            },
            "functionSelector": "43218e19",
            "id": 1816,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "simulateDelegatecallInternal",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1791,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1788,
                  "mutability": "mutable",
                  "name": "targetContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3267:22:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1787,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3267:7:6",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1790,
                  "mutability": "mutable",
                  "name": "calldataPayload",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3299:28:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1789,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3299:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3257:76:6"
            },
            "returnParameters": {
              "id": 1794,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1793,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1816,
                  "src": "3350:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1792,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3350:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3349:23:6"
            },
            "scope": 1833,
            "src": "3220:337:6",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1822,
              "nodeType": "Block",
              "src": "3618:93:6",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3637:68:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "response",
                                  "nodeType": "YulIdentifier",
                                  "src": "3662:8:6"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "3672:4:6",
                                  "type": "",
                                  "value": "0x20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3658:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3658:19:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "response",
                                  "nodeType": "YulIdentifier",
                                  "src": "3685:8:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "3679:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3679:15:6"
                            }
                          ],
                          "functionName": {
                            "name": "revert",
                            "nodeType": "YulIdentifier",
                            "src": "3651:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3651:44:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "3651:44:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1818,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3662:8:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1818,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3685:8:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1821,
                  "nodeType": "InlineAssembly",
                  "src": "3628:77:6"
                }
              ]
            },
            "functionSelector": "65906ca3",
            "id": 1823,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "revertWith",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1819,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1818,
                  "mutability": "mutable",
                  "name": "response",
                  "nodeType": "VariableDeclaration",
                  "scope": 1823,
                  "src": "3583:21:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1817,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3583:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3582:23:6"
            },
            "returnParameters": {
              "id": 1820,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3618:0:6"
            },
            "scope": 1833,
            "src": "3563:148:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1831,
              "nodeType": "Block",
              "src": "3785:71:6",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3804:46:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "buffer",
                              "nodeType": "YulIdentifier",
                              "src": "3825:6:6"
                            },
                            {
                              "name": "length",
                              "nodeType": "YulIdentifier",
                              "src": "3833:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "3818:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3818:22:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "3818:22:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1825,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3825:6:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1827,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3833:6:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1830,
                  "nodeType": "InlineAssembly",
                  "src": "3795:55:6"
                }
              ]
            },
            "functionSelector": "52b8dfc5",
            "id": 1832,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setLength",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1828,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1825,
                  "mutability": "mutable",
                  "name": "buffer",
                  "nodeType": "VariableDeclaration",
                  "scope": 1832,
                  "src": "3736:19:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1824,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3736:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1827,
                  "mutability": "mutable",
                  "name": "length",
                  "nodeType": "VariableDeclaration",
                  "scope": 1832,
                  "src": "3757:14:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1826,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3757:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3735:37:6"
            },
            "returnParameters": {
              "id": 1829,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3785:0:6"
            },
            "scope": 1833,
            "src": "3717:139:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 1834,
        "src": "755:3103:6"
      }
    ],
    "src": "42:3817:6"
  },
  "compiler": {
    "name": "solc",
    "version": "0.7.5+commit.eb77ed08.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.1",
  "updatedAt": "2020-12-08T09:43:37.087Z",
  "devdoc": {
    "kind": "dev",
    "methods": {
      "getStorageAt(uint256,uint256)": {
        "details": "Reads `length` bytes of storage in the currents contract",
        "params": {
          "length": "- the number of words (32 bytes) of data to read",
          "offset": "- the offset in the current contract's storage in words to start reading from"
        },
        "returns": {
          "_0": "the bytes that were read."
        }
      },
      "simulateDelegatecall(address,bytes)": {
        "details": "Performs a delegetecall on a targetContract in the context of self. Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.",
        "params": {
          "calldataPayload": "Calldata that should be sent to the target contract (encoded method name and arguments).",
          "targetContract": "Address of the contract containing the code to execute."
        }
      },
      "simulateDelegatecallInternal(address,bytes)": {
        "details": "Performs a delegetecall on a targetContract in the context of self. Internally reverts execution to avoid side effects (making it static). Returns encoded result as revert message concatenated with the success flag of the inner call as a last byte.",
        "params": {
          "calldataPayload": "Calldata that should be sent to the target contract (encoded method name and arguments).",
          "targetContract": "Address of the contract containing the code to execute."
        }
      }
    },
    "title": "StorageAccessible - generic base contract that allows callers to access all internal storage.",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}