Socket
Socket
Sign inDemoInstall

electusvoting

Package Overview
Dependencies
107
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    electusvoting

Standard implementation and interface for Voting


Version published
Maintainers
1
Install size
29.0 MB
Created

Readme

Source

Voting

npm version

Gitter chat

CircleCI

Greenkeeper badge

codecov

Install

git clone https://github.com/chaitanyapotti/Voting.git
cd Voting
npm install

Contracts

The protocol level contracts use OpenZeppelin extensively for referencing standard EIPs. Electus Voting utilizes OpenZeppelin's implementations for EIP-165. Please refer to OpenZeppelin's github page here

truffle

To use with Truffle, first install it and initialize your project with truffle init.

npm install -g truffle
mkdir myproject && cd myproject
truffle init

Installing Voting Framework

After installing either Framework, to install the Voting library, run the following in your Solidity project root directory:

npm init -y
npm install --save electusvoting

After that, you'll get all the library's contracts in the node_modules/electusvoting/contracts folder. You can use the contracts in the library like so:

import 'electusvoting/contracts/poll/IPoll.sol';

contract MyContract is IPoll {
  ...
}

#Linting To lint solidity, use

node ./node_modules/solhint ./contracts/poll/BasePoll.sol

For linting Solidity files you need to run Solhint with one or more Globs as arguments. For example, to lint all files inside contracts directory, you can do:

solhint "contracts/**/*.sol"

To lint a single file:

solhint contracts/MyToken.sol

To disable linting for next line, use

// solhint-disable-next-line

Testing

Unit test are critical to the Electus Voting framework. They help ensure code quality and mitigate against security vulnerabilities. The directory structure within the /test directory corresponds to the /contracts directory. OpenZeppelin uses Mocha’s JavaScript testing framework and Chai’s assertion library. To learn more about how to tests are structured, please reference Voting's Testing Guide.

To run all tests:

Start ganache-cli or other testrpc

npm run test
truffle test

Security

Electus Voting is meant to provide secure, tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problem you might experience.

The core development principles and strategies that Electus Voting is based on include: security in depth, simple and modular code, clarity-driven naming conventions, comprehensive unit testing, pre-and-post-condition sanity checks, code consistency, and regular audits.

If you find a security issue, please email chaitanya.potti@gmail.com.

Contributing

For details about how to contribute you can check the contributing page

Keywords

FAQs

Last updated on 01 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc