Skip to content
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

generate default constructors and manipulate storage after copying #428

Merged
merged 57 commits into from
Mar 29, 2022

Conversation

ivoysey
Copy link
Collaborator

@ivoysey ivoysey commented Feb 25, 2022

  • generates default constructors for every object
  • calls those constructors to build a copy of the main contract in memory at deployment time
  • calls a copying tracer to migrate that to storage
  • implements a convention on addresses to differentiate storage from memory
  • subsequent transactions dynamically check pointers to read them from the right place
  • added test cases
  • updates to the testing harness to check for logs from both deployment and invocation

…tion because this code alsp appears in the assignment case
@ivoysey ivoysey requested a review from mcoblenz March 24, 2022 22:00
@ivoysey ivoysey marked this pull request as ready for review March 24, 2022 22:00
@@ -9,6 +9,36 @@ object "{{contractName}}" {
code {
{{! init free memory pointer, see chatper "Layout in Memory" of the Solidity doc}}
{{memoryInit}}
{{! todo: these are copied from below }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear what is to be done. And where is below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a way to give names to string in mustache, or else export the repeated chunk of code from the Scala call to the template so that it's not copied twice. I'll update the comment to make that possible fix more clear.

@ivoysey ivoysey merged commit 78d789c into master Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants