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

Support spaces in Tokenizer #295

Open
CodeSandwich opened this issue May 29, 2023 · 0 comments
Open

Support spaces in Tokenizer #295

CodeSandwich opened this issue May 29, 2023 · 0 comments

Comments

@CodeSandwich
Copy link

Currently Tokenizer doesn't support white spaces between items of tuples and arrays, instead of being ignored they are passed into the lower-level parser often causing errors. It'd be great to just trim the white spaces, AFAIK they don't carry any useful information for any of the tokenized types.

For example parsing bytes[] from string [0x0a, 0x0b] fails with a cryptic message expected value of type: bytes[]. This is because the space between 0x0a and 0x0b isn't ignored, it's considered a part of 0x0b which confuses the hex decoder. The only valid payload is [0x0a,0x0b], which is difficult to guess and less human-readable.

For the context, I'm coming as a user of Foundry, where cast abi-encode is extremely tricky to use with arrays and tuples.

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

1 participant