Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate
- func NewHandler(keeper Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func NewTokenProposalHandler(k Keeper) govtypes.Handler
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type GenesisState
- type Keeper
- func (k *Keeper) CreateToken(ctx sdk.Context, tokenInfo sdk.Token) error
- func (k *Keeper) GetIBCToken(ctx sdk.Context, symbol sdk.Symbol) *sdk.IBCToken
- func (k *Keeper) GetIBCTokenList(ctx sdk.Context) []*sdk.IBCToken
- func (k *Keeper) GetIBCTokenSymbols(ctx sdk.Context) []sdk.Symbol
- func (k *Keeper) GetSymbolIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetToken(ctx sdk.Context, symbol sdk.Symbol) sdk.Token
- func (k *Keeper) HasToken(ctx sdk.Context, symbol sdk.Symbol) bool
- func (k *Keeper) IsSubToken(ctx sdk.Context, symbol sdk.Symbol) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) SetEvidenceKeeper(evidenceKeeper internal.EvidenceKeeper)
- func (k *Keeper) SetIBCTokenSymbols(ctx sdk.Context, symbols []sdk.Symbol)
- func (k *Keeper) SetStakingKeeper(sk internal.StakingKeeper)
- func (k *Keeper) SetToken(ctx sdk.Context, tokenInfo sdk.Token)
- func (k *Keeper) SynGasPrice(ctx sdk.Context, fromAddr string, height uint64, ...) ([]sdk.TokensGasPrice, sdk.Result)
- type QueryTokenInfoParams
- type ResToken
Constants ¶
View Source
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey StoreKey = types.StoreKey QuerierRoute = types.QuerierRoute QuerierKey = types.QuerierRoute DefaultCodespace = types.DefaultCodespace QueryToken = types.QueryToken QueryIBCTokens = types.QueryIBCTokens )
Variables ¶
View Source
var ( ModuleCdc = types.ModuleCdc RegisterCodec = types.RegisterCodec AddTokenProposalHandler = client.AddTokenProposalHandler TokenParamsChangeProposalHandler = client.TokenParamsChangeProposalHandler NewAddTokenProposal = types.NewAddTokenProposal NewTokenParamsChangeProposal = types.NewTokenParamsChangeProposal )
View Source
var TestBaseTokens = map[sdk.Symbol]*sdk.BaseToken{ sdk.NativeToken: { Name: sdk.NativeToken, Symbol: sdk.Symbol(sdk.NativeToken), Issuer: "", Chain: sdk.Symbol(sdk.NativeToken), SendEnabled: true, Decimals: sdk.NativeTokenDecimal, TotalSupply: sdk.NewIntWithDecimal(21, 24), }, sdk.NativeDefiToken: { Name: sdk.NativeDefiToken, Symbol: sdk.Symbol(sdk.NativeDefiToken), Issuer: "", Chain: sdk.Symbol(sdk.NativeToken), SendEnabled: true, Decimals: sdk.NativeDefiTokenDecimal, TotalSupply: sdk.NewIntWithDecimal(1, 16), }, }
View Source
var TestIBCTokens = map[sdk.Symbol]*sdk.IBCToken{ // contains filtered or unexported fields }
View Source
var TestTokenData map[sdk.Symbol]sdk.Token
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate
func NewHandler ¶
func NewQuerier ¶
func NewTokenProposalHandler ¶
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
app module
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
module begin-block
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
module init-genesis
func (AppModule) NewQuerierHandler ¶
module querier
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
register invariants
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
default genesis state
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
get the root tx command of this module
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
register module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
register rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
module validate genesis
type GenesisState ¶
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
func (GenesisState) Equal ¶
func (g GenesisState) Equal(g2 GenesisState) bool
Checks whether 2 GenesisState structs are equivalent.
func (GenesisState) IsEmpty ¶
func (g GenesisState) IsEmpty() bool
Returns if a GenesisState is empty or has data in it
func (GenesisState) String ¶
func (g GenesisState) String() string
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (*Keeper) CreateToken ¶ added in v0.9.3
func (*Keeper) GetIBCToken ¶ added in v0.9.3
func (*Keeper) GetIBCTokenList ¶ added in v0.9.3
func (*Keeper) GetIBCTokenSymbols ¶ added in v0.9.3
func (*Keeper) SetEvidenceKeeper ¶
func (k *Keeper) SetEvidenceKeeper(evidenceKeeper internal.EvidenceKeeper)
func (*Keeper) SetIBCTokenSymbols ¶ added in v0.9.3
func (*Keeper) SetStakingKeeper ¶
func (k *Keeper) SetStakingKeeper(sk internal.StakingKeeper)
func (*Keeper) SynGasPrice ¶
type QueryTokenInfoParams ¶ added in v0.9.3
type QueryTokenInfoParams = types.QueryTokenInfoParams
Source Files ¶
Click to show internal directories.
Click to hide internal directories.