Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifySignature ¶
func VerifySignature( pubKey cryptotypes.PubKey, signerData authsigning.SignerData, sigData signing.SignatureData, _ authsigning.SignModeHandler, tx authsigning.Tx, ) error
VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes and single vs multi-signatures.
Types ¶
type AuthzLimiterDecorator ¶
type AuthzLimiterDecorator struct {
// contains filtered or unexported fields
}
AuthzLimiterDecorator blocks certain msg types from being granted or executed within the authorization module.
func NewAuthzLimiterDecorator ¶
func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator
NewAuthzLimiterDecorator creates a decorator to block certain msg types from being granted or executed within authz.
func (AuthzLimiterDecorator) AnteHandle ¶
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error }
BankKeeper defines the exposed interface for using functionality of the bank keeper in the context of the cosmos AnteHandler package.
type DeductFeeDecorator ¶
type DeductFeeDecorator struct {
// contains filtered or unexported fields
}
DeductFeeDecorator deducts fees from the first signer of the tx. If the first signer does not have the funds to pay for the fees, and does not have enough unclaimed staking rewards, then return with InsufficientFunds error. The next AnteHandler is called if fees are successfully deducted.
CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator
func NewDeductFeeDecorator ¶
func NewDeductFeeDecorator( ak authante.AccountKeeper, bk BankKeeper, dk anteutils.DistributionKeeper, fk authante.FeegrantKeeper, sk anteutils.StakingKeeper, tfc anteutils.TxFeeChecker, ) DeductFeeDecorator
NewDeductFeeDecorator returns a new DeductFeeDecorator.
func (DeductFeeDecorator) AnteHandle ¶
func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)
AnteHandle ensures that the transaction contains valid fee requirements and tries to deduct those from the account balance or unclaimed staking rewards, which the transaction sender might have.
type LegacyEip712SigVerificationDecorator
deprecated
type LegacyEip712SigVerificationDecorator struct {
// contains filtered or unexported fields
}
Deprecated: LegacyEip712SigVerificationDecorator Verify all signatures for a tx and return an error if any are invalid. Note, the LegacyEip712SigVerificationDecorator decorator will not get executed on ReCheck. NOTE: As of v10, EIP-712 signature verification is handled by the ethsecp256k1 public key (see ethsecp256k1.go)
CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewLegacyEip712SigVerificationDecorator
deprecated
func NewLegacyEip712SigVerificationDecorator( ak evmtypes.AccountKeeper, signModeHandler authsigning.SignModeHandler, ) LegacyEip712SigVerificationDecorator
Deprecated: NewLegacyEip712SigVerificationDecorator creates a new LegacyEip712SigVerificationDecorator
func (LegacyEip712SigVerificationDecorator) AnteHandle ¶
func (svd LegacyEip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler, ) (newCtx sdk.Context, err error)
AnteHandle handles validation of EIP712 signed cosmos txs. it is not run on RecheckTx
type MinGasPriceDecorator ¶
type MinGasPriceDecorator struct {
// contains filtered or unexported fields
}
MinGasPriceDecorator will check if the transaction's fee is at least as large as the MinGasPrices param. If fee is too low, decorator returns error and tx is rejected. This applies for both CheckTx and DeliverTx If fee is high enough, then call next AnteHandler CONTRACT: Tx must implement FeeTx to use MinGasPriceDecorator
func NewMinGasPriceDecorator ¶
func NewMinGasPriceDecorator(fk evmante.FeeMarketKeeper, ek evmante.EVMKeeper) MinGasPriceDecorator
NewMinGasPriceDecorator creates a new MinGasPriceDecorator instance used only for Cosmos transactions.
func (MinGasPriceDecorator) AnteHandle ¶
type RejectMessagesDecorator ¶
type RejectMessagesDecorator struct{}
RejectMessagesDecorator prevents invalid msg types from being executed
func (RejectMessagesDecorator) AnteHandle ¶
func (rmd RejectMessagesDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle rejects messages that requires ethereum-specific authentication. For example `MsgEthereumTx` requires fee to be deducted in the antehandler in order to perform the refund.