Skip to content

Commit

Permalink
fix[lang]: allow print schema larger than 32 bytes
Browse files Browse the repository at this point in the history
historically, schemas larger than 32 bytes were blocked, presumably as a
sanity check. however, it is not really needed.
  • Loading branch information
charles-cooper committed Jan 20, 2025
1 parent 4d693b7 commit a16291c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2293,12 +2293,11 @@ def build_IR(self, expr, args, kwargs, context):

else:
method_id = method_id_int("log(string,bytes)")
schema = args_abi_t.selector_name().encode("utf-8")
if len(schema) > 32:
raise CompilerPanic(f"print signature too long: {schema}")

schema = args_abi_t.selector_name().encode("utf-8")
schema_t = StringT(len(schema))
schema_buf = context.new_internal_variable(schema_t)

ret = ["seq"]
ret.append(["mstore", schema_buf, len(schema)])

Expand Down

0 comments on commit a16291c

Please sign in to comment.