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
(A more meaningful test would be to check the return value is equal to the loop index i, the number of deposit invocations made.)
Then you will get the following exception:
eth_abi.exceptions.NonEmptyPaddingBytes: Padding bytes were not empty: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 '
which is generated by eth_abi/decoding.py. (Note that the last character is an ascii character of b'\x20.)
How to fix?
Well, wait until the compiler bug is fixed, and update the Vyper compiler version. :)
Also, add some tests for (or have the existing tests to invoke) get_deposit_count, to detect further regressions.
The text was updated successfully, but these errors were encountered:
What's wrong?
The return value of the
get_deposit_count
function ofdeposit_contract
does not conform to the ABI encoding, having incorrect zero-padding, due to a Vyper compiler bug.How to reproduce?
For a quick reproduction of the buggy behavior, just add the following line at the end of
test_deposit_tree
(inside thefor
loop):(A more meaningful test would be to check the return value is equal to the loop index
i
, the number ofdeposit
invocations made.)Then you will get the following exception:
which is generated by
eth_abi/decoding.py
. (Note that the last character is an ascii character ofb'\x20
.)How to fix?
Well, wait until the compiler bug is fixed, and update the Vyper compiler version. :)
Also, add some tests for (or have the existing tests to invoke)
get_deposit_count
, to detect further regressions.The text was updated successfully, but these errors were encountered: