Documentation ¶
Index ¶
- func NewMsgServerImpl(k *Keeper) types.MsgServer
- func NewQuerierImpl(k *Keeper) types.QueryServer
- type Keeper
- func (k Keeper) ConvertTabi(ctx sdk.Context, sender sdk.AccAddress, coin sdk.Coin) error
- func (k Keeper) ExportGenesis(ctx sdktypes.Context) *types.GenesisState
- func (k Keeper) GetStrategies(ctx sdk.Context) (strategies []types.Strategy)
- func (k Keeper) GetStrategy(ctx sdk.Context, name string) (types.Strategy, bool)
- func (k Keeper) GetVoucher(ctx sdk.Context, voucherID string) (types.Voucher, bool)
- func (k Keeper) GetVoucherSeq(ctx sdk.Context) uint64
- func (k Keeper) GetVouchers(ctx sdk.Context) (vouchers []types.Voucher)
- func (k Keeper) HasStrategy(ctx sdk.Context, name string) bool
- func (k Keeper) InitGenesis(ctx sdktypes.Context, state types.GenesisState)
- func (k Keeper) InstantWithdrawVetabi(ctx sdk.Context, sender sdk.AccAddress, coin sdk.Coin) error
- func (k Keeper) LockVetabiAndCreateVoucher(ctx sdk.Context, sender sdk.AccAddress, strategy types.Strategy, coin sdk.Coin) (string, string, error)
- func (k Keeper) WithdrawTabi(ctx sdk.Context, sender sdk.AccAddress, voucher types.Voucher) (sdk.Coin, sdk.Coin, error)
- type Querier
- func (q Querier) Strategies(goCtx context.Context, req *types.QueryStrategiesRequest) (*types.QueryStrategiesResponse, error)
- func (q Querier) Strategy(goCtx context.Context, req *types.QueryStrategyRequest) (*types.QueryStrategyResponse, error)
- func (q Querier) Voucher(goCtx context.Context, req *types.QueryVoucherRequest) (*types.QueryVoucherResponse, error)
- func (q Querier) VoucherStatus(goCtx context.Context, req *types.QueryVoucherStatusRequest) (*types.QueryVoucherStatusResponse, error)
- func (q Querier) Vouchers(goCtx context.Context, req *types.QueryVouchersRequest) (*types.QueryVouchersResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the token-convert MsgServer interface.
func NewQuerierImpl ¶
func NewQuerierImpl(k *Keeper) types.QueryServer
NewQuerierImpl returns an implementation of the token-convert QueryServer interface.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, ak types.AccountKeeper, bk types.BankKeeper, instant string, ) Keeper
func (Keeper) ConvertTabi ¶
ConvertTabi converts tabi to vetabi.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdktypes.Context) *types.GenesisState
ExportGenesis returns a GenesisState
func (Keeper) GetStrategies ¶
GetStrategies gets all strategies
func (Keeper) GetStrategy ¶
GetStrategy gets a strategy by strategy id
func (Keeper) GetVoucher ¶
GetVoucher gets a voucher by voucher id
func (Keeper) GetVoucherSeq ¶
GetVoucherSeq returns the next usable voucher seq
func (Keeper) GetVouchers ¶
GetVouchers gets all vouchers
func (Keeper) HasStrategy ¶
HasStrategy checks if a strategy exists
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdktypes.Context, state types.GenesisState)
InitGenesis sets the initial state of the module
func (Keeper) InstantWithdrawVetabi ¶
InstantWithdrawVetabi convert vetabi to tabi with instant strategy.
type Querier ¶
type Querier struct {
*Keeper
}
func (Querier) Strategies ¶
func (q Querier) Strategies(goCtx context.Context, req *types.QueryStrategiesRequest) (*types.QueryStrategiesResponse, error)
Strategies queries all strategies
func (Querier) Strategy ¶
func (q Querier) Strategy(goCtx context.Context, req *types.QueryStrategyRequest) (*types.QueryStrategyResponse, error)
Strategy queries the strategy of a given name
func (Querier) Voucher ¶
func (q Querier) Voucher(goCtx context.Context, req *types.QueryVoucherRequest) (*types.QueryVoucherResponse, error)
Voucher queries a voucher by its id
func (Querier) VoucherStatus ¶
func (q Querier) VoucherStatus(goCtx context.Context, req *types.QueryVoucherStatusRequest) (*types.QueryVoucherStatusResponse, error)
VoucherStatus queries the lock status of a given voucher
func (Querier) Vouchers ¶
func (q Querier) Vouchers(goCtx context.Context, req *types.QueryVouchersRequest) (*types.QueryVouchersResponse, error)
Vouchers queries all vouchers