CRYPTO NEWS

Getting a "TypeError: this.interface.encodeDeploy is not a function" error when trying to deploy contract with ethers.js/metamask in browser

I’m attempting to deploy a contract with ethers.js in browser. The code is as follows

const provider = new ethers.providers.Web3Provider(window.ethereum); await provider.send('eth_requestAccounts', []); const factory = new ethers.ContractFactory(contractInterface, bytecode, signer); const contract = await factory.deploy(...tokenParameters); 

Yet for some reason it throws the following error in the browser console.

Uncaught (in promise) TypeError: this.interface.encodeDeploy is not a function at ContractFactory.getDeployTransaction (index.ts:1221:28)

Has anyone encountered this or have any idea why it might be happening?

Landofwaves

#Landofwaves #TheSupremeTeam Artist Name: Landofwaves Who are you? I’m my own wave. I rap, sing, produce but you can’t say I’m quite like any other artist. My upbringing deserves a lot of credit for that. Where are you from? I’m from the Bay Area, California. The music scene is slept on so many great artist::Listen

#Landofwaves #TheSupremeTeam
Artist Name: Landofwaves

Who are you?

I’m my own wave. I rap, sing, produce but you can’t say I’m quite like any other artist. My upbringing deserves a lot of credit for that.

Where are you from?

I’m from the Bay Area, California. The music scene is slept on so many great artist and producers.

How can we follow you?

Can follow me on all socials (IG and Twitter) including YouTube @landofwaves. Jusr dropped a new music video.

Song Title: MovesSoLow /Everything wavy ft NO1-NOAH

Listen to Landofwaves:

Source: https://supremepr.us/

Getting a "TypeError: this.interface.encodeDeploy is not a function" error when trying to deploy contract with ethers.js/metamask in browser

Shopping cart
There are no products in the cart!
Continue shopping
0