Giter Site home page Giter Site logo

juice-contract-template's Introduction

juice-contract-template

Template used to code juicy solidity stuff - includes forge, libs, etc

Install dependencies (forge tests, Juice-contracts-V3, OZ) via forge install && yarn install

Use this template as a starting point, do not push straight on main, rather create a new branch and open a PR - your reviewer will love you for this.

Usage

use yarn test to run tests

use yarn test:fork to run tests in CI mode (including slower mainnet fork tests)


use yarn size to check contract size

use yarn doc to generate natspec docs

use yarn lint to lint the code

use yarn tree to generate a Solidity dependency tree


use yarn deploy:mainnet and yarn deploy:goerli to deploy and verify (see .env.example for required env vars, using a ledger by default).

Code coverage

Run yarn coverageto display code coverage summary and generate an LCOV report

To display code coverage in VSCode:

  • You need to install the coverage gutters extension (Ryan Luker) or any other extension handling LCOV reports
  • ctrl shift p > "Coverage Gutters: Display Coverage" (coverage are the colored markdown lines in the left gutter, after the line numbers)

PR

Github CI flow will run both unit and forked tests, log the contracts size (with the tests) and check linting compliance.

juice-contract-template's People

Contributors

drgorillamd avatar

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.