Documentation ¶
Index ¶
- Constants
- func DefaultDisableFilter() bool
- func DefaultTxFilter() []string
- func GenAllowedContractMap(contracts []string, isOff bool) map[string]bool
- func GenAllowedMsgRegex(targets []string) string
- func NewAnteHandler(opts HandlerOptions, appOpts servertypes.AppOptions) (sdk.AnteHandler, error)
- type AppOptionsMock
- type HandlerOptions
- type TxFilterDecorator
- type TxFilterOptions
Constants ¶
View Source
const ( FlagTxFilter = "tx-filter.allowed-targets" FlagInitHeight = "tx-filter.initial-block-height" FlagAllowedContract = "tx-filter.allowed-contracts" FlagDisableFilter = "tx-filter.disable-contract-filter" )
Variables ¶
This section is empty.
Functions ¶
func DefaultDisableFilter ¶
func DefaultDisableFilter() bool
func DefaultTxFilter ¶
func DefaultTxFilter() []string
func GenAllowedContractMap ¶
func GenAllowedMsgRegex ¶
func NewAnteHandler ¶
func NewAnteHandler(opts HandlerOptions, appOpts servertypes.AppOptions) (sdk.AnteHandler, error)
Types ¶
type AppOptionsMock ¶
func MakeAppOptionsMock ¶
func MakeAppOptionsMock() AppOptionsMock
func (AppOptionsMock) Get ¶
func (msc AppOptionsMock) Get(key string) any
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCkeeper *ibckeeper.Keeper WasmConfig *wasmtypes.WasmConfig }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type TxFilterDecorator ¶
type TxFilterDecorator struct {
Options TxFilterOptions
}
TxFilterDecorator blocks the sdk.Msg if it's not registered in tx-filter AllowedTargets
func NewTxFilterDecorator ¶
func NewTxFilterDecorator(opts TxFilterOptions) TxFilterDecorator
func (TxFilterDecorator) AnteHandle ¶
func (TxFilterDecorator) CheckIfAllowed ¶
func (tfd TxFilterDecorator) CheckIfAllowed(msgs []sdk.Msg) error
type TxFilterOptions ¶
type TxFilterOptions struct { AllowedMsgRegex string InitialBlockHeight int64 AllowedContract map[string]bool }
func NewTxFilterOptions ¶
func NewTxFilterOptions(appOpts servertypes.AppOptions) TxFilterOptions
Click to show internal directories.
Click to hide internal directories.