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
abi.encodeParameter should process BigNumbers in the same way for uint256 and uint256[]
Actual behavior
ABI coder encodes arrays of BigNumbers incorrectly
Steps to reproduce the behavior
const Web3 = require('web3')
const web3 = new Web3()
web3.eth.abi.encodeParameter('uint256', '123') // 0x00...007b
web3.eth.abi.encodeParameter('uint256', web3.utils.toBN('123')) // same as above
web3.eth.abi.encodeParameter('uint256[]', ['123']) // 0x00..007b
web3.eth.abi.encodeParameter('uint256[]', [web3.utils.toBN('123')]) // should be the same as above, gives 0x00..0000 instead
Environment
web3@1.2.9
The text was updated successfully, but these errors were encountered:
Expected behavior
abi.encodeParameter
should process BigNumbers in the same way foruint256
anduint256[]
Actual behavior
ABI coder encodes arrays of BigNumbers incorrectly
Steps to reproduce the behavior
Environment
The text was updated successfully, but these errors were encountered: