Skip to content

Lesson 8: TypeError: AbiCoder is not a constructor #5683

Discussion options

You must be logged in to vote

@mahziarwoas The error is in the chai matchers, it is using ethers version 6 and inside node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/reverted/utils.ts:65:15 it is using this code which imports the AbiCoder and initiate it.

const { AbiCoder } = require("ethers") as typeof EthersT;
const abi = new AbiCoder();

And we are using ethers version 5 because hardhat-deploy is dependent on it, now I think from this point onward we need to leave hardhat-deploy and use the hardhat way to deploy and test our contracts until hardhat-deploy get updated to ethers version 6.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@MahzyarSaadat
Comment options

@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

Answer selected by alymurtazamemon
@MahzyarSaadat
Comment options

@Ar11-kgp
Comment options

@alymurtazamemon
Comment options

@cah311
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants