The first Plantoid, a blockchain-based artwork that collects donations and lets its supporters vote on proposals to commission new Plantoids.
Key Facts
Description
When donations pass a threshold, the Plantoid opens a SubmissionPhase in which artists submit proposals and donors vote with their contributions. The contract records its Bitcoin address, its artist and the recipients who share in donations.
Source Verified
Exact runtime and creation bytecode match with soljson v0.2.0-nightly.2015.12.4+commit.02e4aa94, optimizer off. Source: github.com/plantoid/plantoid-v1 plantoid.sol, revision with blob 83c9fafa36 (author original, verbatim). Verified on Etherscan.
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
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract SubmissionPhase {
struct Submission {
string btcaddress;
//link to proposal
string linktoproposal;
uint weightedVote;
}
uint endtime;
address plantoid;
bool isvoted = false;
modifier onlyowner { if (msg.sender == plantoid) _ }
modifier submissionlive { if (isvoted == false) _ }
Submission[] public submissions;
event WinnerVoted(string s, string link);
event Submitted(string s);
event SubmissionState(string s);
function SubmissionPhase() {
//endtime is in 30 days of start date
endtime = now + (60 * 60 * 24 * 30);
plantoid = tx.origin;
}
function newSubmission(string _artistbtc, string _linktoproposal) submissionlive {
submissions.push(Submission({btcaddress: _artistbtc, linktoproposal: _linktoproposal, weightedVote: 0}));
Submitted(_linktoproposal);
}
function newVote(uint _weightedVote, uint submissionid) onlyowner {
submissions[submissionid].weightedVote += _weightedVote;
}
function isEnd() submissionlive {
if (now >= endtime) {
isvoted = true;
SubmissionState("Submission and Voting has ended. Votes will be counted now");
}
}
function countVotes() onlyowner {
Submission winner = submissions[0];
//TODO: What if 2 submissions have the same amount of votes?
for (uint i = 1; i < submissions.length; i++) {
if (winner.weightedVote < submissions[i].weightedVote) {
winner = submissions[i];
}
}
WinnerVoted("The Winner of the Vote:", winner.linktoproposal);
}
}
contract Plantoid {
struct Heart {
//Bitcoin address of the plant. Has to be string.
address ethaddress;
string btcaddress;
// ethereum address of the creator of the plant, can also be changed to the twitter handle of the person
address artist;
//Address of the parent
address parent;
// if False, it means that it is a single node with no children
bool isParent;
uint threshold;
uint256 fundsraised;
}
struct Recipient {
bytes32 name;
string btcaddress;
uint amount;
}
Heart public plant;
// List of all recipients that receive a percentage of donations
Recipient[] public recipients;
// we keep track of all nodes (children) this plant has
address[] public nodes;
event SubmissionState(string s, address a);
modifier onlyowner { if (msg.sender == plant.ethaddress) _ }
modifier artist_plant { if ((msg.sender == plant.ethaddress) || (msg.sender == plant.artist)) _ }
function Plantoid(string _btcaddr, address _artist, address _parent, uint _threshold) {
plant.btcaddress = _btcaddr;
plant.ethaddress = msg.sender;
plant.artist = _artist;
plant.parent = _parent;
plant.isParent = false;
plant.threshold = _threshold;
// This plant is one of the recipients and receives 1% of funds
recipients.push(Recipient({name: "Parent Plant", btcaddress: _btcaddr, amount: 1}));
}
function newFunds(uint256 _amount) onlyowner {
plant.fundsraised += _amount;
if (plant.fundsraised >= plant.threshold) {
plant.fundsraised = 0;
address submissionsaddr = address(new SubmissionPhase());
SubmissionState("Submission Phase started", submissionsaddr);
}
}
// The artist him/herself will decide the payout structure for second and subsequent layers
function addRecipients(bytes32 _name, string _btc_address, uint _amount) artist_plant {
recipients.push(Recipient({name: _name, btcaddress: _btc_address, amount: _amount}));
}
// Once a child plant has been successfully created, we will link it to this plant (the parent)
function addChild(address _nodeaddress) onlyowner {
plant.isParent = true;
nodes.push(_nodeaddress);
}
}External Links
Related contracts
SubmissionPhase
Same deployerThe voting round of the first Plantoid: artists submit proposals for a new Plantoid and donors vote on them.
0x247289...189577December 4, 2015Greeter
Same eraA HelloWorld greeter deployed at block 51,909 on 8 August 2015, one of a run of contracts from the same account that week.
0x412fda...7267edAugust 8, 2015Greeter
Same eraA Greeter with the message 'Ethereum will change the world smarter' - deployed Aug 8, 2015 by a developer connected to the Tokyo Smart Contract meetup.
0xda0c1c...7a68ebAugust 8, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015Greeter
Same eraThe go-ethereum Contract Tutorial greeter, deployed with the greeting: Hello World!
0x506f4b...466983August 8, 2015Contract 0xd4eae4...a2c77a
Same eraThe ethereum.org crowdsale tutorial, deployed on the ninth day of the public chain, with the funding goal, deadline and price fixed at construction.
0xd4eae4...a2c77aAugust 8, 2015