This repo has all smart contracts used by Sovreign.
The ./contracts folder has the following structure:
./facets/
: contains the Diamond Facets utilized./farming/
: contains all yield-farming contracts as well as the main staking vault./governance/
: contains contracts related to the ReignDAO, the Diamond set-up, and Governance Rewards./interfaces/
: contains all interfaces used across the protocol./libraries/
: contains all libraries./mocks/
: contains mock contracts used for testing./tokens/
: contains the SOV and REIGN Token contracts./vesting/
: contains vesting contracts for the team and early investors./wrapper/
: contains all functionality related to wrapping the Balancer LP into SVR
Check the ./docs folder for an audit report and deployment information on testnet + mainnet.
This project is using the solidity compiler version 0.7.6
- node v14.14
- hardhat v2
- openzeppelin-contracts v3.2.2-solc-0.7
- docker
- docker-compose
yarn install
yarn compile
yarn test
yarn test ./test/<TestName>.test.ts
yarn coverage
IMPORTANT:
The following env variables can be set:
TAG
MAINNET_FORKING_ENABLED
MAINNET_URL
RINKEBY_URL
ETHERSCAN_API_KEY
By default, the
MAINNET_FORKING_ENABLED
is set totrue
in.env
file. It means that hardhat uses mainnet forking for running the scripts and tests.
- Just deploy and set-up all contracts:
npx hardhat run scripts/run-deploy-all.ts
- Run the
scenario1
:
npx hardhat run ./scripts/run-scenario1.ts
docker-compose up
Go to http://localhost:8080, and choose
--connect to localhost--
in the "Workspaces" dropdown menu within "File Explorers".
This repository was composed being based on the following repositories:
- BarnBridge/BarnBridge-DAO, more specifically from this commit.
- BarnBridge/BarnBridge-Barn, more specifically from this commit.
- BarnBridge/BarnBridge-YieldFarming, more specifically from this commit.
We're pretty thankful for their hard work! 👏 🚀
Modifications from the original work can be found in subsequent commits on this repository, made by the Sovreign Team. 🙏
Licensed under the Apache2 License.
See LICENSE for more information.
Made with ❤️ by Sovreign Team