Consensys / abi-decoder

Nodejs and Javascript library for decoding data params and events from ethereum transactions
GNU General Public License v3.0
633 stars 218 forks source link

_decodeLogs error on parsing hex topics #83

Open nire5687298 opened 2 years ago

nire5687298 commented 2 years ago

abi-decoder has a dependency: "web3-utils": "^1.2.1". That caused usage of web3-utils v1.7.3. Now it causes usage of web3-utils v1.7.4. One of the changes between these versions is a wrapper around BN class added. The earlier version passed the args to the class through, but the new one tries to guess the base by looking "0x" at the beginning of the string. Since abi-decoder removes "0x" from the value, bn.js tries to parse the value with base 10 and throws an error if the value contains letters or parses it with wrong base if doesn't.