-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Create new index for tracking Asset metadata #2445
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
#[tokio::test] | ||
#[ignore] // TODO: Need to be able to mint assets for this test to work |
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.
I'm not quite sure how to enable permissions to be able to mint assets for the purposes of this test
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.
I think we need the test to be working before merging this.
.checked_sub(*val) | ||
.ok_or(anyhow::anyhow!("Asset count overflow")) |
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.
Is it possible that if we start indexing from now and not the past we end-up with a fail here because we would find a burn on a token with 0 (because we saw no mint before) ?
let burn_amount = 50; | ||
|
||
// Mint coins first | ||
let mint_tx = TransactionBuilder::mint( |
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.
I think this is not how you mint assets. From the spec : https://github.com/FuelLabs/fuel-specs/blob/master/src/tx-format/transaction.md#transactionmint this transaction is only used by the block producer that's why it's not accepted in the pool.
It's currently used for block rewards I think and it has this much fields for future usage.
However I don't know how to mint asset with the Native assets I never used it but I think it should be that way that you should mint your coins (using script or calls). Maybe someone else in the @FuelLabs/client has more details.
Linked Issues/PRs
Closes Add indexation
AssetId -> (ContractId, SubId)
#2425Related to Consider
assets
in check-account utility fuels-ts#3373Description
This introduces a new GraphQL endpoint that returns info about an asset.
The off-chain worker indexes
Mint
andBurn
events to store this metadata about anAssetId
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]