testcoin

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChecksEqual

func ChecksEqual(whichChecks, withChecks types.Checks) bool

func CoinsEqual

func CoinsEqual(whichCoins, withCoins []types.Coin) bool

func CreateNewCheck

func CreateNewCheck(chainID, coinStr, nonceStr, password string, dueBlock uint64) types.Check

Types

type Helper

type Helper struct {
	Ctx sdk.Context
	// contains filtered or unexported fields
}

Helper is a structure which wraps the staking handler and provides methods useful in tests

func NewHelper

func NewHelper(t *testing.T, ctx sdk.Context, k keeper.Keeper) *Helper

NewHelper creates staking Handler wrapper for tests

func (*Helper) BuyCoin

func (sh *Helper) BuyCoin(sender sdk.AccAddress, coinToBuy, maxCoinToSell sdk.Coin, ok bool)

BuyCoin create msg and handler buy coins request

func (*Helper) CheckRedeem

func (sh *Helper) CheckRedeem(sender sdk.AccAddress, check, proof string, ok bool)

CheckRedeem create msg and handle redeem check

func (*Helper) CreateCoin

func (sh *Helper) CreateCoin(sender sdk.AccAddress, title, denom string, crr uint64, initVolume, initReserve, limitVolume sdkmath.Int, identity string, ok bool) types.Coin

CreateCoin create msg and handle create coin

func (*Helper) CreateCoinWithContext

func (sh *Helper) CreateCoinWithContext(ctx sdk.Context, sender sdk.AccAddress, title, denom string, crr uint64, initVolume, initReserve, limitVolume sdkmath.Int, identity string, ok bool) types.Coin

CreateCoinWithContext create msg and handle create coin with custom context

func (*Helper) GetCoin

func (sh *Helper) GetCoin(denom string, ok bool)

func (*Helper) Handle

func (sh *Helper) Handle(ctx sdk.Context, msg sdk.Msg, ok bool) *sdk.Result

Handle calls staking handler on a given message

func (*Helper) MultiSendCoin

func (sh *Helper) MultiSendCoin(sender sdk.AccAddress, sends []types.MultiSendEntry, ok bool)

MultiSendCoin create msg and handler send coin to other addresses

func (*Helper) QueryCheck added in v0.0.8

func (sh *Helper) QueryCheck(hash []byte) types.Check

func (*Helper) QueryChecks added in v0.0.8

func (sh *Helper) QueryChecks() []types.Check

func (*Helper) QueryCoin added in v0.0.8

func (sh *Helper) QueryCoin(denom string) types.Coin

func (*Helper) QueryCoins added in v0.0.8

func (sh *Helper) QueryCoins() []types.Coin

func (*Helper) QueryParams added in v0.0.8

func (sh *Helper) QueryParams() types.Params

func (*Helper) SellAllCoin

func (sh *Helper) SellAllCoin(sender sdk.AccAddress, coinDenomToSell string, minCoinToBuy sdk.Coin, ok bool)

SellAllCoin create msg and handler sell all coins request

func (*Helper) SellCoin

func (sh *Helper) SellCoin(sender sdk.AccAddress, coinToSell, maxCoinToBuy sdk.Coin, ok bool)

SellCoin create msg and handler sell coins request

func (*Helper) SendCoin

func (sh *Helper) SendCoin(sender, recipient sdk.AccAddress, coin sdk.Coin, ok bool)

SendCoin create msg and handler send coin to other address

func (*Helper) UpdateCoin

func (sh *Helper) UpdateCoin(sender sdk.AccAddress, denom string, limitVolume sdkmath.Int, identity string, ok bool)

UpdateCoin create msg and handle update coin

Jump to

Keyboard shortcuts

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