abi-decoder icon indicating copy to clipboard operation
abi-decoder copied to clipboard

Receiving undefined decode input from transacation

Open CovalentBond opened this issue 2 years ago • 2 comments

Hi, I am trying to decode input from transaction that I receive:

{
  from: '0x1987d1c15d95cab34c154ede0a4c3bf7dba5c287',
  input: '0xa9059cbb0000000000000000000000001987d1c15d95cab34c154ede0a4c3bf7dba5c287000000000000000000000000000000000000000000000000002386f26fc10000',
  to: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
}

The code looks like:

abiDecoder.addABI(ABI);
const decodedData = abiDecoder.decodeMethod("0xa9059cbb0000000000000000000000001987d1c15d95cab34c154ede0a4c3bf7dba5c287000000000000000000000000000000000000000000000000002386f26fc10000");
console.log(decodedData);

But this is returning undefined.

Any thing that I am missing.

CovalentBond avatar Nov 05 '22 14:11 CovalentBond

Hey @CovalentBond did you find any solution to this even I am facing the same issue?

sreyom31 avatar Dec 10 '22 16:12 sreyom31

You can try to check the ABI.Especially the data type

longganggang avatar Apr 01 '23 14:04 longganggang