Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
- func NewHandler(keeper Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) types.Tags
- func (am AppModule) EndBlock(types.Context, abci.RequestEndBlock) ([]abci.ValidatorUpdate, types.Tags)
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx types.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() types.Handler
- func (am AppModule) NewQuerierHandler() types.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRouter)
- func (am AppModule) Route() string
- type AppModuleBasic
- type CosmicBond
- func (c CosmicBond) GetCurrentPrice() sdk.Int
- func (c CosmicBond) GetPriceForSupply(supply sdk.Int) sdk.Int
- func (c CosmicBond) GetReserveAvailableAfterDecreaseInSupply(decrease sdk.Int) sdk.Int
- func (c CosmicBond) GetReserveNecessaryForIncreaseInSupply(increase sdk.Int) sdk.Int
- func (c CosmicBond) GetReserveNecessaryForSupply(supply sdk.Int) sdk.Int
- func (c CosmicBond) String() string
- type GenesisState
- type Keeper
- func (k Keeper) GetAllowSells(ctx sdk.Context, moniker string) string
- func (k Keeper) GetCosmicBond(ctx sdk.Context, name string) CosmicBond
- func (k Keeper) GetCosmicBondIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetCreator(ctx sdk.Context, moniker string) sdk.AccAddress
- func (k Keeper) GetCurrentSupply(ctx sdk.Context, moniker string) sdk.Coin
- func (k Keeper) GetFunctionType(ctx sdk.Context, moniker string) string
- func (k Keeper) GetM(ctx sdk.Context, moniker string) string
- func (k Keeper) GetMaxSupply(ctx sdk.Context, moniker string) sdk.Coin
- func (k Keeper) GetN(ctx sdk.Context, moniker string) string
- func (k Keeper) GetReserveAddress(ctx sdk.Context, moniker string) sdk.AccAddress
- func (k Keeper) GetReserveToken(ctx sdk.Context, moniker string) string
- func (k Keeper) SetAllowSells(ctx sdk.Context, moniker string, allowSells string)
- func (k Keeper) SetCosmicBond(ctx sdk.Context, name string, cb CosmicBond)
- func (k Keeper) SetCreator(ctx sdk.Context, moniker string, creator sdk.AccAddress)
- func (k Keeper) SetCurrentSupply(ctx sdk.Context, moniker string, currentSupply sdk.Coin)
- func (k Keeper) SetFunctionType(ctx sdk.Context, moniker string, functionType string)
- func (k Keeper) SetM(ctx sdk.Context, moniker string, m string)
- func (k Keeper) SetMaxSupply(ctx sdk.Context, moniker string, max_supply sdk.Coin)
- func (k Keeper) SetN(ctx sdk.Context, moniker string, n string)
- func (k Keeper) SetReserveAddress(ctx sdk.Context, moniker string, reserveAddress sdk.AccAddress)
- func (k Keeper) SetReserveToken(ctx sdk.Context, moniker, reserveToken string)
- type MsgBuy
- type MsgCreateCosmicBond
- type MsgSell
- type QueryResCosmicBonds
Constants ¶
View Source
const ( QueryCosmicBonds = "cosmic-bonds" QueryCosmicBond = "cosmic-bond" )
View Source
const ModuleName = "pricing"
View Source
const (
PowerFunction = "power_function"
)
View Source
const RouterKey = ModuleName
View Source
const StoreKey = "pricing"
Variables ¶
View Source
var ModuleCdc = codec.New()
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) []abci.ValidatorUpdate
func NewHandler ¶
NewHandler returns a handler for "nameservice" type messages.
func NewQuerier ¶
NewQuerier is the module level router for state queries
func RegisterCodec ¶
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
func (AppModule) BeginBlock ¶
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(types.Context, abci.RequestEndBlock) ([]abci.ValidatorUpdate, types.Tags)
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx types.Context, data json.RawMessage) []abci.ValidatorUpdate
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRouter)
type AppModuleBasic ¶
type AppModuleBasic struct{}
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
type CosmicBond ¶
type CosmicBond struct { Moniker string `json:"moniker"` Creator sdk.AccAddress `json:"creator"` ReserveToken string `json:"reserve_token"` ReserveAddress sdk.AccAddress `json:"reserve_address"` MaxSupply sdk.Coin `json:"max_supply"` CurrentSupply sdk.Coin `json:"current_supply"` FunctionType string `json:"function_type"` M string `json:"m"` N string `json:"n"` AllowSells string `json:"allow_sells"` }
func NewCosmicBond ¶
func NewCosmicBond(moniker string) CosmicBond
func (CosmicBond) GetCurrentPrice ¶
func (c CosmicBond) GetCurrentPrice() sdk.Int
func (CosmicBond) GetPriceForSupply ¶
func (c CosmicBond) GetPriceForSupply(supply sdk.Int) sdk.Int
func (CosmicBond) GetReserveAvailableAfterDecreaseInSupply ¶
func (c CosmicBond) GetReserveAvailableAfterDecreaseInSupply(decrease sdk.Int) sdk.Int
func (CosmicBond) GetReserveNecessaryForIncreaseInSupply ¶
func (c CosmicBond) GetReserveNecessaryForIncreaseInSupply(increase sdk.Int) sdk.Int
func (CosmicBond) GetReserveNecessaryForSupply ¶
func (c CosmicBond) GetReserveNecessaryForSupply(supply sdk.Int) sdk.Int
func (CosmicBond) String ¶
func (c CosmicBond) String() string
type GenesisState ¶
type GenesisState struct {
CosmicBondRecords []CosmicBond `json:"cosmic_bonds"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
func NewGenesisState ¶
func NewGenesisState(cosmicBondRecords []CosmicBond) GenesisState
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) GetCosmicBond ¶
func (k Keeper) GetCosmicBond(ctx sdk.Context, name string) CosmicBond
Gets the entire Whois metadata struct for a name
func (Keeper) GetCosmicBondIterator ¶
func (Keeper) GetCreator ¶
func (Keeper) GetCurrentSupply ¶
func (Keeper) GetFunctionType ¶
func (Keeper) GetReserveAddress ¶
func (Keeper) GetReserveToken ¶
func (Keeper) SetAllowSells ¶
func (Keeper) SetCosmicBond ¶
func (k Keeper) SetCosmicBond(ctx sdk.Context, name string, cb CosmicBond)
func (Keeper) SetCreator ¶
func (Keeper) SetCurrentSupply ¶
func (Keeper) SetFunctionType ¶
func (Keeper) SetMaxSupply ¶
func (Keeper) SetReserveAddress ¶
type MsgBuy ¶
func (MsgBuy) GetSignBytes ¶
func (MsgBuy) GetSigners ¶
func (msg MsgBuy) GetSigners() []sdk.AccAddress
func (MsgBuy) ValidateBasic ¶
type MsgCreateCosmicBond ¶
type MsgCreateCosmicBond struct { Moniker string Creator sdk.AccAddress ReserveToken string ReserveAddress sdk.AccAddress MaxSupply sdk.Coin FunctionType string M string N string AllowSell string }
func NewMsgCreateCosmicBond ¶
func NewMsgCreateCosmicBond(moniker string, creator sdk.AccAddress, reserveToken string, reserveAddress sdk.AccAddress, maxSupply sdk.Coin, functionType, m, n, allowSell string) MsgCreateCosmicBond
func (MsgCreateCosmicBond) GetSignBytes ¶
func (msg MsgCreateCosmicBond) GetSignBytes() []byte
func (MsgCreateCosmicBond) GetSigners ¶
func (msg MsgCreateCosmicBond) GetSigners() []sdk.AccAddress
func (MsgCreateCosmicBond) Route ¶
func (msg MsgCreateCosmicBond) Route() string
func (MsgCreateCosmicBond) Type ¶
func (msg MsgCreateCosmicBond) Type() string
func (MsgCreateCosmicBond) ValidateBasic ¶
func (msg MsgCreateCosmicBond) ValidateBasic() sdk.Error
type MsgSell ¶
type MsgSell struct { Moniker string Seller sdk.AccAddress Amount sdk.Coin }
func NewMsgSell ¶
func (MsgSell) GetSignBytes ¶
func (MsgSell) GetSigners ¶
func (msg MsgSell) GetSigners() []sdk.AccAddress
func (MsgSell) ValidateBasic ¶
type QueryResCosmicBonds ¶
type QueryResCosmicBonds []string
func (QueryResCosmicBonds) String ¶
func (n QueryResCosmicBonds) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.