EthElection is a free and open-source starter template that helps you get started on Blockchain development. It contains an Election contract that keeps the votes for the candidates.
- Node.js
- Truffle
- Ganache - for local development
- Metamask
- jQuery
- Bootstrap
- Surge - for live deployment
- Node version -
14.15.4
- Truffle version -
4.1.17
- Solidity version -
0.4.26
- Node - Download here
- Truffle -
npm install -g truffle@4.1.17
- Ganache - Download here
- Surge -
npm install --global surge
- Read here for set up
-
Clone the repository
git clone https://gitlab.com/atceng/ilab/trublo/blockchain-tools.git
-
Install NPM packages
npm install
-
Edit environment variables
-
Create
.env
filecp .env.example .env
-
-
Deploy contract
You have two options for the deployment.
-
Local server
In order to deploy your contract locally, you first need to set up the Ganache environment.
-
Install Ganache and open it
-
Set up Metamask
Copy your phrase and paste it in the
.env
file that you've created in step 3. Edit theAPP_MNEMONIC
variable. This document will help you with the process.
Deployment
# compile and delpoy contract npm run migrate:local # deploy ui application npm run dev
-
-
Live servers
In order to deploy your contract in a test server you will need to generate a project id using the infura.io.
- Register and create a new project.
- Copy the project id and paste it in the
.env
file. Edit theAPP_PROJECT_ID
variable.
Deployment
# compile and delpoy contract npm run migrate:mainnet # or npm run migrate:ropsten # or npm run migrate:kovan # or npm run migrate:rinkeby # or npm run migrate:goerli # deploy ui application npm run deploy:surge # or
-
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request