std

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertOriginCall

func AssertOriginCall(m *gno.Machine)

func IsOriginCall

func IsOriginCall(m *gno.Machine) bool

func TestSkipHeights

func TestSkipHeights(m *gno.Machine, count int64)

func X_callerAt

func X_callerAt(m *gno.Machine, n int) string

func X_getRealm

func X_getRealm(m *gno.Machine, height int) (address string, pkgPath string)

func X_isRealm

func X_isRealm(m *gno.Machine, pkgPath string) bool

func X_testIssueCoins

func X_testIssueCoins(m *gno.Machine, addr string, denom []string, amt []int64)

func X_testSetOrigCaller

func X_testSetOrigCaller(m *gno.Machine, addr string)

func X_testSetOrigPkgAddr

func X_testSetOrigPkgAddr(m *gno.Machine, addr string)

func X_testSetOrigSend

func X_testSetOrigSend(m *gno.Machine,
	sentDenom []string, sentAmt []int64,
	spentDenom []string, spentAmt []int64,
)

func X_testSetRealm

func X_testSetRealm(m *gno.Machine, addr, pkgPath string)

Types

type RealmOverride

type RealmOverride struct {
	Addr    crypto.Bech32Address
	PkgPath string
}

type TestBanker

type TestBanker struct {
	CoinTable map[crypto.Bech32Address]tm2std.Coins
}

TestBanker is a banker that can be used as a mock banker in test contexts.

func (*TestBanker) GetCoins

func (tb *TestBanker) GetCoins(addr crypto.Bech32Address) (dst tm2std.Coins)

GetCoins implements the Banker interface.

func (*TestBanker) IssueCoin

func (tb *TestBanker) IssueCoin(addr crypto.Bech32Address, denom string, amt int64)

IssueCoin implements the Banker interface.

func (*TestBanker) RemoveCoin

func (tb *TestBanker) RemoveCoin(addr crypto.Bech32Address, denom string, amt int64)

RemoveCoin implements the Banker interface.

func (*TestBanker) SendCoins

func (tb *TestBanker) SendCoins(from, to crypto.Bech32Address, amt tm2std.Coins)

SendCoins implements the Banker interface.

func (*TestBanker) TotalCoin

func (tb *TestBanker) TotalCoin(denom string) int64

TotalCoin implements the Banker interface.

type TestExecContext

type TestExecContext struct {
	std.ExecContext

	// These are used to set up the result of CurrentRealm() and PrevRealm().
	RealmFrames map[*gno.Frame]RealmOverride
}

TestExecContext is the testing extension of the exec context.

Jump to

Keyboard shortcuts

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