Documentation ¶
Index ¶
- func HandleCheckMinInitialDeposit(ctx sdk.Context, msg sdk.Msg, govKeeper govkeeper.Keeper, ...) (err error)
- func IsMsgSubmitProposal(msg sdk.Msg) bool
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- type BankKeeper
- type DistrKeeper
- type GovKeeper
- type HandlerOptions
- type MinInitialDepositDecorator
- type OracleKeeper
- type SpammingPreventionDecorator
- type Tax2GasKeeper
- type TreasuryKeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCheckMinInitialDeposit ¶
func HandleCheckMinInitialDeposit(ctx sdk.Context, msg sdk.Msg, govKeeper govkeeper.Keeper, treasuryKeeper TreasuryKeeper) (err error)
HandleCheckMinInitialDeposit
func IsMsgSubmitProposal ¶
IsMsgSubmitProposal checks whether the input msg is a MsgSubmitProposal
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
Types ¶
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error 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 SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error }
BankKeeper defines the contract needed for supply related APIs (noalias)
type DistrKeeper ¶
type HandlerOptions ¶
type HandlerOptions struct { AccountKeeper ante.AccountKeeper BankKeeper BankKeeper ExtensionOptionChecker ante.ExtensionOptionChecker FeegrantKeeper tax2gastypes.FeegrantKeeper OracleKeeper OracleKeeper TreasuryKeeper TreasuryKeeper SignModeHandler signing.SignModeHandler SigGasConsumer ante.SignatureVerificationGasConsumer TxFeeChecker ante.TxFeeChecker IBCKeeper ibckeeper.Keeper WasmKeeper *wasmkeeper.Keeper DistributionKeeper distributionkeeper.Keeper GovKeeper govkeeper.Keeper WasmConfig *wasmtypes.WasmConfig TXCounterStoreKey storetypes.StoreKey DyncommKeeper dyncommkeeper.Keeper StakingKeeper *stakingkeeper.Keeper Tax2Gaskeeper tax2gaskeeper.Keeper Cdc codec.BinaryCodec }
HandlerOptions are the options required for constructing a default SDK AnteHandler.
type MinInitialDepositDecorator ¶
type MinInitialDepositDecorator struct {
// contains filtered or unexported fields
}
MinInitialDeposit Decorator will check Initial Deposits for MsgSubmitProposal
func NewMinInitialDepositDecorator ¶
func NewMinInitialDepositDecorator(govKeeper govkeeper.Keeper, treasuryKeeper TreasuryKeeper) MinInitialDepositDecorator
NewMinInitialDeposit returns new min initial deposit decorator instance
func (MinInitialDepositDecorator) AnteHandle ¶
func (midd MinInitialDepositDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle handles checking MsgSubmitProposal
type OracleKeeper ¶
type OracleKeeper interface {
ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
}
OracleKeeper for feeder validation
type SpammingPreventionDecorator ¶
type SpammingPreventionDecorator struct {
// contains filtered or unexported fields
}
SpammingPreventionDecorator will check if the transaction's gas is smaller than configured hard cap
func NewSpammingPreventionDecorator ¶
func NewSpammingPreventionDecorator(oracleKeeper OracleKeeper) SpammingPreventionDecorator
NewSpammingPreventionDecorator returns new spamming prevention decorator instance
func (SpammingPreventionDecorator) AnteHandle ¶
func (spd SpammingPreventionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)
AnteHandle handles msg tax fee checking
func (SpammingPreventionDecorator) CheckOracleSpamming ¶
CheckOracleSpamming check whether the msgs are spamming purpose or not
type Tax2GasKeeper ¶ added in v3.2.1
type TreasuryKeeper ¶
type TreasuryKeeper interface { RecordEpochTaxProceeds(ctx sdk.Context, delta sdk.Coins) GetTaxRate(ctx sdk.Context) (taxRate sdk.Dec) GetTaxCap(ctx sdk.Context, denom string) (taxCap math.Int) GetBurnSplitRate(ctx sdk.Context) sdk.Dec HasBurnTaxExemptionAddress(ctx sdk.Context, addresses ...string) bool HasBurnTaxExemptionContract(ctx sdk.Context, address string) bool GetMinInitialDepositRatio(ctx sdk.Context) sdk.Dec GetOracleSplitRate(ctx sdk.Context) sdk.Dec }
TreasuryKeeper for tax charging & recording