Starter dApp for an account based voting mechanism. The template can be a start for developers who want to try out an ink! smart contract in combination with a simple user interface.
Screencast.2022-05-19.08.36.15.mp4
-
Follow the Substrate getting started tutorial to prepare your envrionment for Substrate development
-
Follow the steps provided in the Substrate contracts node template repository to setup a local Substrate node
- Run the following commands
git clone https://github.com/marlowl/ink-voter-contract
cd ink-voter-contract
cargo +nightly contract build
- It builds a
./target/ink
folder. This folder contains thevoter_sample.contract
file - Go to Parity's contracts ui
- Make sure your local Substrate node is running
- Upload the
voter_sample.contract
file - Visit the PolkadotJs explorer
- Target your local node as network
- Look for the
contract.Instantiated
event - Copy the contract address and paste it here
- Run
yarn install
&&yarn start
to play with the Voter contract UI! ๐