Documentation ¶
Overview ¶
nolint
Index ¶
- Variables
- func DeductFees(blockTime time.Time, acc xauth.Account, fee xauth.StdFee, ...) (xauth.Account, sdk.Result)
- func EnsureSufficientMempoolFees(ctx sdk.Context, stdFee xauth.StdFee) sdk.Result
- func EstimateFee(tx xauth.StdTx) xauth.StdFee
- func ExistsMsgSend(tx sdk.Tx) bool
- func GetSignBytes(chainID string, stdTx xauth.StdTx, acc xauth.Account, genesis bool) []byte
- func GetSignerAcc(ctx sdk.Context, ak xauth.AccountKeeper, addr sdk.AccAddress) (xauth.Account, sdk.Result)
- func NewAnteHandler(ak xauth.AccountKeeper, fck xauth.FeeCollectionKeeper) sdk.AnteHandler
- func ProcessPubKey(acc xauth.Account, sig xauth.StdSignature, simulate bool) (crypto.PubKey, sdk.Result)
- func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit uint64) sdk.Context
- func ValidateFeeV2(tx xauth.StdTx) sdk.Error
- func ValidateMemo(stdTx xauth.StdTx, params xauth.Params) sdk.Result
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
Estimate RealFee by calculating real gas consumption
func GetSignBytes ¶
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 ¶
func NewAnteHandler(ak xauth.AccountKeeper, fck xauth.FeeCollectionKeeper) sdk.AnteHandler
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 ¶
SetGasMeter returns a new context with a gas meter set from a given context.
func ValidateFeeV2 ¶
junying-todo, 2019-11-22 copy from x/auth/stdtx.go and changed to normal function
Types ¶
This section is empty.