Skip to content

Inconsistent provided data #205

Closed
@moreei

Description

@moreei

Hey, I'm currently playing with your stuff, that's really cool, but I'm having a strange behavior when I'm using the decodeTransaction() method.

I use that transaction for testing:

https://etherscan.io/tx/0x3bc3e038a3934b4273bb532ee72f01546109a65b9f5e772083a43ddafed1cb0f

Sometimes is doesn't giving me all the actual transfers, an error is shown on that case:

timestamp=2025-02-05T08:57:34.093Z level=ERROR fiber=#4 message="Logs decode errors: [{"message":"Could not decode log 0x456FB056a8D118300B624D3AEE3864e685ae086C Encoded event signature "0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1" not found on ABI.\nMake sure you are using the correct ABI and that the event exists on it.\nYou can look up the signature here: ...

[
  {
    type: 'ERC20',
    name: 'Tether USD',
    symbol: 'USDT',
    address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
    amount: '861.50328',
    to: '0x3b42df4D64623468349b817DC25d0B633855f1eA',
    from: '0x11b815efB8f581194ae79006d24E0d814B7697F6'
  }
]

But sometimes, I run the same thing and it works, no error displayed:

[
  {
    type: 'ERC20',
    name: 'Capsule Coin',
    symbol: 'CAPS',
    address: '0x03Be5C903c727Ee2C8C4e9bc0AcC860Cca4715e2',
    amount: '20000',
    to: '0x456FB056a8D118300B624D3AEE3864e685ae086C',
    from: '0x3b42df4D64623468349b817DC25d0B633855f1eA'
  },
  {
    type: 'ERC20',
    name: 'Wrapped Ether',
    symbol: 'WETH',
    address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
    amount: '0.491934254582490252',
    to: '0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B',
    from: '0x456FB056a8D118300B624D3AEE3864e685ae086C'
  },
  {
    type: 'ERC20',
    name: 'Tether USD',
    symbol: 'USDT',
    address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
    amount: '861.50328',
    to: '0x3b42df4D64623468349b817DC25d0B633855f1eA',
    from: '0x11b815efB8f581194ae79006d24E0d814B7697F6'
  },
  {
    type: 'ERC20',
    name: 'Wrapped Ether',
    symbol: 'WETH',
    address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
    amount: '0.491934254582490252',
    to: '0x11b815efB8f581194ae79006d24E0d814B7697F6',
    from: '0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B'
  }
]

I'm trying to detect when it has an error, to retry if this is the case, but the DecodedTransaction.errors property is empty when that error case is happening. Looks like the errors come from this:

const logsErrors = decodedLogs.filter(Either.isLeft).map((r) => r.left)

But that data is not available on the final DecodedTransaction object given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions