Giter Site home page Giter Site logo

chechu / isolated-pools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from venusprotocol/isolated-pools

0.0 0.0 0.0 11.93 MB

Smart contracts for Venus Isolated Lending & Borrowing Pools

License: BSD 3-Clause "New" or "Revised" License

Shell 0.24% JavaScript 0.73% TypeScript 69.78% Makefile 0.34% Handlebars 0.06% Dockerfile 0.06% Solidity 28.19% PEG.js 0.60%

isolated-pools's Introduction

This repository is temporarily read-only

This repository is being audited. It has been temporarily frozen to avoid any unexpected change in the reviewed code. It will be unarchived in 10 days.

Venus Isolated Pools

Compound Fork Commit

https://github.com/compound-finance/compound-protocol/tree/a3214f67b73310d547e00fc578e8355911c9d376

Prerequisites

Installing


yarn install

Run Tests


yarn test

yarn hardhat:test

  • To run fork tests add FORK_MAINNET=true and QUICK_NODE_KEY in the .env file.

Deployment


npx hardhat deploy

  • This command will execute all the deployment scripts in ./deploy directory - It will skip only deployment scripts which implement a skip condition - Here is example of a skip condition: - Skipping deployment script on bsctestnet network func.skip = async (hre: HardhatRuntimeEnvironment) => hre.network.name !== "bsctestnet";
  • The default network will be hardhat
  • Deployment to another network: - Make sure the desired network is configured in hardhat.config.ts - Add MNEMONIC variable in .env file - Execute deploy command by adding --network <network_name> in the deploy command above - E.g. npx hardhat deploy --network bsctestnet
  • Execution of single or custom set of scripts is possible, if:
    • In the deployment scripts you have added tags for example: - func.tags = ["MockTokens"];
    • Once this is done, adding --tags "<tag_name>,<tag_name>..." to the deployment command will execute only the scripts containing the tags.

Source Code Verification

In order to verify the source code of already deployed contracts, run: npx hardhat etherscan-verify --network <network_name>

Make sure you have added ETHERSCAN_API_KEY in .env file.

Hardhat Commands


npx hardhat accounts

npx hardhat compile

npx hardhat clean

npx hardhat test

npx hardhat node

npx hardhat help

REPORT_GAS=true npx hardhat test

npx hardhat coverage

TS_NODE_FILES=true npx ts-node scripts/deploy.ts

npx eslint '**/*.{js,ts}'

npx eslint '**/*.{js,ts}' --fix

npx prettier '**/*.{json,sol,md}' --check

npx prettier '**/*.{json,sol,md}' --write

npx solhint 'contracts/**/*.sol'

npx solhint 'contracts/**/*.sol' --fix



MNEMONIC="<>" BSC_API_KEY="<>" npx hardhat run ./script/hardhat/deploy.ts --network testnet

Documentation

Documentation is autogenerated using solidity-docgen.

They can be generated by running yarn docgen

isolated-pools's People

Contributors

0xlucian avatar coreyar avatar kkirka avatar narayanprusty avatar uravgdeveloper avatar debugger022 avatar chechu avatar defistar avatar gleiser-oliveira avatar gitguru7 avatar jannes-stubbemann-20230331 avatar stubbi 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.