@netvote/elections-solidity
Version:
Elections Contracts
841 lines • 33.8 kB
JSON
{
"contractName": "Ownable",
"abi": [
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
}
],
"bytecode": "0x6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091161790556101768061003b6000396000f30060606040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461007f575b600080fd5b341561005b57600080fd5b6100636100a0565b604051600160a060020a03909116815260200160405180910390f35b341561008a57600080fd5b61009e600160a060020a03600435166100af565b005b600054600160a060020a031681565b60005433600160a060020a039081169116146100ca57600080fd5b600160a060020a03811615156100df57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820e3fdcd6b14428dedd27a67c45bf2cd91a062f513de451b8acb4c5f8445a887190029",
"deployedBytecode": "0x60606040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638da5cb5b8114610050578063f2fde38b1461007f575b600080fd5b341561005b57600080fd5b6100636100a0565b604051600160a060020a03909116815260200160405180910390f35b341561008a57600080fd5b61009e600160a060020a03600435166100af565b005b600054600160a060020a031681565b60005433600160a060020a039081169116146100ca57600080fd5b600160a060020a03811615156100df57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820e3fdcd6b14428dedd27a67c45bf2cd91a062f513de451b8acb4c5f8445a887190029",
"sourceMap": "217:782:21:-;;;469:48;;;;;;;;494:5;:18;;-1:-1:-1;;;;;502:10:21;494:18;-1:-1:-1;;;;;;494:18:21;;;;;;217:782;;;;;;",
"deployedSourceMap": "217:782:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20;;;;;;;;;;;;;;;-1:-1:-1;;;;;238:20:21;;;;;;;;;;;;;;827:169;;;;;;;;;;-1:-1:-1;;;;;827:169:21;;;;;;;238:20;;;-1:-1:-1;;;;;238:20:21;;:::o;827:169::-;647:5;;633:10;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;-1:-1:-1;;;;;903:22:21;;;;895:31;;;;;;953:5;;-1:-1:-1;;;;;932:37:21;;;;953:5;932:37;;;;;;;;;;975:5;:16;;-1:-1:-1;;975:16:21;-1:-1:-1;;;;;975:16:21;;;;;;;;;;827:169::o",
"source": "pragma solidity ^0.4.11;\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n function Ownable() {\n owner = msg.sender;\n }\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 /**\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) onlyOwner public {\n require(newOwner != address(0));\n OwnershipTransferred(owner, newOwner);\n owner = newOwner;\n }\n\n}\n",
"sourcePath": "zeppelin-solidity/contracts/ownership/Ownable.sol",
"ast": {
"attributes": {
"absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol",
"exportedSymbols": {
"Ownable": [
2703
]
}
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.4",
".11"
]
},
"id": 2649,
"name": "PragmaDirective",
"src": "0:24:21"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"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,
"linearizedBaseContracts": [
2703
],
"name": "Ownable",
"scope": 2704
},
"children": [
{
"attributes": {
"constant": false,
"name": "owner",
"scope": 2703,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 2650,
"name": "ElementaryTypeName",
"src": "238:7:21"
}
],
"id": 2651,
"name": "VariableDeclaration",
"src": "238:20:21"
},
{
"attributes": {
"anonymous": false,
"name": "OwnershipTransferred"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": true,
"name": "previousOwner",
"scope": 2657,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 2652,
"name": "ElementaryTypeName",
"src": "291:7:21"
}
],
"id": 2653,
"name": "VariableDeclaration",
"src": "291:29:21"
},
{
"attributes": {
"constant": false,
"indexed": true,
"name": "newOwner",
"scope": 2657,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 2654,
"name": "ElementaryTypeName",
"src": "322:7:21"
}
],
"id": 2655,
"name": "VariableDeclaration",
"src": "322:24:21"
}
],
"id": 2656,
"name": "ParameterList",
"src": "290:57:21"
}
],
"id": 2657,
"name": "EventDefinition",
"src": "264:84:21"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": true,
"modifiers": [
null
],
"name": "Ownable",
"payable": false,
"scope": 2703,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 2658,
"name": "ParameterList",
"src": "485:2:21"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 2659,
"name": "ParameterList",
"src": "488:0:21"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2651,
"type": "address",
"value": "owner"
},
"id": 2660,
"name": "Identifier",
"src": "494:5:21"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3238,
"type": "msg",
"value": "msg"
},
"id": 2661,
"name": "Identifier",
"src": "502:3:21"
}
],
"id": 2662,
"name": "MemberAccess",
"src": "502:10:21"
}
],
"id": 2663,
"name": "Assignment",
"src": "494:18:21"
}
],
"id": 2664,
"name": "ExpressionStatement",
"src": "494:18:21"
}
],
"id": 2665,
"name": "Block",
"src": "488:29:21"
}
],
"id": 2666,
"name": "FunctionDefinition",
"src": "469:48:21"
},
{
"attributes": {
"name": "onlyOwner",
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 2667,
"name": "ParameterList",
"src": "616:2:21"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3241,
"type": "function (bool) pure",
"value": "require"
},
"id": 2668,
"name": "Identifier",
"src": "625:7:21"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3238,
"type": "msg",
"value": "msg"
},
"id": 2669,
"name": "Identifier",
"src": "633:3:21"
}
],
"id": 2670,
"name": "MemberAccess",
"src": "633:10:21"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2651,
"type": "address",
"value": "owner"
},
"id": 2671,
"name": "Identifier",
"src": "647:5:21"
}
],
"id": 2672,
"name": "BinaryOperation",
"src": "633:19:21"
}
],
"id": 2673,
"name": "FunctionCall",
"src": "625:28:21"
}
],
"id": 2674,
"name": "ExpressionStatement",
"src": "625:28:21"
},
{
"id": 2675,
"name": "PlaceholderStatement",
"src": "659:1:21"
}
],
"id": 2676,
"name": "Block",
"src": "619:46:21"
}
],
"id": 2677,
"name": "ModifierDefinition",
"src": "598:67:21"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"name": "transferOwnership",
"payable": false,
"scope": 2703,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "newOwner",
"scope": 2702,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"type": "address"
},
"id": 2678,
"name": "ElementaryTypeName",
"src": "854:7:21"
}
],
"id": 2679,
"name": "VariableDeclaration",
"src": "854:16:21"
}
],
"id": 2680,
"name": "ParameterList",
"src": "853:18:21"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 2683,
"name": "ParameterList",
"src": "889:0:21"
},
{
"attributes": {
"arguments": [
null
]
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2677,
"type": "modifier ()",
"value": "onlyOwner"
},
"id": 2681,
"name": "Identifier",
"src": "872:9:21"
}
],
"id": 2682,
"name": "ModifierInvocation",
"src": "872:9:21"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3241,
"type": "function (bool) pure",
"value": "require"
},
"id": 2684,
"name": "Identifier",
"src": "895:7:21"
},
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "!=",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2679,
"type": "address",
"value": "newOwner"
},
"id": 2685,
"name": "Identifier",
"src": "903:8:21"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": true,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "address",
"type_conversion": true
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"type": "type(address)",
"value": "address"
},
"id": 2686,
"name": "ElementaryTypeNameExpression",
"src": "915:7:21"
},
{
"attributes": {
"argumentTypes": null,
"hexvalue": "30",
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"subdenomination": null,
"token": "number",
"type": "int_const 0",
"value": "0"
},
"id": 2687,
"name": "Literal",
"src": "923:1:21"
}
],
"id": 2688,
"name": "FunctionCall",
"src": "915:10:21"
}
],
"id": 2689,
"name": "BinaryOperation",
"src": "903:22:21"
}
],
"id": 2690,
"name": "FunctionCall",
"src": "895:31:21"
}
],
"id": 2691,
"name": "ExpressionStatement",
"src": "895:31:21"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2657,
"type": "function (address,address)",
"value": "OwnershipTransferred"
},
"id": 2692,
"name": "Identifier",
"src": "932:20:21"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2651,
"type": "address",
"value": "owner"
},
"id": 2693,
"name": "Identifier",
"src": "953:5:21"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2679,
"type": "address",
"value": "newOwner"
},
"id": 2694,
"name": "Identifier",
"src": "960:8:21"
}
],
"id": 2695,
"name": "FunctionCall",
"src": "932:37:21"
}
],
"id": 2696,
"name": "ExpressionStatement",
"src": "932:37:21"
},
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2651,
"type": "address",
"value": "owner"
},
"id": 2697,
"name": "Identifier",
"src": "975:5:21"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 2679,
"type": "address",
"value": "newOwner"
},
"id": 2698,
"name": "Identifier",
"src": "983:8:21"
}
],
"id": 2699,
"name": "Assignment",
"src": "975:16:21"
}
],
"id": 2700,
"name": "ExpressionStatement",
"src": "975:16:21"
}
],
"id": 2701,
"name": "Block",
"src": "889:107:21"
}
],
"id": 2702,
"name": "FunctionDefinition",
"src": "827:169:21"
}
],
"id": 2703,
"name": "ContractDefinition",
"src": "217:782:21"
}
],
"id": 2704,
"name": "SourceUnit",
"src": "0:1000:21"
},
"compiler": {
"name": "solc",
"version": "0.4.18+commit.9cf6e910.Emscripten.clang"
},
"networks": {},
"schemaVersion": "1.0.1",
"updatedAt": "2018-03-26T15:46:12.494Z"
}