-
Notifications
You must be signed in to change notification settings - Fork 176
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
[sozo] Deploy Account #1601
[sozo] Deploy Account #1601
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1601 +/- ##
==========================================
- Coverage 70.32% 70.04% -0.29%
==========================================
Files 309 315 +6
Lines 35126 35547 +421
==========================================
+ Hits 24703 24898 +195
- Misses 10423 10649 +226 ☔ View 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.
Thank you for the work here!
Some minor comments for this first review. You can definitely start the testing phase to ensure everything is well supported.
I've made some tests with Katana, creating a new account and deploying it, works like a charm (tested with --disable-fee
though).
I'm wondering if we can even simplify a bit, for instance without the simulate
for the deployment. @ponderingdemocritus the idea here is not being exhaustive as Starkli, but supporting the minimum features to have sozo
with all the basic account stuff, right?
@lambda-0x if you have a chance to revise this too, happy to have your feedback.
@JimmyFate how are you feeling about this? If you need any support or more information from the given reviews, don't hesitate to reach out to us. 👍 |
Thanks for checking up ❤️ I'll try to complete the PR as soon as I can. |
5c175d8
to
44b6bb0
Compare
@glihm As for simplifying the logic - I feel like, for example the mentioned Could then also remove any other feature with the goal of simplification - probably Also probably should add Will add the tests soon. |
No problem at all, it was more a ping check to ensure you still interested working on that until having the PR in good shape to be merged. :)
Awesome, appreciate the reactivity and the update on that.
Let's keep it then, good point.
I was exactly thinking about this, and usually working with Katana, fees are disabled. But when users are working with other chain than Katana, it can be useful. Also, the
Shouldn't we deploy it again? Because the file is already written, but if not deployed, the file is not updated and still in |
fc1cd0f
to
692869b
Compare
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.
Great work @JimmyFate, thanks for that!
Made some testings, it's getting nice.
Could we add a test for the account deploy to have all 3 tested?
I've revised and the katana runner does not expose the --disable-fee
. So you can to an execute first to transfer funds to the account to deploy.
sozo execute 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 transfer -c <ACCOUNT_ADDRESS>,10000000000000000,0
And you can use the first pre-funded account to do this execute.
@glihm Also, overall this PR has grown quite bigger than I initially expected making it hard to maintain with the rebasing. Other than that my Mac is having a tough time lately with regards to its speed, especially noticeable when building / running dojo in debug mode, so it just pushes me to upgrade sooner than later 🫠 |
Man, you did a great job and appreciate the dedication to that.
If you're ok to do it, let me know. But once again, great job on the PR here and thank you for your time to contribute! Could you anyway please reach out to me on the Dojo discord when you have a chance? 👍 |
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.
Some notes here to finish the PR and testing. I would do this in the week if not tackled before. 👍
crates/sozo/ops/src/account.rs
Outdated
format!("{:#064x}", target_deployment_address).bright_yellow() | ||
); | ||
|
||
eprint!("Press [ENTER] once you've funded the address."); |
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.
Add an option to skip this to allow testing and automated deployments.
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.
done
Cargo.toml
Outdated
serde = { version = "1.0.192", features = [ "derive" ] } | ||
serde_json = { version = "1.0", features = [ "arbitrary_precision" ] } | ||
serde = { version = "1.0.192", features = ["derive"] } | ||
serde_json = { version = "1.0", features = ["arbitrary_precision"] } | ||
serde_with = "2.3.1" | ||
similar-asserts = "1.5.0" | ||
smol_str = { version = "0.2.0", features = [ "serde" ] } | ||
sqlx = { version = "0.7.2", features = [ "chrono", "macros", "regexp", "runtime-async-std", "runtime-tokio", "sqlite", "uuid" ] } | ||
smol_str = { version = "0.2.0", features = ["serde"] } | ||
sqlx = { version = "0.7.2", features = [ | ||
"chrono", | ||
"macros", | ||
"regexp", | ||
"runtime-async-std", | ||
"runtime-tokio", | ||
"sqlite", | ||
"uuid", | ||
] } |
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.
any idea why this formatting changed? on main
even after running cargo +nightly fmt
it stays the same.
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.
while merging with main switched back to formatting we have on main
to be consistent
crates/sozo/ops/src/account.rs
Outdated
format!("{:#064x}", target_deployment_address).bright_yellow() | ||
); | ||
|
||
eprint!("Press [ENTER] once you've funded the address."); |
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.
done
Should wait the #1808 to use |
21c0535
to
cc75f82
Compare
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
Thank you @JimmyFate for your awesome work on this PR! |
Closes DOJ-176
Closes #1574
I would love to get some feedback on the PR before putting effort into writing the tests :)
Introduced changes
UI related changes:
sozo account new / deploy
sozo keystore new / from-key / inspect / inspect-private
Development related changes:
private_key
,keystore_path
,keystore_password
fromAccountOptions
intoSignerOptions