Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nya1/solidity-boilerplate
A modern boilerplate project to quickly kickstart your Solidity project with best practices.
https://github.com/nya1/solidity-boilerplate
boilerplate ethereum smart-contracts solidity truffle
Last synced: 10 days ago
JSON representation
A modern boilerplate project to quickly kickstart your Solidity project with best practices.
- Host: GitHub
- URL: https://github.com/nya1/solidity-boilerplate
- Owner: nya1
- License: mit
- Created: 2019-06-15T15:14:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T13:48:00.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T00:27:05.193Z (26 days ago)
- Topics: boilerplate, ethereum, smart-contracts, solidity, truffle
- Language: JavaScript
- Homepage:
- Size: 118 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# solidity boilerplate
[![JavaScript Style Guide](https://img.shields.io/badge/js%20code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)
[![Solidity Style Guide](https://img.shields.io/badge/solidity%20code%20style-ethlint-brightgreen.svg)](https://github.com/duaraghav8/Ethlint)
[![Build Status](https://travis-ci.org/nya1/solidity-boilerplate.svg?branch=master)](https://travis-ci.org/nya1/solidity-boilerplate)A modern boilerplate project to quickly kickstart your solidity project with best practices.
Included
* Truffle 5 with optimization enabled
* Ethlint (Solium) linter with rules
* Standard and prettier to lint JS code
* Example contract with tests
* Complete continuous integration setup for Travis / GitLab CIThis is not an obstructive or complex boilerplate, you can remove/add any modules with minimal effort.
TODO:
* Add solidity documentation generator
* Add solidity coverage
* Create truffle box## Get started
Clone repo and create your project
`git clone https://github.com/nya1/solidity-boilerplate my-project`
## Install
`npm install`
## Truffle
This project includes a fixed truffle version in package.json, this means a deterministic development between developers using the same codebase.
Commands:
`npm run compile` (alias of `truffle compile`)
`npm run build` (alias of `truffle build`)
To run custom truffle commands with the local installed version use `npm run truffle` with `--` delimiter, example:
`npm run truffle -- debug 0x8e5dadfb921ddddfa8f53af1f9bd8beeac6838d52d7e0c2fe5085b42a4f3ca76`
Will be automatically translated to (local truffle):
`truffle debug 0x8e5dadfb921ddddfa8f53af1f9bd8beeac6838d52d7e0c2fe5085b42a4f3ca76`
## Test
`npm run test`
### Continuous integration
CI will:
* Start `gananche-cli` node
* Install package
* Run linting (`npm run lint`)
* Run tests (`npm run test`)## Lint
Lint both JS and Solidity files:
`npm run lint`
Javascript files only:
`npm run lint:js`
Solidity files only:
`npm run lint:sol`
## License
MIT