tinytest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockInfo

type BlockInfo struct {
	Height int64
	Time   int64 `json:",string"`
}

type Coin

type Coin struct {
	Denom  string
	Amount string
}

type ContractInfo

type ContractInfo struct {
	Address string
}

type DepositMsg

type DepositMsg struct {
	ToAccount string
	Amount    string
}

type Env

type Env struct {
	Block    BlockInfo
	Contract ContractInfo
}

basic, standard struct (with embedded structs)

type ExecuteMsg

type ExecuteMsg struct {
	Deposit  *DepositMsg  `json:",omitempty"`
	Withdraw *WithdrawMsg `json:",omitempty"`
}

emulate Rust enum, only one should ever be set

func (*ExecuteMsg) Equals

func (a *ExecuteMsg) Equals(b *ExecuteMsg) bool

For Testing

type MessageInfo

type MessageInfo struct {
	Signer string
	// Note: added custom tag "emptyslice" to never encode to nil, but rather []
	Funds []Coin `json:",emptyslice"`
}

another important struct that includes a slice of structs (which caused issues with another parser)

func (*MessageInfo) Equals

func (a *MessageInfo) Equals(b *MessageInfo) bool

For Testing

type WithdrawMsg

type WithdrawMsg struct {
	// use a different field here to ensure we have proper types (json must not overlap)
	FromAccount string
}

withdraws all funds

Jump to

Keyboard shortcuts

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