testutil

package
v0.0.0-...-1c33bd2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2022 Evmos Foundation This file is part of the Evmos Network packages.

Evmos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Evmos packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Evmos packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastTxBytes

func BroadcastTxBytes(app *app.App, txEncoder sdk.TxEncoder, tx sdk.Tx) (abci.ResponseDeliverTx, error)

BroadcastTxBytes encodes a transaction and calls DeliverTx on the app.

func CheckTx

func CheckTx(
	ctx sdk.Context,
	runingApp *app.App,
	priv cryptotypes.PrivKey,
	gasPrice *sdkmath.Int,
	msgs ...sdk.Msg,
) (abci.ResponseCheckTx, error)

CheckTx checks a cosmos tx for a given set of msgs

func Commit

func Commit(ctx sdk.Context, app *app.App, t time.Duration, vs *tmtypes.ValidatorSet) (sdk.Context, error)

Commit commits a block at a given time. Reminder: At the end of each Tendermint Consensus round the following methods are run

  1. BeginBlock
  2. DeliverTx
  3. EndBlock
  4. Commit

func DeliverTx

func DeliverTx(
	ctx sdk.Context,
	appEvmos *app.App,
	priv cryptotypes.PrivKey,
	gasPrice *sdkmath.Int,
	msgs ...sdk.Msg,
) (abci.ResponseDeliverTx, error)

DeliverTx delivers a cosmos tx for a given set of msgs

func NewHeader

func NewHeader(
	height int64,
	blockTime time.Time,
	chainID string,
	proposer sdk.ConsAddress,
	appHash,
	validatorHash []byte,
) tmproto.Header

NewHeader creates a new Tendermint header for testing purposes.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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