types

package
v8.0.0-...-3c7b58a Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeRegisterIncentive    = "register_incentive"
	EventTypeCancelIncentive      = "cancel_incentive"
	EventTypeDistributeIncentives = "distribute_incentives"

	AttributeKeyContract = "contract"
	AttributeKeyEpochs   = "epochs"
)

incentives events

View Source
const (
	// module name
	ModuleName = "incentives"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for message routing
	RouterKey = ModuleName
)

constants

View Source
const (
	ProposalTypeRegisterIncentive string = "RegisterIncentive"
	ProposalTypeCancelIncentive   string = "CancelIncentive"
)

constants

Variables

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 (
	ErrInvalidLengthIncentives        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowIncentives          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupIncentives = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyPrefixIncentive       = []byte{prefixIncentive}
	KeyPrefixGasMeter        = []byte{prefixGasMeter}
	KeyPrefixAllocationMeter = []byte{prefixAllocationMeter}
)

KVStore key prefixes

View Source
var (
	ParamStoreKeyEnableIncentives = []byte("EnableIncentives")
	ParamStoreKeyAllocationLimit  = []byte("AllocationLimit")
	ParamStoreKeyEpochIdentifier  = []byte("EpochIdentifier")
	ParamStoreKeyRewardScaler     = []byte("RewardScaler")
)

Parameter store key

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 (
	ErrInternalIncentive = sdkerrors.Register(ModuleName, 2, "internal incentives error")
)

errors

View Source
var ModuleAddress common.Address

ModuleAddress is the native module address for incentives module

ModuleCdc references the global incentives module codec. Note, the codec should ONLY be used in certain instances of tests and for JSON encoding.

The actual codec used for serialization should be provided to modules/incentives and defined at the application level.

Functions

func NewCancelIncentiveProposal

func NewCancelIncentiveProposal(
	title, description, contract string,
) govtypes.Content

NewCancelIncentiveProposal returns new instance of RegisterIncentiveProposal

func NewRegisterIncentiveProposal

func NewRegisterIncentiveProposal(
	title, description, contract string,
	allocations sdk.DecCoins,
	epochs uint32,
) govtypes.Content

NewRegisterIncentiveProposal returns new instance of RegisterIncentiveProposal

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the parameter key table.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register implementations

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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SplitGasMeterKey

func SplitGasMeterKey(key []byte) (contract, userAddr common.Address)

SplitGasMeterKey is a helper to split up KV-store keys in a `prefix|<contract_address>|<participant_address>` format

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected interface needed to retrieve account info.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	HasSupply(ctx sdk.Context, denom string) bool
	IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool)
}

BankKeeper defines the expected interface needed to retrieve account balances.

type CancelIncentiveProposal

type CancelIncentiveProposal struct {
	// title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// proposal description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contract address
	Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
}

CancelIncentiveProposal is a gov Content type to cancel an incentive

func (*CancelIncentiveProposal) Descriptor

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

func (*CancelIncentiveProposal) GetContract

func (m *CancelIncentiveProposal) GetContract() string

func (*CancelIncentiveProposal) GetDescription

func (m *CancelIncentiveProposal) GetDescription() string

func (*CancelIncentiveProposal) GetTitle

func (m *CancelIncentiveProposal) GetTitle() string

func (*CancelIncentiveProposal) Marshal

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

func (*CancelIncentiveProposal) MarshalTo

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

func (*CancelIncentiveProposal) MarshalToSizedBuffer

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

func (*CancelIncentiveProposal) ProposalRoute

func (*CancelIncentiveProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*CancelIncentiveProposal) ProposalType

func (*CancelIncentiveProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*CancelIncentiveProposal) ProtoMessage

func (*CancelIncentiveProposal) ProtoMessage()

func (*CancelIncentiveProposal) Reset

func (m *CancelIncentiveProposal) Reset()

func (*CancelIncentiveProposal) Size

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

func (*CancelIncentiveProposal) String

func (m *CancelIncentiveProposal) String() string

func (*CancelIncentiveProposal) Unmarshal

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

func (*CancelIncentiveProposal) ValidateBasic

func (rip *CancelIncentiveProposal) ValidateBasic() error

ValidateBasic performs a stateless check of the proposal fields

func (*CancelIncentiveProposal) XXX_DiscardUnknown

func (m *CancelIncentiveProposal) XXX_DiscardUnknown()

func (*CancelIncentiveProposal) XXX_Marshal

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

func (*CancelIncentiveProposal) XXX_Merge

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

func (*CancelIncentiveProposal) XXX_Size

func (m *CancelIncentiveProposal) XXX_Size() int

func (*CancelIncentiveProposal) XXX_Unmarshal

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

type EVMKeeper

type EVMKeeper interface {
	GetParams(ctx sdk.Context) evmtypes.Params
	GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account
}

EVMKeeper defines the expected EVM keeper interface used on erc20

type GasMeter

type GasMeter struct {
	// hex address of the incentivized contract
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
	// participant address that interacts with the incentive
	Participant string `protobuf:"bytes,2,opt,name=participant,proto3" json:"participant,omitempty"`
	// cumulative gas spent during the epoch
	CumulativeGas uint64 `protobuf:"varint,3,opt,name=cumulative_gas,json=cumulativeGas,proto3" json:"cumulative_gas,omitempty"`
}

GasMeter tracks the cumulative gas spent per participant in one epoch

func NewGasMeter

func NewGasMeter(
	contract common.Address,
	participant common.Address,
	cumulativeGas uint64,
) GasMeter

NewGasMeter returns an instance of GasMeter

func (*GasMeter) Descriptor

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

func (*GasMeter) GetContract

func (m *GasMeter) GetContract() string

func (*GasMeter) GetCumulativeGas

func (m *GasMeter) GetCumulativeGas() uint64

func (*GasMeter) GetParticipant

func (m *GasMeter) GetParticipant() string

func (*GasMeter) Marshal

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

func (*GasMeter) MarshalTo

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

func (*GasMeter) MarshalToSizedBuffer

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

func (*GasMeter) ProtoMessage

func (*GasMeter) ProtoMessage()

func (*GasMeter) Reset

func (m *GasMeter) Reset()

func (*GasMeter) Size

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

func (*GasMeter) String

func (m *GasMeter) String() string

func (*GasMeter) Unmarshal

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

func (GasMeter) Validate

func (gm GasMeter) Validate() error

Validate performs a stateless validation of a Incentive

func (*GasMeter) XXX_DiscardUnknown

func (m *GasMeter) XXX_DiscardUnknown()

func (*GasMeter) XXX_Marshal

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

func (*GasMeter) XXX_Merge

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

func (*GasMeter) XXX_Size

func (m *GasMeter) XXX_Size() int

func (*GasMeter) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// module parameters
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// active incentives
	Incentives []Incentive `protobuf:"bytes,2,rep,name=incentives,proto3" json:"incentives"`
	// active Gasmeters
	GasMeters []GasMeter `protobuf:"bytes,3,rep,name=gas_meters,json=gasMeters,proto3" json:"gas_meters"`
}

GenesisState defines the module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState sets default evm genesis state with empty accounts and default params and chain config values.

func NewGenesisState

func NewGenesisState(
	params Params,
	incentives []Incentive,
	gasMeters []GasMeter,
) GenesisState

NewGenesisState creates a new genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetGasMeters

func (m *GenesisState) GetGasMeters() []GasMeter

func (*GenesisState) GetIncentives

func (m *GenesisState) GetIncentives() []Incentive

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 GovKeeper

type GovKeeper interface {
	Logger(sdk.Context) log.Logger
	GetVotingParams(ctx sdk.Context) govtypes.VotingParams
	GetProposal(ctx sdk.Context, proposalID uint64) (govtypes.Proposal, bool)
	InsertActiveProposalQueue(ctx sdk.Context, proposalID uint64, timestamp time.Time)
	RemoveFromActiveProposalQueue(ctx sdk.Context, proposalID uint64, timestamp time.Time)
	SetProposal(ctx sdk.Context, proposal govtypes.Proposal)
}

GovKeeper defines the expected governance keeper interface used on incentives

type Incentive

type Incentive struct {
	// contract address
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
	// denoms and percentage of rewards to be allocated
	Allocations github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=allocations,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"allocations"`
	// number of remaining epochs
	Epochs uint32 `protobuf:"varint,3,opt,name=epochs,proto3" json:"epochs,omitempty"`
	// distribution start time
	StartTime time.Time `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// cumulative gas spent by all gasmeters of the incentive during the epoch
	TotalGas uint64 `protobuf:"varint,5,opt,name=total_gas,json=totalGas,proto3" json:"total_gas,omitempty"`
}

Incentive defines an instance that organizes distribution conditions for a given smart contract

func NewIncentive

func NewIncentive(
	contract common.Address,
	allocations sdk.DecCoins,
	epochs uint32,
) Incentive

NewIncentive returns an instance of Incentive

func (*Incentive) Descriptor

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

func (*Incentive) GetAllocations

func (*Incentive) GetContract

func (m *Incentive) GetContract() string

func (*Incentive) GetEpochs

func (m *Incentive) GetEpochs() uint32

func (*Incentive) GetStartTime

func (m *Incentive) GetStartTime() time.Time

func (*Incentive) GetTotalGas

func (m *Incentive) GetTotalGas() uint64

func (Incentive) IsActive

func (i Incentive) IsActive() bool

IsActive returns true if the Incentive has remaining Epochs

func (*Incentive) Marshal

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

func (*Incentive) MarshalTo

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

func (*Incentive) MarshalToSizedBuffer

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

func (*Incentive) ProtoMessage

func (*Incentive) ProtoMessage()

func (*Incentive) Reset

func (m *Incentive) Reset()

func (*Incentive) Size

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

func (*Incentive) String

func (m *Incentive) String() string

func (*Incentive) Unmarshal

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

func (Incentive) Validate

func (i Incentive) Validate() error

Validate performs a stateless validation of a Incentive

func (*Incentive) XXX_DiscardUnknown

func (m *Incentive) XXX_DiscardUnknown()

func (*Incentive) XXX_Marshal

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

func (*Incentive) XXX_Merge

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

func (*Incentive) XXX_Size

func (m *Incentive) XXX_Size() int

func (*Incentive) XXX_Unmarshal

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

type InflationKeeper

type InflationKeeper interface {
	GetParams(ctx sdk.Context) (params inflationtypes.Params)
}

InflationKeeper defines the expected mint keeper interface used on incentives

type Params

type Params struct {
	// parameter to enable incentives
	EnableIncentives bool `protobuf:"varint,1,opt,name=enable_incentives,json=enableIncentives,proto3" json:"enable_incentives,omitempty"`
	// maximum percentage an incentive can allocate per denomination
	AllocationLimit github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
	// identifier for the epochs module hooks
	IncentivesEpochIdentifier string `` /* 138-byte string literal not displayed */
	// scaling factor for capping rewards
	RewardScaler github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
}

Params defines the incentives module params

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(
	enableIncentives bool,
	epocheDuration time.Duration,
	allocationLimit sdk.Dec,
	epochIdentifier string,
	rewardScaler sdk.Dec,
) Params

NewParams creates a new Params object

func (*Params) Descriptor

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

func (*Params) GetEnableIncentives

func (m *Params) GetEnableIncentives() bool

func (*Params) GetIncentivesEpochIdentifier

func (m *Params) GetIncentivesEpochIdentifier() string

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs returns the parameter set pairs.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryAllocationMeterRequest

type QueryAllocationMeterRequest struct {
	// denom is the coin denom to query an allocation meter for.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryAllocationMeterRequest is the request type for the Query/AllocationMeter RPC method.

func (*QueryAllocationMeterRequest) Descriptor

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

func (*QueryAllocationMeterRequest) GetDenom

func (m *QueryAllocationMeterRequest) GetDenom() string

func (*QueryAllocationMeterRequest) Marshal

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

func (*QueryAllocationMeterRequest) MarshalTo

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

func (*QueryAllocationMeterRequest) MarshalToSizedBuffer

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

func (*QueryAllocationMeterRequest) ProtoMessage

func (*QueryAllocationMeterRequest) ProtoMessage()

func (*QueryAllocationMeterRequest) Reset

func (m *QueryAllocationMeterRequest) Reset()

func (*QueryAllocationMeterRequest) Size

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

func (*QueryAllocationMeterRequest) String

func (m *QueryAllocationMeterRequest) String() string

func (*QueryAllocationMeterRequest) Unmarshal

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

func (*QueryAllocationMeterRequest) XXX_DiscardUnknown

func (m *QueryAllocationMeterRequest) XXX_DiscardUnknown()

func (*QueryAllocationMeterRequest) XXX_Marshal

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

func (*QueryAllocationMeterRequest) XXX_Merge

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

func (*QueryAllocationMeterRequest) XXX_Size

func (m *QueryAllocationMeterRequest) XXX_Size() int

func (*QueryAllocationMeterRequest) XXX_Unmarshal

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

type QueryAllocationMeterResponse

type QueryAllocationMeterResponse struct {
	AllocationMeter types.DecCoin `` /* 153-byte string literal not displayed */
}

QueryAllocationMeterResponse is the response type for the Query/AllocationMeter RPC method.

func (*QueryAllocationMeterResponse) Descriptor

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

func (*QueryAllocationMeterResponse) GetAllocationMeter

func (m *QueryAllocationMeterResponse) GetAllocationMeter() types.DecCoin

func (*QueryAllocationMeterResponse) Marshal

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

func (*QueryAllocationMeterResponse) MarshalTo

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

func (*QueryAllocationMeterResponse) MarshalToSizedBuffer

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

func (*QueryAllocationMeterResponse) ProtoMessage

func (*QueryAllocationMeterResponse) ProtoMessage()

func (*QueryAllocationMeterResponse) Reset

func (m *QueryAllocationMeterResponse) Reset()

func (*QueryAllocationMeterResponse) Size

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

func (*QueryAllocationMeterResponse) String

func (*QueryAllocationMeterResponse) Unmarshal

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

func (*QueryAllocationMeterResponse) XXX_DiscardUnknown

func (m *QueryAllocationMeterResponse) XXX_DiscardUnknown()

func (*QueryAllocationMeterResponse) XXX_Marshal

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

func (*QueryAllocationMeterResponse) XXX_Merge

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

func (*QueryAllocationMeterResponse) XXX_Size

func (m *QueryAllocationMeterResponse) XXX_Size() int

func (*QueryAllocationMeterResponse) XXX_Unmarshal

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

type QueryAllocationMetersRequest

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

QueryAllocationMetersRequest is the request type for the Query/AllocationMeters RPC method.

func (*QueryAllocationMetersRequest) Descriptor

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

func (*QueryAllocationMetersRequest) GetPagination

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

func (*QueryAllocationMetersRequest) Marshal

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

func (*QueryAllocationMetersRequest) MarshalTo

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

func (*QueryAllocationMetersRequest) MarshalToSizedBuffer

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

func (*QueryAllocationMetersRequest) ProtoMessage

func (*QueryAllocationMetersRequest) ProtoMessage()

func (*QueryAllocationMetersRequest) Reset

func (m *QueryAllocationMetersRequest) Reset()

func (*QueryAllocationMetersRequest) Size

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

func (*QueryAllocationMetersRequest) String

func (*QueryAllocationMetersRequest) Unmarshal

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

func (*QueryAllocationMetersRequest) XXX_DiscardUnknown

func (m *QueryAllocationMetersRequest) XXX_DiscardUnknown()

func (*QueryAllocationMetersRequest) XXX_Marshal

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

func (*QueryAllocationMetersRequest) XXX_Merge

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

func (*QueryAllocationMetersRequest) XXX_Size

func (m *QueryAllocationMetersRequest) XXX_Size() int

func (*QueryAllocationMetersRequest) XXX_Unmarshal

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

type QueryAllocationMetersResponse

type QueryAllocationMetersResponse struct {
	AllocationMeters github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 156-byte string literal not displayed */
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllocationMetersResponse is the response type for the Query/AllocationMeters RPC method.

func (*QueryAllocationMetersResponse) Descriptor

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

func (*QueryAllocationMetersResponse) GetAllocationMeters

func (*QueryAllocationMetersResponse) GetPagination

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

func (*QueryAllocationMetersResponse) Marshal

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

func (*QueryAllocationMetersResponse) MarshalTo

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

func (*QueryAllocationMetersResponse) MarshalToSizedBuffer

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

func (*QueryAllocationMetersResponse) ProtoMessage

func (*QueryAllocationMetersResponse) ProtoMessage()

func (*QueryAllocationMetersResponse) Reset

func (m *QueryAllocationMetersResponse) Reset()

func (*QueryAllocationMetersResponse) Size

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

func (*QueryAllocationMetersResponse) String

func (*QueryAllocationMetersResponse) Unmarshal

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

func (*QueryAllocationMetersResponse) XXX_DiscardUnknown

func (m *QueryAllocationMetersResponse) XXX_DiscardUnknown()

func (*QueryAllocationMetersResponse) XXX_Marshal

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

func (*QueryAllocationMetersResponse) XXX_Merge

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

func (*QueryAllocationMetersResponse) XXX_Size

func (m *QueryAllocationMetersResponse) XXX_Size() int

func (*QueryAllocationMetersResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Incentives retrieves registered incentives
	Incentives(ctx context.Context, in *QueryIncentivesRequest, opts ...grpc.CallOption) (*QueryIncentivesResponse, error)
	// Incentive retrieves a registered incentive
	Incentive(ctx context.Context, in *QueryIncentiveRequest, opts ...grpc.CallOption) (*QueryIncentiveResponse, error)
	// GasMeters retrieves active gas meters for a given contract
	GasMeters(ctx context.Context, in *QueryGasMetersRequest, opts ...grpc.CallOption) (*QueryGasMetersResponse, error)
	// GasMeter Retrieves a active gas meter
	GasMeter(ctx context.Context, in *QueryGasMeterRequest, opts ...grpc.CallOption) (*QueryGasMeterResponse, error)
	// AllocationMeters retrieves active allocation meters for a given
	// denomination
	AllocationMeters(ctx context.Context, in *QueryAllocationMetersRequest, opts ...grpc.CallOption) (*QueryAllocationMetersResponse, error)
	// AllocationMeter Retrieves a active gas meter
	AllocationMeter(ctx context.Context, in *QueryAllocationMeterRequest, opts ...grpc.CallOption) (*QueryAllocationMeterResponse, error)
	// Params retrieves the incentives module params
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryGasMeterRequest

type QueryGasMeterRequest struct {
	// contract identifier is the hex contract address of a contract
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
	// participant identifier is the hex address of a user
	Participant string `protobuf:"bytes,2,opt,name=participant,proto3" json:"participant,omitempty"`
}

QueryGasMeterRequest is the request type for the Query/Incentive RPC method.

func (*QueryGasMeterRequest) Descriptor

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

func (*QueryGasMeterRequest) GetContract

func (m *QueryGasMeterRequest) GetContract() string

func (*QueryGasMeterRequest) GetParticipant

func (m *QueryGasMeterRequest) GetParticipant() string

func (*QueryGasMeterRequest) Marshal

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

func (*QueryGasMeterRequest) MarshalTo

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

func (*QueryGasMeterRequest) MarshalToSizedBuffer

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

func (*QueryGasMeterRequest) ProtoMessage

func (*QueryGasMeterRequest) ProtoMessage()

func (*QueryGasMeterRequest) Reset

func (m *QueryGasMeterRequest) Reset()

func (*QueryGasMeterRequest) Size

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

func (*QueryGasMeterRequest) String

func (m *QueryGasMeterRequest) String() string

func (*QueryGasMeterRequest) Unmarshal

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

func (*QueryGasMeterRequest) XXX_DiscardUnknown

func (m *QueryGasMeterRequest) XXX_DiscardUnknown()

func (*QueryGasMeterRequest) XXX_Marshal

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

func (*QueryGasMeterRequest) XXX_Merge

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

func (*QueryGasMeterRequest) XXX_Size

func (m *QueryGasMeterRequest) XXX_Size() int

func (*QueryGasMeterRequest) XXX_Unmarshal

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

type QueryGasMeterResponse

type QueryGasMeterResponse struct {
	GasMeter uint64 `protobuf:"varint,1,opt,name=gas_meter,json=gasMeter,proto3" json:"gas_meter,omitempty"`
}

QueryGasMeterResponse is the response type for the Query/Incentive RPC method.

func (*QueryGasMeterResponse) Descriptor

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

func (*QueryGasMeterResponse) GetGasMeter

func (m *QueryGasMeterResponse) GetGasMeter() uint64

func (*QueryGasMeterResponse) Marshal

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

func (*QueryGasMeterResponse) MarshalTo

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

func (*QueryGasMeterResponse) MarshalToSizedBuffer

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

func (*QueryGasMeterResponse) ProtoMessage

func (*QueryGasMeterResponse) ProtoMessage()

func (*QueryGasMeterResponse) Reset

func (m *QueryGasMeterResponse) Reset()

func (*QueryGasMeterResponse) Size

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

func (*QueryGasMeterResponse) String

func (m *QueryGasMeterResponse) String() string

func (*QueryGasMeterResponse) Unmarshal

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

func (*QueryGasMeterResponse) XXX_DiscardUnknown

func (m *QueryGasMeterResponse) XXX_DiscardUnknown()

func (*QueryGasMeterResponse) XXX_Marshal

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

func (*QueryGasMeterResponse) XXX_Merge

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

func (*QueryGasMeterResponse) XXX_Size

func (m *QueryGasMeterResponse) XXX_Size() int

func (*QueryGasMeterResponse) XXX_Unmarshal

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

type QueryGasMetersRequest

type QueryGasMetersRequest struct {
	// contract is the hex contract address of a incentivized smart contract
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryGasMetersRequest is the request type for the Query/Incentives RPC method.

func (*QueryGasMetersRequest) Descriptor

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

func (*QueryGasMetersRequest) GetContract

func (m *QueryGasMetersRequest) GetContract() string

func (*QueryGasMetersRequest) GetPagination

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

func (*QueryGasMetersRequest) Marshal

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

func (*QueryGasMetersRequest) MarshalTo

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

func (*QueryGasMetersRequest) MarshalToSizedBuffer

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

func (*QueryGasMetersRequest) ProtoMessage

func (*QueryGasMetersRequest) ProtoMessage()

func (*QueryGasMetersRequest) Reset

func (m *QueryGasMetersRequest) Reset()

func (*QueryGasMetersRequest) Size

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

func (*QueryGasMetersRequest) String

func (m *QueryGasMetersRequest) String() string

func (*QueryGasMetersRequest) Unmarshal

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

func (*QueryGasMetersRequest) XXX_DiscardUnknown

func (m *QueryGasMetersRequest) XXX_DiscardUnknown()

func (*QueryGasMetersRequest) XXX_Marshal

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

func (*QueryGasMetersRequest) XXX_Merge

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

func (*QueryGasMetersRequest) XXX_Size

func (m *QueryGasMetersRequest) XXX_Size() int

func (*QueryGasMetersRequest) XXX_Unmarshal

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

type QueryGasMetersResponse

type QueryGasMetersResponse struct {
	GasMeters []GasMeter `protobuf:"bytes,1,rep,name=gas_meters,json=gasMeters,proto3" json:"gas_meters"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryGasMetersResponse is the response type for the Query/Incentives RPC method.

func (*QueryGasMetersResponse) Descriptor

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

func (*QueryGasMetersResponse) GetGasMeters

func (m *QueryGasMetersResponse) GetGasMeters() []GasMeter

func (*QueryGasMetersResponse) GetPagination

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

func (*QueryGasMetersResponse) Marshal

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

func (*QueryGasMetersResponse) MarshalTo

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

func (*QueryGasMetersResponse) MarshalToSizedBuffer

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

func (*QueryGasMetersResponse) ProtoMessage

func (*QueryGasMetersResponse) ProtoMessage()

func (*QueryGasMetersResponse) Reset

func (m *QueryGasMetersResponse) Reset()

func (*QueryGasMetersResponse) Size

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

func (*QueryGasMetersResponse) String

func (m *QueryGasMetersResponse) String() string

func (*QueryGasMetersResponse) Unmarshal

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

func (*QueryGasMetersResponse) XXX_DiscardUnknown

func (m *QueryGasMetersResponse) XXX_DiscardUnknown()

func (*QueryGasMetersResponse) XXX_Marshal

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

func (*QueryGasMetersResponse) XXX_Merge

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

func (*QueryGasMetersResponse) XXX_Size

func (m *QueryGasMetersResponse) XXX_Size() int

func (*QueryGasMetersResponse) XXX_Unmarshal

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

type QueryIncentiveRequest

type QueryIncentiveRequest struct {
	// contract identifier is the hex contract address of a contract
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
}

QueryIncentiveRequest is the request type for the Query/Incentive RPC method.

func (*QueryIncentiveRequest) Descriptor

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

func (*QueryIncentiveRequest) GetContract

func (m *QueryIncentiveRequest) GetContract() string

func (*QueryIncentiveRequest) Marshal

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

func (*QueryIncentiveRequest) MarshalTo

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

func (*QueryIncentiveRequest) MarshalToSizedBuffer

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

func (*QueryIncentiveRequest) ProtoMessage

func (*QueryIncentiveRequest) ProtoMessage()

func (*QueryIncentiveRequest) Reset

func (m *QueryIncentiveRequest) Reset()

func (*QueryIncentiveRequest) Size

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

func (*QueryIncentiveRequest) String

func (m *QueryIncentiveRequest) String() string

func (*QueryIncentiveRequest) Unmarshal

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

func (*QueryIncentiveRequest) XXX_DiscardUnknown

func (m *QueryIncentiveRequest) XXX_DiscardUnknown()

func (*QueryIncentiveRequest) XXX_Marshal

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

func (*QueryIncentiveRequest) XXX_Merge

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

func (*QueryIncentiveRequest) XXX_Size

func (m *QueryIncentiveRequest) XXX_Size() int

func (*QueryIncentiveRequest) XXX_Unmarshal

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

type QueryIncentiveResponse

type QueryIncentiveResponse struct {
	Incentive Incentive `protobuf:"bytes,1,opt,name=incentive,proto3" json:"incentive"`
}

QueryIncentiveResponse is the response type for the Query/Incentive RPC method.

func (*QueryIncentiveResponse) Descriptor

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

func (*QueryIncentiveResponse) GetIncentive

func (m *QueryIncentiveResponse) GetIncentive() Incentive

func (*QueryIncentiveResponse) Marshal

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

func (*QueryIncentiveResponse) MarshalTo

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

func (*QueryIncentiveResponse) MarshalToSizedBuffer

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

func (*QueryIncentiveResponse) ProtoMessage

func (*QueryIncentiveResponse) ProtoMessage()

func (*QueryIncentiveResponse) Reset

func (m *QueryIncentiveResponse) Reset()

func (*QueryIncentiveResponse) Size

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

func (*QueryIncentiveResponse) String

func (m *QueryIncentiveResponse) String() string

func (*QueryIncentiveResponse) Unmarshal

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

func (*QueryIncentiveResponse) XXX_DiscardUnknown

func (m *QueryIncentiveResponse) XXX_DiscardUnknown()

func (*QueryIncentiveResponse) XXX_Marshal

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

func (*QueryIncentiveResponse) XXX_Merge

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

func (*QueryIncentiveResponse) XXX_Size

func (m *QueryIncentiveResponse) XXX_Size() int

func (*QueryIncentiveResponse) XXX_Unmarshal

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

type QueryIncentivesRequest

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

QueryIncentivesRequest is the request type for the Query/Incentives RPC method.

func (*QueryIncentivesRequest) Descriptor

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

func (*QueryIncentivesRequest) GetPagination

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

func (*QueryIncentivesRequest) Marshal

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

func (*QueryIncentivesRequest) MarshalTo

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

func (*QueryIncentivesRequest) MarshalToSizedBuffer

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

func (*QueryIncentivesRequest) ProtoMessage

func (*QueryIncentivesRequest) ProtoMessage()

func (*QueryIncentivesRequest) Reset

func (m *QueryIncentivesRequest) Reset()

func (*QueryIncentivesRequest) Size

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

func (*QueryIncentivesRequest) String

func (m *QueryIncentivesRequest) String() string

func (*QueryIncentivesRequest) Unmarshal

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

func (*QueryIncentivesRequest) XXX_DiscardUnknown

func (m *QueryIncentivesRequest) XXX_DiscardUnknown()

func (*QueryIncentivesRequest) XXX_Marshal

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

func (*QueryIncentivesRequest) XXX_Merge

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

func (*QueryIncentivesRequest) XXX_Size

func (m *QueryIncentivesRequest) XXX_Size() int

func (*QueryIncentivesRequest) XXX_Unmarshal

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

type QueryIncentivesResponse

type QueryIncentivesResponse struct {
	Incentives []Incentive `protobuf:"bytes,1,rep,name=incentives,proto3" json:"incentives"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryIncentivesResponse is the response type for the Query/Incentives RPC method.

func (*QueryIncentivesResponse) Descriptor

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

func (*QueryIncentivesResponse) GetIncentives

func (m *QueryIncentivesResponse) GetIncentives() []Incentive

func (*QueryIncentivesResponse) GetPagination

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

func (*QueryIncentivesResponse) Marshal

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

func (*QueryIncentivesResponse) MarshalTo

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

func (*QueryIncentivesResponse) MarshalToSizedBuffer

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

func (*QueryIncentivesResponse) ProtoMessage

func (*QueryIncentivesResponse) ProtoMessage()

func (*QueryIncentivesResponse) Reset

func (m *QueryIncentivesResponse) Reset()

func (*QueryIncentivesResponse) Size

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

func (*QueryIncentivesResponse) String

func (m *QueryIncentivesResponse) String() string

func (*QueryIncentivesResponse) Unmarshal

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

func (*QueryIncentivesResponse) XXX_DiscardUnknown

func (m *QueryIncentivesResponse) XXX_DiscardUnknown()

func (*QueryIncentivesResponse) XXX_Marshal

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

func (*QueryIncentivesResponse) XXX_Merge

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

func (*QueryIncentivesResponse) XXX_Size

func (m *QueryIncentivesResponse) XXX_Size() int

func (*QueryIncentivesResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Incentives retrieves registered incentives
	Incentives(context.Context, *QueryIncentivesRequest) (*QueryIncentivesResponse, error)
	// Incentive retrieves a registered incentive
	Incentive(context.Context, *QueryIncentiveRequest) (*QueryIncentiveResponse, error)
	// GasMeters retrieves active gas meters for a given contract
	GasMeters(context.Context, *QueryGasMetersRequest) (*QueryGasMetersResponse, error)
	// GasMeter Retrieves a active gas meter
	GasMeter(context.Context, *QueryGasMeterRequest) (*QueryGasMeterResponse, error)
	// AllocationMeters retrieves active allocation meters for a given
	// denomination
	AllocationMeters(context.Context, *QueryAllocationMetersRequest) (*QueryAllocationMetersResponse, error)
	// AllocationMeter Retrieves a active gas meter
	AllocationMeter(context.Context, *QueryAllocationMeterRequest) (*QueryAllocationMeterResponse, error)
	// Params retrieves the incentives module params
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type RegisterIncentiveProposal

type RegisterIncentiveProposal struct {
	// title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// proposal description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contract address
	Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
	// denoms and percentage of rewards to be allocated
	Allocations github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,4,rep,name=allocations,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"allocations"`
	// number of remaining epochs
	Epochs uint32 `protobuf:"varint,5,opt,name=epochs,proto3" json:"epochs,omitempty"`
}

RegisterIncentiveProposal is a gov Content type to register an incentive

func (*RegisterIncentiveProposal) Descriptor

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

func (*RegisterIncentiveProposal) GetAllocations

func (*RegisterIncentiveProposal) GetContract

func (m *RegisterIncentiveProposal) GetContract() string

func (*RegisterIncentiveProposal) GetDescription

func (m *RegisterIncentiveProposal) GetDescription() string

func (*RegisterIncentiveProposal) GetEpochs

func (m *RegisterIncentiveProposal) GetEpochs() uint32

func (*RegisterIncentiveProposal) GetTitle

func (m *RegisterIncentiveProposal) GetTitle() string

func (*RegisterIncentiveProposal) Marshal

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

func (*RegisterIncentiveProposal) MarshalTo

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

func (*RegisterIncentiveProposal) MarshalToSizedBuffer

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

func (*RegisterIncentiveProposal) ProposalRoute

func (*RegisterIncentiveProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*RegisterIncentiveProposal) ProposalType

func (*RegisterIncentiveProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*RegisterIncentiveProposal) ProtoMessage

func (*RegisterIncentiveProposal) ProtoMessage()

func (*RegisterIncentiveProposal) Reset

func (m *RegisterIncentiveProposal) Reset()

func (*RegisterIncentiveProposal) Size

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

func (*RegisterIncentiveProposal) String

func (m *RegisterIncentiveProposal) String() string

func (*RegisterIncentiveProposal) Unmarshal

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

func (*RegisterIncentiveProposal) ValidateBasic

func (rip *RegisterIncentiveProposal) ValidateBasic() error

ValidateBasic performs a stateless check of the proposal fields

func (*RegisterIncentiveProposal) XXX_DiscardUnknown

func (m *RegisterIncentiveProposal) XXX_DiscardUnknown()

func (*RegisterIncentiveProposal) XXX_Marshal

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

func (*RegisterIncentiveProposal) XXX_Merge

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

func (*RegisterIncentiveProposal) XXX_Size

func (m *RegisterIncentiveProposal) XXX_Size() int

func (*RegisterIncentiveProposal) XXX_Unmarshal

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

type StakeKeeper

type StakeKeeper interface{}

Stakekeeper defines the expected staking keeper interface used on incentives

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllocationMeter

func (*UnimplementedQueryServer) AllocationMeters

func (*UnimplementedQueryServer) GasMeter

func (*UnimplementedQueryServer) GasMeters

func (*UnimplementedQueryServer) Incentive

func (*UnimplementedQueryServer) Incentives

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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