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

[INDEXER_CLIENT] list_substates method returns only one substate #1257

Open
humb1t opened this issue Jan 22, 2025 · 0 comments
Open

[INDEXER_CLIENT] list_substates method returns only one substate #1257

humb1t opened this issue Jan 22, 2025 · 0 comments
Milestone

Comments

@humb1t
Copy link
Contributor

humb1t commented Jan 22, 2025

Describe the bug

list_substates method with a filter by template hex returns only one earliest substate of the component.

To Reproduce

  1. Upload template
  2. Create a component
  3. Execute method that changes component's state
  4. Execute code below:
    let substate_ids = client
        .list_substates(ListSubstatesRequest {
            filter_by_template: Some(template_address),
            filter_by_type: None,
            limit: None,
            offset: None,
        })
        .await?
        .substates
        .into_iter()
        .map(|list_item| (list_item.substate_id, list_item.version));
    println!("{substate_ids:?}");

Expected behavior

List of all substates with correct versions printed.

Actual behavior

Map { iter: IntoIter([ListSubstateItem { substate_id: Component(ComponentAddress(BorTag(Required(ObjectKey([54, 239, 36, 180, 109, 225, 130, 68, 160, 36, 165, 249, 242, 119, 225, 86, 89, 15, 152, 190, 87, 118, 151, 191, 132, 160, 79, 237, 67, 226, 140, 138]))))), module_name: Some("Tex"), version: 0, template_address: Some(Hash([249, 215, 112, 122, 150, 9, 77, 93, 96, 144, 171, 156, 10, 205, 73, 14, 27, 114, 162, 102, 62, 203, 43, 37, 41, 39, 135, 240, 108, 194, 188, 224])), timestamp: 1737479916 }]) }

Only one substate with old version returned.

Screenshots

Image

Desktop (please complete the following information):

  • OS & Version: [e.g. iOS 10.2.1]
  • Browser & Version [e.g. chrome v71.0.12345]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser & Version [e.g. stock browser v0.1.2]

Additional context

Changing the limit from None to Some(10) won't change the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Selected for development
Development

No branches or pull requests

2 participants