Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Unable to incorporate into hardhat project. #44

Description

@jguthrie7

I would like to include aave-v3-deploy in my project in order to integrate with the aave-v3 contracts.

I followed the steps in the README: How to integrate in your Hardhat project

Reproduction steps

------------
bash
------------
mkdir test-ts
cd test-ts/
npm init
npx hardhat init

✔ What do you want to do? · Create a TypeScript project
✔ Hardhat project root: · /Users/john/dev/github/temp/test-ts
✔ Do you want to add a .gitignore? (Y/n) · y
✔ Do you want to install this sample project's dependencies with npm (hardhat @nomicfoundation/hardhat-toolbox)? (Y/n) · n

-------------
.env
-------------
# Name of the Market to deploy. If you want to deploy a custom market, it must be included at `loadPoolConfig` function at ./helpers/market-config-helpers.ts:65
MARKET_NAME=Aave

# Alchemy RPC api key
ALCHEMY_KEY="Valid Key"

# Seed phrase
MNEMONIC="Valid Mnemonic"

# Etherscan API key to verify contracts
ETHERSCAN_KEY=

# Toggle Permissioned Faucet
PERMISSIONED_FAUCET=false


--------------
#package.json
--------------
{
  "name": "test-ts",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@aave/deploy-v3": "^1.55.3",
    "@aave/core-v3": "^1.19.0",
    "@aave/periphery-v3": "^2.4.1",
    "@nomicfoundation/hardhat-toolbox": "^2.0.0",
    "hardhat": "^2.17.0",
    "hardhat-deploy": "^0.11.34"
  },
  "dependencies": {
    "bluebird": "^3.7.2",
    "dotenv": "^16.3.1",
    "ethers": "^5.7.2",
    "jsondiffpatch": "^0.4.1"
  }
}

--------------
hardhat.config.ts
--------------
import dotenv from "dotenv";
dotenv.config();
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

import "hardhat-deploy";
import { DEFAULT_NAMED_ACCOUNTS, hardhatNetworkSettings } from "@aave/deploy-v3";

const autoOrNumberOrUndefined = (value?: "auto" | string | number) => {
  if (value === undefined) return value;
  if (value === "auto") return value;
  if (typeof value === "number") return value;

  return parseFloat(value);
}

const numberOrUndefined = (value?: string | number) => {
  if (value === undefined) return value;
  if (typeof value === "number") return value;

  return parseFloat(value);
}

const config: HardhatUserConfig = {
  solidity: "0.8.18",
  networks: {
    hardhat: {
      ...hardhatNetworkSettings,
      gasPrice: autoOrNumberOrUndefined(hardhatNetworkSettings.gasPrice),
      initialBaseFeePerGas: numberOrUndefined(hardhatNetworkSettings.initialBaseFeePerGas),
    },
  },
  namedAccounts: {
    ...DEFAULT_NAMED_ACCOUNTS
  },
  external: {
    contracts: [
      {
        artifacts: "node_modules/@aave/deploy-v3/artifacts",
        deploy: "node_modules/@aave/deploy-v3/dist/deploy"
      }
    ]
  }
};

export default config;


--------------
bash
--------------
npm i
npx hardhat deploy 


# you eventually get this error:
=== Post deployment hook ===
- Enable stable borrow in selected assets
- Checking reserve DAI , normalized symbol DAI
  - Reserve DAI Borrow Stable Rate follows the expected configuration
- Checking reserve LINK , normalized symbol LINK
  - Reserve LINK Borrow Stable Rate follows the expected configuration
- Checking reserve USDC , normalized symbol USDC
  - Reserve USDC Borrow Stable Rate follows the expected configuration
- Checking reserve WBTC , normalized symbol WBTC
  - Reserve WBTC Borrow Stable Rate follows the expected configuration
- Checking reserve WETH , normalized symbol WETH
  - Reserve WETH Borrow Stable Rate follows the expected configuration
- Checking reserve USDT , normalized symbol USDT
  - Reserve USDT Borrow Stable Rate follows the expected configuration
- Checking reserve AAVE , normalized symbol AAVE
  - Reserve AAVE Borrow Stable Rate follows the expected configuration
- Checking reserve EURS , normalized symbol EURS
  - Reserve EURS Borrow Stable Rate follows the expected configuration
- Review rate strategies
- Checking reserve DAI , normalized symbol DAI
An unexpected error occurred:

Error: ERROR processing /Users/john/dev/github/temp/test-ts/node_modules/@aave/deploy-v3/dist/deploy/01-after-deploy.js:
HardhatError: HH700: Artifact for contract "DefaultReserveInterestRateStrategy" not found.
    at Artifacts._handleWrongArtifactForContractName (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/artifacts.ts:700:11)
    at Artifacts._getArtifactPathFromFiles (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/artifacts.ts:825:19)
    at Artifacts._getArtifactPath (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/artifacts.ts:505:21)
    at async Artifacts.readArtifact (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/artifacts.ts:71:26)
    at async getContractAt (/Users/john/dev/github/temp/test-ts/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:303:22)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/@aave/deploy-v3/dist/tasks/misc/review-rate-strategies.js:49:34)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Object.Environment.run (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async Object.func (/Users/john/dev/github/temp/test-ts/node_modules/@aave/deploy-v3/dist/deploy/01-after-deploy.js:15:5)
    at async DeploymentsManager.executeDeployScripts (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1226:22)
    at async DeploymentsManager.runDeploy (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1049:13)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/index.ts:438:5)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/index.ts:584:32)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at DeploymentsManager.executeDeployScripts (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1229:19)
    at async DeploymentsManager.runDeploy (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1049:13)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/index.ts:438:5)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/index.ts:584:32)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async SimpleTaskDefinition.action (/Users/john/dev/github/temp/test-ts/node_modules/hardhat-deploy/src/index.ts:669:5)
    at async Environment._runTaskDefinition (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
    at async Environment.run (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
    at async main (/Users/john/dev/github/temp/test-ts/node_modules/hardhat/src/internal/cli/cli.ts:280:7)

I have tried many things but am unable to get past this.

Would appreciate any assistance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions