Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 2.76 KB

setup.md

File metadata and controls

61 lines (44 loc) · 2.76 KB

Aave Governance v3. Setup instructions

General setup

This project uses foundry. To install run:

npm i // install package dependencies
forge install // install dependency libraries

To run the tests:

forge test

Env Configuration

An .env.example in included in the repository, that can be used as template to fill all the required configurations

cp .env.example .env

Scripts

The deployment scripts can be found here. The deployment scripts use the contract GovBaseScripts to register and use the deployed addresses between them, to coordinate a full deployment.

The scripts consist on:

  • scripts/Governance: containing the scripts to deploy Core Network contracts (on Ethereum).
  • scripts/VotingMachine: containing the scripts to deploy a VotingMachine.
  • scripts/Payloads: containing the scripts to deploy a PayloadsController.
  • scripts/extendedContracts: containing contract extensions for test net deployments (these contracts have lower configurations to make a test net proposal life cycle faster)
  • scripts/helpers: containing helper scripts to for example modify configurations, set new VotingPortals etc.

Makefile

We have created a Makefile with the necessary commands to trigger the different deployment scripts. To trigger a full deployment:

make deploy-full # this command will trigger a deployment for all the configured networks.

with the flags:

  • PROD=true: if specified the deployment will happen on mainnet networks. If not it will deploy on test networks
  • LEDGER=true: if specified the deployment will use a (connected) Ledger. If not it will use the private key specified on the local environment.

A gas multiplier option has been added to give the option to hardcode a gas price, to ensure a deployment will go smoothly.

To add / remove a network from deployment it must be updated on the specific command.

The commands use the network names specified to search for the contracts on the deployment scripts (if no name for contracts to execute are specified):

$(call deploy_fn,Governance/Set_VotingPortals_on_Gov,ethereum) This takes the network name -> capitalizes the name -> searches for the contract on the specified directory (it adds _testnet to the contract names to be able to differentiate between a prod and test deployment).

If the script contract has a different naming (than a network name: Ethereum) it can also be specified on the command like: $(call deploy_fn,SomeDir/SomeFile,ethereum,ContractToCall)

Addresses output

The addresses obtained from triggering the deployment scripts can be found HERE.