{"id":18704965,"url":"https://github.com/aave/aave-v3-deploy","last_synced_at":"2025-04-05T22:08:12.205Z","repository":{"id":64659172,"uuid":"568796675","full_name":"aave/aave-v3-deploy","owner":"aave","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-30T11:14:05.000Z","size":729,"stargazers_count":53,"open_issues_count":14,"forks_count":104,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T21:04:49.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aave.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-21T12:34:18.000Z","updated_at":"2025-03-25T09:03:30.000Z","dependencies_parsed_at":"2024-02-27T09:42:18.061Z","dependency_job_id":"5edac562-5757-4065-85e6-4805860d5163","html_url":"https://github.com/aave/aave-v3-deploy","commit_stats":{"total_commits":96,"total_committers":9,"mean_commits":"10.666666666666666","dds":"0.47916666666666663","last_synced_commit":"27ccc6d24ef767a2b71946784a843526edbc9618"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v3-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v3-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v3-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v3-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aave","download_url":"https://codeload.github.com/aave/aave-v3-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406090,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:09:18.036Z","updated_at":"2025-04-05T22:08:12.176Z","avatar_url":"https://github.com/aave.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aave V3 Deployments\n\n[![npm (scoped)](https://img.shields.io/npm/v/@aave/deploy-v3)](https://www.npmjs.com/package/@aave/deploy-v3)\n\nThis Node.js repository contains the configuration and deployment scripts for the Aave V3 protocol core and periphery contracts. The repository makes use of `hardhat` and `hardhat-deploy` tools to facilitate the deployment of Aave V3 protocol.\n\n## Requirements\n\n- Node.js \u003e= 16\n- Alchemy key\n  - If you use a custom RPC node, you can change the default RPC provider URL at [./helpers/hardhat-config-helpers.ts:25](./helpers/hardhat-config-helpers.ts).\n- Etherscan API key _(Optional)_\n\n## Getting Started\n\n1. Install Node.JS dependencies:\n\n   ```\n   npm i\n   ```\n\n2. Compile contracts before running any other command, to generate Typechain TS typings:\n\n   ```\n   npm run compile\n   ```\n\n## How to deploy Aave V3 in testnet network\n\nTo deploy Aave V3 in a Testnet network, copy the `.env.example` into a `.env` file, and fill the environment variables `MNEMONIC`, and `ALCHEMY_KEY`.\n\n```\ncp .env.example .env\n```\n\nEdit the `.env` file to fill the environment variables `MNEMONIC`, `ALCHEMY_KEY` and `MARKET_NAME`. You can check all possible pool configurations in this [file](https://github.com/aave/aave-v3-deploy/blob/09e91b80aff219da80f35a9fc55dafc5d698b574/helpers/market-config-helpers.ts#L95).\n\n```\nnano .env\n```\n\nRun the deployments scripts and specify which network \u0026 aave market configs you wish to deploy.\n\n```\nHARDHAT_NETWORK=goerli npx hardhat deploy\n```\n\n## How to deploy Aave V3 in fork network\n\nYou can use the environment variable `FORK` with the network name to deploy into a fork.\n\n```\nFORK=main MARKET_NAME=Aave npx hardhat deploy\n```\n\n## How to integrate in your Hardhat project\n\nYou can install the `@aave/deploy-v3` package in your Hardhat project to be able to import deployments with `hardhat-deploy` and build on top of Aave in local or testnet network.\n\nTo make it work, you must install the following packages in your project:\n\n```\nnpm i --save-dev @aave/deploy-v3 @aave/core-v3 @aave/periphery-v3\n```\n\nThen, proceed to load the deploy scripts adding the `externals` field in your Hardhat config file at `hardhat.config.js|ts`.\n\n```\n# Content of hardhat.config.ts file\n\nexport default hardhatConfig: HardhatUserConfig = {\n   {...},\n   external: {\n    contracts: [\n      {\n        artifacts: 'node_modules/@aave/deploy-v3/artifacts',\n        deploy: 'node_modules/@aave/deploy-v3/dist/deploy',\n      },\n    ],\n  },\n}\n```\n\nAfter all is configured, you can run `npx hardhat deploy` to run the scripts or you can also run it programmatically in your tests using fixtures:\n\n```\nimport {getPoolAddressesProvider} from '@aave/deploy-v3';\n\ndescribe('Tests', () =\u003e {\n   before(async () =\u003e {\n      // Set the MARKET_NAME env var\n      process.env.MARKET_NAME = \"Aave\"\n\n      // Deploy Aave V3 contracts before running tests\n      await hre.deployments.fixture(['market', 'periphery-post']);`\n   })\n\n   it('Get Pool address from AddressesProvider', async () =\u003e {\n      const addressesProvider = await getPoolAddressesProvider();\n\n      const poolAddress = await addressesProvider.getPool();\n\n      console.log('Pool', poolAddress);\n   })\n})\n\n```\n\n## How to verify your contract deployments\n\n```\nnpx hardhat --network XYZ etherscan-verify --api-key YZX\n```\n\n## Project Structure\n\n| Path                  | Description                                                                                                                     |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| deploy/               | Main deployment scripts dir location                                                                                            |\n| ├─ 00-core/           | Core deployment, only needed to run once per network.                                                                           |\n| ├─ 01-periphery_pre/  | Periphery contracts deployment, only need to run once per network.                                                              |\n| ├─ 02-market/         | Market deployment scripts, depends of Core and Periphery deployment.                                                            |\n| ├─ 03-periphery_post/ | Periphery contracts deployment after market is deployed.                                                                        |\n| deployments/          | Artifacts location of the deployments, contains the addresses, the abi, solidity input metadata and the constructor parameters. |\n| markets/              | Directory to configure Aave markets                                                                                             |\n| tasks/                | Hardhat tasks to setup and review market configs                                                                                |\n| helpers/              | Utility helpers to manage configs and deployments                                                                               |\n\n## License\n\nPlease be aware that [Aave V3](https://github.com/aave/aave-v3-core) is under [BSUL](https://github.com/aave/aave-v3-core/blob/master/LICENSE.md) license as of 27 January 2023 or date specified at v3-license-date.aave.eth. The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. Any exceptions to this license may be specified by Aave governance. This repository containing the deployment scripts for the Aave V3 smart contracts can only be used for local or testing purposes. If you wish to deploy to a production environment you can reach out to Aave Governance [here](https://governance.aave.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-v3-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faave%2Faave-v3-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-v3-deploy/lists"}