Skip to content

Append constructor args to runtime bytecode #612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 10, 2024

Conversation

palinatolmach
Copy link
Collaborator

@palinatolmach palinatolmach commented Jun 10, 2024

As identified by @PetarMax, we were not appending arguments to init bytecode when executing constructors taking inputs as we should. This PR

  • adds a new property, encoded_args, to Constructor class, which returns concatenated ABI-encoded arguments based on constructor's inputs
  • if the function being executed is a constructor, appends those arguments to the init bytecode and insert the result into the <program> cell in the initial CTerm and adds the corresponding type constraints
  • adds a test, ConstructorArgsTest.test_constructor_args that exercises a constructor with two symbolic arguments

There're a few follow-ups to this PR:

@palinatolmach palinatolmach force-pushed the append-constructor-args branch from e2329f4 to d2446a4 Compare June 10, 2024 09:37
@palinatolmach palinatolmach force-pushed the append-constructor-args branch from 0092170 to 50b0f6d Compare June 10, 2024 10:37
@palinatolmach palinatolmach marked this pull request as ready for review June 10, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants