UNPKG

@newos/upgrades

Version:
514 lines (513 loc) 20.6 kB
{ "fileName": "WithInitialValues.sol", "contractName": "WithInitialValuesInFieldsDeclarations", "source": "pragma solidity ^0.5.0;\n\ncontract WithoutInitialValuesInFieldsDeclarations {\n uint constant myConst = 115994;\n\n function doSomething() public pure returns (string memory) {\n return 'do';\n }\n}\n\ncontract WithInitialValuesInFieldsDeclarations {\n string public allaps = 'allaps';\n\n function doSomething() public pure returns (string memory) {\n return 'do';\n }\n}\n\ncontract WithParentWithInitialValuesInFieldsDeclarations is WithInitialValuesInFieldsDeclarations {\n string public myVar;\n\n function doSomething() public pure returns (string memory) {\n return 'do';\n }\n}\n\n", "sourcePath": "contracts/mocks/WithInitialValues.sol", "sourceMap": "199:170:23:-;;;250:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;199:170;8:9:-1;5:2;;;30:1;27;20:12;5:2;199:170:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "199:170:23:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;199:170:23;;;;;;;;;;;;;;;;;;;;;;;;286:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;286:81:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;250:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;250:31:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;286:81;330:13;351:11;;;;;;;;;;;;;;;;;;;;286:81;:::o;250:31::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", "abi": [ { "constant": true, "inputs": [], "name": "doSomething", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [], "name": "allaps", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "ast": { "absolutePath": "contracts/mocks/WithInitialValues.sol", "exportedSymbols": { "WithInitialValuesInFieldsDeclarations": [ 4776 ], "WithParentWithInitialValuesInFieldsDeclarations": [ 4789 ], "WithoutInitialValuesInFieldsDeclarations": [ 4764 ] }, "id": 4790, "nodeType": "SourceUnit", "nodes": [ { "id": 4752, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:23" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4764, "linearizedBaseContracts": [ 4764 ], "name": "WithoutInitialValuesInFieldsDeclarations", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 4755, "name": "myConst", "nodeType": "VariableDeclaration", "scope": 4764, "src": "79:30:23", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4753, "name": "uint", "nodeType": "ElementaryTypeName", "src": "79:4:23", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "313135393934", "id": 4754, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "103:6:23", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_115994_by_1", "typeString": "int_const 115994" }, "value": "115994" }, "visibility": "internal" }, { "body": { "id": 4762, "nodeType": "Block", "src": "173:22:23", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "646f", "id": 4760, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "186:4:23", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a25dd137276eccd5048f808ec1a55102f9cde0dc9f47be33bc0c29fa331a789d", "typeString": "literal_string \"do\"" }, "value": "do" }, "functionReturnParameters": 4759, "id": 4761, "nodeType": "Return", "src": "179:11:23" } ] }, "documentation": null, "id": 4763, "implemented": true, "kind": "function", "modifiers": [], "name": "doSomething", "nodeType": "FunctionDefinition", "parameters": { "id": 4756, "nodeType": "ParameterList", "parameters": [], "src": "134:2:23" }, "returnParameters": { "id": 4759, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4758, "name": "", "nodeType": "VariableDeclaration", "scope": 4763, "src": "158:13:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4757, "name": "string", "nodeType": "ElementaryTypeName", "src": "158:6:23", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "157:15:23" }, "scope": 4764, "src": "114:81:23", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], "scope": 4790, "src": "25:172:23" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4776, "linearizedBaseContracts": [ 4776 ], "name": "WithInitialValuesInFieldsDeclarations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4767, "name": "allaps", "nodeType": "VariableDeclaration", "scope": 4776, "src": "250:31:23", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 4765, "name": "string", "nodeType": "ElementaryTypeName", "src": "250:6:23", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "argumentTypes": null, "hexValue": "616c6c617073", "id": 4766, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "273:8:23", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e919cf55dac0a9e9746a92ec54b98336dc9d8e3bcca6fbbc6ecdc60172503ead", "typeString": "literal_string \"allaps\"" }, "value": "allaps" }, "visibility": "public" }, { "body": { "id": 4774, "nodeType": "Block", "src": "345:22:23", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "646f", "id": 4772, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "358:4:23", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a25dd137276eccd5048f808ec1a55102f9cde0dc9f47be33bc0c29fa331a789d", "typeString": "literal_string \"do\"" }, "value": "do" }, "functionReturnParameters": 4771, "id": 4773, "nodeType": "Return", "src": "351:11:23" } ] }, "documentation": null, "id": 4775, "implemented": true, "kind": "function", "modifiers": [], "name": "doSomething", "nodeType": "FunctionDefinition", "parameters": { "id": 4768, "nodeType": "ParameterList", "parameters": [], "src": "306:2:23" }, "returnParameters": { "id": 4771, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4770, "name": "", "nodeType": "VariableDeclaration", "scope": 4775, "src": "330:13:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4769, "name": "string", "nodeType": "ElementaryTypeName", "src": "330:6:23", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "329:15:23" }, "scope": 4776, "src": "286:81:23", "stateMutability": "pure", "superFunction": null, "visibility": "public" } ], "scope": 4790, "src": "199:170:23" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 4777, "name": "WithInitialValuesInFieldsDeclarations", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4776, "src": "431:37:23", "typeDescriptions": { "typeIdentifier": "t_contract$_WithInitialValuesInFieldsDeclarations_$4776", "typeString": "contract WithInitialValuesInFieldsDeclarations" } }, "id": 4778, "nodeType": "InheritanceSpecifier", "src": "431:37:23" } ], "contractDependencies": [ 4776 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 4789, "linearizedBaseContracts": [ 4789, 4776 ], "name": "WithParentWithInitialValuesInFieldsDeclarations", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4780, "name": "myVar", "nodeType": "VariableDeclaration", "scope": 4789, "src": "473:19:23", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 4779, "name": "string", "nodeType": "ElementaryTypeName", "src": "473:6:23", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "public" }, { "body": { "id": 4787, "nodeType": "Block", "src": "556:22:23", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "646f", "id": 4785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "569:4:23", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_a25dd137276eccd5048f808ec1a55102f9cde0dc9f47be33bc0c29fa331a789d", "typeString": "literal_string \"do\"" }, "value": "do" }, "functionReturnParameters": 4784, "id": 4786, "nodeType": "Return", "src": "562:11:23" } ] }, "documentation": null, "id": 4788, "implemented": true, "kind": "function", "modifiers": [], "name": "doSomething", "nodeType": "FunctionDefinition", "parameters": { "id": 4781, "nodeType": "ParameterList", "parameters": [], "src": "517:2:23" }, "returnParameters": { "id": 4784, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4783, "name": "", "nodeType": "VariableDeclaration", "scope": 4788, "src": "541:13:23", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 4782, "name": "string", "nodeType": "ElementaryTypeName", "src": "541:6:23", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "540:15:23" }, "scope": 4789, "src": "497:81:23", "stateMutability": "pure", "superFunction": 4775, "visibility": "public" } ], "scope": 4790, "src": "371:209:23" } ], "src": "0:582:23" }, "bytecode": "0x60806040526040805190810160405280600681526020017f616c6c61707300000000000000000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610107565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b61010491905b808211156101005760008160009055506001016100e8565b5090565b90565b610248806101166000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063826926791461003b578063bc4b0e64146100be575b600080fd5b610043610141565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c661017e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101065780820151818401526020810190506100eb565b50505050905090810190601f1680156101335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040805190810160405280600281526020017f646f000000000000000000000000000000000000000000000000000000000000815250905090565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102145780601f106101e957610100808354040283529160200191610214565b820191906000526020600020905b8154815290600101906020018083116101f757829003601f168201915b50505050508156fea165627a7a723058206b6e8c2607b72dac9bd9ff1151a288000b58f4f605273261ddac69c01b7ce9180029", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063826926791461003b578063bc4b0e64146100be575b600080fd5b610043610141565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c661017e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101065780820151818401526020810190506100eb565b50505050905090810190601f1680156101335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60606040805190810160405280600281526020017f646f000000000000000000000000000000000000000000000000000000000000815250905090565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102145780601f106101e957610100808354040283529160200191610214565b820191906000526020600020905b8154815290600101906020018083116101f757829003601f168201915b50505050508156fea165627a7a723058206b6e8c2607b72dac9bd9ff1151a288000b58f4f605273261ddac69c01b7ce9180029", "compiler": { "name": "solc", "version": "0.5.3+commit.10d17f24.Emscripten.clang", "optimizer": {}, "evmVersion": "constantinople" } }