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

Library Values #210

Merged
merged 4 commits into from
Sep 12, 2024
Merged

Library Values #210

merged 4 commits into from
Sep 12, 2024

Conversation

hayesgm
Copy link
Contributor

@hayesgm hayesgm commented Sep 11, 2024

This patch uses library values for a variety of constants as a way to clean up a variety of copy-pasted code in our QuarkScripts code. Small clean-up.

This patch uses library values for a variety of constants as a way to clean up a variety of copy-pasted code in our QuarkScripts code. Small clean-up.
Copy link
Collaborator

@fluffywaffles fluffywaffles left a comment

Choose a reason for hiding this comment

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

😎

Counter counter = new Counter();
assertEq(counter.number(), 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

so were we... re-initializing the counter here? 😆

@hayesgm hayesgm mentioned this pull request Sep 11, 2024
src/quark-core/src/QuarkWallet.sol Outdated Show resolved Hide resolved
This patch adds back cooperative storage, which simply isolates each
`read` and `write` call in `QuarkScript` to pulling the active nonce and
isolating storage keys on that value.

Notes:
* This is cooperative. A malicious script is free to change any stored
data.
* After a nested quark operation, the nonce value is cleared and thus
will not be properly read. We raise an error in this case.
@hayesgm hayesgm merged commit 997bd3d into hayesgm/get-nonce Sep 12, 2024
2 of 4 checks passed
@hayesgm hayesgm deleted the hayesgm/library-values branch September 12, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants