useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Error: no matching event (argument="topichash", value="0xddf25...", code=INVALID_ARGUMENT, version=abi/5.4.0)

Open mirko-xyz opened this issue 4 years ago • 3 comments

error 2

This error is thrown out after successfully mined transaction, in my case it is minting new tokens. Minting works fine, but this error is thrown out after every successful mint or any other transactions like transfer etc.

This is my code but simplified:

import { utils } from 'ethers';
import { Contract } from '@ethersproject/contracts'
import { useContractFunction } from '@usedapp/core';

function Mint() {
  const citInterface = new utils.Interface(['function mint(uint amount) external']);
  const citContractAddress = '0xd2539E040A79D9597310D96aD17C96518168A63F';
  const contract = new Contract(citContractAddress, citInterface);
  const { send } = useContractFunction(contract, 'mint');

  const callMint = (mintAmount) => {
    send(mintAmount*10**8);
  }
 // method callMint is called when I input some number and click on button
}

I have googled this error and stumbled across this https://github.com/ethers-io/ethers.js/issues/733 . I am not quite experienced so I don't know how to fix this.

mirko-xyz avatar Aug 10 '21 22:08 mirko-xyz

Please check this PR it should fix your problem, the issue is that one of the logs returned by the transaction comes from another contract.

lcamargof avatar Aug 12 '21 22:08 lcamargof

Still happening to me: code=INVALID_ARGUMENT, version=abi/5.2.0

brunitob avatar Aug 30 '21 21:08 brunitob

Does anyone has this issue with useDApp 1.0? Did anyone tried to upgrade ethers to version 5.6?

rzadp avatar Aug 10 '22 10:08 rzadp