testcoin

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 9 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.Coins) bool

func CreateNewCheck

func CreateNewCheck(chainID, coinAmountStr, 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, symbol string, crr uint64, initVolume, initReserve, limitVolume sdk.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, symbol string, crr uint64, initVolume, initReserve, limitVolume sdk.Int, identity string, ok bool) types.Coin

CreateCoinWithContext create msg and handle create coin with custom context

func (*Helper) GetCoin

func (sh *Helper) GetCoin(symbol 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.Send, ok bool)

MultiSendCoin create msg and handler send coin to other addresses

func (*Helper) SellAllCoin

func (sh *Helper) SellAllCoin(sender sdk.AccAddress, coinToSell, 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, receiver 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, symbol string, limitVolume sdk.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