From d92cc492d02d3fc019b66c887b49418322ecc3a4 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Tue, 27 Aug 2024 21:41:52 +0200 Subject: [PATCH] fix an error cause by using 0x as address Error: provider is required to use ENS name as contract address --- packages/target-ethers-v6/src/codegen/reserved-keywords.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/target-ethers-v6/src/codegen/reserved-keywords.ts b/packages/target-ethers-v6/src/codegen/reserved-keywords.ts index f0567bd2..819096aa 100644 --- a/packages/target-ethers-v6/src/codegen/reserved-keywords.ts +++ b/packages/target-ethers-v6/src/codegen/reserved-keywords.ts @@ -1,9 +1,9 @@ -import { BaseContract } from 'ethers' +import { BaseContract, ZeroAddress } from 'ethers' export const ethersPassProperties = new Set(['then']) export const baseContractProperties = new Set([ ...Object.getOwnPropertyNames(BaseContract.prototype), // for methods - ...Object.keys(new BaseContract('0x', [])), // for readOnly properties + ...Object.keys(new BaseContract(ZeroAddress, [])), // for readOnly properties ]) export const reservedKeywordsLabels = new Set([