DAO – Part IV

Julien Klepatch

In this video, we are going to allow investors of the DAO to:

  • create investment proposals
  • vote on each investment proposal

We will manipulate Solidity mappings a lot, including nested mappings. We will also use a storage pointer, to be able to manipulate a struct instance more easily.

Any investors can create an investment proposal with a name, an amount, and a recipient address. The recipient address is another smart contract that will receive the smart contract. It could be the smart contract of an ICO for example. We also need to not commit to an investment proposal if we don’t have enough ether in the smart contract. If might look as simple as comparing the investment proposal to the amount of ether stored in the smart contract, but there is a caveat.

Once a proposal is created, all investors can vote. We will need to make sure that nobody vote can vote twice, and that a vote can only occur within a specified period of time.

0 Comments

Leave a Reply

More great articles

Debugging with events

Do you like often use console.log() statement to debug your Javascript code? Convenient, uh? How about Solidity smart contracts, can…

Read Story

Introduction to Drizzle: Dapp Tutorial with React & Truffle

In this episode I am going to introduce you Drizzle, a frontend framework for Ethereum Dapps. We will also build…

Read Story

ToDo List Ethereum Dapp (Step9) | Toggle Task Done & Keep Frontend Updated

This tutorial is part of the series ToDo List Ethereum Dapp. This is the Step 9. Tutorials already published: (more…)

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.
[contact-form-7 id="6" title="Footer CTA Subscribe Form"]
Arrow-up