Skip to content

feat: use json rpc apis for IOTA-Names reads #6617

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

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

DaughterOfMars
Copy link
Contributor

Description of change

Updates the CLI commands lookup, reverse-lookup, get-user-data, and list to use the new JSON RPC APIs.

Links to any relevant issues

#6394

Type of change

Choose a type of change, and delete any options that are not relevant.

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

How the change has been tested

The config.rs file was modified to load ENV vars for the package IDs and such, then a localnet was started, and the packages published. The ENV was set and the server was restarted. Then the client was run against the existing server.

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
apps-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 10:13am
apps-ui-kit ✅ Ready (Inspect) Visit Preview May 22, 2025 10:13am
rebased-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 10:13am
wallet-dashboard ✅ Ready (Inspect) Visit Preview May 22, 2025 10:13am

@github-actions github-actions bot added the ci Issues related to our CI pipeline label Apr 28, 2025
@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels Apr 28, 2025
@DaughterOfMars DaughterOfMars force-pushed the dev-tools/use-json-rpc-apis branch from c4fdae2 to a3b9cb9 Compare April 28, 2025 09:13
Base automatically changed from iota-names to develop April 29, 2025 15:52
@DaughterOfMars DaughterOfMars force-pushed the dev-tools/use-json-rpc-apis branch from a3b9cb9 to 5c3bd1b Compare April 30, 2025 11:20
@DaughterOfMars DaughterOfMars marked this pull request as ready for review April 30, 2025 11:22
@DaughterOfMars DaughterOfMars requested a review from a team as a code owner April 30, 2025 11:22
Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe iota_names_find_all_registration_nfts can be used as well?

@DaughterOfMars
Copy link
Contributor Author

Maybe iota_names_find_all_registration_nfts can be used as well?

How do you think I implemented list? 😆

@thibault-martinez
Copy link
Member

iota_names_find_all_registration_nfts

I was thinking of using it in get_owned_nft_by_name but I forgot about the generic param

} else {
break;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to use GetAllPages if merged before

let mut nfts = get_owned_nfts::<IotaNamesRegistration>(address, context).await?;
let subdomain_nfts =
get_owned_nfts::<SubdomainRegistration>(address, context).await?;
nfts.extend(subdomain_nfts.into_iter().map(|nft| nft.into_inner()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this wasn't creating duplicates btw?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were we requesting both IotaNamesRegistration and SubdomainRegistration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because they don't return the other one

Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List currently does not return SubdomainRegistration

@DaughterOfMars DaughterOfMars requested a review from a team as a code owner May 7, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to our CI pipeline dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants