A single-function voting contract where users cast votes by sending ETH with a string candidate name, from the same developer who built MovieVoting.
Key Facts
Description
A voting contract deployed at block 50,797 (August 2015). Users vote by calling vote(string) with ETH attached. Votes are tracked by sha3 hash of the candidate name, with new candidates added to a dynamic array. Same deployer (0x2905726ed1) as the MovieVoting contracts at ranks 22 and 23.
Source Verified
near_exact_match: vote(string) selector confirmed. Source structure reconstructed from bytecode disassembly showing payable check, sha3 hashing, dynamic array push, and ETH accumulation. Same developer as MovieVoting (ranks 22/23).
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
This contract has verified source code.
Show source code (Solidity)
contract StringVoting {
mapping(bytes32 => uint) bids;
string[] candidates;
function vote(string candidate) {
if (msg.value == 0) return;
bytes32 h = sha3(candidate);
if (bids[h] == 0) {
candidates.push(candidate);
}
bids[h] += msg.value;
}
}