-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat!: worker.dev_create_account
, worker.dev_deploy
create subaccounts of root account instead of tla (sandbox, testnet)
#369
Conversation
@AlexKushnir1 Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: staleThis pull request was removed from the race, but you can include it again with What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
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.
@AlexKushnir1 Great job! We are getting very close to solving it once and for all!
@race-of-sloths score 13
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.
Overall, looks good to me. I would want to have a one more review here from
@dj8yfo or @PolyProgrammist
will be adding some minor changes here |
generate_tla_credentials and generate_sponsored_credentials do the same procedure. they were merged into a single method, where method doesn"t know and isn"t responsible for how its result will be used. this could be made an associated method instead, but `Worker::<Sandbox>::generate_dev_account_credentials` would be somewhat inconvenient to be called
trait was renamed SponsoredAccountCreator -> RootAccountSubaccountCreator to follow pattern with TopLevelAccountCreator, where created accounts are created funded too and it's kind of implied by default, that they have some balance on themselves, otherwise they'd have been somewhat useless
as it was used as a sync method anyway; there was no benefit from defining it as async
worker.dev_create_account
, worker.dev_deploy
create subaccounts of root account instead of tla (sandbox, testnet)
adding `test_dev_deploy_testnet` will cost somewhat around 80 Test NEAR per week for runs in ci, these are stats based on the number of runs in last week. And the test needed to be added to detect when some functionality becomes broken or if it needs some tweaks with additional delays, if it periodically flakily fails.
@@ -105,17 +114,22 @@ impl TopLevelAccountCreator for Testnet { | |||
}) | |||
} | |||
|
|||
async fn create_tla_and_deploy( | |||
async fn create_root_account_subaccount_and_deploy( |
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.
this appears to never have been run (during the lifespan of pr), as it didn't work
## 🤖 New release * `near-workspaces`: 0.16.0 -> 0.17.0 (⚠️ API breaking changes) ###⚠️ `near-workspaces` breaking changes ``` --- failure inherent_method_missing: pub method removed or renamed --- Description: A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/inherent_method_missing.ron Failed in: Worker::dev_generate, previously in file /tmp/.tmp1p4bcu/near-workspaces/src/network/variants.rs:75 --- failure trait_added_supertrait: non-sealed trait added new supertraits --- Description: A non-sealed trait added one or more supertraits, which breaks downstream implementations of the trait ref: https://doc.rust-lang.org/cargo/reference/semver.html#generic-bounds-tighten impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/trait_added_supertrait.ron Failed in: trait near_workspaces::DevNetwork gained RootAccountSubaccountCreator in file /tmp/.tmpwlIIQu/near-workspaces-rs/workspaces/src/network/variants.rs:215 --- failure trait_missing: pub trait removed or renamed --- Description: A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/trait_missing.ron Failed in: trait near_workspaces::network::AllowDevAccountCreation, previously in file /tmp/.tmp1p4bcu/near-workspaces/src/network/variants.rs:38 --- failure trait_removed_supertrait: supertrait removed or renamed --- Description: A supertrait was removed from a trait. Users of the trait can no longer assume it can also be used like its supertrait. ref: https://doc.rust-lang.org/reference/items/traits.html#supertraits impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/trait_removed_supertrait.ron Failed in: supertrait near_workspaces::network::TopLevelAccountCreator of trait DevNetwork in file /tmp/.tmpwlIIQu/near-workspaces-rs/workspaces/src/network/variants.rs:215 supertrait near_workspaces::prelude::TopLevelAccountCreator of trait DevNetwork in file /tmp/.tmpwlIIQu/near-workspaces-rs/workspaces/src/network/variants.rs:215 supertrait near_workspaces::network::AllowDevAccountCreation of trait DevNetwork in file /tmp/.tmpwlIIQu/near-workspaces-rs/workspaces/src/network/variants.rs:215 ``` <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.17.0](near-workspaces-v0.16.0...near-workspaces-v0.17.0) - 2024-12-26 ### Added - [**breaking**] `worker.dev_create_account`, `worker.dev_deploy` create subaccounts of root account instead of tla (sandbox, testnet) (#369) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
Renamed method (create_tla) and added .testnet to the randomly generated ID sent to the helper when creating a dev account
worker.dev_create_account
has now becomeworker.dev_create_tla
,worker.dev_deploy
has now becomeworker.dev_deploy_tla
main branch (base branch)
sandbox
worker.create_tla
,worker.create_tla_and_deploy
,worker.dev_create_account
,worker.dev_deploy
)testnet
remove-using-tla-on-testnet branch (head branch)
sandbox
worker.create_tla
,worker.create_tla_and_deploy
,worker.dev_create_tla
,dev_deploy_tla
)worker.create_root_account_subaccount
,worker.create_root_account_subaccount_and_deploy
,worker.dev_create_account
,worker.dev_deploy
)testnet
worker.create_root_account_subaccount
,worker.create_root_account_subaccount_and_deploy
,worker.dev_create_account
,worker.dev_deploy
)