UNPKG

@alice-network/zos-lib

Version:

JavaScript library for the ZeppelinOS smart contract platform

1,201 lines (1,200 loc) 88.2 kB
{ "contractName": "Ownable", "abi": [ { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" } ], "name": "OwnershipRenounced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103c1806100606000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a61461005c5780638da5cb5b14610073578063f2fde38b146100ca575b600080fd5b34801561006857600080fd5b5061007161010d565b005b34801561007f57600080fd5b5061008861020f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100d657600080fd5b5061010b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610234565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561016857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561028f57600080fd5b6102988161029b565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156102d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820eea77a3f010eb77340bd041ff795829c79d9dad5b5e69b6c30d320624881b8500029", "deployedBytecode": "0x608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063715018a61461005c5780638da5cb5b14610073578063f2fde38b146100ca575b600080fd5b34801561006857600080fd5b5061007161010d565b005b34801561007f57600080fd5b5061008861020f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100d657600080fd5b5061010b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610234565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561016857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561028f57600080fd5b6102988161029b565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156102d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820eea77a3f010eb77340bd041ff795829c79d9dad5b5e69b6c30d320624881b8500029", "sourceMap": "217:1294:29:-;;;540:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;540:50:29;575:10;567:5;;:18;;;;;;;;;;;;;;;;;;217:1294;;;;;;", "deployedSourceMap": "217:1294:29:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;827:111:29;;;;;;238:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:29;;;;;;;;;;;;;;;;;;;;;;;;;;;1100:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1100:103:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:111;719:5;;;;;;;;;;;705:19;;:10;:19;;;697:28;;;;;;;;903:5;;;;;;;;;;;884:25;;;;;;;;;;;;931:1;915:5;;:18;;;;;;;;;;;;;;;;;;827:111::o;238:20::-;;;;;;;;;;;;;:::o;1100:103::-;719:5;;;;;;;;;;;705:19;;:10;:19;;;697:28;;;;;;;;1169:29;1188:9;1169:18;:29::i;:::-;1100:103;:::o;1338:171::-;1429:1;1408:23;;:9;:23;;;;1400:32;;;;;;;;1471:9;1443:38;;1464:5;;;;;;;;;;;1443:38;;;;;;;;;;;;1495:9;1487:5;;:17;;;;;;;;;;;;;;;;;;1338:171;:::o", "source": "pragma solidity ^0.4.23;\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address public owner;\n\n\n event OwnershipRenounced(address indexed previousOwner);\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n constructor() public {\n owner = msg.sender;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n /**\n * @dev Allows the current owner to relinquish control of the contract.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipRenounced(owner);\n owner = address(0);\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param _newOwner The address to transfer ownership to.\n */\n function transferOwnership(address _newOwner) public onlyOwner {\n _transferOwnership(_newOwner);\n }\n\n /**\n * @dev Transfers control of the contract to a newOwner.\n * @param _newOwner The address to transfer ownership to.\n */\n function _transferOwnership(address _newOwner) internal {\n require(_newOwner != address(0));\n emit OwnershipTransferred(owner, _newOwner);\n owner = _newOwner;\n }\n}\n", "sourcePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "ast": { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "exportedSymbols": { "Ownable": [ 3142 ] }, "id": 3143, "nodeType": "SourceUnit", "nodes": [ { "id": 3058, "literals": [ "solidity", "^", "0.4", ".23" ], "nodeType": "PragmaDirective", "src": "0:24:29" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", "fullyImplemented": true, "id": 3142, "linearizedBaseContracts": [ 3142 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3060, "name": "owner", "nodeType": "VariableDeclaration", "scope": 3142, "src": "238:20:29", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3059, "name": "address", "nodeType": "ElementaryTypeName", "src": "238:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 3064, "name": "OwnershipRenounced", "nodeType": "EventDefinition", "parameters": { "id": 3063, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3062, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", "scope": 3064, "src": "289:29:29", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3061, "name": "address", "nodeType": "ElementaryTypeName", "src": "289:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "288:31:29" }, "src": "264:56:29" }, { "anonymous": false, "documentation": null, "id": 3070, "name": "OwnershipTransferred", "nodeType": "EventDefinition", "parameters": { "id": 3069, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3066, "indexed": true, "name": "previousOwner", "nodeType": "VariableDeclaration", "scope": 3070, "src": "355:29:29", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3065, "name": "address", "nodeType": "ElementaryTypeName", "src": "355:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3068, "indexed": true, "name": "newOwner", "nodeType": "VariableDeclaration", "scope": 3070, "src": "390:24:29", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3067, "name": "address", "nodeType": "ElementaryTypeName", "src": "390:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "349:69:29" }, "src": "323:96:29" }, { "body": { "id": 3078, "nodeType": "Block", "src": "561:29:29", "statements": [ { "expression": { "argumentTypes": null, "id": 3076, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3073, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "567:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3074, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3157, "src": "575:3:29", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3075, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "575:10:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "567:18:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3077, "nodeType": "ExpressionStatement", "src": "567:18:29" } ] }, "documentation": "@dev The Ownable constructor sets the original `owner` of the contract to the sender\naccount.", "id": 3079, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 3071, "nodeType": "ParameterList", "parameters": [], "src": "551:2:29" }, "payable": false, "returnParameters": { "id": 3072, "nodeType": "ParameterList", "parameters": [], "src": "561:0:29" }, "scope": 3142, "src": "540:50:29", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 3089, "nodeType": "Block", "src": "691:46:29", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 3085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3082, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3157, "src": "705:3:29", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3083, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "705:10:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 3084, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "719:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "705:19:29", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3081, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "697:7:29", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3086, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "697:28:29", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3087, "nodeType": "ExpressionStatement", "src": "697:28:29" }, { "id": 3088, "nodeType": "PlaceholderStatement", "src": "731:1:29" } ] }, "documentation": "@dev Throws if called by any account other than the owner.", "id": 3090, "name": "onlyOwner", "nodeType": "ModifierDefinition", "parameters": { "id": 3080, "nodeType": "ParameterList", "parameters": [], "src": "688:2:29" }, "src": "670:67:29", "visibility": "internal" }, { "body": { "id": 3105, "nodeType": "Block", "src": "873:65:29", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3096, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "903:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 3095, "name": "OwnershipRenounced", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3064, "src": "884:18:29", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 3097, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "884:25:29", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3098, "nodeType": "EmitStatement", "src": "879:30:29" }, { "expression": { "argumentTypes": null, "id": 3103, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3099, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "915:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 3101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "931:1:29", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 3100, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "923:7:29", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 3102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "923:10:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "915:18:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3104, "nodeType": "ExpressionStatement", "src": "915:18:29" } ] }, "documentation": "@dev Allows the current owner to relinquish control of the contract.", "id": 3106, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 3093, "modifierName": { "argumentTypes": null, "id": 3092, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3090, "src": "863:9:29", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "863:9:29" } ], "name": "renounceOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 3091, "nodeType": "ParameterList", "parameters": [], "src": "853:2:29" }, "payable": false, "returnParameters": { "id": 3094, "nodeType": "ParameterList", "parameters": [], "src": "873:0:29" }, "scope": 3142, "src": "827:111:29", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 3117, "nodeType": "Block", "src": "1163:40:29", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3114, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3108, "src": "1188:9:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 3113, "name": "_transferOwnership", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3141, "src": "1169:18:29", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, "id": 3115, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1169:29:29", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3116, "nodeType": "ExpressionStatement", "src": "1169:29:29" } ] }, "documentation": "@dev Allows the current owner to transfer control of the contract to a newOwner.\n@param _newOwner The address to transfer ownership to.", "id": 3118, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 3111, "modifierName": { "argumentTypes": null, "id": 3110, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3090, "src": "1153:9:29", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1153:9:29" } ], "name": "transferOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 3109, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3108, "name": "_newOwner", "nodeType": "VariableDeclaration", "scope": 3118, "src": "1127:17:29", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3107, "name": "address", "nodeType": "ElementaryTypeName", "src": "1127:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1126:19:29" }, "payable": false, "returnParameters": { "id": 3112, "nodeType": "ParameterList", "parameters": [], "src": "1163:0:29" }, "scope": 3142, "src": "1100:103:29", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 3140, "nodeType": "Block", "src": "1394:115:29", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 3128, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 3124, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3120, "src": "1408:9:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 3126, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1429:1:29", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 3125, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1421:7:29", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 3127, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1421:10:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1408:23:29", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3123, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 3160, 3161 ], "referencedDeclaration": 3160, "src": "1400:7:29", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3129, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1400:32:29", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3130, "nodeType": "ExpressionStatement", "src": "1400:32:29" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3132, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "1464:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 3133, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3120, "src": "1471:9:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 3131, "name": "OwnershipTransferred", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3070, "src": "1443:20:29", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, "id": 3134, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1443:38:29", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3135, "nodeType": "EmitStatement", "src": "1438:43:29" }, { "expression": { "argumentTypes": null, "id": 3138, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3136, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3060, "src": "1487:5:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3137, "name": "_newOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3120, "src": "1495:9:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1487:17:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 3139, "nodeType": "ExpressionStatement", "src": "1487:17:29" } ] }, "documentation": "@dev Transfers control of the contract to a newOwner.\n@param _newOwner The address to transfer ownership to.", "id": 3141, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "_transferOwnership", "nodeType": "FunctionDefinition", "parameters": { "id": 3121, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3120, "name": "_newOwner", "nodeType": "VariableDeclaration", "scope": 3141, "src": "1366:17:29", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3119, "name": "address", "nodeType": "ElementaryTypeName", "src": "1366:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1365:19:29" }, "payable": false, "returnParameters": { "id": 3122, "nodeType": "ParameterList", "parameters": [], "src": "1394:0:29" }, "scope": 3142, "src": "1338:171:29", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 3143, "src": "217:1294:29" } ], "src": "0:1512:29" }, "legacyAST": { "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", "exportedSymbols": { "Ownable": [ 3142 ] }, "id": 3143, "nodeType": "SourceUnit", "nodes": [ { "id": 3058, "literals": [ "solidity", "^", "0.4", ".23" ], "nodeType": "PragmaDirective", "src": "0:24:29" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title Ownable\n@dev The Ownable contract has an owner address, and provides basic authorization control\nfunctions, this simplifies the implementation of \"user permissions\".", "fullyImplemented": true, "id": 3142, "linearizedBaseContracts": [ 3142 ], "name": "Ownable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3060, "name": "owner", "nodeType": "VariableDeclaration", "scope": 3142, "src": "238:20:29", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3059, "name": "address", "nodeType": "ElementaryTypeName", "src": "238:7:29", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 3064, "name": "OwnershipRenounced", "nodeType": "EventDefinition", "parameters": {