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
{{ message }}
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
The ABIMessage decoding fails for contract transaction execution.
In case we try to decode the smart-contract execution transaction's input by wrapping it in ABIMessage and executing any of DecodeABI* function an overflow error occurs. The bug happens because of additional prefix signature bytes. Example for the transaction:
Integer with hex representation
612e45a3000000000000000000000000b656b2a9c3b2416437a811e07466ca71
exceeds maximum size 8 by 24
It seems resonable if ABIMessage will recognize that there is a signature in the input and perform all operations by cutting it out.
However, we got same error in case of decoding custom data that was not encoded (padded correctly) by the Web3. Example for the transaction. We got input 0x49206c6f7665205765623353776966742e696f that represents I love Web3Swift.io string. An error occures expected to not throw any error, got <Received bytes of size 19 when 32 was expected>
The text was updated successfully, but these errors were encountered:
The message ctor of the ABIMessage was intended to be used without the prepended message signature. How about adding an abiReturn ctor to the ABIMessage which will drop first 3 bytes?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
ABIMessage
decoding fails for contract transaction execution.In case we try to decode the smart-contract execution transaction's
input
by wrapping it inABIMessage
and executing any ofDecodeABI*
function an overflow error occurs. The bug happens because of additional prefix signature bytes. Example for the transaction:An error occures:
It seems resonable if
ABIMessage
will recognize that there is asignature
in theinput
and perform all operations by cutting it out.However, we got same error in case of decoding custom data that was not encoded (padded correctly) by the Web3. Example for the transaction. We got input
0x49206c6f7665205765623353776966742e696f
that representsI love Web3Swift.io
string. An error occuresexpected to not throw any error, got <Received bytes of size 19 when 32 was expected>
The text was updated successfully, but these errors were encountered: