Open haltman-at opened 3 years ago
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.
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.
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.