Skip to content

Commit

Permalink
use qualified contract name
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed May 9, 2024
1 parent 3969bac commit bcdd62c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/tasks/helpers/Subtask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit bcdd62c

Please sign in to comment.