helpers

package
v22.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAddress            = sdkerrors.ErrInvalidAddress
	ErrContractNotRegistered     = errorsmod.Register(codespace, 1, "contract not registered")
	ErrContractAlreadyRegistered = errorsmod.Register(codespace, 2, "contract already registered")
	ErrContractNotAdmin          = errorsmod.Register(codespace, 3, "sender is not the contract admin")
	ErrContractNotCreator        = errorsmod.Register(codespace, 4, "sender is not the contract creator")
	ErrInvalidCWContract         = errorsmod.Register(codespace, 5, "invalid CosmWasm contract")
	ErrOutOfGas                  = errorsmod.Register(codespace, 6, "contract execution ran out of gas")
	ErrContractExecutionPanic    = errorsmod.Register(codespace, 7, "contract execution panicked")
)

Functions

func ExecuteContract

func ExecuteContract(k wasmtypes.ContractOpsKeeper, childCtx sdk.Context, contractAddr sdk.AccAddress, msgBz []byte, err *error)

Execute contract, recover from panic

func IsOutOfGasError

func IsOutOfGasError(err any) (bool, string)

Check if error is out of gas error

Types

type PV

type PV struct {
	PrivKey cryptotypes.PrivKey
}

PV implements PrivValidator without any safety or persistence. Only use it for testing.

func NewPV

func NewPV() PV

func (PV) GetPubKey

func (pv PV) GetPubKey() (crypto.PubKey, error)

GetPubKey implements PrivValidator interface

func (PV) SignProposal

func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error

SignProposal implements PrivValidator interface

func (PV) SignVote

func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error

SignVote implements PrivValidator interface

Jump to

Keyboard shortcuts

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