Skip to content

Commit

Permalink
fix: default value for addressBook
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Nov 7, 2023
1 parent af7e2e3 commit ade92df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/extendContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ declare module 'hardhat/types/runtime' {
}

extendEnvironment((hre: HardhatRuntimeEnvironment) => {
const chainId = hre.network.config.chainId
const addressBookPath = process.env.ADDRESS_BOOK
const chainId = (hre.network.config.chainId as number).toString()
const addressBookPath = process.env.ADDRESS_BOOK || 'addresses.json'
const addresses = getAddressBook(addressBookPath, chainId)
const addressBook = addresses[chainId as number]
const addressBook = addresses[chainId as unknown as number]
hre['contracts'] = lazyObject(() => {
return loadContracts(
addressBook?.Billing,
Expand Down

0 comments on commit ade92df

Please sign in to comment.