Code Monkey home page Code Monkey logo

atoken-wrapper-deployer's Introduction

atoken-wrapper-deployer

npm

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. The GenerateAvaxDeployMetadata 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.

Repository Setup

Install dependencies

yarn install

Create .env file

A sample .env file is provided in the repo. Copy it and fill in the values.

AVALANCHE_URL=
PRIVATE_KEY=
ETHERSCAN_API_KEY=

Add tokens to be deployed

Within helpers/tokenRegistry is a list of tokens to be deployed. Edit this list if these tokens need to be changed.

Obtain the necessary underlying tokens to use as an initial deposit

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.

Available Scripts

GenerateAvaxDeployMetadata

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 on hardhat if you wish to deploy using batch transactions.

yarn hardhat run scripts/GenerateAvaxDeployMetadata.ts --network <network-name>

BatchDeployment

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.