A set of scripts to deploy & test the Badger protocol. A more detailed overview of the deploy process can be found at the Badger Docs repo.
-
Clone
git clone https://github.com/Badger-Finance/badger-deploy
-
Install dependencies
npm install
-
Setup environment
cp .env.example .envInput values for Mnemonic and Infura API key in .env to connect to live testnets or mainnet
-
Run Scripts
Deploy (local): Create a local instance of the Badger system using the parmeters specified in
deploy/badgerConfig.ts. The initial parameters will be confirmed after deploy.npm run deploy-local(See
package.jsonfor other network variants)
Integration Test: Test the operation of a local system, including inital deploy, token distribution, normal update operations of the system, and governance mechanics
npm run test
Because of the myriad sets of dependencies (node versions, compilers, etc) required to compile smart contract components used from other systems, the artifacts are pre-compiled and bundled under the dependency-artifacts folder.
Managing the various environment setups, installation, compilation, and storing of artifacts may be automated in the future to improve the experience of deployers who wish to confirm the veracity of all artifact files independently.
The source code for all artifacts can be found in the following repos:
-
Badger DAO Template @latest
- Based on Aragon DAO Templates @3e1c3a5
-
Badger Geyser @latest
-
Badger SmartTimelock @latest
-
Digg Core @latest
-
Digg Oracles @latest
-
Gnosis Safe @94f9b90
-
Balancer Core @f4ed5d6
-
Uniswap-v2-Core @4dd5906
-
Uniswap-v2-Periphery @4123f93
-
Openzeppelin Contracts @cb791a1