Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tuple and CompactBytesArray decoding #252

Closed
frozeman opened this issue Oct 28, 2022 · 1 comment
Closed

Add tuple and CompactBytesArray decoding #252

frozeman opened this issue Oct 28, 2022 · 1 comment

Comments

@frozeman
Copy link
Contributor

frozeman commented Oct 28, 2022

Should be able to decode valueType and valueContent of tuples:

(bytes4,address,bytes4) results in -> ["0x11223344", "0x1122334411223344112233441122334411223344", "0x11223344"]

CompactBytesArray:
first byte length of bytes l, followed by bytes, follo3ed by length of next bytes.
valueContent = "CompactBytesArray"
"0x04112233441411223344112233441122334411223344112233440411223344" in
-> ["0x11223344", "0x1122334411223344112233441122334411223344", "0x11223344"]

Should also work:
(Bytes4,Address,Bytes4)[] // ABI encoded array of a tuple
(Bytes4,Address,Bytes4)[CompactBytesArray] // CompactBytesArray encoded tuple (cheaper)

@Hugoo
Copy link
Contributor

Hugoo commented Feb 6, 2023

Closed in #261

@Hugoo Hugoo closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants