reward

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 Imported by: 0

README

Reward module

Usage

(Tx) Fund fee collector for reward module
// fund fee collector test
fundFeeCollectorMsg := types.FundFeeCollectorMsg{
    DepositorAddr: "xpla1j55tymfdys9n7k0dq6xmyd4hgfelp9jghzympt",
    Amount:        "1000",
}

txbytes, err := xplac.FundFeeCollector(fundFeeCollectorMsg).CreateAndSignTx()
res, err := xplac.Broadcast(txbytes)
(Query) Query reward module params
res, err := xplac.RewardParams().Query()
(Query) Query pool amount of reward module
res, err := xplac.RewardPool().Query()

Documentation

Index

Constants

View Source
const (
	RewardModule                   = "reward"
	RewardFundFeeCollectorMsgType  = "fund-fee-collector"
	RewardQueryRewardParamsMsgType = "query-reward-params"
	RewardQueryRewardPoolMsgType   = "query-reward-pool"
)

Variables

This section is empty.

Functions

func MakeFundFeeCollectorMsg

func MakeFundFeeCollectorMsg(fundFeeCollectorMsg types.FundFeeCollectorMsg, from sdk.AccAddress) (rewardtypes.MsgFundFeeCollector, error)

(Tx) make msg - Fund fee collector

func MakeQueryRewardParamsMsg

func MakeQueryRewardParamsMsg() (rewardtypes.QueryParamsRequest, error)

(Query) make msg - query reward params

func MakeQueryRewardPoolMsg

func MakeQueryRewardPoolMsg() (rewardtypes.QueryPoolRequest, error)

(Query) make msg - query reward pool

func NewCoreModule added in v0.1.2

func NewCoreModule() core.CoreModule

func QueryReward

func QueryReward(i core.QueryClient) (string, error)

Query client for reward module.

Types

type RewardExternal added in v0.1.2

type RewardExternal struct {
	Xplac provider.XplaClient
}

func NewRewardExternal added in v0.1.2

func NewRewardExternal(xplac provider.XplaClient) (e RewardExternal)

func (RewardExternal) FundFeeCollector added in v0.1.2

func (e RewardExternal) FundFeeCollector(fundFeeCollectorMsg types.FundFeeCollectorMsg) provider.XplaClient

Funds the fee collector with the specified amount

func (RewardExternal) RewardParams added in v0.1.2

func (e RewardExternal) RewardParams() provider.XplaClient

Query reward params

func (RewardExternal) RewardPool added in v0.1.2

func (e RewardExternal) RewardPool() provider.XplaClient

Query reward pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL