UNPKG

@alice-network/zos-lib

Version:

JavaScript library for the ZeppelinOS smart contract platform

795 lines 31.3 kB
{ "contractName": "WithConstructorImplementation", "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" } ], "bytecode": "0x608060405234801561001057600080fd5b50604051610301380380610301833981018060405281019080805190602001909291908051820192919050505060008211151561004c57600080fd5b816000819055508060019080519060200190610069929190610071565b505050610116565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100b257805160ff19168380011785556100e0565b828001600101855582156100e0579182015b828111156100df5782518255916020019190600101906100c4565b5b5090506100ed91906100f1565b5090565b61011391905b8082111561010f5760008160009055506001016100f7565b5090565b90565b6101dc806101256000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f1bd692146100515780633fa4f245146100e1575b600080fd5b34801561005d57600080fd5b5061006661010c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100a657808201518184015260208101905061008b565b50505050905090810190601f1680156100d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100ed57600080fd5b506100f66101aa565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101a25780601f10610177576101008083540402835291602001916101a2565b820191906000526020600020905b81548152906001019060200180831161018557829003601f168201915b505050505081565b600054815600a165627a7a7230582006502ee628799019d3349dff530c382c4ef948ddb01cfadc08ba25df89617e880029", "deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631f1bd692146100515780633fa4f245146100e1575b600080fd5b34801561005d57600080fd5b5061006661010c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100a657808201518184015260208101905061008b565b50505050905090810190601f1680156100d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100ed57600080fd5b506100f66101aa565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156101a25780601f10610177576101008083540402835291602001916101a2565b820191906000526020600020905b81548152906001019060200180831161018557829003601f168201915b505050505081565b600054815600a165627a7a7230582006502ee628799019d3349dff530c382c4ef948ddb01cfadc08ba25df89617e880029", "sourceMap": "26:209:20:-;;;116:117;8:9:-1;5:2;;;30:1;27;20:12;5:2;116:117:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;188:1;179:6;:10;171:19;;;;;;;;204:6;196:5;:14;;;;223:5;216:4;:12;;;;;;;;;;;;:::i;:::-;;116:117;;26:209;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "26:209:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93:18:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;93:18:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;69:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;69:20:20;;;;;;;;;;;;;;;;;;;;;;;93:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;69:20::-;;;;:::o", "source": "pragma solidity ^0.4.24;\n\ncontract WithConstructorImplementation {\n uint256 public value;\n string public text;\n\n constructor(uint256 _value, string _text) public {\n require(_value > 0);\n value = _value;\n text = _text;\n }\n}", "sourcePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/WithConstructorImplementation.sol", "ast": { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/WithConstructorImplementation.sol", "exportedSymbols": { "WithConstructorImplementation": [ 2485 ] }, "id": 2486, "nodeType": "SourceUnit", "nodes": [ { "id": 2458, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2485, "linearizedBaseContracts": [ 2485 ], "name": "WithConstructorImplementation", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2460, "name": "value", "nodeType": "VariableDeclaration", "scope": 2485, "src": "69:20:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2459, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "69:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2462, "name": "text", "nodeType": "VariableDeclaration", "scope": 2485, "src": "93:18:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 2461, "name": "string", "nodeType": "ElementaryTypeName", "src": "93:6:20", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "public" }, { "body": { "id": 2483, "nodeType": "Block", "src": "165:68:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2470, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "179:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2471, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "188:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "179:10:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2469, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "171:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2473, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "171:19:20", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2474, "nodeType": "ExpressionStatement", "src": "171:19:20" }, { "expression": { "argumentTypes": null, "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2475, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "196:5:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2476, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "204:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "196:14:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2478, "nodeType": "ExpressionStatement", "src": "196:14:20" }, { "expression": { "argumentTypes": null, "id": 2481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2479, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "216:4:20", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2480, "name": "_text", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2466, "src": "223:5:20", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "216:12:20", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 2482, "nodeType": "ExpressionStatement", "src": "216:12:20" } ] }, "documentation": null, "id": 2484, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2467, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2464, "name": "_value", "nodeType": "VariableDeclaration", "scope": 2484, "src": "128:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2463, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "128:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2466, "name": "_text", "nodeType": "VariableDeclaration", "scope": 2484, "src": "144:12:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2465, "name": "string", "nodeType": "ElementaryTypeName", "src": "144:6:20", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "127:30:20" }, "payable": false, "returnParameters": { "id": 2468, "nodeType": "ParameterList", "parameters": [], "src": "165:0:20" }, "scope": 2485, "src": "116:117:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 2486, "src": "26:209:20" } ], "src": "0:235:20" }, "legacyAST": { "absolutePath": "/Users/yoonjae/WebstormProjects/zos/packages/lib/contracts/mocks/WithConstructorImplementation.sol", "exportedSymbols": { "WithConstructorImplementation": [ 2485 ] }, "id": 2486, "nodeType": "SourceUnit", "nodes": [ { "id": 2458, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2485, "linearizedBaseContracts": [ 2485 ], "name": "WithConstructorImplementation", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2460, "name": "value", "nodeType": "VariableDeclaration", "scope": 2485, "src": "69:20:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2459, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "69:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2462, "name": "text", "nodeType": "VariableDeclaration", "scope": 2485, "src": "93:18:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 2461, "name": "string", "nodeType": "ElementaryTypeName", "src": "93:6:20", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "public" }, { "body": { "id": 2483, "nodeType": "Block", "src": "165:68:20", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2470, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "179:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2471, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "188:1:20", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "179:10:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2469, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "171:7:20", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2473, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "171:19:20", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2474, "nodeType": "ExpressionStatement", "src": "171:19:20" }, { "expression": { "argumentTypes": null, "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2475, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "196:5:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2476, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "204:6:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "196:14:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2478, "nodeType": "ExpressionStatement", "src": "196:14:20" }, { "expression": { "argumentTypes": null, "id": 2481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2479, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "216:4:20", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2480, "name": "_text", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2466, "src": "223:5:20", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "216:12:20", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 2482, "nodeType": "ExpressionStatement", "src": "216:12:20" } ] }, "documentation": null, "id": 2484, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 2467, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2464, "name": "_value", "nodeType": "VariableDeclaration", "scope": 2484, "src": "128:14:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2463, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "128:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2466, "name": "_text", "nodeType": "VariableDeclaration", "scope": 2484, "src": "144:12:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2465, "name": "string", "nodeType": "ElementaryTypeName", "src": "144:6:20", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "127:30:20" }, "payable": false, "returnParameters": { "id": 2468, "nodeType": "ParameterList", "parameters": [], "src": "165:0:20" }, "scope": 2485, "src": "116:117:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 2486, "src": "26:209:20" } ], "src": "0:235:20" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2019-02-15T10:15:15.369Z" }