tx

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: 10 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

Functions

func PrepareCosmosTx

func PrepareCosmosTx(
	ctx sdk.Context,
	appEvmos *app.App,
	args CosmosTxArgs,
) (authsigning.Tx, error)

PrepareCosmosTx creates a cosmos tx and signs it with the provided messages and private key. It returns the signed transaction and an error

Types

type CosmosTxArgs

type CosmosTxArgs struct {
	// TxCfg is the client transaction config
	TxCfg client.TxConfig
	// Priv is the private key that will be used to sign the tx
	Priv cryptotypes.PrivKey
	// ChainID is the chain's id on cosmos format, e.g. 'evmos_9000-1'
	ChainID string
	// Gas to be used on the tx
	Gas uint64
	// GasPrice to use on tx
	GasPrice *sdkmath.Int
	// Fees is the fee to be used on the tx (amount and denom)
	Fees sdk.Coins
	// FeeGranter is the account address of the fee granter
	FeeGranter sdk.AccAddress
	// Msgs slice of messages to include on the tx
	Msgs []sdk.Msg
}

CosmosTxArgs contains the params to create a cosmos tx

type InvalidTx

type InvalidTx struct{}

InvalidTx defines a type, which satisfies the sdk.Tx interface, but holds no valid transaction information.

NOTE: This is used for testing purposes, to serve the edge case of invalid data being passed to functions.

func (InvalidTx) GetMsgs

func (InvalidTx) GetMsgs() []sdk.Msg

func (InvalidTx) ValidateBasic

func (InvalidTx) ValidateBasic() error

Jump to

Keyboard shortcuts

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