项目作者: chaitanyapotti

项目描述 :
Vault Smart Contracts
高级语言: JavaScript
项目地址: git://github.com/chaitanyapotti/Vault-Sc.git
创建时间: 2018-09-20T16:43:39Z
项目社区:https://github.com/chaitanyapotti/Vault-Sc

开源协议:MIT License

下载


Vault - Smart Contracts

npm version

Gitter chat

CircleCI

Greenkeeper badge

codecov

Install

  1. git clone https://github.com/chaitanyapotti/Vault-Sc.git
  2. cd Vault-Sc
  3. npm install

Contracts

The protocol level contracts use OpenZeppelin extensively for referencing standard EIPs.
Vault utilizes OpenZeppelin’s implementations for EIP-165 and EIP-173.
Please refer to OpenZeppelin’s github page here

truffle

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

  1. npm install -g truffle
  2. mkdir myproject && cd myproject
  3. truffle init

Linting

To lint solidity, use

  1. 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:

  1. solhint "contracts/**/*.sol"

To lint a single file:

  1. solhint contracts/MyToken.sol

To disable linting for next line, use

// solhint-disable-next-line

To use eslint,

  1. node .\node_modules\eslint\bin\eslint.js . --fix

Testing

Unit test are critical to the Electus Protocol 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 Electus Protocol’s Testing Guide.

To run all tests:

Start ganache-cli or other testrpc

  1. npm run test
  2. truffle test

Security

Vault-Sc 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 Vault 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