Skip to content

Commit

Permalink
fix an error cause by using 0x as address
Browse files Browse the repository at this point in the history
Error: provider is required to use ENS name as contract address
  • Loading branch information
jfschwarz committed Aug 27, 2024
1 parent c975af6 commit d92cc49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/target-ethers-v6/src/codegen/reserved-keywords.ts
Original file line number Diff line number Diff line change
@@ -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([
Expand Down

0 comments on commit d92cc49

Please sign in to comment.