Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAdmissionRefused = sdkerrors.ErrMempoolIsFull
TODO: We don't have a more appropriate error type for this.
var ErrInboundQueueFull = sdkerrors.ErrMempoolIsFull
TODO: We don't have a more appropriate error type for this.
Functions ¶
func NewAnteHandler ¶
func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error)
func NewInboundDecorator ¶
func NewInboundDecorator(sk SwingsetKeeper) sdk.AnteDecorator
NewInboundDecorator returns an AnteDecorator which honors the allowed size of the inbound queue.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetParams(ctx sdk.Context) (params authtypes.Params) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI SetAccount(ctx sdk.Context, acc authtypes.AccountI) GetModuleAddress(moduleName string) sdk.AccAddress }
AccountKeeper defines the contract needed for AccountKeeper related APIs. Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators.
type AdmissionDecorator ¶
type AdmissionDecorator struct {
// contains filtered or unexported fields
}
AdmissionDecorator will ask the Controller (such as SwingSet) if it is temporarily rejecting inbound messages. If CheckAdmissibility passes for all messages, decorator calls next AnteHandler in chain.
func NewAdmissionDecorator ¶
func NewAdmissionDecorator(data interface{}) AdmissionDecorator
func (AdmissionDecorator) AnteHandle ¶
func (ad AdmissionDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)
AnteHandle calls CheckAdmissibility for all messages that implement the vm.ControllerAdmissionMsg interface. If it returns an error, refuse the entire transaction.
type FeegrantKeeper ¶
type FeegrantKeeper interface {
UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
}
FeegrantKeeper defines the expected feegrant keeper.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCKeeper *ibckeeper.Keeper FeeCollectorName string AdmissionData interface{} SwingsetKeeper SwingsetKeeper }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.