auth

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

nolint

Index

Constants

This section is empty.

Variables

View Source
var (
	GetMsgSendDataHandler sdk.GetMsgDataFunc = nil
)

Functions

func DeductFees

func DeductFees(blockTime time.Time, acc xauth.Account, fee xauth.StdFee, fOnlyCheckBalanceEnoughForFee bool) (xauth.Account, sdk.Result)

DeductFees deducts fees from the given account.

NOTE: We could use the CoinKeeper (in addition to the AccountKeeper, because the CoinKeeper doesn't give us accounts), but it seems easier to do this.

func EnsureSufficientMempoolFees

func EnsureSufficientMempoolFees(ctx sdk.Context, stdFee xauth.StdFee) sdk.Result

EnsureSufficientMempoolFees verifies that the given transaction has supplied enough fees to cover a proposer's minimum fees. A result object is returned indicating success or failure.

Contract: This should only be called during CheckTx as it cannot be part of consensus.

func EstimateFee

func EstimateFee(tx xauth.StdTx) xauth.StdFee

Estimate RealFee by calculating real gas consumption

func ExistsMsgSend

func ExistsMsgSend(tx sdk.Tx) bool

Check if EVM Tx exists

func GetSignBytes

func GetSignBytes(chainID string, stdTx xauth.StdTx, acc xauth.Account, genesis bool) []byte

GetSignBytes returns a slice of bytes to sign over for a given transaction and an account.

func GetSignerAcc

func GetSignerAcc(ctx sdk.Context, ak xauth.AccountKeeper, addr sdk.AccAddress) (xauth.Account, sdk.Result)

GetSignerAcc returns an account for a given address that is expected to sign a transaction.

func NewAnteHandler

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer. getDataFunc to get MsgSend.Data

func ProcessPubKey

func ProcessPubKey(acc xauth.Account, sig xauth.StdSignature, simulate bool) (crypto.PubKey, sdk.Result)

ProcessPubKey verifies that the given account address matches that of the StdSignature. In addition, it will set the public key of the account if it has not been set.

func SetGasMeter

func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context

SetGasMeter returns a new context with a gas meter set from a given context.

func ValidateFeeV2

func ValidateFeeV2(tx xauth.StdTx) sdk.Error

junying-todo, 2019-11-22 copy from x/auth/stdtx.go and changed to normal function

func ValidateMemo

func ValidateMemo(stdTx xauth.StdTx, params xauth.Params) sdk.Result

ValidateMemo validates the memo size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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