Coder Social home page Coder Social logo

jeremiesamson / solidity_docker_bootstrap Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 1.33 MB

A bootstrap repo to help starting developing with solidity with docker, a CI and a Makefile ready to go

License: MIT License

Makefile 10.78% Solidity 4.55% Dockerfile 1.06% JavaScript 67.72% HTML 11.40% CSS 4.49%
docker truffle ganache githubaction ci cd coverage coveralls solidity react

solidity_docker_bootstrap's Introduction

Solidity template with Docker, CI and Makefile ready to go

This template is here to help you developping solidity localy with docker.

This bootstrap works with truffle and you already have a truffle friendly environment.

You will only have to add your contract in the contracts directory and add a migration to deploy your contract on ganache.

Then feel free to add test in the tests directory and play with make commands

Install docker and docker-compose

This template use Docker, a container tool to let people have a development environment quickly. There is only 3 dependencies:

  • Docker
  • docker-compose
  • GNU make

Docker

To install docker, please go to the official docker installation page : https://docs.docker.com/engine/installation/.

When docker is installed, check it with docker -v, you should find something like following:

$ docker -v
Docker version 20.10.7, build 20.10.7

Docker-compose

To install docker-compose, you can also find it under docker official documentation : https://docs.docker.com/compose/install/.

When it's installed, check it with docker-compose -v, you should have something like this

$ docker-compose -v
docker-compose version 1.25.0

Clone the project

git clone [email protected]:JeremieSamson/solidity_docker_bootstrap.git

Then you can use make commands

// This will build images, up them and install node_modules
make install

// This will launch migration
make truffle migrate

// This will launch tests
make truffle test

Lint

ESLint let you find and fix problems in your javascript code. It is a nice plugin to lint your code.

// To see errors
make esnlint

// To fix errors
make esnlintfix

Customizable linter for ethereum's solidity smart contract.

// To see errors
make solium

// To fix errors
make soliumfix

Coveralls

Coveralls is a web service to help you track your code coverage over time, and ensure that all your new code is fully covered.

Setup

Your code must be hosted on GitHub, BitBucket, or GitLab. Then, you only need to login to your coveralls accoutn with github.

Add a badge

To add your badge, you need to first link a repository to coveralls. When you are on you repositoru page like https://coveralls.io/github/ACCOUNT/REPOSITORY_NAME, just clic on the embed dropdown under the badge card

Then, just copy past the markdown in your readme

[![Coverage Status](https://coveralls.io/repos/github/JeremieSamson/alyra_voting/badge.svg?branch=main)](https://coveralls.io/github/JeremieSamson/alyra_voting?branch=main)

Continuous integration

When you have your contract and your tests, you are ready to go to open a pull request on your repository and start pushing your code to your teammates. The github action workflow installed will

  1. Check that your javascript files are properly lints (ESLint)
  2. Check that your solidity files are properly lints (Ethlint)
  3. Run your tests
  4. Run your coverage
  5. Push the coverage result to coveralls

solidity_docker_bootstrap's People

Contributors

jeremiesamson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gregs-hub

solidity_docker_bootstrap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.