ThPadelis / eth-election

Home Page:https://thpadelis.github.io/eth-election/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EthElection

Description

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.

Demo

Built With

Getting Started

Environment

  • Node version - 14.15.4
  • Truffle version - 4.1.17
  • Solidity version - 0.4.26

Prerequisites

  • Node - Download here
  • Truffle - npm install -g truffle@4.1.17
  • Ganache - Download here
  • Surge - npm install --global surge - Read here for set up

Installation

  1. Clone the repository

    git clone https://gitlab.com/atceng/ilab/trublo/blockchain-tools.git
  2. Install NPM packages

    npm install
  3. Edit environment variables

    • Create .env file

      cp .env.example .env
  4. 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 the APP_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 the APP_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

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

https://thpadelis.github.io/eth-election/

License:MIT License


Languages

Language:JavaScript 97.1%Language:HTML 1.4%Language:CSS 0.7%Language:Solidity 0.6%Language:Shell 0.2%