Open Crypto-Doby opened 2 years ago
@Crypto-Doby Can you fix this method and make a PR? Please also include the official test cases from Solidity's docs.
@Crypto-Doby Please check #135
That's just decoding for now. But after making a few tests I will recreate the encoding API as well.
This issue has not been fixed
now the dynamic array's encoding logic is to encode every item, then concat the hex string follow the length encoded hex.:
but follw the document: https://docs.soliditylang.org/en/v0.8.13/abi-spec.html#formal-specification-of-the-encoding it seems that the dynamic array's encoded data should have extra bytes between length hex and item's hex, to represent the dynamic item's data location.
for example: I want to encode a dynamic array of 4 datas:
the testData now is this:
it seems should add the extra bytes like this:
I was trying to send a eth_call with dynamic array's encoded data but got error. after add the extra bytes. the call is success.
is there any wrong usage of me or any missunderstanding?