This repo provides easy to use scripts for deploying multiple Aave V3 aToken wrappers on Avalanche C-Chain using batched transactions via a Safe multisig wallet.
Warning This repo is a work in progress. Due to the Safe-SDK compatibility issues the
BatchDeployment
script is not yet functional. TheGenerateAvaxDeployMetadata
script is functional and can be used to generate the metadata for a batch deployment as well as deploy the necessary Aave V3 aToken wrappers.
yarn install
A sample .env file is provided in the repo. Copy it and fill in the values.
AVALANCHE_URL=
PRIVATE_KEY=
ETHERSCAN_API_KEY=
Within helpers/tokenRegistry
is a list of tokens to be deployed. Edit this list if these tokens need to be changed.
Initial deposits are required in order to help prevent exchange rate attacks on the aToken. A recommended deposit amount is between $50 and $100 per asset. The initial depsit values are already set within the tokenRegistry
but can be changed if necessary. Please make sure the account you are deploying from contains these tokens before running the deployment script.
This script generates the metadata for the Avax deployment. This metadata is used by the Safe multisig wallet to execute a batch transaction to deploy the aToken wrappers.
This scripted should be run before batchDeployment
on with hardhat and will generate a file called aave_v3_wrapper_output.json
in the txFiles
directory.
Warning If you run this script on a production network it will deploy all tokens and generate an overwriting
aave_v3_wrapper_output.json
file. Please only run this script onhardhat
if you wish to deploy using batch transactions.
yarn hardhat run scripts/GenerateAvaxDeployMetadata.ts --network <network-name>
This script deploys the aToken wrappers to the Avalanche C-Chain using a Safe multisig wallet. The script will read the aave_v3_wrapper_output.json
file generated by GenerateAvaxDeployMetadata
and deploy the aToken wrappers.
yarn hardhat run scripts/BatchDeployment.ts --network <network-name>
Warning This script is not yet functional due to Safe-SDK compatibility issues. Please use
GenerateAvaxDeployMetadata
to deploy wrappers.