UNPKG

@netvote/elections-solidity

Version:
906 lines (905 loc) 151 kB
{ "contractName": "BaseElection", "abi": [ { "constant": false, "inputs": [], "name": "activate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "voteToken", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ], "name": "removeAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "electionStartTime", "type": "uint256" }, { "name": "electionEndTime", "type": "uint256" } ], "name": "setTimes", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "addr", "type": "address" } ], "name": "isAdmin", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "electionPhase", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "endTime", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "abort", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "entry", "type": "bytes32" } ], "name": "addAuthorized", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "close", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "acct", "type": "address" } ], "name": "setVoteOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "electionType", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "privateKey", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "removeSelf", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "entry", "type": "bytes32" } ], "name": "isAuthorized", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "publicKey", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "key", "type": "string" } ], "name": "setPublicKey", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ], "name": "addAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "entry", "type": "bytes32" } ], "name": "removeAuthorized", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "startTime", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "value", "type": "uint256" } ], "name": "withdrawVotes", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "isLocked", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "unlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "allowVoteUpdates", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isClosed", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "deductVote", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "key", "type": "string" } ], "name": "setPrivateKey", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "withdrawAllVotes", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "checkConfig", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "name": "hashedUserId", "type": "bytes32" }, { "name": "tokenContractAddress", "type": "address" }, { "name": "acct", "type": "address" }, { "name": "allowUpdates", "type": "bool" }, { "name": "revealer", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [], "name": "KeyReleased", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Closed", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Activated", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Aborted", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Locked", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Unlocked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" } ], "bytecode": "0x60606040526003805461ffff191690556006805460ff19169055341561002457600080fd5b60405160a08061127a833981016040528080519190602001805191906020018051919060200180519190602001805160008054600160a060020a03338116600160a060020a0319909216919091179091556003805491831662010000026201000060b060020a031990921691909117905591506100af90508564010000000061076561011782021704565b506006805461010060a860020a031916610100600160a060020a039586160217905560078054600160a060020a031916929093169190911760a060020a60ff0219167401000000000000000000000000000000000000000091151591909102179055506101a2565b61012d336401000000006106b161015382021704565b151561013857600080fd5b6000908152600260205260409020805460ff19166001179055565b6000600160a060020a0382161580159061019c5750600054600160a060020a038381169116148061019c5750600160a060020a03821660009081526001602052604090205460ff165b92915050565b6110c9806101b16000396000f30060606040526004361061017c5763ffffffff60e060020a6000350416630f15f4c08114610181578063160d66ae146101965780631785f53c146101c557806322434836146101e457806324d7806c146101fd578063265050b6146102305780633197cbb61461026757806335a063b41461028c57806341af099d1461029f57806343d726d6146102b557806347beabd6146102c85780634885c72a146102e757806349da5a0f146103715780635e898dac1461038457806362f4ed901461039757806363ffab31146103ad5780636f6fc077146103c0578063704802751461041157806372e789b31461043057806378e97925146104465780638da5cb5b14610459578063961edb251461046c578063a4e2d63414610482578063a69df4b514610495578063bf41bf36146104a8578063c2b6b58c146104bb578063de61a732146104ce578063e0d4f017146104e1578063ee51d4e114610532578063f098fe4714610545578063f2fde38b14610558578063f83d08ba14610577575b600080fd5b341561018c57600080fd5b61019461058a565b005b34156101a157600080fd5b6101a9610601565b604051600160a060020a03909116815260200160405180910390f35b34156101d057600080fd5b610194600160a060020a0360043516610615565b34156101ef57600080fd5b610194600435602435610651565b341561020857600080fd5b61021c600160a060020a03600435166106b1565b604051901515815260200160405180910390f35b341561023b57600080fd5b610243610700565b6040518082600381111561025357fe5b60ff16815260200191505060405180910390f35b341561027257600080fd5b61027a61070e565b60405190815260200160405180910390f35b341561029757600080fd5b610194610714565b34156102aa57600080fd5b610194600435610765565b34156102c057600080fd5b610194610794565b34156102d357600080fd5b610194600160a060020a036004351661081a565b34156102f257600080fd5b6102fa61085d565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561033657808201518382015260200161031e565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037c57600080fd5b6102fa6108fb565b341561038f57600080fd5b610194610966565b34156103a257600080fd5b61021c60043561099c565b34156103b857600080fd5b6102fa6109b1565b34156103cb57600080fd5b61019460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610a1c95505050505050565b341561041c57600080fd5b610194600160a060020a0360043516610a54565b341561043b57600080fd5b610194600435610a96565b341561045157600080fd5b61027a610ac2565b341561046457600080fd5b6101a9610ac8565b341561047757600080fd5b610194600435610ad7565b341561048d57600080fd5b61021c610b7b565b34156104a057600080fd5b610194610b85565b34156104b357600080fd5b61021c610be2565b34156104c657600080fd5b61021c610c03565b34156104d957600080fd5b610194610c23565b34156104ec57600080fd5b61019460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610cfe95505050505050565b341561053d57600080fd5b610194610d62565b341561055057600080fd5b61021c610e6d565b341561056357600080fd5b610194600160a060020a0360043516610e72565b341561058257600080fd5b610194610f0d565b610592610b7b565b1580156105b45750600060038054610100900460ff16908111156105b257fe5b145b15156105bf57600080fd5b6105c8336106b1565b15156105d357600080fd5b6009541580156105e35750600a54155b156105f7574260098190556224ea0001600a555b6105ff610f6c565b565b6006546101009004600160a060020a031681565b60005433600160a060020a0390811691161461063057600080fd5b600160a060020a03166000908152600160205260409020805460ff19169055565b610659610b7b565b15801561067b5750600060038054610100900460ff169081111561067957fe5b145b151561068657600080fd5b61068f336106b1565b151561069a57600080fd5b8181116106a657600080fd5b600991909155600a55565b6000600160a060020a038216158015906106fa5750600054600160a060020a03838116911614806106fa5750600160a060020a03821660009081526001602052604090205460ff165b92915050565b600354610100900460ff1681565b600a5481565b61071d336106b1565b151561072857600080fd5b6003805461ff0019166103001790557f72c874aeff0b183a56e2b79c71b46e1aed4dee5e09862134b8821ba2fddbf8bf60405160405180910390a1565b61076e336106b1565b151561077957600080fd5b6000908152600260205260409020805460ff19166001179055565b61079c610b7b565b1580156107be5750600160038054610100900460ff16908111156107bc57fe5b145b15156107c957600080fd5b6107d2336106b1565b15156107dd57600080fd5b6003805461ff0019166102001790557f1cdde67b72a90f19919ac732a437ac2f7a10fc128d28c2a6e525d89ce5cd9d3a60405160405180910390a1565b610823336106b1565b151561082e57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b505050505081565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b61096f336106b1565b151561097a57600080fd5b600160a060020a0333166000908152600160205260409020805460ff19169055565b60009081526002602052604090205460ff1690565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b60035433600160a060020a03908116620100009092041614610a3d57600080fd5b6004818051610a50929160200190611005565b5050565b60005433600160a060020a03908116911614610a6f57600080fd5b600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b610a9f336106b1565b1515610aaa57600080fd5b6000908152600260205260409020805460ff19169055565b60095481565b600054600160a060020a031681565b60075433600160a060020a03908116911614610af257600080fd5b600654600754600160a060020a0361010090920482169163a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610b5d57600080fd5b6102c65a03f11515610b6e57600080fd5b5050506040518051505050565b60035460ff165b90565b610b8e336106b1565b1515610b9957600080fd5b60035460ff161515610baa57600080fd5b6003805460ff191690557f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd660405160405180910390a1565b60075474010000000000000000000000000000000000000000900460ff1681565b6000600260038054610100900460ff1690811115610c1d57fe5b14905090565b610c2b610b7b565b158015610c4d5750600160038054610100900460ff1690811115610c4b57fe5b145b1515610c5857600080fd5b600954612a2f19014211610c6b57600080fd5b600a54612a30014210610c7d57600080fd5b60065460ff1615610c8d57600080fd5b6006805460ff191660011790819055600160a060020a03610100909104166365775d156040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610cde57600080fd5b6102c65a03f11515610cef57600080fd5b50506006805460ff1916905550565b60035433600160a060020a03908116620100009092041614610d1f57600080fd5b6005818051610d32929160200190611005565b507ff9d8c4f7f692590eaf6d41d6160024ffe0ce509fa752efcf47543eb851869cfb60405160405180910390a150565b60075433600160a060020a03908116911614610d7d57600080fd5b600654600754600160a060020a0361010090920482169163a9059cbb9116826370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610de957600080fd5b6102c65a03f11515610dfa57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e5057600080fd5b6102c65a03f11515610e6157600080fd5b50505060405180515050565b600190565b60005433600160a060020a03908116911614610e8d57600080fd5b600160a060020a0381161515610ea257600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610f16336106b1565b1515610f2157600080fd5b60035460ff1615610f3157600080fd5b6003805460ff191660011790557f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b60405160405180910390a1565b610f74610b7b565b158015610f965750600060038054610100900460ff1690811115610f9457fe5b145b1515610fa157600080fd5b610faa336106b1565b1515610fb557600080fd5b610fbd610e6d565b1515610fc857600080fd5b6003805461ff0019166101001790557fed1cd0670ee0c0017f550451a038818c696d0b6a9d6ce5b369e44275573cf9b060405160405180910390a1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061104657805160ff1916838001178555611073565b82800160010185558215611073579182015b82811115611073578251825591602001919060010190611058565b5061107f929150611083565b5090565b610b8291905b8082111561107f57600081556001016110895600a165627a7a723058205d311abbe96b18ca9604be473cb85c1586d407d7bd49f17840a57eaa7d43eeff0029", "deployedBytecode": "0x60606040526004361061017c5763ffffffff60e060020a6000350416630f15f4c08114610181578063160d66ae146101965780631785f53c146101c557806322434836146101e457806324d7806c146101fd578063265050b6146102305780633197cbb61461026757806335a063b41461028c57806341af099d1461029f57806343d726d6146102b557806347beabd6146102c85780634885c72a146102e757806349da5a0f146103715780635e898dac1461038457806362f4ed901461039757806363ffab31146103ad5780636f6fc077146103c0578063704802751461041157806372e789b31461043057806378e97925146104465780638da5cb5b14610459578063961edb251461046c578063a4e2d63414610482578063a69df4b514610495578063bf41bf36146104a8578063c2b6b58c146104bb578063de61a732146104ce578063e0d4f017146104e1578063ee51d4e114610532578063f098fe4714610545578063f2fde38b14610558578063f83d08ba14610577575b600080fd5b341561018c57600080fd5b61019461058a565b005b34156101a157600080fd5b6101a9610601565b604051600160a060020a03909116815260200160405180910390f35b34156101d057600080fd5b610194600160a060020a0360043516610615565b34156101ef57600080fd5b610194600435602435610651565b341561020857600080fd5b61021c600160a060020a03600435166106b1565b604051901515815260200160405180910390f35b341561023b57600080fd5b610243610700565b6040518082600381111561025357fe5b60ff16815260200191505060405180910390f35b341561027257600080fd5b61027a61070e565b60405190815260200160405180910390f35b341561029757600080fd5b610194610714565b34156102aa57600080fd5b610194600435610765565b34156102c057600080fd5b610194610794565b34156102d357600080fd5b610194600160a060020a036004351661081a565b34156102f257600080fd5b6102fa61085d565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561033657808201518382015260200161031e565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037c57600080fd5b6102fa6108fb565b341561038f57600080fd5b610194610966565b34156103a257600080fd5b61021c60043561099c565b34156103b857600080fd5b6102fa6109b1565b34156103cb57600080fd5b61019460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610a1c95505050505050565b341561041c57600080fd5b610194600160a060020a0360043516610a54565b341561043b57600080fd5b610194600435610a96565b341561045157600080fd5b61027a610ac2565b341561046457600080fd5b6101a9610ac8565b341561047757600080fd5b610194600435610ad7565b341561048d57600080fd5b61021c610b7b565b34156104a057600080fd5b610194610b85565b34156104b357600080fd5b61021c610be2565b34156104c657600080fd5b61021c610c03565b34156104d957600080fd5b610194610c23565b34156104ec57600080fd5b61019460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610cfe95505050505050565b341561053d57600080fd5b610194610d62565b341561055057600080fd5b61021c610e6d565b341561056357600080fd5b610194600160a060020a0360043516610e72565b341561058257600080fd5b610194610f0d565b610592610b7b565b1580156105b45750600060038054610100900460ff16908111156105b257fe5b145b15156105bf57600080fd5b6105c8336106b1565b15156105d357600080fd5b6009541580156105e35750600a54155b156105f7574260098190556224ea0001600a555b6105ff610f6c565b565b6006546101009004600160a060020a031681565b60005433600160a060020a0390811691161461063057600080fd5b600160a060020a03166000908152600160205260409020805460ff19169055565b610659610b7b565b15801561067b5750600060038054610100900460ff169081111561067957fe5b145b151561068657600080fd5b61068f336106b1565b151561069a57600080fd5b8181116106a657600080fd5b600991909155600a55565b6000600160a060020a038216158015906106fa5750600054600160a060020a03838116911614806106fa5750600160a060020a03821660009081526001602052604090205460ff165b92915050565b600354610100900460ff1681565b600a5481565b61071d336106b1565b151561072857600080fd5b6003805461ff0019166103001790557f72c874aeff0b183a56e2b79c71b46e1aed4dee5e09862134b8821ba2fddbf8bf60405160405180910390a1565b61076e336106b1565b151561077957600080fd5b6000908152600260205260409020805460ff19166001179055565b61079c610b7b565b1580156107be5750600160038054610100900460ff16908111156107bc57fe5b145b15156107c957600080fd5b6107d2336106b1565b15156107dd57600080fd5b6003805461ff0019166102001790557f1cdde67b72a90f19919ac732a437ac2f7a10fc128d28c2a6e525d89ce5cd9d3a60405160405180910390a1565b610823336106b1565b151561082e57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b505050505081565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b61096f336106b1565b151561097a57600080fd5b600160a060020a0333166000908152600160205260409020805460ff19169055565b60009081526002602052604090205460ff1690565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f35780601f106108c8576101008083540402835291602001916108f3565b60035433600160a060020a03908116620100009092041614610a3d57600080fd5b6004818051610a50929160200190611005565b5050565b60005433600160a060020a03908116911614610a6f57600080fd5b600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b610a9f336106b1565b1515610aaa57600080fd5b6000908152600260205260409020805460ff19169055565b60095481565b600054600160a060020a031681565b60075433600160a060020a03908116911614610af257600080fd5b600654600754600160a060020a0361010090920482169163a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610b5d57600080fd5b6102c65a03f11515610b6e57600080fd5b5050506040518051505050565b60035460ff165b90565b610b8e336106b1565b1515610b9957600080fd5b60035460ff161515610baa57600080fd5b6003805460ff191690557f19aad37188a1d3921e29eb3c66acf43d81975e107cb650d58cca878627955fd660405160405180910390a1565b60075474010000000000000000000000000000000000000000900460ff1681565b6000600260038054610100900460ff1690811115610c1d57fe5b14905090565b610c2b610b7b565b158015610c4d5750600160038054610100900460ff1690811115610c4b57fe5b145b1515610c5857600080fd5b600954612a2f19014211610c6b57600080fd5b600a54612a30014210610c7d57600080fd5b60065460ff1615610c8d57600080fd5b6006805460ff191660011790819055600160a060020a03610100909104166365775d156040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610cde57600080fd5b6102c65a03f11515610cef57600080fd5b50506006805460ff1916905550565b60035433600160a060020a03908116620100009092041614610d1f57600080fd5b6005818051610d32929160200190611005565b507ff9d8c4f7f692590eaf6d41d6160024ffe0ce509fa752efcf47543eb851869cfb60405160405180910390a150565b60075433600160a060020a03908116911614610d7d57600080fd5b600654600754600160a060020a0361010090920482169163a9059cbb9116826370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610de957600080fd5b6102c65a03f11515610dfa57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e5057600080fd5b6102c65a03f11515610e6157600080fd5b50505060405180515050565b600190565b60005433600160a060020a03908116911614610e8d57600080fd5b600160a060020a0381161515610ea257600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610f16336106b1565b1515610f2157600080fd5b60035460ff1615610f3157600080fd5b6003805460ff191660011790557f0f2e5b6c72c6a4491efd919a9f9a409f324ef0708c11ee57d410c2cb06c0992b60405160405180910390a1565b610f74610b7b565b158015610f965750600060038054610100900460ff1690811115610f9457fe5b145b1515610fa157600080fd5b610faa336106b1565b1515610fb557600080fd5b610fbd610e6d565b1515610fc857600080fd5b6003805461ff0019166101001790557fed1cd0670ee0c0017f550451a038818c696d0b6a9d6ce5b369e44275573cf9b060405160405180910390a1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061104657805160ff1916838001178555611073565b82800160010185558215611073579182015b82811115611073578251825591602001919060010190611058565b5061107f929150611083565b5090565b610b8291905b8082111561107f57600081556001016110895600a165627a7a723058205d311abbe96b18ca9604be473cb85c1586d407d7bd49f17840a57eaa7d43eeff0029", "sourceMap": "1252:1667:3:-;;;1183:22:16;;;-1:-1:-1;;1326:59:15;;;319:35:19;;;-1:-1:-1;;319:35:19;;;1502:356:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;494:5:21;:18;;-1:-1:-1;;;;;502:10:21;494:18;;-1:-1:-1;;;;;;494:18:21;;;;;;;;;;1385:8:11;:23;;;;;;;-1:-1:-1;;;;;;1385:23:11;;;;;;;;;1502:356:3;-1:-1:-1;1709:27:3;;-1:-1:-1;1723:12:3;1709:13;;;;;;:27;:::i;:::-;-1:-1:-1;1746:9:3;:38;;-1:-1:-1;;;;;;1746:38:3;;-1:-1:-1;;;;;1746:38:3;;;;;;;1794:9;:16;;-1:-1:-1;;;;;;1794:16:3;;;;;;;;;-1:-1:-1;;;;;;1820:31:3;;;;;;;;;;;;-1:-1:-1;1252:1667:3;;1240:92:1;1168:19:0;1176:10;1168:7;;;;;;:19;:::i;:::-;1160:28;;;;;;;;1301:17:1;;;;:10;:17;;;;;:24;;-1:-1:-1;;1301:24:1;1321:4;1301:24;;;1240:92::o;1212:145:0:-;1268:4;-1:-1:-1;;;;;1291:18:0;;;;;;:59;;-1:-1:-1;1322:5:0;;-1:-1:-1;;;;;1314:13:0;;;1322:5;;1314:13;;:35;;-1:-1:-1;;;;;;1331:18:0;;;;;;:12;:18;;;;;;;;1314:35;1284:66;1212:145;-1:-1:-1;;1212:145:0:o;1252:1667:3:-;;;;;;;", "deployedSourceMap": "1252:1667:3:-;;;;;;;;;-1:-1:-1;;;1252:1667:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1998:199;;;;;;;;;;;;;;1333:21;;;;;;;;;;;;;;;-1:-1:-1;;;;;1333:21:3;;;;;;;;;;;;;;1460:95:0;;;;;;;;;;-1:-1:-1;;;;;1460:95:0;;;;;2203:221:3;;;;;;;;;;;;;;;;1212:145:0;;;;;;;;;;-1:-1:-1;;;;;1212:145:0;;;;;;;;;;;;;;;;;;;;;;1326:59:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1476:19:3;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:103:15;;;;;;;;;;;;1240:92:1;;;;;;;;;;;;;;2160:108:15;;;;;;;;;;;;2430:82:3;;;;;;;;;;-1:-1:-1;;;;;2430:82:3;;;;;1417:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1296:24:11;;;;;;;;;;;;1561:84:0;;;;;;;;;;;;1125:109:1;;;;;;;;;;;;;;1267:23:11;;;;;;;;;;;;1595:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1595:86:11;;-1:-1:-1;1595:86:11;;-1:-1:-1;;;;;;1595:86:11;1363:91:0;;;;;;;;;;-1:-1:-1;;;;;1363:91:0;;;;;1338:96:1;;;;;;;;;;;;;;1449:21:3;;;;;;;;;;;;238:20:21;;;;;;;;;;;;2674:140:3;;;;;;;;;;;;;;1355:84:16;;;;;;;;;;;;1540:92;;;;;;;;;;;;1383:28:3;;;;;;;;;;;;1720:112:15;;;;;;;;;;;;2820:97:3;;;;;;;;;;;;1773:111:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1773:111:11;;-1:-1:-1;1773:111:11;;-1:-1:-1;;;;;;1773:111:11;2518:150:3;;;;;;;;;;;;1838:162:15;;;;;;;;;;;;827:169:21;;;;;;;;;;-1:-1:-1;;;;;827:169:21;;;;;1445:89:16;;;;;;;;;;;;1998:199:3;1529:10:15;:8;:10::i;:::-;1528:11;:54;;;;-1:-1:-1;1560:22:15;1543:13;;;;;;;;;:39;;;;;;;;1528:54;1520:63;;;;;;;;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2054:9:3;;:14;:30;;;;-1:-1:-1;2072:7:3;;:12;2054:30;2050:115;;;2112:3;2100:9;:15;;;2146:7;2139:15;2129:7;:25;2050:115;2174:16;:14;:16::i;:::-;1998:199::o;1333:21::-;;;;;;-1:-1:-1;;;;;1333:21:3;;:::o;1460:95:0:-;647:5:21;;633:10;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;-1:-1:-1;;;;;1522:18:0;1543:5;1522:18;;;:12;:18;;;;;:26;;-1:-1:-1;;1522:26:0;;;1460:95::o;2203:221:3:-;1529:10:15;:8;:10::i;:::-;1528:11;:54;;;;-1:-1:-1;1560:22:15;1543:13;;;;;;;;;:39;;;;;;;;1528:54;1520:63;;;;;;;;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2307:35:3;;;2299:44;;;;;;2353:9;:29;;;;2392:7;:25;2203:221::o;1212:145:0:-;1268:4;-1:-1:-1;;;;;1291:18:0;;;;;;:59;;-1:-1:-1;1322:5:0;;-1:-1:-1;;;;;1314:13:0;;;1322:5;;1314:13;;:35;;-1:-1:-1;;;;;;1331:18:0;;;;;;:12;:18;;;;;;;;1314:35;1284:66;1212:145;-1:-1:-1;;1212:145:0:o;1326:59:15:-;;;;;;;;;:::o;1476:19:3:-;;;;:::o;2274:103:15:-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2330:21:15;2314:37;;-1:-1:-1;;2314:37:15;;;;;2361:9;;;;;;;;;;2274:103::o;1240:92:1:-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;1301:17:1;;;;:10;:17;;;;;:24;;-1:-1:-1;;1301:24:1;1321:4;1301:24;;;1240:92::o;2160:108:15:-;1644:10;:8;:10::i;:::-;1643:11;:52;;;;-1:-1:-1;1675:20:15;1658:13;;;;;;;;;:37;;;;;;;;1643:52;1635:61;;;;;;;;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2207:13:15;:36;;-1:-1:-1;;2207:36:15;;;;;2253:8;;;;;;;;;;2160:108::o;2430:82:3:-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2489:9:3;:16;;-1:-1:-1;;2489:16:3;-1:-1:-1;;;;;2489:16:3;;;;;;;;;;2430:82::o;1417:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1296:24:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1561:84:0;1168:19;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;-1:-1:-1;;;;;1619:10:0;1606:24;1633:5;1606:24;;;:12;:24;;;;;:32;;-1:-1:-1;;1606:32:0;;;1561:84::o;1125:109:1:-;1187:4;1210:17;;;:10;:17;;;;;;;;;1125:109::o;1267:23:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1595:86;1476:8;;1462:10;-1:-1:-1;;;;;1462:22:11;;;1476:8;;;;;1462:22;1454:31;;;;;;1659:9;1671:3;;1659:15;;;;;;;;:::i;:::-;;1595:86;:::o;1363:91:0:-;647:5:21;;633:10;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;-1:-1:-1;;;;;1422:18:0;;;;;1443:4;1422:18;;;;;;;;:25;;-1:-1:-1;;1422:25:0;;;;;;1363:91::o;1338:96:1:-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;1422:5:1;1402:17;;;:10;:17;;;;;:25;;-1:-1:-1;;1402:25:1;;;1338:96::o;1449:21:3:-;;;;:::o;238:20:21:-;;;-1:-1:-1;;;;;238:20:21;;:::o;2674:140:3:-;2751:9;;2737:10;-1:-1:-1;;;;;2737:23:3;;;2751:9;;2737:23;2729:32;;;;;;2771:9;;2790;;-1:-1:-1;;;;;2771:9:3;;;;;;;:18;;2790:9;2801:5;2790:9;2771:36;;;;;;;-1:-1:-1;;;2771:36:3;;;;;;-1:-1:-1;;;;;2771:36:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2674:140:3:o;1355:84:16:-;1423:9;;;;1355:84;;:::o;1540:92::-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;1248:9:16;;;;1240:18;;;;;;;;1588:9;:17;;-1:-1:-1;;1588:17:16;;;1615:10;;;;;;;;;;1540:92::o;1383:28:3:-;;;;;;;;;:::o;1720:112:15:-;1765:4;1805:20;1788:13;;;;;;;;;:37;;;;;;;;1781:44;;1720:112;:::o;2820:97:3:-;1644:10:15;:8;:10::i;:::-;1643:11;:52;;;;-1:-1:-1;1675:20:15;1658:13;;;;;;;;;:37;;;;;;;;1643:52;1635:61;;;;;;;;1909:9:3;;-1:-1:-1;;1909:19:3;1902:3;:27;1894:36;;;;;;1955:7;;1965;1955:17;1948:3;:25;1940:34;;;;;;780:14:19;;;;779:15;771:24;;;;;;801:14;:21;;-1:-1:-1;;801:21:19;818:4;801:21;;;;;-1:-1:-1;;;;;801:21:19;2889:9:3;;;;:19;:21;;;;;-1:-1:-1;;;2889:21:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;835:14:19;:22;;-1:-1:-1;;835:22:19;;;-1:-1:-1;2820:97:3:o;1773:111:11:-;1476:8;;1462:10;-1:-1:-1;;;;;1462:22:11;;;1476:8;;;;;1462:22;1454:31;;;;;;1838:10;1851:3;;1838:16;;;;;;;;:::i;:::-;;1864:13;;;;;;;;;;1773:111;:::o;2518:150:3:-;2585:9;;2571:10;-1:-1:-1;;;;;2571:23:3;;;2585:9;;2571:23;2563:32;;;;;;2605:9;;2624;;-1:-1:-1;;;;;2605:9:3;;;;;;;:18;;2624:9;2605;2635:19;2655:4;2624:9;2635:25;;;;;;;-1:-1:-1;;;2635:25:3;;;;;;-1:-1:-1;;;;;2635:25:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2605:56;;;;;;;;-1:-1:-1;;;2605:56:3;;;;;;-1:-1:-1;;;;;2605:56:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2518:150:3:o;1838:162:15:-;1989:4;1838:162;:::o;827:169:21:-;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;1445:89:16:-;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;1321:9:16;;;;1320:10;1312:19;;;;;;1493:9;:16;;-1:-1:-1;;1493:16:16;1505:4;1493:16;;;1519:8;;;;;;;;;;1445:89::o;2006:148:15:-;1529:10;:8;:10::i;:::-;1528:11;:54;;;;-1:-1:-1;1560:22:15;1543:13;;;;;;;;;:39;;;;;;;;1528:54;1520:63;;;;;;;;1168:19:0;1176:10;1168:7;:19::i;:::-;1160:28;;;;;;;;2066:13:15;:11;:13::i;:::-;2058:22;;;;;;;;2090:13;:36;;-1:-1:-1;;2090:36:15;;;;;2136:11;;;;;;;;;;2006:148::o;1252:1667:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1252:1667:3;;;-1:-1:-1;1252:1667:3;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", "source": "// ------------------------------------------------------------------------------\n// This file is part of netvote.\n//\n// netvote is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// netvote is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with solidity. If not, see <http://www.gnu.org/licenses/>\n//\n// (c) 2017 netvote contributors.\n//------------------------------------------------------------------------------\n\npragma solidity ^0.4.17;\n\nimport \"../token/Vote.sol\";\nimport \"../auth/ExternalAuthorizable.sol\";\nimport \"./links/BallotRegistry.sol\";\nimport \"./links/PoolRegistry.sol\";\nimport \"../encryption/KeyHolder.sol\";\nimport \"zeppelin-solidity/contracts/ReentrancyGuard.sol\";\n\n\n/**\n * @title BaseElection\n * @dev A base contract that transacts vote allowance and allows a key to be released\n */\ncontract BaseElection is ExternalAuthorizable, KeyHolder, ReentrancyGuard {\n\n Vote public voteToken;\n address voteOwner;\n bool public allowVoteUpdates;\n string public electionType;\n uint public startTime;\n uint public endTime;\n\n function BaseElection(\n bytes32 hashedUserId,\n address tokenContractAddress,\n address acct,\n bool allowUpdates,\n address revealer) KeyHolder(revealer) public\n {\n addAuthorized(hashedUserId);\n voteToken = Vote(tokenContractAddress);\n voteOwner = acct;\n allowVoteUpdates = allowUpdates;\n }\n\n modifier validTime(){\n require(now > (startTime - 3 hours));\n require(now < (endTime + 3 hours));\n _;\n }\n\n function activate() public building admin {\n if (startTime == 0 && endTime == 0) {\n startTime = now;\n endTime = now + (4 weeks);\n }\n super.activate();\n }\n\n function setTimes(uint electionStartTime, uint electionEndTime) public building admin {\n require(electionEndTime > electionStartTime);\n startTime = electionStartTime;\n endTime = electionEndTime;\n }\n\n function setVoteOwner(address acct) public admin {\n voteOwner = acct;\n }\n\n function withdrawAllVotes() public {\n require(msg.sender == voteOwner);\n voteToken.transfer(voteOwner, voteToken.balanceOf(this));\n }\n\n function withdrawVotes(uint256 value) public {\n require(msg.sender == voteOwner);\n voteToken.transfer(voteOwner, value);\n }\n\n function deductVote() public voting validTime nonReentrant {\n voteToken.spendVote();\n }\n}", "sourcePath": "/Users/slanders/netvote/elections-solidity/contracts/elections/BaseElection.sol", "ast": { "attributes": { "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/elections/BaseElection.sol", "exportedSymbols": { "BaseElection": [ 371 ] } }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.4", ".17" ] }, "id": 162, "name": "PragmaDirective", "src": "868:24:3" }, { "attributes": { "SourceUnit": 2530, "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/token/Vote.sol", "file": "../token/Vote.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 163, "name": "ImportDirective", "src": "894:27:3" }, { "attributes": { "SourceUnit": 135, "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/auth/ExternalAuthorizable.sol", "file": "../auth/ExternalAuthorizable.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 164, "name": "ImportDirective", "src": "922:42:3" }, { "attributes": { "SourceUnit": 708, "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/elections/links/BallotRegistry.sol", "file": "./links/BallotRegistry.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 165, "name": "ImportDirective", "src": "965:36:3" }, { "attributes": { "SourceUnit": 801, "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/elections/links/PoolRegistry.sol", "file": "./links/PoolRegistry.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 166, "name": "ImportDirective", "src": "1002:34:3" }, { "attributes": { "SourceUnit": 1543, "absolutePath": "/Users/slanders/netvote/elections-solidity/contracts/encryption/KeyHolder.sol", "file": "../encryption/KeyHolder.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 167, "name": "ImportDirective", "src": "1037:37:3" }, { "attributes": { "SourceUnit": 2553, "absolutePath": "zeppelin-solidity/contracts/ReentrancyGuard.sol", "file": "zeppelin-solidity/contracts/ReentrancyGuard.sol", "scope": 372, "symbolAliases": [ null ], "unitAlias": "" }, "id": 168, "name": "ImportDirective", "src": "1075:57:3" }, { "attributes": { "contractDependencies": [ 84, 134, 1542, 2129, 2197, 2552, 2703 ], "contractKind": "contract", "documentation": "@title BaseElection\n@dev A base contract that transacts vote allowance and allows a key to be released", "fullyImplemented": true, "linearizedBaseContracts": [ 371, 2552, 1542, 2129, 2197, 134, 84, 2703 ], "name": "BaseElection", "scope": 372 }, "children": [ { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "ExternalAuthorizable", "referencedDeclaration": 134, "type": "contract ExternalAuthorizable" }, "id": 169, "name": "UserDefinedTypeName", "src": "1277:20:3" } ], "id": 170, "name": "InheritanceSpecifier", "src": "1277:20:3" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "KeyHolder", "referencedDeclaration": 1542, "type": "contract KeyHolder" }, "id": 171, "name": "UserDefinedTypeName", "src": "1299:9:3" } ], "id": 172, "name": "InheritanceSpecifier", "src": "1299:9:3" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "ReentrancyGuard", "referencedDeclaration": 2552, "type": "contract ReentrancyGuard" }, "id": 173, "name": "UserDefinedTypeName", "src": "1310:15:3" } ], "id": 174, "name": "InheritanceSpecifier", "src": "1310:15:3" }, { "attributes": { "constant": false, "name": "voteToken", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "contract Vote", "value": null, "visibility": "public" }, "children": [ { "attributes": { "contractScope": null, "name": "Vote", "referencedDeclaration": 2529, "type": "contract Vote" }, "id": 175, "name": "UserDefinedTypeName", "src": "1333:4:3" } ], "id": 176, "name": "VariableDeclaration", "src": "1333:21:3" }, { "attributes": { "constant": false, "name": "voteOwner", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 177, "name": "ElementaryTypeName", "src": "1360:7:3" } ], "id": 178, "name": "VariableDeclaration", "src": "1360:17:3" }, { "attributes": { "constant": false, "name": "allowVoteUpdates", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "bool", "value": null, "visibility": "public" }, "children": [ { "attributes": { "name": "bool", "type": "bool" }, "id": 179, "name": "ElementaryTypeName", "src": "1383:4:3" } ], "id": 180, "name": "VariableDeclaration", "src": "1383:28:3" }, { "attributes": { "constant": false, "name": "electionType", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "string storage ref", "value": null, "visibility": "public" }, "children": [ { "attributes": { "name": "string", "type": "string storage pointer" }, "id": 181, "name": "ElementaryTypeName", "src": "1417:6:3" } ], "id": 182, "name": "VariableDeclaration", "src": "1417:26:3" }, { "attributes": { "constant": false, "name": "startTime", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "public" }, "children": [ { "attributes": { "name": "uint", "type": "uint256" }, "id": 183, "name": "ElementaryTypeName", "src": "1449:4:3" } ], "id": 184, "name": "VariableDeclaration", "src": "1449:21:3" }, { "attributes": { "constant": false, "name": "endTime", "scope": 371, "stateVariable": true, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "public" }, "children": [ { "attributes": { "name": "uint", "type": "uint256" }, "id": 185, "name": "ElementaryTypeName", "src": "1476:4:3" } ], "id": 186, "name": "VariableDeclaration", "src": "1476:19:3" }, { "attributes": { "constant": false, "implemented": true, "isConstructor": true, "name": "BaseElection", "payable": false, "scope": 371, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, "children": [ { "children": [ { "attributes": { "constant": false, "name": "hashedUserId", "scope": 221, "stateVariable": false, "storageLocation": "default", "type": "bytes32", "value": null, "visibility": "internal"