Implements the BarnBridge Decentralized Autonomous Organization (DAO) Governance contracts, allowing token holders to create proposals, vote upon them, and queues up for execution those proposals that have passed with quorum. Includes an Abrogation mechanism to cancel queued transactions.
Any questions? Please contact us on Discord or read our Developer Guides for more information.
Implements DAO logic Creating proposals, voting, queuing, canceling, executing and abrogating.
Overview
Check out more detailed smart contract Slither graphs with all the dependencies: Yield Farming Slither Graphs.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# Restart terminal and/or run commands given at the end of the installation script
nvm install 12
nvm use 12
git clone https://github.com/BarnBridge/BarnBridge-DAO.git
cd BarnBridge-YieldFarming
Create an API key with a Provider such as Infura to deploy to Ethereum Public Testnet. In this guide, we are using Kovan.
- Navigate to Infura.io and create an account
- Log in and select "Get started and create your first project to access the Ethereum network"
- Create a project and name it appropriately; switch the Network to Kovan
- Then, copy the URL and paste it into the section named PROVIDER in the .env file
- Navigate to EtherScan and create an account
- Log in and navigate to MyAPIKey
- Use the Add button to create an API key, and paste it into the indicated section towards the bottom of the
config.ts
file
Update .env file with the address of the Barn contract from BarnBridge-Barn
- Get the Barn address given by deploying BarnBridge-Barn and paste it into the .env file section labeled BARN
- Finally, insert the mnemonic phrase for your testing wallet. You can use a MetaMask instance, and switch the network to Rinkeby on the upper right. DO NOT USE YOUR PERSONAL METAMASK SEED PHRASE; USE A DIFFERENT BROWSER WITH AN INDEPENDENT METAMASK INSTALLATION
- You'll need some Kovan-ETH (it is free) in order to pay the gas costs of deploying the contracts on the TestNet; you can use your GitHub account to authenticate to the KovanFaucet and receive 2 Kovan-ETH for free every 24 hours
npm install
npm run compile
npm run test
Note: The result of tests is readily available here.
npm run coverage
npm run deploy-from-env
For any concerns with the platform, open an issue on GitHub or visit us on Discord to discuss. For security concerns, please email info@barnbridge.com.
Copyright 2021 BarnBridge DAO