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

refactor(docs/examples): Create a utility methods lib #1821

Merged

Conversation

miker83z
Copy link
Contributor

Description of change

This PR simply refactors the examples in order to group the following methods into one file:

  • setup_keystore
  • clean_keystore
  • fund_address
  • publish_custom_nft_package

The docs were updated accordingly.

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

  • cargo run --example x for each example
  • pnpm iota-docs dev

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@miker83z miker83z requested review from valeriyr and Dkwcs August 14, 2024 09:38
@miker83z miker83z requested a review from a team as a code owner August 14, 2024 09:38
@miker83z miker83z self-assigned this Aug 14, 2024
@miker83z miker83z added the sc-platform Issues related to the Smart Contract Platform group. label Aug 14, 2024
Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

@miker83z miker83z merged commit 3a45555 into vm-language/stardust-models-docs Aug 14, 2024
32 of 34 checks passed
@miker83z miker83z deleted the vm-language/stardust-models-docs-fix branch August 14, 2024 16:19
valeriyr added a commit that referenced this pull request Aug 22, 2024
…ock outputs, documentation enhancement (#1862)

* feat(docs): Create an examples folder for Rust code (#1503)

* feat(docs): create an example folder for Rust code

* Update docs/examples/rust/Cargo.toml

---------

Co-authored-by: Dr-Electron <[email protected]>

* fix(docs/examples): remove base_keystore example

* feat(iota-sdk): added an alias output claim example (#1493)

* feat(iota-sdk): added an alias output claim example

* feat(docs): moved the alias output claim example

* refactor(docs): used the extract_and_send_to function to simplify the example

* fix(docs): added a license header and an example description

* fix(docs): alias-output-claim comments

* fix(docs): clippy

* fix(docs): move the alias-output-claim example into the stardust subfolder

* fix(docs): fixed the example after rebasing

* fix(docs): move the alias-output-claim example

* fix(docs): alias-output-claim logs improved

* feat(iota-sdk): add basic output claim example

* fix(iota-sdk): use the proper native token bag key

* fix(iota-sdk): move basic output example in docs

* fix(docs/examples): comments

* fix(docs/examples): license header

* fix(docs/examples): basic output address

* fix(docs/examples): fix clippy

* fix(docs/examples): fix from comments

* fix(docs/examples): move basic output example

* fix(docs/examples): remove src folder

* feat(docs/examples): nft output extraction example based on sdk (#1478)

* feat(docs): add nft output claiming test example based on sdk usage

* feat(ci): add docs examples in rust (#1539)

* fix(docs/examples): add license

* fix(docs/examples): cargo lock

* chore(docs/examples): add clarification comment

* feat(docs/examples): add unlock condition example based on rust sdk (#1559)

* feat(docs): add unlock condition example based on rust sdk
Add fund_address function for sponsoring the main transaction

* feat(docs/examples): Add foundry output claim example (#1575)

* feat(docs/examples): ad foundry output claim

* fix(docs/examples): cargo toml and clones

* feat(docs/examples): Test the positive scenarios for using an NFT object (#1615)

* Add example of third party simple nft package, PTB that creates custom nft from stardust::nft
Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* feat(docs/stardust): Add docs for basic output claim (#1639)

* feat(docs/stardust): add docs for basic output claim

* Update docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs

Co-authored-by: Thoralf-M <[email protected]>

* Update docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs

Co-authored-by: Thoralf-M <[email protected]>

---------

Co-authored-by: Thoralf-M <[email protected]>

* feat(docs/content): documentation - claim NFT Output (#1654)

* feat(docs/content): documentation - claim NFT Output

* fear(docs/content) example of conversion of a stardust NFT into a custom user's. (#1669)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* Review comment fixes

* Fix Nft naming

* Fix review comments

---------

Co-authored-by: Mirko Zichichi <[email protected]>

* feat(docs): Using an Alias object test scenario (#1679)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* feat(docs): extended the custom_nft package with collections

* Review comment fixes

* Fix Nft naming

* fix(docs): NFTs conversion docs were fixed after refactoring

* fix(docs): spelling issues

---------

Co-authored-by: Dkwcs <[email protected]>

* refactor(docs/content): Split claiming docs in a tree (#1710)

* refactor(docs/content): split claiming docs in a tree

* feat(docs/content): add address unlock condition claim

* fix(docs/content): claiming references

* fix(docs/content): claiming references 2

* chore(docs): fix doc tree for claiming

---------

Co-authored-by: Levente Pap <[email protected]>

* feat(docs): Alias usage documentation was added (#1723)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* feat(docs): extended the custom_nft package with collections

* Review comment fixes

* Fix Nft naming

* fix(docs): NFTs conversion docs were fixed after refactoring

* fix(docs): spelling issues

* feat(docs): added alias documentation

* fix(docs): spelling issues

* fix(docs): review comments

---------

Co-authored-by: Dkwcs <[email protected]>

* feat(docs/content): docs implementation for address unlock condition example (#1706)

* feat(docs/content): docs impl for address unlock condition

* feat(docs/content): Create example doc for claiming a Foundry Output (#1724)

* feat(docs/content): add doc example of claiming foundry output

* fix(docs/content): enhance claiming and fix links (#1768)

* feat(docs/examples): Add self sponsor example for Shimmer assets (#1772)

* feat(docs/examples): add self sponsor example

* fix(docs/content): make self sponsor example for Shimmer

* fix(docs/examples): smr comment

* fix(docs/examples): dprint

* fix(docs/examples): remove double comment

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/examples): client server comments

---------

Co-authored-by: Thoralf-M <[email protected]>

* feat(docs/content): Add Shimmer self-sponsorship claim docs (#1773)

* feat(docs/examples): add self sponsor example

* fix(docs/content): make self sponsor example for Shimmer

* fix(docs/examples): smr comment

* fix(docs/examples): dprint

* feat(docs/content): add shimmer self-sponsorship claim

* fix(docs/content): spaces

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/content): code lines

---------

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/content): improvements of docs navigation by adding links (#1774)

* fix(docs/content): improvements of docs navigation by adding links

* fix(docs/content): add additional links, readable improvements.

* fix(docs/content/../claiming): simplify navigation with additional links for OTW, Bag, Coin, Unlock Condition

* refactor(docs/examples): Create a utility methods lib (#1821)

* refactor(docs/examples): create a utility methods lib

* refactor(docs/examples): update examples

* refactor(docs/content): update examples code lines in docs

* fix(docs/examples): move module path

* fix(docs/examples): address uc name

* Update docs/examples/rust/src/lib.rs

Co-authored-by: Thoralf-M <[email protected]>

* Update docs/content/developer/stardust/claiming/nft.mdx

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/examples): move utils out of lib

---------

Co-authored-by: Thoralf-M <[email protected]>

---------

Co-authored-by: Mirko Zichichi <[email protected]>
Co-authored-by: Dr-Electron <[email protected]>
Co-authored-by: Valerii Reutov <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>
Co-authored-by: Levente Pap <[email protected]>
valeriyr added a commit that referenced this pull request Aug 22, 2024
* feat(docs): Create an examples folder for Rust code (#1503)

* feat(docs): create an example folder for Rust code

* Update docs/examples/rust/Cargo.toml

---------

Co-authored-by: Dr-Electron <[email protected]>

* fix(docs/examples): remove base_keystore example

* feat(iota-sdk): added an alias output claim example (#1493)

* feat(iota-sdk): added an alias output claim example

* feat(docs): moved the alias output claim example

* refactor(docs): used the extract_and_send_to function to simplify the example

* fix(docs): added a license header and an example description

* fix(docs): alias-output-claim comments

* fix(docs): clippy

* fix(docs): move the alias-output-claim example into the stardust subfolder

* fix(docs): fixed the example after rebasing

* fix(docs): move the alias-output-claim example

* fix(docs): alias-output-claim logs improved

* feat(iota-sdk): add basic output claim example

* fix(iota-sdk): use the proper native token bag key

* fix(iota-sdk): move basic output example in docs

* fix(docs/examples): comments

* fix(docs/examples): license header

* fix(docs/examples): basic output address

* fix(docs/examples): fix clippy

* fix(docs/examples): fix from comments

* fix(docs/examples): move basic output example

* fix(docs/examples): remove src folder

* feat(docs/examples): nft output extraction example based on sdk (#1478)

* feat(docs): add nft output claiming test example based on sdk usage

* feat(ci): add docs examples in rust (#1539)

* fix(docs/examples): add license

* fix(docs/examples): cargo lock

* chore(docs/examples): add clarification comment

* feat(docs/examples): add unlock condition example based on rust sdk (#1559)

* feat(docs): add unlock condition example based on rust sdk
Add fund_address function for sponsoring the main transaction

* feat(docs/examples): Add foundry output claim example (#1575)

* feat(docs/examples): ad foundry output claim

* fix(docs/examples): cargo toml and clones

* feat(docs/examples): Test the positive scenarios for using an NFT object (#1615)

* Add example of third party simple nft package, PTB that creates custom nft from stardust::nft
Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* feat(docs/stardust): Add docs for basic output claim (#1639)

* feat(docs/stardust): add docs for basic output claim

* Update docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs

Co-authored-by: Thoralf-M <[email protected]>

* Update docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs

Co-authored-by: Thoralf-M <[email protected]>

---------

Co-authored-by: Thoralf-M <[email protected]>

* feat(docs/content): documentation - claim NFT Output (#1654)

* feat(docs/content): documentation - claim NFT Output

* fear(docs/content) example of conversion of a stardust NFT into a custom user's. (#1669)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* Review comment fixes

* Fix Nft naming

* Fix review comments

---------

Co-authored-by: Mirko Zichichi <[email protected]>

* feat(docs): Using an Alias object test scenario (#1679)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* feat(docs): extended the custom_nft package with collections

* Review comment fixes

* Fix Nft naming

* fix(docs): NFTs conversion docs were fixed after refactoring

* fix(docs): spelling issues

---------

Co-authored-by: Dkwcs <[email protected]>

* refactor(docs/content): Split claiming docs in a tree (#1710)

* refactor(docs/content): split claiming docs in a tree

* feat(docs/content): add address unlock condition claim

* fix(docs/content): claiming references

* fix(docs/content): claiming references 2

* chore(docs): fix doc tree for claiming

---------

Co-authored-by: Levente Pap <[email protected]>

* feat(docs): Alias usage documentation was added (#1723)

* Add example ofr third party simple nft package, PTB that create custom nft from stardust::nft

* feat(examples/docs): Add a conversion function for custom NFTs to allow migrating custom NFTs from Stardust NFTs

* Add function that publishes random nft package via CLI.

* feat(examples): replace package publishing approach with iota-move-builder

* Fix chkecs

* Minor refactoring

* dprint fix

* Fix review comments

* feat(docs/content): add doc related to conversion of a NFT Output into sutom NFT

* feat(docs): extended the custom_nft package with collections

* Review comment fixes

* Fix Nft naming

* fix(docs): NFTs conversion docs were fixed after refactoring

* fix(docs): spelling issues

* feat(docs): added alias documentation

* fix(docs): spelling issues

* fix(docs): review comments

---------

Co-authored-by: Dkwcs <[email protected]>

* feat(docs/content): docs implementation for address unlock condition example (#1706)

* feat(docs/content): docs impl for address unlock condition

* feat(docs/content): Create example doc for claiming a Foundry Output (#1724)

* feat(docs/content): add doc example of claiming foundry output

* fix(docs/content): enhance claiming and fix links (#1768)

* feat(docs/examples): Add self sponsor example for Shimmer assets (#1772)

* feat(docs/examples): add self sponsor example

* fix(docs/content): make self sponsor example for Shimmer

* fix(docs/examples): smr comment

* fix(docs/examples): dprint

* fix(docs/examples): remove double comment

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/examples): client server comments

---------

Co-authored-by: Thoralf-M <[email protected]>

* feat(docs/content): Add Shimmer self-sponsorship claim docs (#1773)

* feat(docs/examples): add self sponsor example

* fix(docs/content): make self sponsor example for Shimmer

* fix(docs/examples): smr comment

* fix(docs/examples): dprint

* feat(docs/content): add shimmer self-sponsorship claim

* fix(docs/content): spaces

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/content): code lines

---------

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/content): improvements of docs navigation by adding links (#1774)

* fix(docs/content): improvements of docs navigation by adding links

* fix(docs/content): add additional links, readable improvements.

* fix(docs/content/../claiming): simplify navigation with additional links for OTW, Bag, Coin, Unlock Condition

* refactor(docs/examples): Create a utility methods lib (#1821)

* refactor(docs/examples): create a utility methods lib

* refactor(docs/examples): update examples

* refactor(docs/content): update examples code lines in docs

* fix(docs/examples): move module path

* fix(docs/examples): address uc name

* Update docs/examples/rust/src/lib.rs

Co-authored-by: Thoralf-M <[email protected]>

* Update docs/content/developer/stardust/claiming/nft.mdx

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/examples): move utils out of lib

---------

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/content): add links to simplify docs navigation

* feat(docs): Move content was fixed in the Developer/Getting Started documentation part

* fix(docs/context): add links, minor docs refactoring

* fix(docs/content): documentation code examples enhancement

* fix(docs): fixed tokenomics link

---------

Co-authored-by: Mirko Zichichi <[email protected]>
Co-authored-by: Dr-Electron <[email protected]>
Co-authored-by: Valerii Reutov <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>
Co-authored-by: Levente Pap <[email protected]>
Co-authored-by: Thibault Martinez <[email protected]>
lucas-tortora pushed a commit that referenced this pull request Aug 26, 2024
* refactor(docs/examples): create a utility methods lib

* refactor(docs/examples): update examples

* refactor(docs/content): update examples code lines in docs

* fix(docs/examples): move module path

* fix(docs/examples): address uc name

* Update docs/examples/rust/src/lib.rs

Co-authored-by: Thoralf-M <[email protected]>

* Update docs/content/developer/stardust/claiming/nft.mdx

Co-authored-by: Thoralf-M <[email protected]>

* fix(docs/examples): move utils out of lib

---------

Co-authored-by: Thoralf-M <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants