eth-abi's encode_abi() does not match exactly what Solidity's abi encode() method produces. It likely has to do with 0-padding among possibly other things. It isn't broken in the sense that the instructions for the EVM end up being the same (same bytes are sent just represented differently)... but this leads to issues with hashes not matching and, also, using more gas - and thus a less efficient transaction.
See conversation in ethereum/web3.py#1065
Possibly related to ethereum/web3.py#1812
Expected Result
The ideal scenario is that eth-abi should match exactly what is produced via Solidity's encode() method.
How can it be fixed?
Investigate where extraneous padding with zero's may occur and look into removing this extra bit of padding
Investigate if there is anything else going on that is producing a different representation of the encoded data
What was wrong?
eth-abi
'sencode_abi()
does not match exactly what Solidity's abiencode()
method produces. It likely has to do with0
-padding among possibly other things. It isn't broken in the sense that the instructions for the EVM end up being the same (same bytes are sent just represented differently)... but this leads to issues with hashes not matching and, also, using moregas
- and thus a less efficient transaction.See conversation in ethereum/web3.py#1065
Possibly related to ethereum/web3.py#1812
Expected Result
eth-abi
should match exactly what is produced via Solidity'sencode()
method.How can it be fixed?