Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Support decoding variables when debugging Vyper #3832

Open
haltman-at opened this issue Feb 20, 2021 · 2 comments
Open

Support decoding variables when debugging Vyper #3832

haltman-at opened this issue Feb 20, 2021 · 2 comments

Comments

@haltman-at
Copy link
Contributor

Speaks for itself. This will be a lot of work. We may want to wait on this until Vyper has a more structured AST format (see this Vyper issue), and only support it from that Vyper version forward. If we don't, we may not be able to support everything. In particular, decoding loop variables (!) will be impossible, and it's not clear whether it will be possible to decode mapping keys.

Note that doing this would require expanding the type system in codec. Likely this would be done for just Vyper 0.2.x first, and support for Vyper 0.1.x (with its unit types that were removed in 0.2.x) could be added later.

@haltman-at
Copy link
Contributor Author

By the way, a note on implementation -- Vyper currently doesn't have type descriptors like Solidity does, which seems like it might present a problem for the way we store mapping keys. However, because Vyper doesn't store struct / array elements inline, we actually don't need the type descriptor; we could just always use "" instead. We only store things by type descriptor in Solidity to solve a problem that arises from struct / array elements being stored inline.

@haltman-at
Copy link
Contributor Author

One more note: If we're doing this, we might also want to decode Vyper's reentrancy locks. That would probably be follow-on work & a separate issue though? I'll just note it here for now.

@gnidan gnidan added the decoder label Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants