fuel_core_client/client/schema/
assets.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::client::schema::{
    schema,
    AssetId,
    ContractId,
    SubId,
    U128,
};

#[derive(cynic::QueryVariables, Debug)]
pub struct AssetInfoArg {
    pub id: AssetId,
}

#[derive(cynic::QueryFragment, Clone, Debug)]
#[cynic(
    schema_path = "./assets/schema.sdl",
    graphql_type = "Query",
    variables = "AssetInfoArg"
)]
pub struct AssetInfoQuery {
    #[arguments(id: $id)]
    pub asset_details: AssetInfoDetails,
}

#[derive(cynic::QueryFragment, Clone, Debug)]
#[cynic(schema_path = "./assets/schema.sdl")]
pub struct AssetInfoDetails {
    pub sub_id: SubId,
    pub contract_id: ContractId,
    pub total_supply: U128,
}