New web3.eth.Contract(tokenContractAbi, TOKEN_CONTRACT_ADDRESS)

new web3.eth.Contract(tokenContractAbi, TOKEN_CONTRACT_ADDRESS);

not working any more, updated the sdk

“moralis”: “1.5.5”
“react-moralis”: “^1.3.4”

I’m also having same issue.
Please any help with it?

Moralis now runs on ethers.js, not web3, so you would have to create an ethers.js contract instance or use an older version of moralis

Try Moralis sdk version 0.0.184 that uses web3, or read on forum (a post with ethers and Moralis sdk) how to use web3 with latest version of Moralis sdk

Thank you very much for the prompt response. I’ll try to use ethers.js instead!

Alright! I do really appreciate your support. I’ll keep that in mind as well.



some text some text

Here’s an example of creating a contract instance. From there you can call functions in the contract.

const daiContract = new ethers.Contract(daiAddress, daiAbi, provider); is the key line.