deno-npm / web3-eth-abi

1 stars 1 forks source link

Error: data out-of-bounds (length=32, offset=64, code=BUFFER_OVERRUN, version=abi/5.0.7) #1

Open vizsatiz opened 2 years ago

vizsatiz commented 2 years ago

I have out-of-bound error when trying to decodeLog

Error: data out-of-bounds (length=32, offset=64, code=BUFFER_OVERRUN, version=abi/5.0.7)\n    at Logger.makeError (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/logger/lib/index.js:199:21)\n    at Logger.throwError (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/logger/lib/index.js:208:20)\n    at Reader._peekBytes (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:149:24)\n    at Reader.readBytes (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:161:26)\n    at Reader.readValue (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:167:48)\n    at AddressCoder.decode (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/address.js:34:63)\n    at /Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/array.js:106:31\n    at Array.forEach (<anonymous>)\n    at Object.unpack (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/array.js:85:12)\n    at TupleCoder.decode (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/coders/tuple.js:39:49)\n    at AbiCoder.decode (/Users/vishnusatis/Documents/viz/ayala/node_modules/@ethersproject/abi/lib/abi-coder.js:93:22)\n    at ABICoder.decodeParametersWith (/Users/vishnusatis/Documents/viz/ayala/node_modules/web3-eth-abi/lib/index.js:303:30)\n    at ABICoder.decodeLog (/Users/vishnusatis/Documents/viz/ayala/node_modules/web3-eth-abi/lib/index.js:346:52)\n    at /Users/vishnusatis/Documents/viz/ayala/contract/erc1155.js:144:42\n    at Array.map (<anonymous>)\n    at parseTrxReceipt (/Users/vishnusatis/Documents/viz/ayala/contract/erc1155.js:137:41)","timestamp":"2021-11-15T08:55:58.932Z"

It says that support for this has been added in ethers 5.0.12 in here: https://github.com/ethers-io/ethers.js/issues/891

vizsatiz commented 2 years ago

I can create a fix and a PR, but am not sure how to build this repo, can you share some documentation to the same