Skip to content

decodeLogs don't work with uint256 tokenId #84

@ibaraki-douji

Description

@ibaraki-douji

So i was trying to decode some transactions and got this error :

(node:17304) UnhandledPromiseRejectionWarning: Error: Invalid character
    at assert (C:\Users\XX\Documents\DEV\EtherScan\node_modules\bn.js\lib\bn.js:6:21)
    at parseBase (C:\Users\XX\Documents\DEV\EtherScan\node_modules\bn.js\lib\bn.js:274:7)
    at BN._parseBase (C:\Users\XX\Documents\DEV\EtherScan\node_modules\bn.js\lib\bn.js:298:14)
    at BN.init [as _init] (C:\Users\XX\Documents\DEV\EtherScan\node_modules\bn.js\lib\bn.js:105:14)
    at new BN (C:\Users\XX\Documents\DEV\EtherScan\node_modules\bn.js\lib\bn.js:39:12)
    at new BNwrapped (C:\Users\XX\Documents\DEV\EtherScan\node_modules\web3-utils\lib\utils.js:480:16)
    at C:\Users\XX\Documents\DEV\EtherScan\node_modules\abi-decoder\index.js:190:30
    at Array.map (<anonymous>)
    at C:\Users\XX\Documents\DEV\EtherScan\node_modules\abi-decoder\index.js:157:21
    at Array.map (<anonymous>)

after some search the cause was this event :

{
  "name": "tokenId",
  "type": "uint256",
  "value": "0xfe4c845b279619589d6c4c444cc9f5d7a5d1d86aec7cb7083fcd58b57cd9b652"
}

i have other tokenId who fail too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions