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 ¶
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)
- func Recover(logger tmlog.Logger, err *error)
- func SigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- type AuthzLimiterDecorator
- type HandlerOptions
- type MempoolFeeDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeMultisignatureVerificationGas ¶
func ConsumeMultisignatureVerificationGas( meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, params authtypes.Params, accSeq uint64, ) error
ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature
func NewAnteHandler ¶
func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an 'AnteHandler' that will run actions before a tx is sent to a module's handler.
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:
- ethsecp256k1 (Ethereum keys)
- ed25519 (Validators)
- secp256k1, secp256r1 (default Cosmos SDK keys)
- multisig (Cosmos SDK multisigs)
Types ¶
type AuthzLimiterDecorator ¶ added in v1.2.1
type AuthzLimiterDecorator struct {
// contains filtered or unexported fields
}
AuthzLimiterDecorator blocks certain msg types from being granted or executed within the authorization module.
func NewAuthzLimiterDecorator ¶ added in v1.2.1
func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator
NewAuthzLimiterDecorator creates a decorator to block certain msg types from being granted or executed within authz.
func (AuthzLimiterDecorator) AnteHandle ¶ added in v1.2.1
type HandlerOptions ¶
type HandlerOptions struct { AccountKeeper evmtypes.AccountKeeper BankKeeper evmtypes.BankKeeper IBCKeeper *ibckeeper.Keeper EvmKeeper evmante.EVMKeeper FeegrantKeeper authante.FeegrantKeeper SignModeHandler authsigning.SignModeHandler SigGasConsumer authante.SignatureVerificationGasConsumer FeeMarketKeeper evmtypes.FeeMarketKeeper MaxTxGasWanted uint64 BypassMinFeeMsgTypes []string TxCounterStoreKey sdk.StoreKey WasmConfig wasmTypes.WasmConfig }
HandlerOptions extend the SDK's AnteHandler opts by requiring the IBC channel keeper.
type MempoolFeeDecorator ¶
type MempoolFeeDecorator struct {
BypassMinFeeMsgTypes []string
}
MempoolFeeDecorator will check if the transaction's fee is at least as large as the local validator's minimum gasFee (defined in validator config).
If fee is too low, decorator returns error and tx is rejected from mempool. Note this only applies when ctx.CheckTx = true. If fee is high enough or not CheckTx, then call next AnteHandler.
CONTRACT: Tx must implement FeeTx to use MempoolFeeDecorator
func NewMempoolFeeDecorator ¶
func NewMempoolFeeDecorator(bypassMsgTypes []string) MempoolFeeDecorator