Documentation ¶
Index ¶
- Constants
- Variables
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- type Advertisement
- type Advertisements
- type GenesisState
- type MsgCaptureTheFlag
- type MsgCreateAdvertisement
- type MsgDeleteAdvertisement
- type MsgDeposit
- type MsgWithdraw
- type ParamSubspace
- type Params
- type SupplyKeeper
Constants ¶
View Source
const ( // ModuleName is the name of the module ModuleName = "halborn" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for querier msgs QuerierRoute = ModuleName )
View Source
const (
AdvertisementPrefix = "advertisement-"
)
View Source
const (
AttributeValueCategory = ModuleName
)
halborn module event types
View Source
const DefaultDepositDenom = "ctc"
View Source
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
View Source
const (
MaxContentLength = 64
)
View Source
const QueryGetAdvertisement = "get-advertisement"
View Source
const QueryListAdvertisement = "list-advertisement"
Variables ¶
View Source
var ( DefaultAdvertisementDeposit = sdk.NewCoin(DefaultDepositDenom, sdk.NewInt(0)) ModuleInitialBalance = sdk.NewCoins(sdk.NewCoin(DefaultDepositDenom, sdk.NewInt(100))) )
View Source
var (
ErrInvalidBalance = sdkerrors.Register(ModuleName, 22, "invalid balance")
)
View Source
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
Types ¶
type Advertisement ¶
type Advertisements ¶
type Advertisements []*Advertisement
func (Advertisements) Len ¶
func (a Advertisements) Len() int
func (Advertisements) Less ¶
func (a Advertisements) Less(i, j int) bool
func (Advertisements) Swap ¶
func (a Advertisements) Swap(i, j int)
type GenesisState ¶
type GenesisState struct {
Advertisements []*Advertisement `json:"advertisement" yaml:"advertisement"`
}
GenesisState - all halborn state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - default GenesisState used by Cosmos Hub
func NewGenesisState ¶
func NewGenesisState(advertisements []*Advertisement) GenesisState
NewGenesisState creates a new GenesisState object
type MsgCaptureTheFlag ¶
type MsgCaptureTheFlag struct { ID string `json:"id" yaml:"id"` Winner sdk.AccAddress `json:"winner" yaml:"winner"` }
func NewMsgCaptureTheFlag ¶
func NewMsgCaptureTheFlag(id string, winner sdk.AccAddress) MsgCaptureTheFlag
func (MsgCaptureTheFlag) GetSignBytes ¶
func (msg MsgCaptureTheFlag) GetSignBytes() []byte
func (MsgCaptureTheFlag) GetSigners ¶
func (msg MsgCaptureTheFlag) GetSigners() []sdk.AccAddress
func (MsgCaptureTheFlag) Route ¶
func (msg MsgCaptureTheFlag) Route() string
func (MsgCaptureTheFlag) Type ¶
func (msg MsgCaptureTheFlag) Type() string
func (MsgCaptureTheFlag) ValidateBasic ¶
func (msg MsgCaptureTheFlag) ValidateBasic() error
type MsgCreateAdvertisement ¶
type MsgCreateAdvertisement struct { ID string `json:"id" yaml:"id"` Content string `json:"content" yaml:"content"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` }
func NewMsgCreateAdvertisement ¶
func NewMsgCreateAdvertisement(id string, content string, creator sdk.AccAddress) MsgCreateAdvertisement
func (MsgCreateAdvertisement) GetSignBytes ¶
func (msg MsgCreateAdvertisement) GetSignBytes() []byte
func (MsgCreateAdvertisement) GetSigners ¶
func (msg MsgCreateAdvertisement) GetSigners() []sdk.AccAddress
func (MsgCreateAdvertisement) Route ¶
func (msg MsgCreateAdvertisement) Route() string
func (MsgCreateAdvertisement) Type ¶
func (msg MsgCreateAdvertisement) Type() string
func (MsgCreateAdvertisement) ValidateBasic ¶
func (msg MsgCreateAdvertisement) ValidateBasic() error
type MsgDeleteAdvertisement ¶
type MsgDeleteAdvertisement struct { ID string `json:"id" yaml:"id"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` }
func NewMsgDeleteAdvertisement ¶
func NewMsgDeleteAdvertisement(id string, creator sdk.AccAddress) MsgDeleteAdvertisement
func (MsgDeleteAdvertisement) GetSignBytes ¶
func (msg MsgDeleteAdvertisement) GetSignBytes() []byte
func (MsgDeleteAdvertisement) GetSigners ¶
func (msg MsgDeleteAdvertisement) GetSigners() []sdk.AccAddress
func (MsgDeleteAdvertisement) Route ¶
func (msg MsgDeleteAdvertisement) Route() string
func (MsgDeleteAdvertisement) Type ¶
func (msg MsgDeleteAdvertisement) Type() string
func (MsgDeleteAdvertisement) ValidateBasic ¶
func (msg MsgDeleteAdvertisement) ValidateBasic() error
type MsgDeposit ¶
type MsgDeposit struct { ID string `json:"id" yaml:"id"` Amount sdk.Coin `json:"amount" yaml:"amount"` Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` }
func NewMsgDeposit ¶
func NewMsgDeposit(id string, amount sdk.Coin, depositor sdk.AccAddress) MsgDeposit
func (MsgDeposit) GetSignBytes ¶
func (msg MsgDeposit) GetSignBytes() []byte
func (MsgDeposit) GetSigners ¶
func (msg MsgDeposit) GetSigners() []sdk.AccAddress
func (MsgDeposit) Route ¶
func (msg MsgDeposit) Route() string
func (MsgDeposit) Type ¶
func (msg MsgDeposit) Type() string
func (MsgDeposit) ValidateBasic ¶
func (msg MsgDeposit) ValidateBasic() error
type MsgWithdraw ¶
type MsgWithdraw struct { ID string `json:"id" yaml:"id"` Amount sdk.Coin `json:"amount" yaml:"amount"` Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` }
func NewMsgWithdraw ¶
func NewMsgWithdraw(id string, amount sdk.Coin, depositor sdk.AccAddress) MsgWithdraw
func (MsgWithdraw) GetSignBytes ¶
func (msg MsgWithdraw) GetSignBytes() []byte
func (MsgWithdraw) GetSigners ¶
func (msg MsgWithdraw) GetSigners() []sdk.AccAddress
func (MsgWithdraw) Route ¶
func (msg MsgWithdraw) Route() string
func (MsgWithdraw) Type ¶
func (msg MsgWithdraw) Type() string
func (MsgWithdraw) ValidateBasic ¶
func (msg MsgWithdraw) ValidateBasic() error
type ParamSubspace ¶
type ParamSubspace interface { WithKeyTable(table params.KeyTable) params.Subspace Get(ctx sdk.Context, key []byte, ptr interface{}) GetParamSet(ctx sdk.Context, ps params.ParamSet) SetParamSet(ctx sdk.Context, ps params.ParamSet) }
ParamSubspace defines the expected Subspace interfacace
type Params ¶
type Params struct { }
Params - used for initializing default parameter for halborn at genesis
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
type SupplyKeeper ¶
type SupplyKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error GetModuleAccount(ctx sdk.Context, moduleName string) exported.ModuleAccountI MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error SetModuleAddressAndPermissions(maccPerms map[string][]string) }
Click to show internal directories.
Click to hide internal directories.