You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>coder.encodeParameters(['uint256'],[newBN(42)])
Thrown:
Error: invalidnumbervalue(arg="",coderType="uint256",value="2a")atObject.throwError(./web3_test/node_modules/ethers/utils/errors.js:68:17)atCoderNumber.encode(./web3_test/node_modules/ethers/utils/abi-coder.js:353:20)at./web3_test/node_modules/ethers/utils/abi-coder.js:605:59atArray.forEach(<anonymous>)
at pack (./web3_test/node_modules/ethers/utils/abi-coder.js:604:12)
at CoderTuple.encode (./web3_test/node_modules/ethers/utils/abi-coder.js:764:16)
at AbiCoder.encode (./web3_test/node_modules/ethers/utils/abi-coder.js:897:77)
at ABICoder.encodeParameters (./web3_test/node_modules/web3-eth-abi/src/index.js:96:27) {reason: 'invalid number value',code: 'INVALID_ARGUMENT',arg: '',coderType: 'uint256',value: BN{negative: 0,words: [42],length: 1,red: null}}>
This breaks any abi encoding for contract methods, so I can't pass a BN to any method accepting uint. Like Contract.methods.method(BN).encodeABI | call | send
The problem is actually in ethers.js, ethers-io/ethers.js#653
I only create this issue to track progress on that and for visibility
If you could just update your dependencies when it is fixed, would be great.
The text was updated successfully, but these errors were encountered:
Expected behavior
Same as with non-BN numbers
Actual behavior
This breaks any abi encoding for contract methods, so I can't pass a BN to any method accepting uint. Like
Contract.methods.method(BN).encodeABI | call | send
Steps to reproduce the behavior
Logs
Versions
The problem is actually in ethers.js, ethers-io/ethers.js#653
I only create this issue to track progress on that and for visibility
If you could just update your dependencies when it is fixed, would be great.
The text was updated successfully, but these errors were encountered: