Chapter 6: Voting with Custom Tokens

In part 5 of this tutorial series on building DApps with Ethereum, we dealt with adding content to the story, looking at how to add the ability for participants to buy tokens from the DAO and to add submissions into the story. It’s now time for the DAO’s final form: voting, blacklisting/unblacklisting, and dividend distribution and withdrawal. We’ll throw in some additional helper functions for good measure.

If you get lost in all this, the full source code is available in the the repo.

Github

If you get lost in all this, the full source code is available in the the repo.

Votes and Proposals

We’ll be issuing Proposals and voting with Votes. We need two new structs:

struct Proposal { string description; ...

Get Build Your First Ethereum DApp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.