Open bout3fiddy opened 7 months ago
in this particular example i think you could actually just use bytes32, as it is byte-compatible across all primitive types.
but in general, the issue is that the ABI requires by convention that return types are wrapped in a tuple, and the encoding of the wrapped type may be different from the encoding from the type itself (e.g. bytes
vs (bytes)
). so a potential solution is to have a builtin which returns the bytes directly instead of ABI encoding them.
Version Information
vyper --version
): 0.3.10python --version
): 3.10.4What's your issue about?
In the following snippet:
If
implementation
address has the following code:I can only call
foo()
through the parent contract but notbar()
since the__default__()
method of the parent contract can only returnuint256
. It also needs to be able to returnaddress
to allow returning whateverbar()
of the code atimplementation
address returns.How can it be fixed?
Vyper should pass the bytes data as-is. This would probably require a new feature in the language.