Inspiration

I was looking for examples of simple full stack applications that are making use of the Polkadot/Substrate ecosystem. In my opinion, there are too few of these examples available from the known Substrate developer resources. Luckily, I did find out that this is an open track in the Chainlink Spring 2022 hackathon. This gave me the perfect reason to try and build one of these examples with the Polkadot/Substrate ecosystem myself.

In the end, I did come up with a starter voting dApp. Hopefully, this starter template can be a inspiration for other developers that wan't to try out a full stack application in the Polkadot/Substrate ecosystem.

What it does

It includes the following functionality:

  • read accounts from polkadot-js
  • account based vote increment function
  • account based vote decrement function
  • counter with the total amount of votes present in the smart contract

How I built it

I mainly used the Substrate resources described here, in combination with some frontend tooling I already was familiar with.

Challenges I ran into

Rust is a programming language I'm not familiar with. It did cost me quite a lot of trial and error to get used to the way Rust and ink! expect things.

Accomplishments that I'm proud of

That through trial and error, I was able to deliver on the idea I had in mind for this hackathon submission.

What I learned

Basics of Rust, ink! and Polkadot-js

What's next for Voter contract UI

Hope this template can maybe be used as an dApp example in one of the Parity repository's. (Feel free to contact me if you think the template has the potential to serve as an 'official' example) I also think the template can for example be expanded to build more advanced features like:

  • Governance proposals
  • Delegating voting rights to other accounts
  • RBAC mechanisms

Built With

Share this project:

Updates