-
Notifications
You must be signed in to change notification settings - Fork 0
/
query.go
55 lines (42 loc) · 1.24 KB
/
query.go
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package types
// See https://github.com/CosmWasm/token-bindings/blob/main/packages/bindings/src/query.rs
type TokenFactoryQuery struct {
/// Given a subdenom minted by a contract via `OsmosisMsg::MintTokens`,
/// returns the full denom as used by `BankMsg::Send`.
FullDenom *FullDenom `json:"full_denom,omitempty"`
Admin *DenomAdmin `json:"admin,omitempty"`
Metadata *GetMetadata `json:"metadata,omitempty"`
DenomsByCreator *DenomsByCreator `json:"denoms_by_creator,omitempty"`
Params *GetParams `json:"params,omitempty"`
}
// query types
type FullDenom struct {
CreatorAddr string `json:"creator_addr"`
Subdenom string `json:"subdenom"`
}
type GetMetadata struct {
Denom string `json:"denom"`
}
type DenomAdmin struct {
Denom string `json:"denom"`
}
type DenomsByCreator struct {
Creator string `json:"creator"`
}
type GetParams struct{}
// responses
type FullDenomResponse struct {
Denom string `json:"denom"`
}
type AdminResponse struct {
Admin string `json:"admin"`
}
type MetadataResponse struct {
Metadata *Metadata `json:"metadata,omitempty"`
}
type DenomsByCreatorResponse struct {
Denoms []string `json:"denoms"`
}
type ParamsResponse struct {
Params Params `json:"params"`
}