Skip to content

Commit

Permalink
wrap types in tuple as necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Jun 5, 2024
1 parent 5ebfcf9 commit 9949022
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/functional/builtins/codegen/test_abi_decode_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from eth.codecs import abi
from hypothesis import given

from vyper.codegen.core import calculate_type_for_external_return
from vyper.semantics.types import (
AddressT,
BoolT,
Expand Down Expand Up @@ -131,8 +132,9 @@ def _mutate(draw, payload, max_mutations=5):

@st.composite
def payload_from(draw, typ):
typ = calculate_type_for_external_return(typ)
data = draw(data_for_type(typ))
schema = f"({typ.abi_type.selector()})"
schema = typ.abi_type.selector()
payload = abi.encode(schema, data)

return draw(_mutate(payload))
Expand Down

0 comments on commit 9949022

Please sign in to comment.