ante

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountKeeper

type AccountKeeper interface {
	GetParams(ctx sdk.Context) (params types.Params)
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
	SetAccount(ctx sdk.Context, acc types.AccountI)
	GetModuleAddress(moduleName string) sdk.AccAddress
}

type BankKeeper

type BankKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

type DeductFeeDecorator

type DeductFeeDecorator struct {
	// contains filtered or unexported fields
}

ModifiedFeeDecorator is modified version of Cosmos SDK's DeductFeeDecorator implementation which extends it and makes all x/ssi module related transactions incur fixed fee cost. Fixed fee is seperate for each x/ssi module transactions and are updated through Governance based proposals. Please refer HIP-9 to know more: https://github.com/hypersign-protocol/HIPs/blob/main/HIPs/hip-9.md

func (DeductFeeDecorator) AnteHandle

func (mfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

type FeegrantKeeper

type FeegrantKeeper interface {
	UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
}

type MempoolFeeDecorator

type MempoolFeeDecorator struct{}

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 and transaction with only non-SSI messages If fee is high enough or not CheckTx or the transaction consists of only SSI messages, then call next AnteHandler CONTRACT: Tx must implement FeeTx to use MempoolFeeDecorator

func NewMempoolFeeDecorator

func NewMempoolFeeDecorator() MempoolFeeDecorator

func (MempoolFeeDecorator) AnteHandle

func (mfd MempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

type NonSSIMsg

type NonSSIMsg sdk.Msg

type SSIMsg

type SSIMsg sdk.Msg

type SSITxDecorator

type SSITxDecorator struct{}

SSITxDecorator ensures that transactions containing SSI messages are combined with messages from other modules. This is due to the fixed fees associated with SSI messages, irrespective of message size

func NewSSITxDecorator

func NewSSITxDecorator() SSITxDecorator

func (SSITxDecorator) AnteHandle

func (SSITxDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

type SsiKeeper

type SsiKeeper interface {
	GetFeeParams(ctx sdk.Context, ssiParamStoreKey []byte) sdk.Coin
}

Jump to

Keyboard shortcuts

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