-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add declare script for presets #1118
Add declare script for presets #1118
Conversation
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.
Good job! Left a couple of thoughts
packages/presets/scripts/src/declare_presets/declare_presets.cairo
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1118 +/- ##
=======================================
Coverage 88.87% 88.87%
=======================================
Files 57 57
Lines 1375 1375
=======================================
Hits 1222 1222
Misses 153 153 Continue to review full report in Codecov by Sentry.
|
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.
Nice start @andrew-fleming. I wonder why is this located inside the presets package being a housekeeping improving script. I would move it out of it, maybe into a sncast_scripts directory on the root of the project, that won't be part of the released workspace.
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.
Good job! Left a couple of suggestions and questions
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
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.
Looking good @andrew-fleming. Left some comments.
--account path/to/account.json \ | ||
--keystore path/to/key.json \ | ||
script run declare_presets \ | ||
--url http://127.0.0.1:5050 |
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.
--account path/to/account.json \ | |
--keystore path/to/key.json \ | |
script run declare_presets \ | |
--url http://127.0.0.1:5050 | |
script run declare_presets \ | |
--account path/to/account.json \ | |
--keystore path/to/key.json \ | |
--url http://127.0.0.1:5050 |
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.
Having options after the command feels more natural.
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 agree, but sncast only accepts the account flag before the command
sncast_scripts/Scarb.toml
Outdated
@@ -0,0 +1,25 @@ | |||
[package] | |||
name = "sncast_scripts" | |||
version = "0.17.0" |
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.
version = "0.17.0" | |
version = "0.1.0" |
Does this need to be pegged to the latest release from the library?
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.
Mmm no, probably not. Good call
@@ -0,0 +1 @@ | |||
mod declare_presets; |
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.
Why can't we have the script code in here? Do we need the extra directory?
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.
Nope, updated!
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.
LGTM!
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.
LGTM!
This PR proposes to add a sncast script that declares all the preset contracts. This script aims to improve the releasing process.
PR Checklist