The carbon vote: how do smart contracts work together with out-of-chain events?
Crypto Finance: Knowledge Session - En podcast af Crypto Finance AG
Kategorier:
One of the ongoing topics is the use of smart contracts for real life applications. How does a smart contract work together with out-of-chain events? What is relevant to handle on the blockchain, what adds and does not add to the quality of the project by handling it there? In this episode, our Head of Research, Dr Lewin Boehnke, guides the discussion through the complete code of a contract that is both extremely minimalistic and highly consequential in its use of the blockchain. Here is a bit of background on the carbon vote that determined the future path of Ethereum after The DAO hack: The smart contract is comprised of merely 15 lines of code, 6 of them empty or comments. Essentially only one line is relevant. See the code here: http://v1.carbonvote.com/ We discuss how this was sufficient as a full voting contract. During the original session, we had the contract code in front of us. For reference, here is the full contract code: ---- /** *Submitted for verification at Etherscan.io on 2016-07-06 */ contract Vote { event LogVote(address indexed addr); function() { LogVote(msg.sender); if (msg.value > 0) { msg.sender.send(msg.value); } } } ---- Source: https://etherscan.io/address/0x58dd96aa829353032a21c95733ce484b949b2849#code