From bcdd62cb96b926355d6b4453420c9257485f9eda Mon Sep 17 00:00:00 2001 From: yuetloo Date: Thu, 9 May 2024 12:50:57 -0400 Subject: [PATCH] use qualified contract name --- contracts/tasks/helpers/Subtask.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/tasks/helpers/Subtask.ts b/contracts/tasks/helpers/Subtask.ts index 089cf06d6..06eed8015 100644 --- a/contracts/tasks/helpers/Subtask.ts +++ b/contracts/tasks/helpers/Subtask.ts @@ -18,7 +18,7 @@ import type { HardhatRuntimeEnvironment, } from 'hardhat/types' -import { deployContract } from '../../utils/contracts' +import { deployContract, getQualifiedContractName } from '../../utils/contracts' import { EContracts } from '../../utils/types' import { ContractStorage } from './ContractStorage' import { @@ -527,7 +527,8 @@ export class Subtask { const contractAddress = address || this.storage.mustGetAddress(name, this.hre.network.name) - const { abi } = await this.hre.artifacts.readArtifact(name.toString()) + const qualifiedName = getQualifiedContractName(name) + const { abi } = await this.hre.artifacts.readArtifact(qualifiedName) return new BaseContract(contractAddress, abi, deployer) as T }