Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName The name that will be used throughout the module ModuleName = "issuance" // StoreKey Top level store key where all module items will be stored StoreKey = ModuleName // RouterKey Top level router key RouterKey = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName // QuerierRoute route used for abci queries QuerierRoute = ModuleName )
Variables ¶
var ( KeyAssets = []byte("Assets") DefaultAssets = Assets{} ModuleAccountName = ModuleName AssetSupplyPrefix = []byte{0x01} PreviousBlockTimeKey = []byte{0x02} )
Parameter keys and default values
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { Owner sdk.AccAddress `json:"owner" yaml:"owner"` Denom string `json:"denom" yaml:"denom"` BlockedAddresses []sdk.AccAddress `json:"blocked_addresses" yaml:"blocked_addresses"` Paused bool `json:"paused" yaml:"paused"` Blockable bool `json:"blockable" yaml:"blockable"` RateLimit RateLimit `json:"rate_limit" yaml:"rate_limit"` }
Asset type for assets in the issuance module
type AssetSupply ¶
type AssetSupply struct { CurrentSupply sdk.Coin `json:"current_supply" yaml:"current_supply"` TimeElapsed time.Duration `json:"time_elapsed" yaml:"time_elapsed"` }
AssetSupply contains information about an asset's rate-limited supply (the total supply of the asset is tracked in the top-level supply module)
func NewAssetSupply ¶
func NewAssetSupply(currentSupply sdk.Coin, timeElapsed time.Duration) AssetSupply
NewAssetSupply initializes a new AssetSupply
func (AssetSupply) GetDenom ¶
func (a AssetSupply) GetDenom() string
GetDenom getter method for the denom of the asset supply
func (AssetSupply) Validate ¶
func (a AssetSupply) Validate() error
Validate performs a basic validation of an asset supply fields.
type GenesisState ¶
type GenesisState struct { Params Params `json:"params" yaml:"params"` Supplies AssetSupplies `json:"supplies" yaml:"supplies"` }
GenesisState is the state that must be provided at genesis for the issuance module
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns the default GenesisState for the issuance module
func NewGenesisState ¶
func NewGenesisState(params Params, supplies AssetSupplies) GenesisState
NewGenesisState returns a new GenesisState
type Params ¶
type Params struct {
Assets Assets `json:"assets" yaml:"assets"`
}
Params governance parameters for the issuance module
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns default params for issuance module