types

package
v0.42.32 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeUseFeeGrant    = "use_feegrant"
	EventTypeRevokeFeeGrant = "revoke_feegrant"
	EventTypeSetFeeGrant    = "set_feegrant"

	AttributeKeyGranter = "granter"
	AttributeKeyGrantee = "grantee"

	AttributeValueCategory = ModuleName
)

evidence module events

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "feegrant"

	// StoreKey is the store key string for supply
	StoreKey = ModuleName

	// RouterKey is the message route for supply
	RouterKey = ModuleName

	// QuerierRoute is the querier route for supply
	QuerierRoute = ModuleName
)
View Source
const (
	TypeMsgGrantFeeAllowance  = "grant_fee_allowance"
	TypeMsgRevokeFeeAllowance = "revoke_fee_allowance"
)

feegrant message types

View Source
const (
	DefaultCodespace = ModuleName
)

Codes for governance errors

Variables

View Source
var (
	// ErrFeeLimitExceeded error if there are not enough allowance to cover the fees
	ErrFeeLimitExceeded = sdkerrors.Register(DefaultCodespace, 2, "fee limit exceeded")
	// ErrFeeLimitExpired error if the allowance has expired
	ErrFeeLimitExpired = sdkerrors.Register(DefaultCodespace, 3, "fee allowance expired")
	// ErrInvalidDuration error if the Duration is invalid or doesn't match the expiration
	ErrInvalidDuration = sdkerrors.Register(DefaultCodespace, 4, "invalid duration")
	// ErrNoAllowance error if there is no allowance for that pair
	ErrNoAllowance = sdkerrors.Register(DefaultCodespace, 5, "no allowance")
)
View Source
var (
	ErrInvalidLengthFeegrant        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFeegrant          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFeegrant = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// FeeAllowanceKeyPrefix is the set of the kvstore for fee allowance data
	FeeAllowanceKeyPrefix = []byte{0x00}
)

Functions

func FeeAllowanceKey

func FeeAllowanceKey(granter sdk.AccAddress, grantee sdk.AccAddress) []byte

FeeAllowanceKey is the canonical key to store a grant from granter to grantee We store by grantee first to allow searching by everyone who granted to you

func FeeAllowancePrefixByGrantee

func FeeAllowancePrefixByGrantee(grantee sdk.AccAddress) []byte

FeeAllowancePrefixByGrantee returns a prefix to scan for all grants to this given address.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the interfaces types with the interface registry

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis ensures all grants in the genesis state are valid

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) auth.ModuleAccountI

	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) auth.AccountI
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) auth.AccountI
	SetAccount(ctx sdk.Context, acc auth.AccountI)
}

AccountKeeper defines the expected auth Account Keeper (noalias)

type BankKeeper

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

BankKeeper defines the expected supply Keeper (noalias)

type BasicFeeAllowance

type BasicFeeAllowance struct {
	// spend_limit specifies the maximum amount of tokens that can be spent
	// by this allowance and will be updated as tokens are spent. If it is
	// empty, there is no spend limit and any amount of coins can be spent.
	SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `` /* 141-byte string literal not displayed */
	// expiration specifies an optional time when this allowance expires
	Expiration ExpiresAt `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration"`
}

BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens that optionally expires. The delegatee can use up to SpendLimit to cover fees.

func (*BasicFeeAllowance) Accept

func (a *BasicFeeAllowance) Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (bool, error)

Accept can use fee payment requested as well as timestamp/height of the current block to determine whether or not to process this. This is checked in Keeper.UseGrantedFees and the return values should match how it is handled there.

If it returns an error, the fee payment is rejected, otherwise it is accepted. The FeeAllowance implementation is expected to update it's internal state and will be saved again after an acceptance.

If remove is true (regardless of the error), the FeeAllowance will be deleted from storage (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees)

func (*BasicFeeAllowance) Descriptor

func (*BasicFeeAllowance) Descriptor() ([]byte, []int)

func (*BasicFeeAllowance) GetExpiration

func (m *BasicFeeAllowance) GetExpiration() ExpiresAt

func (*BasicFeeAllowance) GetSpendLimit

func (*BasicFeeAllowance) Marshal

func (m *BasicFeeAllowance) Marshal() (dAtA []byte, err error)

func (*BasicFeeAllowance) MarshalTo

func (m *BasicFeeAllowance) MarshalTo(dAtA []byte) (int, error)

func (*BasicFeeAllowance) MarshalToSizedBuffer

func (m *BasicFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BasicFeeAllowance) PrepareForExport

func (a *BasicFeeAllowance) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI

PrepareForExport will adjust the expiration based on export time. In particular, it will subtract the dumpHeight from any height-based expiration to ensure that the elapsed number of blocks this allowance is valid for is fixed.

func (*BasicFeeAllowance) ProtoMessage

func (*BasicFeeAllowance) ProtoMessage()

func (*BasicFeeAllowance) Reset

func (m *BasicFeeAllowance) Reset()

func (*BasicFeeAllowance) Size

func (m *BasicFeeAllowance) Size() (n int)

func (*BasicFeeAllowance) String

func (m *BasicFeeAllowance) String() string

func (*BasicFeeAllowance) Unmarshal

func (m *BasicFeeAllowance) Unmarshal(dAtA []byte) error

func (BasicFeeAllowance) ValidateBasic

func (a BasicFeeAllowance) ValidateBasic() error

ValidateBasic implements FeeAllowance and enforces basic sanity checks

func (*BasicFeeAllowance) XXX_DiscardUnknown

func (m *BasicFeeAllowance) XXX_DiscardUnknown()

func (*BasicFeeAllowance) XXX_Marshal

func (m *BasicFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BasicFeeAllowance) XXX_Merge

func (m *BasicFeeAllowance) XXX_Merge(src proto.Message)

func (*BasicFeeAllowance) XXX_Size

func (m *BasicFeeAllowance) XXX_Size() int

func (*BasicFeeAllowance) XXX_Unmarshal

func (m *BasicFeeAllowance) XXX_Unmarshal(b []byte) error

type Duration

type Duration struct {
	// sum is the oneof that represents either duration or block
	//
	// Types that are valid to be assigned to Sum:
	//	*Duration_Duration
	//	*Duration_Blocks
	Sum isDuration_Sum `protobuf_oneof:"sum"`
}

Duration is a span of a clock time or number of blocks. This is designed to be added to an ExpiresAt struct.

func BlockDuration

func BlockDuration(h uint64) Duration

BlockDuration creates an Duration by block height

func ClockDuration

func ClockDuration(d time.Duration) Duration

ClockDuration creates an Duration by clock time

func (*Duration) Descriptor

func (*Duration) Descriptor() ([]byte, []int)

func (*Duration) GetBlocks

func (m *Duration) GetBlocks() uint64

func (*Duration) GetDuration

func (m *Duration) GetDuration() *time.Duration

func (*Duration) GetSum

func (m *Duration) GetSum() isDuration_Sum

func (*Duration) Marshal

func (m *Duration) Marshal() (dAtA []byte, err error)

func (*Duration) MarshalTo

func (m *Duration) MarshalTo(dAtA []byte) (int, error)

func (*Duration) MarshalToSizedBuffer

func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Duration) ProtoMessage

func (*Duration) ProtoMessage()

func (*Duration) Reset

func (m *Duration) Reset()

func (*Duration) Size

func (m *Duration) Size() (n int)

func (*Duration) String

func (m *Duration) String() string

func (*Duration) Unmarshal

func (m *Duration) Unmarshal(dAtA []byte) error

func (Duration) ValidateBasic

func (d Duration) ValidateBasic() error

ValidateBasic performs basic sanity checks Note that exactly one must be set and it must be positive

func (*Duration) XXX_DiscardUnknown

func (m *Duration) XXX_DiscardUnknown()

func (*Duration) XXX_Marshal

func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Duration) XXX_Merge

func (m *Duration) XXX_Merge(src proto.Message)

func (*Duration) XXX_OneofWrappers

func (*Duration) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Duration) XXX_Size

func (m *Duration) XXX_Size() int

func (*Duration) XXX_Unmarshal

func (m *Duration) XXX_Unmarshal(b []byte) error

type Duration_Blocks

type Duration_Blocks struct {
	Blocks uint64 `protobuf:"varint,2,opt,name=blocks,proto3,oneof" json:"blocks,omitempty"`
}

func (*Duration_Blocks) MarshalTo

func (m *Duration_Blocks) MarshalTo(dAtA []byte) (int, error)

func (*Duration_Blocks) MarshalToSizedBuffer

func (m *Duration_Blocks) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Duration_Blocks) Size

func (m *Duration_Blocks) Size() (n int)

type Duration_Duration

type Duration_Duration struct {
	Duration *time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,oneof,stdduration" json:"duration,omitempty"`
}

func (*Duration_Duration) MarshalTo

func (m *Duration_Duration) MarshalTo(dAtA []byte) (int, error)

func (*Duration_Duration) MarshalToSizedBuffer

func (m *Duration_Duration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Duration_Duration) Size

func (m *Duration_Duration) Size() (n int)

type ExpiresAt

type ExpiresAt struct {
	// sum is the oneof that represents either time or height
	//
	// Types that are valid to be assigned to Sum:
	//	*ExpiresAt_Time
	//	*ExpiresAt_Height
	Sum isExpiresAt_Sum `protobuf_oneof:"sum"`
}

ExpiresAt is a point in time where something expires. It may be *either* block time or block height

func ExpiresAtHeight

func ExpiresAtHeight(h int64) ExpiresAt

ExpiresAtHeight creates an expiration at the given height

func ExpiresAtTime

func ExpiresAtTime(t time.Time) ExpiresAt

ExpiresAtTime creates an expiration at the given time

func (*ExpiresAt) Descriptor

func (*ExpiresAt) Descriptor() ([]byte, []int)

func (ExpiresAt) FastForward

func (e ExpiresAt) FastForward(t time.Time, h int64) ExpiresAt

FastForward produces a new Expiration with the time or height set to the new value, depending on what was set on the original expiration

func (*ExpiresAt) GetHeight

func (m *ExpiresAt) GetHeight() int64

func (*ExpiresAt) GetSum

func (m *ExpiresAt) GetSum() isExpiresAt_Sum

func (*ExpiresAt) GetTime

func (m *ExpiresAt) GetTime() *time.Time

func (ExpiresAt) HasDefinedTime

func (e ExpiresAt) HasDefinedTime() bool

HasDefinedTime returns true if `ExpiresAt` has valid time

func (ExpiresAt) IsCompatible

func (e ExpiresAt) IsCompatible(d Duration) bool

IsCompatible returns true iff the two use the same units. If false, they cannot be added.

func (ExpiresAt) IsExpired

func (e ExpiresAt) IsExpired(t *time.Time, h int64) bool

IsExpired returns if the time or height is *equal to* or greater than the defined expiration point. Note that it is expired upon an exact match.

Note a "zero" ExpiresAt is never expired

func (*ExpiresAt) Marshal

func (m *ExpiresAt) Marshal() (dAtA []byte, err error)

func (*ExpiresAt) MarshalTo

func (m *ExpiresAt) MarshalTo(dAtA []byte) (int, error)

func (*ExpiresAt) MarshalToSizedBuffer

func (m *ExpiresAt) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ExpiresAt) MustStep

func (e ExpiresAt) MustStep(d Duration) ExpiresAt

MustStep is like Step, but panics on error

func (ExpiresAt) PrepareForExport

func (e ExpiresAt) PrepareForExport(dumpTime time.Time, dumpHeight int64) ExpiresAt

PrepareForExport will deduct the dumpHeight from the expiration, so when this is reloaded after a hard fork, the actual number of allowed blocks is constant

func (*ExpiresAt) ProtoMessage

func (*ExpiresAt) ProtoMessage()

func (*ExpiresAt) Reset

func (m *ExpiresAt) Reset()

func (*ExpiresAt) Size

func (m *ExpiresAt) Size() (n int)

func (ExpiresAt) Step

func (e ExpiresAt) Step(d Duration) (ExpiresAt, error)

Step will increase the expiration point by one Duration It returns an error if the Duration is incompatible

func (*ExpiresAt) String

func (m *ExpiresAt) String() string

func (ExpiresAt) Undefined

func (e ExpiresAt) Undefined() bool

Undefined returns true for an uninitialized struct

func (*ExpiresAt) Unmarshal

func (m *ExpiresAt) Unmarshal(dAtA []byte) error

func (ExpiresAt) ValidateBasic

func (e ExpiresAt) ValidateBasic() error

ValidateBasic performs basic sanity checks. Note that empty expiration is allowed

func (*ExpiresAt) XXX_DiscardUnknown

func (m *ExpiresAt) XXX_DiscardUnknown()

func (*ExpiresAt) XXX_Marshal

func (m *ExpiresAt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExpiresAt) XXX_Merge

func (m *ExpiresAt) XXX_Merge(src proto.Message)

func (*ExpiresAt) XXX_OneofWrappers

func (*ExpiresAt) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ExpiresAt) XXX_Size

func (m *ExpiresAt) XXX_Size() int

func (*ExpiresAt) XXX_Unmarshal

func (m *ExpiresAt) XXX_Unmarshal(b []byte) error

type ExpiresAt_Height

type ExpiresAt_Height struct {
	Height int64 `protobuf:"varint,2,opt,name=height,proto3,oneof" json:"height,omitempty"`
}

func (*ExpiresAt_Height) MarshalTo

func (m *ExpiresAt_Height) MarshalTo(dAtA []byte) (int, error)

func (*ExpiresAt_Height) MarshalToSizedBuffer

func (m *ExpiresAt_Height) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExpiresAt_Height) Size

func (m *ExpiresAt_Height) Size() (n int)

type ExpiresAt_Time

type ExpiresAt_Time struct {
	Time *time.Time `protobuf:"bytes,1,opt,name=time,proto3,oneof,stdtime" json:"time,omitempty"`
}

func (*ExpiresAt_Time) MarshalTo

func (m *ExpiresAt_Time) MarshalTo(dAtA []byte) (int, error)

func (*ExpiresAt_Time) MarshalToSizedBuffer

func (m *ExpiresAt_Time) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExpiresAt_Time) Size

func (m *ExpiresAt_Time) Size() (n int)

type FeeAllowanceGrant

type FeeAllowanceGrant struct {
	Granter   string      `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
	Grantee   string      `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
	Allowance *types1.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"`
}

FeeAllowanceGrant is stored in the KVStore to record a grant with full context

func NewFeeAllowanceGrant

func NewFeeAllowanceGrant(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI) (FeeAllowanceGrant, error)

NewFeeAllowanceGrant creates a new FeeAllowanceGrant.

func (*FeeAllowanceGrant) Descriptor

func (*FeeAllowanceGrant) Descriptor() ([]byte, []int)

func (*FeeAllowanceGrant) GetAllowance

func (m *FeeAllowanceGrant) GetAllowance() *types1.Any

func (FeeAllowanceGrant) GetFeeGrant

func (a FeeAllowanceGrant) GetFeeGrant() FeeAllowanceI

GetFeeGrant unpacks allowance

func (*FeeAllowanceGrant) GetGrantee

func (m *FeeAllowanceGrant) GetGrantee() string

func (*FeeAllowanceGrant) GetGranter

func (m *FeeAllowanceGrant) GetGranter() string

func (*FeeAllowanceGrant) Marshal

func (m *FeeAllowanceGrant) Marshal() (dAtA []byte, err error)

func (*FeeAllowanceGrant) MarshalTo

func (m *FeeAllowanceGrant) MarshalTo(dAtA []byte) (int, error)

func (*FeeAllowanceGrant) MarshalToSizedBuffer

func (m *FeeAllowanceGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (FeeAllowanceGrant) PrepareForExport

func (a FeeAllowanceGrant) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceGrant

PrepareForExport will make all needed changes to the allowance to prepare to be re-imported at height 0, and return a copy of this grant.

func (*FeeAllowanceGrant) ProtoMessage

func (*FeeAllowanceGrant) ProtoMessage()

func (*FeeAllowanceGrant) Reset

func (m *FeeAllowanceGrant) Reset()

func (*FeeAllowanceGrant) Size

func (m *FeeAllowanceGrant) Size() (n int)

func (*FeeAllowanceGrant) String

func (m *FeeAllowanceGrant) String() string

func (*FeeAllowanceGrant) Unmarshal

func (m *FeeAllowanceGrant) Unmarshal(dAtA []byte) error

func (FeeAllowanceGrant) UnpackInterfaces

func (a FeeAllowanceGrant) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (FeeAllowanceGrant) ValidateBasic

func (a FeeAllowanceGrant) ValidateBasic() error

ValidateBasic performs basic validation on FeeAllowanceGrant

func (*FeeAllowanceGrant) XXX_DiscardUnknown

func (m *FeeAllowanceGrant) XXX_DiscardUnknown()

func (*FeeAllowanceGrant) XXX_Marshal

func (m *FeeAllowanceGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FeeAllowanceGrant) XXX_Merge

func (m *FeeAllowanceGrant) XXX_Merge(src proto.Message)

func (*FeeAllowanceGrant) XXX_Size

func (m *FeeAllowanceGrant) XXX_Size() int

func (*FeeAllowanceGrant) XXX_Unmarshal

func (m *FeeAllowanceGrant) XXX_Unmarshal(b []byte) error

type FeeAllowanceI

type FeeAllowanceI interface {
	// Accept can use fee payment requested as well as timestamp/height of the current block
	// to determine whether or not to process this. This is checked in
	// Keeper.UseGrantedFees and the return values should match how it is handled there.
	//
	// If it returns an error, the fee payment is rejected, otherwise it is accepted.
	// The FeeAllowance implementation is expected to update it's internal state
	// and will be saved again after an acceptance.
	//
	// If remove is true (regardless of the error), the FeeAllowance will be deleted from storage
	// (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees)
	Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (remove bool, err error)

	// If we export fee allowances the timing info will be quite off (eg. go from height 100000 to 0)
	// This callback allows the fee-allowance to change it's state and return a copy that is adjusted
	// given the time and height of the actual dump (may safely return self if no changes needed)
	PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI

	// ValidateBasic should evaluate this FeeAllowance for internal consistency.
	// Don't allow negative amounts, or negative periods for example.
	ValidateBasic() error
}

FeeAllowance implementations are tied to a given fee delegator and delegatee, and are used to enforce fee grant limits.

type GenesisState

type GenesisState struct {
	FeeAllowances []FeeAllowanceGrant `protobuf:"bytes,1,rep,name=fee_allowances,json=feeAllowances,proto3" json:"fee_allowances"`
}

GenesisState contains a set of fee allowances, persisted from the store

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns default state for feegrant module.

func NewGenesisState

func NewGenesisState(entries []FeeAllowanceGrant) *GenesisState

NewGenesisState creates new GenesisState object

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetFeeAllowances

func (m *GenesisState) GetFeeAllowances() []FeeAllowanceGrant

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) UnpackInterfaces

func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// GrantFeeAllowance grants fee allowance to the grantee on the granter's
	// account with the provided expiration time.
	GrantFeeAllowance(ctx context.Context, in *MsgGrantFeeAllowance, opts ...grpc.CallOption) (*MsgGrantFeeAllowanceResponse, error)
	// RevokeFeeAllowance revokes any fee allowance of granter's account that
	// has been granted to the grantee.
	RevokeFeeAllowance(ctx context.Context, in *MsgRevokeFeeAllowance, opts ...grpc.CallOption) (*MsgRevokeFeeAllowanceResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgGrantFeeAllowance

type MsgGrantFeeAllowance struct {
	Granter   string     `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
	Grantee   string     `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
	Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"`
}

MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter.

func NewMsgGrantFeeAllowance

func NewMsgGrantFeeAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAddress) (*MsgGrantFeeAllowance, error)

NewMsgGrantFeeAllowance creates a new MsgGrantFeeAllowance.

func (*MsgGrantFeeAllowance) Descriptor

func (*MsgGrantFeeAllowance) Descriptor() ([]byte, []int)

func (*MsgGrantFeeAllowance) GetAllowance

func (m *MsgGrantFeeAllowance) GetAllowance() *types.Any

func (MsgGrantFeeAllowance) GetFeeAllowanceI

func (msg MsgGrantFeeAllowance) GetFeeAllowanceI() FeeAllowanceI

GetFeeAllowanceI returns unpacked FeeAllowance

func (*MsgGrantFeeAllowance) GetGrantee

func (m *MsgGrantFeeAllowance) GetGrantee() string

func (*MsgGrantFeeAllowance) GetGranter

func (m *MsgGrantFeeAllowance) GetGranter() string

func (MsgGrantFeeAllowance) GetSigners

func (msg MsgGrantFeeAllowance) GetSigners() []sdk.AccAddress

func (*MsgGrantFeeAllowance) Marshal

func (m *MsgGrantFeeAllowance) Marshal() (dAtA []byte, err error)

func (*MsgGrantFeeAllowance) MarshalTo

func (m *MsgGrantFeeAllowance) MarshalTo(dAtA []byte) (int, error)

func (*MsgGrantFeeAllowance) MarshalToSizedBuffer

func (m *MsgGrantFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGrantFeeAllowance) ProtoMessage

func (*MsgGrantFeeAllowance) ProtoMessage()

func (*MsgGrantFeeAllowance) Reset

func (m *MsgGrantFeeAllowance) Reset()

func (*MsgGrantFeeAllowance) Size

func (m *MsgGrantFeeAllowance) Size() (n int)

func (*MsgGrantFeeAllowance) String

func (m *MsgGrantFeeAllowance) String() string

func (*MsgGrantFeeAllowance) Unmarshal

func (m *MsgGrantFeeAllowance) Unmarshal(dAtA []byte) error

func (MsgGrantFeeAllowance) UnpackInterfaces

func (msg MsgGrantFeeAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgGrantFeeAllowance) ValidateBasic

func (msg MsgGrantFeeAllowance) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgGrantFeeAllowance) XXX_DiscardUnknown

func (m *MsgGrantFeeAllowance) XXX_DiscardUnknown()

func (*MsgGrantFeeAllowance) XXX_Marshal

func (m *MsgGrantFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGrantFeeAllowance) XXX_Merge

func (m *MsgGrantFeeAllowance) XXX_Merge(src proto.Message)

func (*MsgGrantFeeAllowance) XXX_Size

func (m *MsgGrantFeeAllowance) XXX_Size() int

func (*MsgGrantFeeAllowance) XXX_Unmarshal

func (m *MsgGrantFeeAllowance) XXX_Unmarshal(b []byte) error

type MsgGrantFeeAllowanceResponse

type MsgGrantFeeAllowanceResponse struct {
}

MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type.

func (*MsgGrantFeeAllowanceResponse) Descriptor

func (*MsgGrantFeeAllowanceResponse) Descriptor() ([]byte, []int)

func (*MsgGrantFeeAllowanceResponse) Marshal

func (m *MsgGrantFeeAllowanceResponse) Marshal() (dAtA []byte, err error)

func (*MsgGrantFeeAllowanceResponse) MarshalTo

func (m *MsgGrantFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgGrantFeeAllowanceResponse) MarshalToSizedBuffer

func (m *MsgGrantFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGrantFeeAllowanceResponse) ProtoMessage

func (*MsgGrantFeeAllowanceResponse) ProtoMessage()

func (*MsgGrantFeeAllowanceResponse) Reset

func (m *MsgGrantFeeAllowanceResponse) Reset()

func (*MsgGrantFeeAllowanceResponse) Size

func (m *MsgGrantFeeAllowanceResponse) Size() (n int)

func (*MsgGrantFeeAllowanceResponse) String

func (*MsgGrantFeeAllowanceResponse) Unmarshal

func (m *MsgGrantFeeAllowanceResponse) Unmarshal(dAtA []byte) error

func (*MsgGrantFeeAllowanceResponse) XXX_DiscardUnknown

func (m *MsgGrantFeeAllowanceResponse) XXX_DiscardUnknown()

func (*MsgGrantFeeAllowanceResponse) XXX_Marshal

func (m *MsgGrantFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGrantFeeAllowanceResponse) XXX_Merge

func (m *MsgGrantFeeAllowanceResponse) XXX_Merge(src proto.Message)

func (*MsgGrantFeeAllowanceResponse) XXX_Size

func (m *MsgGrantFeeAllowanceResponse) XXX_Size() int

func (*MsgGrantFeeAllowanceResponse) XXX_Unmarshal

func (m *MsgGrantFeeAllowanceResponse) XXX_Unmarshal(b []byte) error

type MsgRevokeFeeAllowance

type MsgRevokeFeeAllowance struct {
	Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
	Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
}

MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee.

func NewMsgRevokeFeeAllowance

func NewMsgRevokeFeeAllowance(granter sdk.AccAddress, grantee sdk.AccAddress) MsgRevokeFeeAllowance

func (*MsgRevokeFeeAllowance) Descriptor

func (*MsgRevokeFeeAllowance) Descriptor() ([]byte, []int)

func (*MsgRevokeFeeAllowance) GetGrantee

func (m *MsgRevokeFeeAllowance) GetGrantee() string

func (*MsgRevokeFeeAllowance) GetGranter

func (m *MsgRevokeFeeAllowance) GetGranter() string

func (MsgRevokeFeeAllowance) GetSigners

func (msg MsgRevokeFeeAllowance) GetSigners() []sdk.AccAddress

func (*MsgRevokeFeeAllowance) Marshal

func (m *MsgRevokeFeeAllowance) Marshal() (dAtA []byte, err error)

func (*MsgRevokeFeeAllowance) MarshalTo

func (m *MsgRevokeFeeAllowance) MarshalTo(dAtA []byte) (int, error)

func (*MsgRevokeFeeAllowance) MarshalToSizedBuffer

func (m *MsgRevokeFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRevokeFeeAllowance) ProtoMessage

func (*MsgRevokeFeeAllowance) ProtoMessage()

func (*MsgRevokeFeeAllowance) Reset

func (m *MsgRevokeFeeAllowance) Reset()

func (*MsgRevokeFeeAllowance) Size

func (m *MsgRevokeFeeAllowance) Size() (n int)

func (*MsgRevokeFeeAllowance) String

func (m *MsgRevokeFeeAllowance) String() string

func (*MsgRevokeFeeAllowance) Unmarshal

func (m *MsgRevokeFeeAllowance) Unmarshal(dAtA []byte) error

func (MsgRevokeFeeAllowance) ValidateBasic

func (msg MsgRevokeFeeAllowance) ValidateBasic() error

func (*MsgRevokeFeeAllowance) XXX_DiscardUnknown

func (m *MsgRevokeFeeAllowance) XXX_DiscardUnknown()

func (*MsgRevokeFeeAllowance) XXX_Marshal

func (m *MsgRevokeFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRevokeFeeAllowance) XXX_Merge

func (m *MsgRevokeFeeAllowance) XXX_Merge(src proto.Message)

func (*MsgRevokeFeeAllowance) XXX_Size

func (m *MsgRevokeFeeAllowance) XXX_Size() int

func (*MsgRevokeFeeAllowance) XXX_Unmarshal

func (m *MsgRevokeFeeAllowance) XXX_Unmarshal(b []byte) error

type MsgRevokeFeeAllowanceResponse

type MsgRevokeFeeAllowanceResponse struct {
}

MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type.

func (*MsgRevokeFeeAllowanceResponse) Descriptor

func (*MsgRevokeFeeAllowanceResponse) Descriptor() ([]byte, []int)

func (*MsgRevokeFeeAllowanceResponse) Marshal

func (m *MsgRevokeFeeAllowanceResponse) Marshal() (dAtA []byte, err error)

func (*MsgRevokeFeeAllowanceResponse) MarshalTo

func (m *MsgRevokeFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgRevokeFeeAllowanceResponse) MarshalToSizedBuffer

func (m *MsgRevokeFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRevokeFeeAllowanceResponse) ProtoMessage

func (*MsgRevokeFeeAllowanceResponse) ProtoMessage()

func (*MsgRevokeFeeAllowanceResponse) Reset

func (m *MsgRevokeFeeAllowanceResponse) Reset()

func (*MsgRevokeFeeAllowanceResponse) Size

func (m *MsgRevokeFeeAllowanceResponse) Size() (n int)

func (*MsgRevokeFeeAllowanceResponse) String

func (*MsgRevokeFeeAllowanceResponse) Unmarshal

func (m *MsgRevokeFeeAllowanceResponse) Unmarshal(dAtA []byte) error

func (*MsgRevokeFeeAllowanceResponse) XXX_DiscardUnknown

func (m *MsgRevokeFeeAllowanceResponse) XXX_DiscardUnknown()

func (*MsgRevokeFeeAllowanceResponse) XXX_Marshal

func (m *MsgRevokeFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRevokeFeeAllowanceResponse) XXX_Merge

func (m *MsgRevokeFeeAllowanceResponse) XXX_Merge(src proto.Message)

func (*MsgRevokeFeeAllowanceResponse) XXX_Size

func (m *MsgRevokeFeeAllowanceResponse) XXX_Size() int

func (*MsgRevokeFeeAllowanceResponse) XXX_Unmarshal

func (m *MsgRevokeFeeAllowanceResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// GrantFeeAllowance grants fee allowance to the grantee on the granter's
	// account with the provided expiration time.
	GrantFeeAllowance(context.Context, *MsgGrantFeeAllowance) (*MsgGrantFeeAllowanceResponse, error)
	// RevokeFeeAllowance revokes any fee allowance of granter's account that
	// has been granted to the grantee.
	RevokeFeeAllowance(context.Context, *MsgRevokeFeeAllowance) (*MsgRevokeFeeAllowanceResponse, error)
}

MsgServer is the server API for Msg service.

type PeriodicFeeAllowance

type PeriodicFeeAllowance struct {
	// basic specifies a struct of `BasicFeeAllowance`
	Basic BasicFeeAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic"`
	// period specifies the time duration in which period_spend_limit coins can
	// be spent before that allowance is reset
	Period Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period"`
	// period_spend_limit specifies the maximum number of coins that can be spent
	// in the period
	PeriodSpendLimit github_com_cosmos_cosmos_sdk_types.Coins `` /* 161-byte string literal not displayed */
	// period_can_spend is the number of coins left to be spent before the period_reset time
	PeriodCanSpend github_com_cosmos_cosmos_sdk_types.Coins `` /* 155-byte string literal not displayed */
	// period_reset is the time at which this period resets and a new one begins,
	// it is calculated from the start time of the first transaction after the
	// last period ended
	PeriodReset ExpiresAt `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3" json:"period_reset"`
}

PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap, as well as a limit per time period.

func (*PeriodicFeeAllowance) Accept

func (a *PeriodicFeeAllowance) Accept(fee sdk.Coins, blockTime time.Time, blockHeight int64) (bool, error)

Accept can use fee payment requested as well as timestamp/height of the current block to determine whether or not to process this. This is checked in Keeper.UseGrantedFees and the return values should match how it is handled there.

If it returns an error, the fee payment is rejected, otherwise it is accepted. The FeeAllowance implementation is expected to update it's internal state and will be saved again after an acceptance.

If remove is true (regardless of the error), the FeeAllowance will be deleted from storage (eg. when it is used up). (See call to RevokeFeeAllowance in Keeper.UseGrantedFees)

func (*PeriodicFeeAllowance) Descriptor

func (*PeriodicFeeAllowance) Descriptor() ([]byte, []int)

func (*PeriodicFeeAllowance) GetBasic

func (*PeriodicFeeAllowance) GetPeriod

func (m *PeriodicFeeAllowance) GetPeriod() Duration

func (*PeriodicFeeAllowance) GetPeriodCanSpend

func (*PeriodicFeeAllowance) GetPeriodReset

func (m *PeriodicFeeAllowance) GetPeriodReset() ExpiresAt

func (*PeriodicFeeAllowance) GetPeriodSpendLimit

func (*PeriodicFeeAllowance) Marshal

func (m *PeriodicFeeAllowance) Marshal() (dAtA []byte, err error)

func (*PeriodicFeeAllowance) MarshalTo

func (m *PeriodicFeeAllowance) MarshalTo(dAtA []byte) (int, error)

func (*PeriodicFeeAllowance) MarshalToSizedBuffer

func (m *PeriodicFeeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeriodicFeeAllowance) PrepareForExport

func (a *PeriodicFeeAllowance) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI

PrepareForExport will adjust the expiration based on export time. In particular, it will subtract the dumpHeight from any height-based expiration to ensure that the elapsed number of blocks this allowance is valid for is fixed. (For PeriodReset and Basic.Expiration)

func (*PeriodicFeeAllowance) ProtoMessage

func (*PeriodicFeeAllowance) ProtoMessage()

func (*PeriodicFeeAllowance) Reset

func (m *PeriodicFeeAllowance) Reset()

func (*PeriodicFeeAllowance) Size

func (m *PeriodicFeeAllowance) Size() (n int)

func (*PeriodicFeeAllowance) String

func (m *PeriodicFeeAllowance) String() string

func (*PeriodicFeeAllowance) Unmarshal

func (m *PeriodicFeeAllowance) Unmarshal(dAtA []byte) error

func (PeriodicFeeAllowance) ValidateBasic

func (a PeriodicFeeAllowance) ValidateBasic() error

ValidateBasic implements FeeAllowance and enforces basic sanity checks

func (*PeriodicFeeAllowance) XXX_DiscardUnknown

func (m *PeriodicFeeAllowance) XXX_DiscardUnknown()

func (*PeriodicFeeAllowance) XXX_Marshal

func (m *PeriodicFeeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeriodicFeeAllowance) XXX_Merge

func (m *PeriodicFeeAllowance) XXX_Merge(src proto.Message)

func (*PeriodicFeeAllowance) XXX_Size

func (m *PeriodicFeeAllowance) XXX_Size() int

func (*PeriodicFeeAllowance) XXX_Unmarshal

func (m *PeriodicFeeAllowance) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// FeeAllowance returns fee granted to the grantee by the granter.
	FeeAllowance(ctx context.Context, in *QueryFeeAllowanceRequest, opts ...grpc.CallOption) (*QueryFeeAllowanceResponse, error)
	// FeeAllowances returns all the grants for address.
	FeeAllowances(ctx context.Context, in *QueryFeeAllowancesRequest, opts ...grpc.CallOption) (*QueryFeeAllowancesResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryFeeAllowanceRequest

type QueryFeeAllowanceRequest struct {
	Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
	Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
}

QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method.

func (*QueryFeeAllowanceRequest) Descriptor

func (*QueryFeeAllowanceRequest) Descriptor() ([]byte, []int)

func (*QueryFeeAllowanceRequest) GetGrantee

func (m *QueryFeeAllowanceRequest) GetGrantee() string

func (*QueryFeeAllowanceRequest) GetGranter

func (m *QueryFeeAllowanceRequest) GetGranter() string

func (*QueryFeeAllowanceRequest) Marshal

func (m *QueryFeeAllowanceRequest) Marshal() (dAtA []byte, err error)

func (*QueryFeeAllowanceRequest) MarshalTo

func (m *QueryFeeAllowanceRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryFeeAllowanceRequest) MarshalToSizedBuffer

func (m *QueryFeeAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryFeeAllowanceRequest) ProtoMessage

func (*QueryFeeAllowanceRequest) ProtoMessage()

func (*QueryFeeAllowanceRequest) Reset

func (m *QueryFeeAllowanceRequest) Reset()

func (*QueryFeeAllowanceRequest) Size

func (m *QueryFeeAllowanceRequest) Size() (n int)

func (*QueryFeeAllowanceRequest) String

func (m *QueryFeeAllowanceRequest) String() string

func (*QueryFeeAllowanceRequest) Unmarshal

func (m *QueryFeeAllowanceRequest) Unmarshal(dAtA []byte) error

func (*QueryFeeAllowanceRequest) XXX_DiscardUnknown

func (m *QueryFeeAllowanceRequest) XXX_DiscardUnknown()

func (*QueryFeeAllowanceRequest) XXX_Marshal

func (m *QueryFeeAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryFeeAllowanceRequest) XXX_Merge

func (m *QueryFeeAllowanceRequest) XXX_Merge(src proto.Message)

func (*QueryFeeAllowanceRequest) XXX_Size

func (m *QueryFeeAllowanceRequest) XXX_Size() int

func (*QueryFeeAllowanceRequest) XXX_Unmarshal

func (m *QueryFeeAllowanceRequest) XXX_Unmarshal(b []byte) error

type QueryFeeAllowanceResponse

type QueryFeeAllowanceResponse struct {
	// fee_allowance is a fee_allowance granted for grantee by granter.
	FeeAllowance *FeeAllowanceGrant `protobuf:"bytes,1,opt,name=fee_allowance,json=feeAllowance,proto3" json:"fee_allowance,omitempty"`
}

QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method.

func (*QueryFeeAllowanceResponse) Descriptor

func (*QueryFeeAllowanceResponse) Descriptor() ([]byte, []int)

func (*QueryFeeAllowanceResponse) GetFeeAllowance

func (m *QueryFeeAllowanceResponse) GetFeeAllowance() *FeeAllowanceGrant

func (*QueryFeeAllowanceResponse) Marshal

func (m *QueryFeeAllowanceResponse) Marshal() (dAtA []byte, err error)

func (*QueryFeeAllowanceResponse) MarshalTo

func (m *QueryFeeAllowanceResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryFeeAllowanceResponse) MarshalToSizedBuffer

func (m *QueryFeeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryFeeAllowanceResponse) ProtoMessage

func (*QueryFeeAllowanceResponse) ProtoMessage()

func (*QueryFeeAllowanceResponse) Reset

func (m *QueryFeeAllowanceResponse) Reset()

func (*QueryFeeAllowanceResponse) Size

func (m *QueryFeeAllowanceResponse) Size() (n int)

func (*QueryFeeAllowanceResponse) String

func (m *QueryFeeAllowanceResponse) String() string

func (*QueryFeeAllowanceResponse) Unmarshal

func (m *QueryFeeAllowanceResponse) Unmarshal(dAtA []byte) error

func (*QueryFeeAllowanceResponse) XXX_DiscardUnknown

func (m *QueryFeeAllowanceResponse) XXX_DiscardUnknown()

func (*QueryFeeAllowanceResponse) XXX_Marshal

func (m *QueryFeeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryFeeAllowanceResponse) XXX_Merge

func (m *QueryFeeAllowanceResponse) XXX_Merge(src proto.Message)

func (*QueryFeeAllowanceResponse) XXX_Size

func (m *QueryFeeAllowanceResponse) XXX_Size() int

func (*QueryFeeAllowanceResponse) XXX_Unmarshal

func (m *QueryFeeAllowanceResponse) XXX_Unmarshal(b []byte) error

type QueryFeeAllowancesRequest

type QueryFeeAllowancesRequest struct {
	Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"`
	// pagination defines an pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method.

func (*QueryFeeAllowancesRequest) Descriptor

func (*QueryFeeAllowancesRequest) Descriptor() ([]byte, []int)

func (*QueryFeeAllowancesRequest) GetGrantee

func (m *QueryFeeAllowancesRequest) GetGrantee() string

func (*QueryFeeAllowancesRequest) GetPagination

func (m *QueryFeeAllowancesRequest) GetPagination() *query.PageRequest

func (*QueryFeeAllowancesRequest) Marshal

func (m *QueryFeeAllowancesRequest) Marshal() (dAtA []byte, err error)

func (*QueryFeeAllowancesRequest) MarshalTo

func (m *QueryFeeAllowancesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryFeeAllowancesRequest) MarshalToSizedBuffer

func (m *QueryFeeAllowancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryFeeAllowancesRequest) ProtoMessage

func (*QueryFeeAllowancesRequest) ProtoMessage()

func (*QueryFeeAllowancesRequest) Reset

func (m *QueryFeeAllowancesRequest) Reset()

func (*QueryFeeAllowancesRequest) Size

func (m *QueryFeeAllowancesRequest) Size() (n int)

func (*QueryFeeAllowancesRequest) String

func (m *QueryFeeAllowancesRequest) String() string

func (*QueryFeeAllowancesRequest) Unmarshal

func (m *QueryFeeAllowancesRequest) Unmarshal(dAtA []byte) error

func (*QueryFeeAllowancesRequest) XXX_DiscardUnknown

func (m *QueryFeeAllowancesRequest) XXX_DiscardUnknown()

func (*QueryFeeAllowancesRequest) XXX_Marshal

func (m *QueryFeeAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryFeeAllowancesRequest) XXX_Merge

func (m *QueryFeeAllowancesRequest) XXX_Merge(src proto.Message)

func (*QueryFeeAllowancesRequest) XXX_Size

func (m *QueryFeeAllowancesRequest) XXX_Size() int

func (*QueryFeeAllowancesRequest) XXX_Unmarshal

func (m *QueryFeeAllowancesRequest) XXX_Unmarshal(b []byte) error

type QueryFeeAllowancesResponse

type QueryFeeAllowancesResponse struct {
	// fee_allowances are fee_allowance's granted for grantee by granter.
	FeeAllowances []*FeeAllowanceGrant `protobuf:"bytes,1,rep,name=fee_allowances,json=feeAllowances,proto3" json:"fee_allowances,omitempty"`
	// pagination defines an pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method.

func (*QueryFeeAllowancesResponse) Descriptor

func (*QueryFeeAllowancesResponse) Descriptor() ([]byte, []int)

func (*QueryFeeAllowancesResponse) GetFeeAllowances

func (m *QueryFeeAllowancesResponse) GetFeeAllowances() []*FeeAllowanceGrant

func (*QueryFeeAllowancesResponse) GetPagination

func (m *QueryFeeAllowancesResponse) GetPagination() *query.PageResponse

func (*QueryFeeAllowancesResponse) Marshal

func (m *QueryFeeAllowancesResponse) Marshal() (dAtA []byte, err error)

func (*QueryFeeAllowancesResponse) MarshalTo

func (m *QueryFeeAllowancesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryFeeAllowancesResponse) MarshalToSizedBuffer

func (m *QueryFeeAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryFeeAllowancesResponse) ProtoMessage

func (*QueryFeeAllowancesResponse) ProtoMessage()

func (*QueryFeeAllowancesResponse) Reset

func (m *QueryFeeAllowancesResponse) Reset()

func (*QueryFeeAllowancesResponse) Size

func (m *QueryFeeAllowancesResponse) Size() (n int)

func (*QueryFeeAllowancesResponse) String

func (m *QueryFeeAllowancesResponse) String() string

func (*QueryFeeAllowancesResponse) Unmarshal

func (m *QueryFeeAllowancesResponse) Unmarshal(dAtA []byte) error

func (*QueryFeeAllowancesResponse) XXX_DiscardUnknown

func (m *QueryFeeAllowancesResponse) XXX_DiscardUnknown()

func (*QueryFeeAllowancesResponse) XXX_Marshal

func (m *QueryFeeAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryFeeAllowancesResponse) XXX_Merge

func (m *QueryFeeAllowancesResponse) XXX_Merge(src proto.Message)

func (*QueryFeeAllowancesResponse) XXX_Size

func (m *QueryFeeAllowancesResponse) XXX_Size() int

func (*QueryFeeAllowancesResponse) XXX_Unmarshal

func (m *QueryFeeAllowancesResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// FeeAllowance returns fee granted to the grantee by the granter.
	FeeAllowance(context.Context, *QueryFeeAllowanceRequest) (*QueryFeeAllowanceResponse, error)
	// FeeAllowances returns all the grants for address.
	FeeAllowances(context.Context, *QueryFeeAllowancesRequest) (*QueryFeeAllowancesResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) GrantFeeAllowance

func (*UnimplementedMsgServer) RevokeFeeAllowance

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) FeeAllowance

func (*UnimplementedQueryServer) FeeAllowances

Jump to

Keyboard shortcuts

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