Giter VIP home page Giter VIP logo

midas-protocol-contracts's Introduction

Contracts

Main repository for Midas Capital's contracts

Structure

 ┌── README.md                        <- The top-level README
 ├── .github/workflows                <- CICD pipeline definition
 ├── .vscode                          <- IDE configs
 │
 ├── out                              <- (forge-generated, git ignored)
 │    ├── *.sol/*.json                <- All the built contracts
 │    └──  ...
 │
 ├── lib                              <- git submodules with forge-based dependencies
 │    ├── flywheel-v2                 <- Tribe flywheel contracts
 │    ├── fuse-flywheel               <- Fuse flywheel contracts
 │    ├── oz-contracts-upgradeable    <- OpenZeppelin deps
 │    └──  ...                        <- other deps
 │
 ├── contracts                        <- All of our contracts
 │    ├── test                        <- Forge-based tests
 │    ├── compound                    <- Compound interfaces
 │    ├── external                    <- External contracts we require
 │    ├── oracles                     <- Oracle contracts
 │    ├── utils                       <- Utility contracts
 │    └──  ...                        <- Main Fuse contracts
 │
 ├── foundry.toml                     <- forge configs
 ├── remappings.txt                   <- forge remappings
 └── package.json                     <- npm deps

Dev Workflow

1. Install dependencies: npm & foundry (forge + cast)

Forge dependencies

>>> curl -L https://foundry.paradigm.xyz | bash
>>> foundryup
# ensure forge and cast are available in your $PATH
# install submodule libraries via forge
>>> forge install

NPM dependencies

>>> npm install

2. Build the contracts

>>> forge build

3. Run the tests for a specific chain id

# export the relevant env variables, or set them in an .env file
>>> export TEST_RUN_CHAINID=1
>>> export  ETHEREUM_MAINNET_RPC_URL=https://rpc.ankr.com/eth
>>> export ETHEREUM_MAINNET_ARCHIVE_RPC_URL=https://rpc.ankr.com/eth

Run the entire test suite

>>> forge test --no-match-contract 'Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|StellaERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|MiniChefERC4626Test|AaveV3ERC4626Test'

Check the CI.yaml file to see what chains we run the tests against

4. Lint

>>> npm run prettier

midas-protocol-contracts's People

Contributors

vminkov avatar carlomazzaferro avatar coolnft avatar rhlsthrm avatar redveil avatar pczek avatar jupiteruwdev avatar smartdevcom avatar nikmidas avatar joaobrunoah avatar peetzweg 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.