Verified contractPartial
Poll
Address0x03fca6077d38dd99d0ce14ba32078bd2cda72d74
- Balance
0 ETH
- Transactions
201
- Compiler
solc 0.1.7
- Same code
43 more contracts
Details
- Compiler
- solc 0.1.7+commit.b4e666cc
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 454,825
- Creation transaction
- 0x1f4bc4e545…c35995b70a
- Main copy (most transactions)
- 0x26a57ced…bda4184b
Poll.sol
// Submitted by EthereumHistory (ethereumhistory.com)
contract Poll {
struct PollData {
address owner;
string question;
uint maxVotes;
string options;
uint created;
bool open;
uint votes;
}
PollData public p;
event NewVote(string vote);
function vote(string text) returns (uint) {
if (msg.sender != p.owner || p.open != true) return 0;
p.votes += 1;
NewVote(text);
if (p.maxVotes > 0) {
if (p.votes >= p.maxVotes) endPoll();
}
return 1;
}
function endPoll() returns (uint) {
if (msg.sender != p.owner) return 0;
p.open = false;
return 1;
}
}
Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.