@newos/upgrades
Version:
Core JavaScript library for the NewOS
427 lines (426 loc) • 18.2 kB
JSON
{
"fileName": "WithConstructorImplementation.sol",
"contractName": "WithConstructorImplementation",
"source": "pragma solidity ^0.5.0;\n\ncontract WithConstructorImplementation {\n uint256 public value;\n string public text;\n\n constructor(uint256 _value, string memory _text) public {\n require(_value > 0);\n value = _value;\n text = _text;\n }\n}",
"sourcePath": "contracts/mocks/WithConstructorImplementation.sol",
"sourceMap": "25:216:22:-;;;115:124;8:9:-1;5:2;;;30:1;27;20:12;5:2;115:124:22;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;115:124:22;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;115:124:22;;;;;;194:1;185:6;:10;177:19;;;;;;;;210:6;202:5;:14;;;;229:5;222:4;:12;;;;;;;;;;;;:::i;:::-;;115:124;;25:216;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "25:216:22:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:216:22;;;;;;;;;;;;;;;;;;;;;;;;92:18;;;:::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;92:18:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;92:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;68:20::-;;;;:::o",
"abi": [
{
"constant": true,
"inputs": [],
"name": "text",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "value",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_value",
"type": "uint256"
},
{
"name": "_text",
"type": "string"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"ast": {
"absolutePath": "contracts/mocks/WithConstructorImplementation.sol",
"exportedSymbols": {
"WithConstructorImplementation": [
4750
]
},
"id": 4751,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4723,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:22"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 4750,
"linearizedBaseContracts": [
4750
],
"name": "WithConstructorImplementation",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4725,
"name": "value",
"nodeType": "VariableDeclaration",
"scope": 4750,
"src": "68:20:22",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4724,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "68:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4727,
"name": "text",
"nodeType": "VariableDeclaration",
"scope": 4750,
"src": "92:18:22",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4726,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "92:6:22",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4748,
"nodeType": "Block",
"src": "171:68:22",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 4735,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4729,
"src": "185:6:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 4736,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "194:1:22",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "185:10:22",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 4734,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6466,
6467
],
"referencedDeclaration": 6466,
"src": "177:7:22",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 4738,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "177:19:22",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4739,
"nodeType": "ExpressionStatement",
"src": "177:19:22"
},
{
"expression": {
"argumentTypes": null,
"id": 4742,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4740,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4725,
"src": "202:5:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4741,
"name": "_value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4729,
"src": "210:6:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "202:14:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 4743,
"nodeType": "ExpressionStatement",
"src": "202:14:22"
},
{
"expression": {
"argumentTypes": null,
"id": 4746,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4744,
"name": "text",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4727,
"src": "222:4:22",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4745,
"name": "_text",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4731,
"src": "229:5:22",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "222:12:22",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4747,
"nodeType": "ExpressionStatement",
"src": "222:12:22"
}
]
},
"documentation": null,
"id": 4749,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4732,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4729,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 4749,
"src": "127:14:22",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4728,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "127:7:22",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4731,
"name": "_text",
"nodeType": "VariableDeclaration",
"scope": 4749,
"src": "143:19:22",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4730,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "143:6:22",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "126:37:22"
},
"returnParameters": {
"id": 4733,
"nodeType": "ParameterList",
"parameters": [],
"src": "171:0:22"
},
"scope": 4750,
"src": "115:124:22",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 4751,
"src": "25:216:22"
}
],
"src": "0:241:22"
},
"bytecode": "0x608060405234801561001057600080fd5b506040516103243803806103248339810180604052604081101561003357600080fd5b8101908080519060200190929190805164010000000081111561005557600080fd5b8281019050602081018481111561006b57600080fd5b815185600182028301116401000000008211171561008857600080fd5b505092919050505060008211151561009f57600080fd5b8160008190555080600190805190602001906100bc9291906100c4565b505050610169565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010557805160ff1916838001178555610133565b82800160010185558215610133579182015b82811115610132578251825591602001919060010190610117565b5b5090506101409190610144565b5090565b61016691905b8082111561016257600081600090555060010161014a565b5090565b90565b6101ac806101786000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631f1bd6921461003b5780633fa4f245146100be575b600080fd5b6100436100dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c661017a565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101725780601f1061014757610100808354040283529160200191610172565b820191906000526020600020905b81548152906001019060200180831161015557829003601f168201915b505050505081565b6000548156fea165627a7a723058201868839842d92b2db3bda4c4cc0fdfc1d3d6f35e4453cd9987c006c1c466edd90029",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80631f1bd6921461003b5780633fa4f245146100be575b600080fd5b6100436100dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610083578082015181840152602081019050610068565b50505050905090810190601f1680156100b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100c661017a565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101725780601f1061014757610100808354040283529160200191610172565b820191906000526020600020905b81548152906001019060200180831161015557829003601f168201915b505050505081565b6000548156fea165627a7a723058201868839842d92b2db3bda4c4cc0fdfc1d3d6f35e4453cd9987c006c1c466edd90029",
"compiler": {
"name": "solc",
"version": "0.5.3+commit.10d17f24.Emscripten.clang",
"optimizer": {},
"evmVersion": "constantinople"
}
}