Append constructor args to runtime bytecode #612
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As identified by @PetarMax, we were not appending arguments to init bytecode when executing constructors taking inputs as we should. This PR
encoded_args
, toConstructor
class, which returns concatenated ABI-encoded arguments based on constructor's inputs<program>
cell in the initial CTerm and adds the corresponding type constraintsConstructorArgsTest.test_constructor_args
that exercises a constructor with two symbolic argumentsThere're a few follow-ups to this PR:
init_cterm
arguments will be included in CSE: Include symbolic contracts corresponding tocontract
fields into accounts #600Method
andConstructor
structure and input processing, with the opportunity for factoring out common logic (I've made an attempt here Refactoring flattening for dynamic types in rules #542, but didn't have enough time to update this PR or do it properly yet)