-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
ivoysey
commented
Feb 25, 2022
•
edited
Loading
edited
- 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
…yul from running solc, for local debugging
…r transaction names
… the contract name prefix
…saction names. this addresses #407
…he default constructor
…an actually use fold
…tion because this code alsp appears in the assignment case
…g them to std out in CI
…first address in storage, removing call to the tracer after new
…aring (x > threshold-1) so that we look in the right place for the first field in the first slot in storage
@@ -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 }} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.