Git Product home page Git Product logo

yearn-base-strategy's Introduction

Yearn V3 Base Strategy

Installation and Setup

  1. To install with Foundry.

  2. Fork this repository (easier) or create a new repository using it as template. Create from template

  3. Clone your newly created repository recursively to include modules.

git clone --recursive https://github.com/myuser/yearn-base-strategy

cd yearn-base-strategy

NOTE: if you create from template you may need to run the following command to fetch the git submodules (.gitmodules for exact releases) git submodule init && git submodule update

  1. Build the project.
make build

To print the size of each contract

make size
  1. Run tests
make test

Testing

Run all tests run on a local chain

make test

Run all tests with traces (very useful)

make trace

Run all tests with gas outputs

make gas

Run specific test contract (e.g. test/StrategyOperation.t.sol)

make test-contract contract=StrategyOperationsTest

Run specific test contract with traces (e.g. test/StrategyOperation.t.sol)

make trace-contract contract=StrategyOperationsTest

Run specific test contract with gas report (e.g. test/StrategyOperation.t.sol)

make test-contract-gas contract=StrategyOperationsTest

Run specific test (e.g. test/StrategyOperation.t.sol::testStrategy)

make test-test test=testStrategy

Run specific test with traces (e.g. test/StrategyOperation.t.sol::testStrategy)

make trace-test test=testStrategy

See here for some tips on testing Testing Tips

Storage Layout

To print out the storage layout of any contract (e.g 'test/MockStrategy.sol')

make inspect contract=MockStrategy

Resources

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.