You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:**
Please merge #2463 first
---
## Linked Issues/PRs
- Closes#2425
- Related to FuelLabs/fuels-ts#3373
- It's based on top of #2463
in order to have access to several mechanisms (like `IndexationError`)
implemented previously for other indexes.
## Description
<!-- List of detailed changes -->
This introduces a new GraphQL endpoint that returns info about an asset.
Similarly to other indexes, the asset metadata index is only available
when the client was started with no database and was able to sync from
scratch. If the index is not available, this endpoint will return an
error:
```
{
"data": null,
"errors": [
{
"message": "Asset metadata index is not available",
"locations": [...],
}
]
}
```
The off-chain worker indexes `Mint` and `Burn` events to store this
metadata about an `AssetId`.
## Checklist
- [x] New behavior is reflected in tests
### Before requesting review
- [x] I have reviewed the code myself
### After merging, notify other teams
[Add or remove entries as needed]
- [ ] [TS SDK](https://github.com/FuelLabs/fuels-ts/)
---------
Co-authored-by: Rafał Chabowski <[email protected]>
Co-authored-by: Green Baneling <[email protected]>
Co-authored-by: AurelienFT <[email protected]>
Co-authored-by: AurelienFT <[email protected]>
Definition of done
GraphQL provides a new endpoint that returns information about the asset like:
SubId
ContractId
Implementation details
First, we need to add a new indexation table into the off-chain database.
If the off chain worker sees
Mint
orBurn
receipt, it indexes the information about sub id, contract id and updates total amount.The text was updated successfully, but these errors were encountered: