Consensys / abi-decoder

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

Get error logs when tried to decode the following Input for Uniswap-v2 function #95

Open AugustusLZJ opened 1 year ago

AugustusLZJ commented 1 year ago

Get error logs when tried to decode the following Input:

hash: '0x10949b75c9e65917347feb7df04af16fd2b28d524d600aa924d4f0e3b9362f61'

input:'0x7ff36ab500000000000000000000000000000000000000000000000000000000018ea67400000000000000000000000000000000000000000000000000000000000000800000000000000000000000007850efacf16f2b71a7ba1d8522d93441172b7211000000000000000000000000000000000000000000000000000000006108f08c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000ffc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000ffa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'

functionName: 'swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline)' Uniswap-v2 Router addr: '0x7a250d5630b4cf539739df2c5dacb4c659f2488d'

Error: Error: value out of range (argument="value", value=20, code=INVALID_ARGUMENT, version=bytes/5.7.0) at Logger.makeError (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\logger\src.ts\index.ts:269:28) at Logger.throwError (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\logger\src.ts\index.ts:281:20) at Logger.throwArgumentError (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\logger\src.ts\index.ts:285:21) at hexZeroPad (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\bytes\src.ts\index.ts:323:16) at AddressCoder.decode (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\abi\src.ts\coders\address.ts:28:37) at AnonymousCoder.decode (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\abi\src.ts\coders\anonymous.ts:23:27) at D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\abi\src.ts\coders\array.ts:108:31 at Array.forEach (<anonymous>) at unpack (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\abi\src.ts\coders\array.ts:89:12) at ArrayCoder.decode (D:\Workspace\FullStack\defi-lab\backend-blockchain\node_modules\@ethersproject\abi\src.ts\coders\array.ts:233:41) { reason: 'value out of range', code: 'INVALID_ARGUMENT', argument: 'value', value: 20, baseType: 'address', name: undefined, type: 'address' }

Most of other transactions to Uniswap are okay, just a few of them got the above errors.