Documentation ¶
Overview ¶
Package minfee is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func DefaultNetworkMinGasPriceAsDec() sdk.Dec
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterMinFeeParamTable(subspace paramtypes.Subspace) paramtypes.Subspace
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateGenesis(genesis *GenesisState) error
- func ValidateMinGasPrice(i interface{}) error
- type AppModule
- func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg sdkmodule.Configurator)
- func (am AppModule) Route() sdk.Route
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (a AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type Params
- type QueryClient
- type QueryNetworkMinGasPrice
- func (*QueryNetworkMinGasPrice) Descriptor() ([]byte, []int)
- func (m *QueryNetworkMinGasPrice) Marshal() (dAtA []byte, err error)
- func (m *QueryNetworkMinGasPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNetworkMinGasPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNetworkMinGasPrice) ProtoMessage()
- func (m *QueryNetworkMinGasPrice) Reset()
- func (m *QueryNetworkMinGasPrice) Size() (n int)
- func (m *QueryNetworkMinGasPrice) String() string
- func (m *QueryNetworkMinGasPrice) Unmarshal(dAtA []byte) error
- func (m *QueryNetworkMinGasPrice) XXX_DiscardUnknown()
- func (m *QueryNetworkMinGasPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNetworkMinGasPrice) XXX_Merge(src proto.Message)
- func (m *QueryNetworkMinGasPrice) XXX_Size() int
- func (m *QueryNetworkMinGasPrice) XXX_Unmarshal(b []byte) error
- type QueryNetworkMinGasPriceResponse
- func (*QueryNetworkMinGasPriceResponse) Descriptor() ([]byte, []int)
- func (m *QueryNetworkMinGasPriceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryNetworkMinGasPriceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNetworkMinGasPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNetworkMinGasPriceResponse) ProtoMessage()
- func (m *QueryNetworkMinGasPriceResponse) Reset()
- func (m *QueryNetworkMinGasPriceResponse) Size() (n int)
- func (m *QueryNetworkMinGasPriceResponse) String() string
- func (m *QueryNetworkMinGasPriceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryNetworkMinGasPriceResponse) XXX_DiscardUnknown()
- func (m *QueryNetworkMinGasPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNetworkMinGasPriceResponse) XXX_Merge(src proto.Message)
- func (m *QueryNetworkMinGasPriceResponse) XXX_Size() int
- func (m *QueryNetworkMinGasPriceResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryServerImpl
- type UnimplementedQueryServer
Constants ¶
const ( // DefaultNetworkMinGasPrice is used by x/minfee to prevent transactions from being // included in a block if they specify a gas price lower than this. // Only applies to app version >= 2 // // Deprecated: use DefaultNetworkMinGasPriceAsDec() instead. DefaultNetworkMinGasPrice = 0.000001 // utia )
const ModuleName = "minfee"
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var (
KeyNetworkMinGasPrice = []byte("NetworkMinGasPrice")
)
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable returns the param key table for the minfee module.
func RegisterMinFeeParamTable ¶
func RegisterMinFeeParamTable(subspace paramtypes.Subspace) paramtypes.Subspace
RegisterMinFeeParamTable returns a subspace with a key table attached.
func RegisterQueryHandler ¶
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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateGenesis ¶
func ValidateGenesis(genesis *GenesisState) error
ValidateGenesis performs basic validation of genesis data returning an error for any failed validation criteria.
func ValidateMinGasPrice ¶
func ValidateMinGasPrice(i interface{}) error
Validate validates the param type
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements an application module for the minfee module.
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock returns the begin blocker for the minfee module.
func (AppModule) ConsensusVersion ¶
ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock returns the end blocker for the minfee module. It returns no validator updates.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the minfee module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the minfee module. It returns no validator updates.
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier
LegacyQuerierHandler returns the minfee module's Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the minfee module's querier route name.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants registers the minfee module invariants.
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg sdkmodule.Configurator)
RegisterServices registers module services.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the minfee module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the minfee module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns the a dummy command.
func (AppModuleBasic) GetTxCmd ¶
func (a AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns the minfee module's root tx command.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the minfee module's name.
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interfaces with the interface registry.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)
RegisterLegacyAminoCodec does nothing. MinFee doesn't use Amino.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router)
RegisterRESTRoutes registers the REST service handlers for the module.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the minfee module.
type GenesisState ¶
type GenesisState struct {
NetworkMinGasPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 159-byte string literal not displayed */
}
GenesisState defines the minfee module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state.
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k params.Keeper) *GenesisState
ExportGenesis returns the minfee module's exported genesis.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) 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 Params ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs gets the param key-value pair
type QueryClient ¶
type QueryClient interface { // NetworkMinGasPrice queries the network wide minimum gas price. NetworkMinGasPrice(ctx context.Context, in *QueryNetworkMinGasPrice, opts ...grpc.CallOption) (*QueryNetworkMinGasPriceResponse, 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 QueryNetworkMinGasPrice ¶
type QueryNetworkMinGasPrice struct { }
QueryNetworkMinGasPrice is the request type for the Query/NetworkMinGasPrice RPC method.
func (*QueryNetworkMinGasPrice) Descriptor ¶
func (*QueryNetworkMinGasPrice) Descriptor() ([]byte, []int)
func (*QueryNetworkMinGasPrice) Marshal ¶
func (m *QueryNetworkMinGasPrice) Marshal() (dAtA []byte, err error)
func (*QueryNetworkMinGasPrice) MarshalTo ¶
func (m *QueryNetworkMinGasPrice) MarshalTo(dAtA []byte) (int, error)
func (*QueryNetworkMinGasPrice) MarshalToSizedBuffer ¶
func (m *QueryNetworkMinGasPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNetworkMinGasPrice) ProtoMessage ¶
func (*QueryNetworkMinGasPrice) ProtoMessage()
func (*QueryNetworkMinGasPrice) Reset ¶
func (m *QueryNetworkMinGasPrice) Reset()
func (*QueryNetworkMinGasPrice) Size ¶
func (m *QueryNetworkMinGasPrice) Size() (n int)
func (*QueryNetworkMinGasPrice) String ¶
func (m *QueryNetworkMinGasPrice) String() string
func (*QueryNetworkMinGasPrice) Unmarshal ¶
func (m *QueryNetworkMinGasPrice) Unmarshal(dAtA []byte) error
func (*QueryNetworkMinGasPrice) XXX_DiscardUnknown ¶
func (m *QueryNetworkMinGasPrice) XXX_DiscardUnknown()
func (*QueryNetworkMinGasPrice) XXX_Marshal ¶
func (m *QueryNetworkMinGasPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNetworkMinGasPrice) XXX_Merge ¶
func (m *QueryNetworkMinGasPrice) XXX_Merge(src proto.Message)
func (*QueryNetworkMinGasPrice) XXX_Size ¶
func (m *QueryNetworkMinGasPrice) XXX_Size() int
func (*QueryNetworkMinGasPrice) XXX_Unmarshal ¶
func (m *QueryNetworkMinGasPrice) XXX_Unmarshal(b []byte) error
type QueryNetworkMinGasPriceResponse ¶
type QueryNetworkMinGasPriceResponse struct {
NetworkMinGasPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 159-byte string literal not displayed */
}
QueryNetworkMinGasPriceResponse is the response type for Query/NetworkMinGasPrice RPC method.
func (*QueryNetworkMinGasPriceResponse) Descriptor ¶
func (*QueryNetworkMinGasPriceResponse) Descriptor() ([]byte, []int)
func (*QueryNetworkMinGasPriceResponse) Marshal ¶
func (m *QueryNetworkMinGasPriceResponse) Marshal() (dAtA []byte, err error)
func (*QueryNetworkMinGasPriceResponse) MarshalTo ¶
func (m *QueryNetworkMinGasPriceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryNetworkMinGasPriceResponse) MarshalToSizedBuffer ¶
func (m *QueryNetworkMinGasPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNetworkMinGasPriceResponse) ProtoMessage ¶
func (*QueryNetworkMinGasPriceResponse) ProtoMessage()
func (*QueryNetworkMinGasPriceResponse) Reset ¶
func (m *QueryNetworkMinGasPriceResponse) Reset()
func (*QueryNetworkMinGasPriceResponse) Size ¶
func (m *QueryNetworkMinGasPriceResponse) Size() (n int)
func (*QueryNetworkMinGasPriceResponse) String ¶
func (m *QueryNetworkMinGasPriceResponse) String() string
func (*QueryNetworkMinGasPriceResponse) Unmarshal ¶
func (m *QueryNetworkMinGasPriceResponse) Unmarshal(dAtA []byte) error
func (*QueryNetworkMinGasPriceResponse) XXX_DiscardUnknown ¶
func (m *QueryNetworkMinGasPriceResponse) XXX_DiscardUnknown()
func (*QueryNetworkMinGasPriceResponse) XXX_Marshal ¶
func (m *QueryNetworkMinGasPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNetworkMinGasPriceResponse) XXX_Merge ¶
func (m *QueryNetworkMinGasPriceResponse) XXX_Merge(src proto.Message)
func (*QueryNetworkMinGasPriceResponse) XXX_Size ¶
func (m *QueryNetworkMinGasPriceResponse) XXX_Size() int
func (*QueryNetworkMinGasPriceResponse) XXX_Unmarshal ¶
func (m *QueryNetworkMinGasPriceResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // NetworkMinGasPrice queries the network wide minimum gas price. NetworkMinGasPrice(context.Context, *QueryNetworkMinGasPrice) (*QueryNetworkMinGasPriceResponse, error) }
QueryServer is the server API for Query service.
type QueryServerImpl ¶
type QueryServerImpl struct {
// contains filtered or unexported fields
}
QueryServerImpl wraps the params keeper and implements the minfee gRPC query server.
func NewQueryServerImpl ¶
func NewQueryServerImpl(paramsKeeper keeper.Keeper) *QueryServerImpl
NewQueryServerImpl creates a new QueryServerImpl.
func (*QueryServerImpl) NetworkMinGasPrice ¶
func (q *QueryServerImpl) NetworkMinGasPrice(ctx context.Context, _ *QueryNetworkMinGasPrice) (*QueryNetworkMinGasPriceResponse, error)
NetworkMinGasPrice returns the network minimum gas price.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) NetworkMinGasPrice ¶
func (*UnimplementedQueryServer) NetworkMinGasPrice(ctx context.Context, req *QueryNetworkMinGasPrice) (*QueryNetworkMinGasPriceResponse, error)