@daostack/upgrades
Version:
Proxy upgadable contracts based on openzeppelin-sdk
1,431 lines • 62.6 kB
JSON
{
"fileName": "Invalid.sol",
"contractName": "WithEmptyConstructor",
"source": "pragma solidity ^0.6.0;\n// SPDX-License-Identifier: MIT\n\nimport \"mock-dependency/contracts/Greeter.sol\";\nimport \"mock-dependency/contracts/DependencyInvalid.sol\";\n\ncontract WithConstructor {\n uint256 public value;\n\n constructor() public {\n value = 42;\n }\n\n function say() public pure returns (string memory) {\n return \"WithConstructor\";\n }\n}\n\ncontract WithParentConstructor is WithConstructor {\n}\n\ncontract WithAncestorConstructor is WithParentConstructor {\n}\n\ncontract WithDependencyParentConstructor is DependencyWithConstructor {\n}\n\ncontract WithEmptyConstructor {\n constructor() internal { }\n}\n\ncontract WithModifierInConstructor {\n modifier modifies { _; }\n constructor() modifies internal { }\n}\n\ncontract WithAncestorEmptyConstructor is WithEmptyConstructor {\n}\n\ncontract WithFailingConstructor {\n constructor() public {\n assert(false);\n }\n}\n\ncontract WithSelfDestruct {\n uint256 public value;\n\n constructor() public {\n if (true)\n selfdestruct(msg.sender);\n }\n\n function say() public pure virtual returns (string memory) {\n return \"WithSelfDestruct\";\n }\n}\n\ncontract WithParentWithSelfDestruct is WithSelfDestruct {\n function say() public pure override(WithSelfDestruct) returns (string memory) {\n return \"WithParentWithSelfDestruct\";\n }\n}\n\ncontract WithDelegateCall {\n constructor(address _e) public {\n // bytes4(keccak256(\"kill()\")) == 0x41c0e1b5\n bytes memory data = \"\\x41\\xc0\\xe1\\xb5\";\n (bool success,) = _e.delegatecall(data);\n require(success);\n }\n\n function say() public pure virtual returns (string memory) {\n return \"WithDelegateCall\";\n }\n}\n\ncontract WithParentWithDelegateCall is WithDelegateCall {\n constructor(address _e) public WithDelegateCall(_e) {\n }\n\n function say() public pure override returns (string memory) {\n return \"WithParentWithDelegateCall\";\n }\n}\n\ncontract WithVanillaBaseContract is Greeter { }\n",
"sourcePath": "contracts/mocks/Invalid.sol",
"sourceMap": "",
"deployedSourceMap": "",
"abi": [],
"ast": {
"absolutePath": "contracts/mocks/Invalid.sol",
"exportedSymbols": {
"WithAncestorConstructor": [
1843
],
"WithAncestorEmptyConstructor": [
1865
],
"WithConstructor": [
1837
],
"WithDelegateCall": [
1939
],
"WithDependencyParentConstructor": [
1846
],
"WithEmptyConstructor": [
1851
],
"WithFailingConstructor": [
1874
],
"WithModifierInConstructor": [
1862
],
"WithParentConstructor": [
1840
],
"WithParentWithDelegateCall": [
1960
],
"WithParentWithSelfDestruct": [
1909
],
"WithSelfDestruct": [
1896
],
"WithVanillaBaseContract": [
1963
]
},
"id": 1964,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1816,
"literals": [
"solidity",
"^",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:12"
},
{
"absolutePath": "mock-dependency/contracts/Greeter.sol",
"file": "mock-dependency/contracts/Greeter.sol",
"id": 1817,
"nodeType": "ImportDirective",
"scope": 1964,
"sourceUnit": 6834,
"src": "57:47:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "mock-dependency/contracts/DependencyInvalid.sol",
"file": "mock-dependency/contracts/DependencyInvalid.sol",
"id": 1818,
"nodeType": "ImportDirective",
"scope": 1964,
"sourceUnit": 6788,
"src": "105:57:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1837,
"linearizedBaseContracts": [
1837
],
"name": "WithConstructor",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "3fa4f245",
"id": 1820,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1837,
"src": "193:20:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1819,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "193:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1827,
"nodeType": "Block",
"src": "239:21:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1825,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1823,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1820,
"src": "245:5:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "3432",
"id": 1824,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "253:2:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_42_by_1",
"typeString": "int_const 42"
},
"value": "42"
},
"src": "245:10:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1826,
"nodeType": "ExpressionStatement",
"src": "245:10:12"
}
]
},
"documentation": null,
"id": 1828,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1821,
"nodeType": "ParameterList",
"parameters": [],
"src": "229:2:12"
},
"returnParameters": {
"id": 1822,
"nodeType": "ParameterList",
"parameters": [],
"src": "239:0:12"
},
"scope": 1837,
"src": "218:42:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1835,
"nodeType": "Block",
"src": "315:35:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "57697468436f6e7374727563746f72",
"id": 1833,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "328:17:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_31a3b5169da5035c08d9b25caf8dc3b126287039d931b211746db94a5f9527fc",
"typeString": "literal_string \"WithConstructor\""
},
"value": "WithConstructor"
},
"functionReturnParameters": 1832,
"id": 1834,
"nodeType": "Return",
"src": "321:24:12"
}
]
},
"documentation": null,
"functionSelector": "954ab4b2",
"id": 1836,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "say",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1829,
"nodeType": "ParameterList",
"parameters": [],
"src": "276:2:12"
},
"returnParameters": {
"id": 1832,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1831,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1836,
"src": "300:13:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1830,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "300:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "299:15:12"
},
"scope": 1837,
"src": "264:86:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 1964,
"src": "164:188:12"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1838,
"name": "WithConstructor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1837,
"src": "388:15:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_WithConstructor_$1837",
"typeString": "contract WithConstructor"
}
},
"id": 1839,
"nodeType": "InheritanceSpecifier",
"src": "388:15:12"
}
],
"contractDependencies": [
1837
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1840,
"linearizedBaseContracts": [
1840,
1837
],
"name": "WithParentConstructor",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 1964,
"src": "354:53:12"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1841,
"name": "WithParentConstructor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1840,
"src": "445:21:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_WithParentConstructor_$1840",
"typeString": "contract WithParentConstructor"
}
},
"id": 1842,
"nodeType": "InheritanceSpecifier",
"src": "445:21:12"
}
],
"contractDependencies": [
1837,
1840
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1843,
"linearizedBaseContracts": [
1843,
1840,
1837
],
"name": "WithAncestorConstructor",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 1964,
"src": "409:61:12"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1844,
"name": "DependencyWithConstructor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 6787,
"src": "516:25:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DependencyWithConstructor_$6787",
"typeString": "contract DependencyWithConstructor"
}
},
"id": 1845,
"nodeType": "InheritanceSpecifier",
"src": "516:25:12"
}
],
"contractDependencies": [
6787
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1846,
"linearizedBaseContracts": [
1846,
6787
],
"name": "WithDependencyParentConstructor",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 1964,
"src": "472:73:12"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1851,
"linearizedBaseContracts": [
1851
],
"name": "WithEmptyConstructor",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1849,
"nodeType": "Block",
"src": "604:3:12",
"statements": []
},
"documentation": null,
"id": 1850,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1847,
"nodeType": "ParameterList",
"parameters": [],
"src": "592:2:12"
},
"returnParameters": {
"id": 1848,
"nodeType": "ParameterList",
"parameters": [],
"src": "604:0:12"
},
"scope": 1851,
"src": "581:26:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1964,
"src": "547:62:12"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1862,
"linearizedBaseContracts": [
1862
],
"name": "WithModifierInConstructor",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1854,
"nodeType": "Block",
"src": "668:6:12",
"statements": [
{
"id": 1853,
"nodeType": "PlaceholderStatement",
"src": "670:1:12"
}
]
},
"documentation": null,
"id": 1855,
"name": "modifies",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 1852,
"nodeType": "ParameterList",
"parameters": [],
"src": "668:0:12"
},
"src": "650:24:12",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 1860,
"nodeType": "Block",
"src": "709:3:12",
"statements": []
},
"documentation": null,
"id": 1861,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": null,
"id": 1858,
"modifierName": {
"argumentTypes": null,
"id": 1857,
"name": "modifies",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1855,
"src": "691:8:12",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "691:8:12"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1856,
"nodeType": "ParameterList",
"parameters": [],
"src": "688:2:12"
},
"returnParameters": {
"id": 1859,
"nodeType": "ParameterList",
"parameters": [],
"src": "709:0:12"
},
"scope": 1862,
"src": "677:35:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 1964,
"src": "611:103:12"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1863,
"name": "WithEmptyConstructor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1851,
"src": "757:20:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_WithEmptyConstructor_$1851",
"typeString": "contract WithEmptyConstructor"
}
},
"id": 1864,
"nodeType": "InheritanceSpecifier",
"src": "757:20:12"
}
],
"contractDependencies": [
1851
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1865,
"linearizedBaseContracts": [
1865,
1851
],
"name": "WithAncestorEmptyConstructor",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 1964,
"src": "716:65:12"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1874,
"linearizedBaseContracts": [
1874
],
"name": "WithFailingConstructor",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1872,
"nodeType": "Block",
"src": "840:24:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1869,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "853:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1868,
"name": "assert",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -3,
"src": "846:6:12",
"typeDescriptions": {
"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1870,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "846:13:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1871,
"nodeType": "ExpressionStatement",
"src": "846:13:12"
}
]
},
"documentation": null,
"id": 1873,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1866,
"nodeType": "ParameterList",
"parameters": [],
"src": "830:2:12"
},
"returnParameters": {
"id": 1867,
"nodeType": "ParameterList",
"parameters": [],
"src": "840:0:12"
},
"scope": 1874,
"src": "819:45:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 1964,
"src": "783:83:12"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1896,
"linearizedBaseContracts": [
1896
],
"name": "WithSelfDestruct",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "3fa4f245",
"id": 1876,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1896,
"src": "898:20:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1875,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "898:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1886,
"nodeType": "Block",
"src": "944:51:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1879,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "954:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"falseBody": null,
"id": 1885,
"nodeType": "IfStatement",
"src": "950:40:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1881,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "979:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1882,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "979:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 1880,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -21,
"src": "966:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$",
"typeString": "function (address payable)"
}
},
"id": 1883,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "966:24:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1884,
"nodeType": "ExpressionStatement",
"src": "966:24:12"
}
}
]
},
"documentation": null,
"id": 1887,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1877,
"nodeType": "ParameterList",
"parameters": [],
"src": "934:2:12"
},
"returnParameters": {
"id": 1878,
"nodeType": "ParameterList",
"parameters": [],
"src": "944:0:12"
},
"scope": 1896,
"src": "923:72:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 1894,
"nodeType": "Block",
"src": "1058:36:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "5769746853656c664465737472756374",
"id": 1892,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1071:18:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_58a0d53a66d046d020d11a8545600304cc361abba7cf227ae045d15251087ec7",
"typeString": "literal_string \"WithSelfDestruct\""
},
"value": "WithSelfDestruct"
},
"functionReturnParameters": 1891,
"id": 1893,
"nodeType": "Return",
"src": "1064:25:12"
}
]
},
"documentation": null,
"functionSelector": "954ab4b2",
"id": 1895,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "say",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1888,
"nodeType": "ParameterList",
"parameters": [],
"src": "1011:2:12"
},
"returnParameters": {
"id": 1891,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1890,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1895,
"src": "1043:13:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1889,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1043:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1042:15:12"
},
"scope": 1896,
"src": "999:95:12",
"stateMutability": "pure",
"virtual": true,
"visibility": "public"
}
],
"scope": 1964,
"src": "868:228:12"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1897,
"name": "WithSelfDestruct",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "1137:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_WithSelfDestruct_$1896",
"typeString": "contract WithSelfDestruct"
}
},
"id": 1898,
"nodeType": "InheritanceSpecifier",
"src": "1137:16:12"
}
],
"contractDependencies": [
1896
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1909,
"linearizedBaseContracts": [
1909,
1896
],
"name": "WithParentWithSelfDestruct",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
1895
],
"body": {
"id": 1907,
"nodeType": "Block",
"src": "1236:46:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"hexValue": "57697468506172656e745769746853656c664465737472756374",
"id": 1905,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1249:28:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0833173257b60f10ec48eaae9ba9300579d05c0505fe51a454ef724750aca66e",
"typeString": "literal_string \"WithParentWithSelfDestruct\""
},
"value": "WithParentWithSelfDestruct"
},
"functionReturnParameters": 1904,
"id": 1906,
"nodeType": "Return",
"src": "1242:35:12"
}
]
},
"documentation": null,
"functionSelector": "954ab4b2",
"id": 1908,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "say",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 1901,
"nodeType": "OverrideSpecifier",
"overrides": [
{
"contractScope": null,
"id": 1900,
"name": "WithSelfDestruct",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1896,
"src": "1194:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_WithSelfDestruct_$1896",
"typeString": "contract WithSelfDestruct"
}
}
],
"src": "1185:26:12"
},
"parameters": {
"id": 1899,
"nodeType": "ParameterList",
"parameters": [],
"src": "1170:2:12"
},
"returnParameters": {
"id": 1904,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1903,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1908,
"src": "1221:13:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1902,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1221:6:12",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1220:15:12"
},
"scope": 1909,
"src": "1158:124:12",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 1964,
"src": "1098:186:12"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1939,
"linearizedBaseContracts": [
1939
],
"name": "WithDelegateCall",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 1929,
"nodeType": "Block",
"src": "1347:165:12",
"statements": [
{
"assignments": [
1915
],
"declarations": [
{
"constant": false,
"id": 1915,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1929,
"src": "1402:17:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1914,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1402:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1917,
"initialValue": {
"argumentTypes": null,
"hexValue": "41c0e1b5",
"id": 1916,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1422:18:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3d5ee410c4f5a40ab8c4301eaa7abf18c79303854495ac5eef70a404abf993d5",
"typeString": "literal_string (contains invalid UTF-8 sequence at position 3)"
},
"value": null
},
"nodeType": "VariableDeclarationStatement",
"src": "1402:38:12"
},
{
"assignments": [
1919,
null
],
"declarations": [
{
"constant": false,
"id": 1919,
"mutability": "mutable",
"name": "success",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1929,
"src": "1447:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1918,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1447:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
null
],
"id": 1924,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1922,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1915,
"src": "1480:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": null,
"id": 1920,
"name": "_e",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1911,
"src": "1464:2:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1921,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "delegatecall",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1464:15:12",
"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": 1923,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1464:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1446:39:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1926,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1919,
"src": "1499:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1925,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1491:7:12",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 1927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1491:16:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1928,
"nodeType": "ExpressionStatement",
"src": "1491:16:12"
}
]
},
"documentation": null,
"id": 1930,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 1912,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1911,
"mutability": "mutable",
"name": "_e",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 1930,
"src": "1328:10:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1910,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1328:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1327:12:12"
},
"returnParameters": {
"id": 1913,
"nodeType": "ParameterList",
"parameters