treasury
The treasury manages all stable currencies which are supported by RIZON Blockchain.
Currency defines a single currency info
type Currency struct {
// denom is the name of the currency
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
// desc is a description of the currency
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty" yaml:"desc"`
// owner is who can mint this currency
Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
// mintable indicates whether this currency can be minted or not
Mintable bool `protobuf:"varint,4,opt,name=mintable,proto3" json:"mintable,omitempty" yaml:"mintable"`
}
Currencies is the list of all supported currencies' name
type Currencies struct {
// denoms is the denom list of all currencies
Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty" yaml:"denoms"`
}
Sequence describes currency sequence number of current state
type Sequence struct {
// number is the currency sequence number of current state
Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty" yaml:"number"`
}
Params defines the parameters for the treasury module
type Params struct {
// mintable indicates whether every currencie of treasury module are able to mint or not
Mintable bool `protobuf:"varint,1,opt,name=mintable,proto3" json:"mintable,omitempty" yaml:"mintable"`
// sequence of currency state
Sequence int64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty" yaml:"sequence"`
// currency_list is the list of supported currencies
CurrencyList []Currency `protobuf:"bytes,3,rep,name=currency_list,json=currencyList,proto3" json:"currency_list" yaml:"currency_list"`
}
MsgMintRequest defines a SDK message for minting currency
type MsgMintRequest struct {
// receiver is the target address of minted coins
Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty" yaml:"receiver"`
// signer is who requests minting
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"`
// amount is the amount to mint
Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}
{
"body": {
"messages": [
{
"@type": "/rizonworld.rizon.treasury.MsgMintRequest",
"amount": {
"amount": "100",
"denom": "skrw"
},
"receiver": "rizon136fzkc73rm5def5fngs386qdlxcuvxvrte8lk7",
"signer": "rizon136fzkc73rm5def5fngs386qdlxcuvxvrte8lk7"
}
],
}
MsgBurnRequest defines a SDK message for burning currency
type MsgBurnRequest struct {
// signer is who requests burning
Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"`
// amount is the amount to burn
Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}
{
"body": {
"messages": [
{
"@type": "/rizonworld.rizon.treasury.MsgBurnRequest",
"amount": {
"amount": "100",
"denom": "susd"
},
"signer": "rizon136fzkc73rm5def5fngs386qdlxcuvxvrte8lk7"
}
],
}
TBD
Type | AttributeKey | AttributeValue |
mint | denom | {msg.Amount.Denom} |
mint | receiver | {msg.Receiver} |
mint | amount | {msg.Amount.Amount} |
message | module | treasury |
message | sender | {msg.Signer} |
Type | AttributeKey | AttributeValue |
burn | denom | {msg.Amount.Denom} |
burn | amount | {msg.Amount.Amount} |
message | module | treasury |
message | sender | {msg.Signer} |
Key | Type | Example |
Mintable | bool | true |
Sequence | int64 | 1 |
CurrencyList | []Currency | [{"denom":"skrw","desc":"stable coin of KRW","owner":"rizon136fzkc73rm5def5fngs386qdlxcuvxvrte8lk7","mintable":true}] |
Last modified 2yr ago