-
Notifications
You must be signed in to change notification settings - Fork 17
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(sui-genesis-builder): implement creation of basic outputs #159
Conversation
While creating foundries now maps the `(ObjectID, TypeOrigin)` to the `TokenId`.
…reate_basic_objects
24f6454
to
3c1e1de
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.
Hey @kodemartin, absolutely fantastic work. Could follow it well.
I have added already a few thoughts in advance while reading it.
…utor::create_basic_objects
…n::Executor::create_basic_objects
…igration::Executor::create_basic_objects
Co-authored-by: Philipp Gackstatter <[email protected]>
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.
Just a couple of oversights! Then it's ready to be merged
Also, the PR description should be aligned with the latest commits! |
Co-authored-by: Mirko Zichichi <[email protected]>
Updated. |
* feat(sui-genesis-builder): store TypeOrigin of native tokens * refactor(sui-genesis-builder): split stardust::types module * feat(sui-genesis-builder): add unlock types * feat(sui-genesis-builder): add BasicOutput type * refactor(sui-genesis-builder): use OutputHeader while creating outputs * feat(sui-genesis-builder): implement stardust::migration::Executor::create_basic_objects * feat(sui-genesis-builder): fix native-token object ids during migration * fix(sui-genesis-builder): correct BasicOutput::type_ module and name Co-authored-by: Philipp Gackstatter <[email protected]> * fix(sui-genesis-builder): load packages and input objects correctly * fix(sui-genesis-builder): dummy transfer Bag object * fix(sui-genesis-builder): native token coins get updated after split * fix(sui-genesis-builder): native token coins get updated after create bag * fix: clippy * refactor(sui-genesis-builder): store ObjectID in Executor::native_tokens * fix(sui-genesis-builder): transform simple basic outputs into coins * fix(sui-genesis-builder): use fresh ids for native tokens * fix(sui-genesis-builder): generate native token coins object id from TxContext * fix(sui-genesis-builder): sort all the outputs * fix(sui-genesis-builder): use string as a bag key * fix(sui-genesis-builder): amend public-transfer flag of coin object Co-authored-by: Mirko Zichichi <[email protected]> * fix(sui-genesis-builder): basic output objects * refactor(sui-genesis-builder): remove bag from written objects --------- Co-authored-by: Philipp Gackstatter <[email protected]> Co-authored-by: Mirko Zichichi <[email protected]>
* feat(sui-genesis-builder): store TypeOrigin of native tokens * refactor(sui-genesis-builder): split stardust::types module * feat(sui-genesis-builder): add unlock types * feat(sui-genesis-builder): add BasicOutput type * refactor(sui-genesis-builder): use OutputHeader while creating outputs * feat(sui-genesis-builder): implement stardust::migration::Executor::create_basic_objects * feat(sui-genesis-builder): fix native-token object ids during migration * fix(sui-genesis-builder): correct BasicOutput::type_ module and name Co-authored-by: Philipp Gackstatter <[email protected]> * fix(sui-genesis-builder): load packages and input objects correctly * fix(sui-genesis-builder): dummy transfer Bag object * fix(sui-genesis-builder): native token coins get updated after split * fix(sui-genesis-builder): native token coins get updated after create bag * fix: clippy * refactor(sui-genesis-builder): store ObjectID in Executor::native_tokens * fix(sui-genesis-builder): transform simple basic outputs into coins * fix(sui-genesis-builder): use fresh ids for native tokens * fix(sui-genesis-builder): generate native token coins object id from TxContext * fix(sui-genesis-builder): sort all the outputs * fix(sui-genesis-builder): use string as a bag key * fix(sui-genesis-builder): amend public-transfer flag of coin object Co-authored-by: Mirko Zichichi <[email protected]> * fix(sui-genesis-builder): basic output objects * refactor(sui-genesis-builder): remove bag from written objects --------- Co-authored-by: Philipp Gackstatter <[email protected]> Co-authored-by: Mirko Zichichi <[email protected]>
* feat(sui-genesis-builder): store TypeOrigin of native tokens * refactor(sui-genesis-builder): split stardust::types module * feat(sui-genesis-builder): add unlock types * feat(sui-genesis-builder): add BasicOutput type * refactor(sui-genesis-builder): use OutputHeader while creating outputs * feat(sui-genesis-builder): implement stardust::migration::Executor::create_basic_objects * feat(sui-genesis-builder): fix native-token object ids during migration * fix(sui-genesis-builder): correct BasicOutput::type_ module and name Co-authored-by: Philipp Gackstatter <[email protected]> * fix(sui-genesis-builder): load packages and input objects correctly * fix(sui-genesis-builder): dummy transfer Bag object * fix(sui-genesis-builder): native token coins get updated after split * fix(sui-genesis-builder): native token coins get updated after create bag * fix: clippy * refactor(sui-genesis-builder): store ObjectID in Executor::native_tokens * fix(sui-genesis-builder): transform simple basic outputs into coins * fix(sui-genesis-builder): use fresh ids for native tokens * fix(sui-genesis-builder): generate native token coins object id from TxContext * fix(sui-genesis-builder): sort all the outputs * fix(sui-genesis-builder): use string as a bag key * fix(sui-genesis-builder): amend public-transfer flag of coin object Co-authored-by: Mirko Zichichi <[email protected]> * fix(sui-genesis-builder): basic output objects * refactor(sui-genesis-builder): remove bag from written objects --------- Co-authored-by: Philipp Gackstatter <[email protected]> Co-authored-by: Mirko Zichichi <[email protected]>
Description of change
This patch implements the transformation logic for basic outputs in the
sui_genesis_builder::stardust::migration::Executor
.It follows the basic_migration_graph logic with the following exceptions (cc: @miker83z):
It further amends the existing implementation in
sui_genesis_builder::stardust::migration
according to the following:create_{<output-kind>_objects
update the executor store internally and do not return the created objects. Less pure, but more ergonomic.Will rebase to squash fixups before merging.
Links to any relevant issues
Resolves #112
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
cargo build -p sui-genesis-builder
Change checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.