Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving undefined decode input from transacation #90

Open
CovalentBond opened this issue Nov 5, 2022 · 2 comments
Open

Receiving undefined decode input from transacation #90

CovalentBond opened this issue Nov 5, 2022 · 2 comments

Comments

@CovalentBond
Copy link

CovalentBond commented Nov 5, 2022

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.

@sreyom31
Copy link

sreyom31 commented Dec 10, 2022

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

@longganggang
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants