Documentation
¶
Index ¶
- func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc sdk.AccountI, fees sdk.Coins) error
- func NewAnteHandler(options HandlerOptions) sdk.AnteHandler
- func NewCosmosAnteHandler(ctx sdk.Context, options HandlerOptions) sdk.AnteHandler
- func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool
- type AccountInitDecorator
- type AccountKeeper
- type BankKeeper
- type DeductFeeDecorator
- type HandlerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeductFees ¶
func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc sdk.AccountI, fees sdk.Coins) error
DeductFees deducts fees from the given account.
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) sdk.AnteHandler
NewAnteHandler returns an ante handler responsible for attempting to route an Ethereum or SDK transaction to an internal ante handler for performing transaction-level processing (e.g. fee payment, signature verification) before being passed onto it's respective handler.
func NewCosmosAnteHandler ¶
func NewCosmosAnteHandler(ctx sdk.Context, options HandlerOptions) sdk.AnteHandler
NewCosmosAnteHandler creates the default ante handler for Cosmos transactions
func OnlyLegacyAminoSigners ¶
func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool
OnlyLegacyAminoSigners checks SignatureData to see if all signers are using SIGN_MODE_LEGACY_AMINO_JSON. If this is the case then the corresponding SignatureV2 struct will not have account sequence explicitly set, and we should skip the explicit verification of sig.Sequence in the SigVerificationDecorator's AnteHandler function.
Types ¶
type AccountInitDecorator ¶
type AccountInitDecorator struct {
// contains filtered or unexported fields
}
func NewAccountInitDecorator ¶
func NewAccountInitDecorator(ak AccountKeeper, signModeHandler *txsigning.HandlerMap) AccountInitDecorator
func (AccountInitDecorator) AnteHandle ¶
type AccountKeeper ¶
type AccountKeeper interface {
NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
GetModuleAddress(moduleName string) sdk.AccAddress
GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
HasAccount(ctx context.Context, addr sdk.AccAddress) bool
SetAccount(ctx context.Context, account sdk.AccountI)
RemoveAccount(ctx context.Context, account sdk.AccountI)
GetParams(ctx context.Context) (params authtypes.Params)
GetSequence(ctx context.Context, addr sdk.AccAddress) (uint64, error)
AddressCodec() addresscodec.Codec
}
type BankKeeper ¶
type BankKeeper interface {
IsSendEnabledCoins(ctx context.Context, coins ...sdk.Coin) error
SendCoins(ctx context.Context, from, to sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}
BankKeeper defines the contract needed for supply related APIs (noalias)
type DeductFeeDecorator ¶
type DeductFeeDecorator struct {
// contains filtered or unexported fields
}
DeductFeeDecorator deducts fees from the fee payer. The fee payer is the fee granter (if specified) or first signer of the tx. If the fee payer does not have the funds to pay for the fees, return an InsufficientFunds error. Call next AnteHandler if fees successfully deducted. CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator
func NewDeductFeeDecorator ¶
func NewDeductFeeDecorator(ak AccountKeeper, bk types.BankKeeper, fk ante.FeegrantKeeper, tfc ante.TxFeeChecker) DeductFeeDecorator
func (DeductFeeDecorator) AnteHandle ¶
type HandlerOptions ¶
type HandlerOptions struct {
Cdc codec.BinaryCodec
AccountKeeper AccountKeeper
BankKeeper BankKeeper
FeegrantKeeper ante.FeegrantKeeper
ExtensionOptionChecker ante.ExtensionOptionChecker
SignModeHandler *txsigning.HandlerMap
SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
WasmConfig *wasmtypes.NodeConfig
WasmKeeper *wasmkeeper.Keeper
TXCounterStoreService corestoretypes.KVStoreService
MaxTxGasWanted uint64
FeeMarketKeeper anteinterfaces.FeeMarketKeeper
EvmKeeper anteinterfaces.EVMKeeper
IBCKeeper *ibckeeper.Keeper
CircuitKeeper *circuitkeeper.Keeper
}
HandlerOptions defines the list of module keepers required to run the EVM AnteHandler decorators.
func (HandlerOptions) Validate ¶
func (options HandlerOptions) Validate() error
Validate checks if the keepers are defined