types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeInflationStop      = "inflation_stop"
	EventTypeStakingRewardsPaid = "staking_rewards_paid"

	AttributeKeyStakingRewardAmount  = "staking_reward_amount"
	AttributeKeyInflationDisableTime = "inflation_disable_time"

	AttributeValueFundCommunityPool = "fund_community_pool"
	AttributeValueCategory          = ModuleName
)

Community module event types

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

	// ModuleAccountName is the name of the module's account
	ModuleAccountName = ModuleName

	// StoreKey Top level store key where all module items will be stored
	StoreKey = ModuleName

	// RouterKey is the top-level router key for the module
	RouterKey = ModuleName

	// Query endpoints supported by community
	QueryBalance = "balance"

	// LegacyCommunityPoolModuleName is the module account name used by the legacy community pool
	// It is used to determine the address of the old community pool to be returned with the legacy balance.
	LegacyCommunityPoolModuleName = "distribution"
)
View Source
const (
	// ProposalTypeCommunityPoolLendDeposit defines the type for a CommunityPoolLendDepositProposal
	ProposalTypeCommunityPoolLendDeposit = "CommunityPoolLendDeposit"
	// ProposalTypeCommunityPoolLendWithdraw defines the type for a CommunityPoolLendDepositProposal
	ProposalTypeCommunityPoolLendWithdraw = "CommunityPoolLendWithdraw"
	// ProposalTypeCommunityCDPRepayDebt defines the type for a CommunityCDPRepayDebtProposal
	ProposalTypeCommunityCDPRepayDebt = "CommunityCDPRepayDebt"
	// ProposalTypeCommunityCDPWithdrawCollateral defines the type for a CommunityCDPWithdrawCollateralProposal
	ProposalTypeCommunityCDPWithdrawCollateral = "CommunityCDPWithdrawCollateral"
)

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 (
	ParamsKey              = []byte{0x01}
	StakingRewardsStateKey = []byte{0x02}
)

key prefixes for store

View Source
var (
	DefaultUpgradeTimeDisableInflation = time.Time{}
	// DefaultStakingRewardsPerSecond is zero and should be set by genesis or upgrade
	DefaultStakingRewardsPerSecond = sdkmath.LegacyNewDec(0)
	// DefaultStakingRewardsPerSecond is zero and should be set by genesis or upgrade
	DefaultUpgradeTimeSetStakingRewardsPerSecond = sdkmath.LegacyNewDec(0)
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = 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 (
	// DefaultLastAccumulationTime is zero
	DefaultLastAccumulationTime = time.Time{}
	// DefaultLastTruncationError is zero
	DefaultLastTruncationError = sdkmath.LegacyZeroDec()
)
View Source
var (
	ErrInvalidLengthStaking        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStaking          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStaking = 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 ErrInvalidParams = errorsmod.Register(ModuleName, 1, "invalid params")
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers proto messages under their interfaces for unmarshalling, in addition to registering the msg service for handling tx msgs.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the module.

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

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

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error

	GetSupply(ctx sdk.Context, denom string) sdk.Coin
}

BankKeeper defines the contract needed to be fulfilled for banking dependencies.

type CdpKeeper

type CdpKeeper interface {
	RepayPrincipal(ctx sdk.Context, owner sdk.AccAddress, collateralType string, payment sdk.Coin) error
	WithdrawCollateral(ctx sdk.Context, owner, depositor sdk.AccAddress, collateral sdk.Coin, collateralType string) error
}

CdpKeeper defines the contract needed to be fulfilled for cdp dependencies.

type CommunityCDPRepayDebtProposal

type CommunityCDPRepayDebtProposal struct {
	Title          string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description    string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CollateralType string     `protobuf:"bytes,3,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Payment        types.Coin `protobuf:"bytes,4,opt,name=payment,proto3" json:"payment"`
}

CommunityCDPRepayDebtProposal repays a cdp debt position owned by the community module This proposal exists primarily to allow committees to repay community module cdp debts.

func NewCommunityCDPRepayDebtProposal

func NewCommunityCDPRepayDebtProposal(
	title string,
	description string,
	collateralType string,
	payment sdk.Coin,
) *CommunityCDPRepayDebtProposal

NewCommunityCDPRepayDebtProposal creates a new community pool cdp debt repay proposal.

func (*CommunityCDPRepayDebtProposal) Descriptor

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

func (*CommunityCDPRepayDebtProposal) GetDescription

func (p *CommunityCDPRepayDebtProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (*CommunityCDPRepayDebtProposal) GetTitle

func (p *CommunityCDPRepayDebtProposal) GetTitle() string

GetTitle returns the title of the proposal.

func (*CommunityCDPRepayDebtProposal) Marshal

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

func (*CommunityCDPRepayDebtProposal) MarshalTo

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

func (*CommunityCDPRepayDebtProposal) MarshalToSizedBuffer

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

func (*CommunityCDPRepayDebtProposal) ProposalRoute

func (p *CommunityCDPRepayDebtProposal) ProposalRoute() string

GetDescription returns the routing key of the proposal.

func (*CommunityCDPRepayDebtProposal) ProposalType

func (p *CommunityCDPRepayDebtProposal) ProposalType() string

ProposalType returns the type of the proposal.

func (*CommunityCDPRepayDebtProposal) ProtoMessage

func (*CommunityCDPRepayDebtProposal) ProtoMessage()

func (*CommunityCDPRepayDebtProposal) Reset

func (m *CommunityCDPRepayDebtProposal) Reset()

func (*CommunityCDPRepayDebtProposal) Size

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

func (*CommunityCDPRepayDebtProposal) String

String implements fmt.Stringer

func (*CommunityCDPRepayDebtProposal) Unmarshal

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

func (*CommunityCDPRepayDebtProposal) ValidateBasic

func (p *CommunityCDPRepayDebtProposal) ValidateBasic() error

ValidateBasic stateless validation of the proposal.

func (*CommunityCDPRepayDebtProposal) XXX_DiscardUnknown

func (m *CommunityCDPRepayDebtProposal) XXX_DiscardUnknown()

func (*CommunityCDPRepayDebtProposal) XXX_Marshal

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

func (*CommunityCDPRepayDebtProposal) XXX_Merge

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

func (*CommunityCDPRepayDebtProposal) XXX_Size

func (m *CommunityCDPRepayDebtProposal) XXX_Size() int

func (*CommunityCDPRepayDebtProposal) XXX_Unmarshal

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

type CommunityCDPWithdrawCollateralProposal

type CommunityCDPWithdrawCollateralProposal struct {
	Title          string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description    string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CollateralType string     `protobuf:"bytes,3,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Collateral     types.Coin `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral"`
}

CommunityCDPWithdrawCollateralProposal withdraws cdp collateral owned by the community module This proposal exists primarily to allow committees to withdraw community module cdp collateral.

func NewCommunityCDPWithdrawCollateralProposal

func NewCommunityCDPWithdrawCollateralProposal(
	title string,
	description string,
	collateralType string,
	collateral sdk.Coin,
) *CommunityCDPWithdrawCollateralProposal

NewCommunityCDPWithdrawCollateralProposal creates a new community pool cdp debt repay proposal.

func (*CommunityCDPWithdrawCollateralProposal) Descriptor

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

func (*CommunityCDPWithdrawCollateralProposal) GetDescription

func (p *CommunityCDPWithdrawCollateralProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) GetTitle

GetTitle returns the title of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) Marshal

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

func (*CommunityCDPWithdrawCollateralProposal) MarshalTo

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

func (*CommunityCDPWithdrawCollateralProposal) MarshalToSizedBuffer

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

func (*CommunityCDPWithdrawCollateralProposal) ProposalRoute

GetDescription returns the routing key of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) ProposalType

ProposalType returns the type of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) ProtoMessage

func (*CommunityCDPWithdrawCollateralProposal) Reset

func (*CommunityCDPWithdrawCollateralProposal) Size

func (*CommunityCDPWithdrawCollateralProposal) String

String implements fmt.Stringer

func (*CommunityCDPWithdrawCollateralProposal) Unmarshal

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

func (*CommunityCDPWithdrawCollateralProposal) ValidateBasic

func (p *CommunityCDPWithdrawCollateralProposal) ValidateBasic() error

ValidateBasic stateless validation of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) XXX_DiscardUnknown

func (m *CommunityCDPWithdrawCollateralProposal) XXX_DiscardUnknown()

func (*CommunityCDPWithdrawCollateralProposal) XXX_Marshal

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

func (*CommunityCDPWithdrawCollateralProposal) XXX_Merge

func (*CommunityCDPWithdrawCollateralProposal) XXX_Size

func (*CommunityCDPWithdrawCollateralProposal) XXX_Unmarshal

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

type CommunityPoolLendDepositProposal

type CommunityPoolLendDepositProposal struct {
	Title       string                                   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string                                   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Amount      github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

CommunityPoolLendDepositProposal deposits from the community pool into lend

func NewCommunityPoolLendDepositProposal

func NewCommunityPoolLendDepositProposal(title, description string, amount sdk.Coins) *CommunityPoolLendDepositProposal

NewCommunityPoolLendDepositProposal creates a new community pool deposit proposal.

func (*CommunityPoolLendDepositProposal) Descriptor

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

func (*CommunityPoolLendDepositProposal) GetDescription

func (p *CommunityPoolLendDepositProposal) GetDescription() string

GetDescription returns the description of a community pool lend deposit proposal.

func (*CommunityPoolLendDepositProposal) GetTitle

GetTitle returns the title of a community pool lend deposit proposal.

func (*CommunityPoolLendDepositProposal) Marshal

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

func (*CommunityPoolLendDepositProposal) MarshalTo

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

func (*CommunityPoolLendDepositProposal) MarshalToSizedBuffer

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

func (*CommunityPoolLendDepositProposal) ProposalRoute

func (p *CommunityPoolLendDepositProposal) ProposalRoute() string

GetDescription returns the routing key of a community pool lend deposit proposal.

func (*CommunityPoolLendDepositProposal) ProposalType

func (p *CommunityPoolLendDepositProposal) ProposalType() string

ProposalType returns the type of a community pool lend deposit proposal.

func (*CommunityPoolLendDepositProposal) ProtoMessage

func (*CommunityPoolLendDepositProposal) ProtoMessage()

func (*CommunityPoolLendDepositProposal) Reset

func (*CommunityPoolLendDepositProposal) Size

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

func (*CommunityPoolLendDepositProposal) String

String implements fmt.Stringer

func (*CommunityPoolLendDepositProposal) Unmarshal

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

func (*CommunityPoolLendDepositProposal) ValidateBasic

func (p *CommunityPoolLendDepositProposal) ValidateBasic() error

ValidateBasic stateless validation of a community pool lend deposit proposal.

func (*CommunityPoolLendDepositProposal) XXX_DiscardUnknown

func (m *CommunityPoolLendDepositProposal) XXX_DiscardUnknown()

func (*CommunityPoolLendDepositProposal) XXX_Marshal

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

func (*CommunityPoolLendDepositProposal) XXX_Merge

func (*CommunityPoolLendDepositProposal) XXX_Size

func (m *CommunityPoolLendDepositProposal) XXX_Size() int

func (*CommunityPoolLendDepositProposal) XXX_Unmarshal

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

type CommunityPoolLendWithdrawProposal

type CommunityPoolLendWithdrawProposal struct {
	Title       string                                   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string                                   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Amount      github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

CommunityPoolLendWithdrawProposal withdraws a lend position back to the community pool

func NewCommunityPoolLendWithdrawProposal

func NewCommunityPoolLendWithdrawProposal(title, description string, amount sdk.Coins) *CommunityPoolLendWithdrawProposal

NewCommunityPoolLendWithdrawProposal creates a new community pool lend withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) Descriptor

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

func (*CommunityPoolLendWithdrawProposal) GetDescription

func (p *CommunityPoolLendWithdrawProposal) GetDescription() string

GetDescription returns the description of a community pool withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) GetTitle

GetTitle returns the title of a community pool withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) Marshal

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

func (*CommunityPoolLendWithdrawProposal) MarshalTo

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

func (*CommunityPoolLendWithdrawProposal) MarshalToSizedBuffer

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

func (*CommunityPoolLendWithdrawProposal) ProposalRoute

func (p *CommunityPoolLendWithdrawProposal) ProposalRoute() string

GetDescription returns the routing key of a community pool withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) ProposalType

func (p *CommunityPoolLendWithdrawProposal) ProposalType() string

ProposalType returns the type of a community pool withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) ProtoMessage

func (*CommunityPoolLendWithdrawProposal) ProtoMessage()

func (*CommunityPoolLendWithdrawProposal) Reset

func (*CommunityPoolLendWithdrawProposal) Size

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

func (*CommunityPoolLendWithdrawProposal) String

String implements fmt.Stringer

func (*CommunityPoolLendWithdrawProposal) Unmarshal

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

func (*CommunityPoolLendWithdrawProposal) ValidateBasic

func (p *CommunityPoolLendWithdrawProposal) ValidateBasic() error

ValidateBasic stateless validation of a community pool withdraw proposal.

func (*CommunityPoolLendWithdrawProposal) XXX_DiscardUnknown

func (m *CommunityPoolLendWithdrawProposal) XXX_DiscardUnknown()

func (*CommunityPoolLendWithdrawProposal) XXX_Marshal

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

func (*CommunityPoolLendWithdrawProposal) XXX_Merge

func (*CommunityPoolLendWithdrawProposal) XXX_Size

func (m *CommunityPoolLendWithdrawProposal) XXX_Size() int

func (*CommunityPoolLendWithdrawProposal) XXX_Unmarshal

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

type DistributionKeeper

type DistributionKeeper interface {
	DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
	FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
	GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins
	GetFeePool(ctx sdk.Context) distrtypes.FeePool
	SetFeePool(ctx sdk.Context, feePool distrtypes.FeePool)
	GetParams(ctx sdk.Context) distrtypes.Params
	SetParams(ctx sdk.Context, params distrtypes.Params) error
	GetCommunityTax(ctx sdk.Context) sdk.Dec
}

DistributionKeeper defines the contract needed to be fulfilled for distribution dependencies.

type GenesisState

type GenesisState struct {
	// params defines all the parameters related to commmunity
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// StakingRewardsState stores the internal staking reward data required to
	// track staking rewards across blocks
	StakingRewardsState StakingRewardsState `protobuf:"bytes,2,opt,name=staking_rewards_state,json=stakingRewardsState,proto3" json:"staking_rewards_state"`
}

GenesisState defines the community module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns default genesis state

func NewGenesisState

func NewGenesisState(params Params, stakingRewardsState StakingRewardsState) GenesisState

NewGenesisState returns a new genesis state object

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetStakingRewardsState

func (m *GenesisState) GetStakingRewardsState() StakingRewardsState

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 checks the params are valid

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 HardKeeper

type HardKeeper interface {
	Deposit(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Coins) error
	Withdraw(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Coins) error
}

HardKeeper defines the contract needed to be fulfilled for Kava Lend dependencies.

type KavadistKeeper

type KavadistKeeper interface {
	GetParams(ctx sdk.Context) (params kavadisttypes.Params)
	SetParams(ctx sdk.Context, params kavadisttypes.Params)
}

type MintKeeper

type MintKeeper interface {
	GetParams(ctx sdk.Context) (params minttypes.Params)
	SetParams(ctx sdk.Context, params minttypes.Params) error
	GetMinter(ctx sdk.Context) (minter minttypes.Minter)
}

type MsgClient

type MsgClient interface {
	// FundCommunityPool defines a method to allow an account to directly fund the community module account.
	FundCommunityPool(ctx context.Context, in *MsgFundCommunityPool, opts ...grpc.CallOption) (*MsgFundCommunityPoolResponse, error)
	// UpdateParams defines a method to allow an account to update the community module parameters.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgFundCommunityPool

type MsgFundCommunityPool struct {
	Amount    github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
	Depositor string                                   `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
}

MsgFundCommunityPool allows an account to directly fund the community module account.

func NewMsgFundCommunityPool

func NewMsgFundCommunityPool(depositor sdk.AccAddress, amount sdk.Coins) MsgFundCommunityPool

NewMsgFundCommunityPool returns a new MsgFundCommunityPool

func (*MsgFundCommunityPool) Descriptor

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

func (*MsgFundCommunityPool) Equal

func (this *MsgFundCommunityPool) Equal(that interface{}) bool

func (MsgFundCommunityPool) GetSignBytes

func (msg MsgFundCommunityPool) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgFundCommunityPool) GetSigners

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

GetSigners returns the addresses of signers that must sign.

func (*MsgFundCommunityPool) Marshal

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

func (*MsgFundCommunityPool) MarshalTo

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

func (*MsgFundCommunityPool) MarshalToSizedBuffer

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

func (*MsgFundCommunityPool) ProtoMessage

func (*MsgFundCommunityPool) ProtoMessage()

func (*MsgFundCommunityPool) Reset

func (m *MsgFundCommunityPool) Reset()

func (MsgFundCommunityPool) Route

func (msg MsgFundCommunityPool) Route() string

Route return the message type used for routing the message.

func (*MsgFundCommunityPool) Size

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

func (*MsgFundCommunityPool) String

func (m *MsgFundCommunityPool) String() string

func (MsgFundCommunityPool) Type

func (msg MsgFundCommunityPool) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgFundCommunityPool) Unmarshal

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

func (MsgFundCommunityPool) ValidateBasic

func (msg MsgFundCommunityPool) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgFundCommunityPool) XXX_DiscardUnknown

func (m *MsgFundCommunityPool) XXX_DiscardUnknown()

func (*MsgFundCommunityPool) XXX_Marshal

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

func (*MsgFundCommunityPool) XXX_Merge

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

func (*MsgFundCommunityPool) XXX_Size

func (m *MsgFundCommunityPool) XXX_Size() int

func (*MsgFundCommunityPool) XXX_Unmarshal

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

type MsgFundCommunityPoolResponse

type MsgFundCommunityPoolResponse struct {
}

MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type.

func (*MsgFundCommunityPoolResponse) Descriptor

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

func (*MsgFundCommunityPoolResponse) Equal

func (this *MsgFundCommunityPoolResponse) Equal(that interface{}) bool

func (*MsgFundCommunityPoolResponse) Marshal

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

func (*MsgFundCommunityPoolResponse) MarshalTo

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

func (*MsgFundCommunityPoolResponse) MarshalToSizedBuffer

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

func (*MsgFundCommunityPoolResponse) ProtoMessage

func (*MsgFundCommunityPoolResponse) ProtoMessage()

func (*MsgFundCommunityPoolResponse) Reset

func (m *MsgFundCommunityPoolResponse) Reset()

func (*MsgFundCommunityPoolResponse) Size

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

func (*MsgFundCommunityPoolResponse) String

func (*MsgFundCommunityPoolResponse) Unmarshal

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

func (*MsgFundCommunityPoolResponse) XXX_DiscardUnknown

func (m *MsgFundCommunityPoolResponse) XXX_DiscardUnknown()

func (*MsgFundCommunityPoolResponse) XXX_Marshal

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

func (*MsgFundCommunityPoolResponse) XXX_Merge

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

func (*MsgFundCommunityPoolResponse) XXX_Size

func (m *MsgFundCommunityPoolResponse) XXX_Size() int

func (*MsgFundCommunityPoolResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// FundCommunityPool defines a method to allow an account to directly fund the community module account.
	FundCommunityPool(context.Context, *MsgFundCommunityPool) (*MsgFundCommunityPoolResponse, error)
	// UpdateParams defines a method to allow an account to update the community module parameters.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the x/community parameters to update.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams allows an account to update the community module parameters.

func NewMsgUpdateParams

func NewMsgUpdateParams(authority sdk.AccAddress, params Params) MsgUpdateParams

NewMsgUpdateParams returns a new MsgUpdateParams

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) Equal

func (this *MsgUpdateParams) Equal(that interface{}) bool

func (MsgUpdateParams) GetSignBytes

func (msg MsgUpdateParams) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgUpdateParams) GetSigners

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

GetSigners returns the addresses of signers that must sign.

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (MsgUpdateParams) Route

func (msg MsgUpdateParams) Route() string

Route return the message type used for routing the message.

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (MsgUpdateParams) Type

func (msg MsgUpdateParams) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgUpdateParams) Unmarshal

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

func (MsgUpdateParams) ValidateBasic

func (msg MsgUpdateParams) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the Msg/UpdateParams response type.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Equal

func (this *MsgUpdateParamsResponse) Equal(that interface{}) bool

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// upgrade_time_disable_inflation is the time at which to disable mint and kavadist module inflation.
	// If set to 0, inflation will be disabled from block 1.
	UpgradeTimeDisableInflation time.Time `` /* 144-byte string literal not displayed */
	// staking_rewards_per_second is the amount paid out to delegators each block from the community account
	StakingRewardsPerSecond cosmossdk_io_math.LegacyDec `` /* 163-byte string literal not displayed */
	// upgrade_time_set_staking_rewards_per_second is the initial staking_rewards_per_second to set
	// and use when the disable inflation time is reached
	UpgradeTimeSetStakingRewardsPerSecond cosmossdk_io_math.LegacyDec `` /* 211-byte string literal not displayed */
}

Params defines the parameters of the community module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default params

func NewParams

func NewParams(
	upgradeTime time.Time,
	stakingRewardsPerSecond sdkmath.LegacyDec,
	upgradeTimeSetstakingRewardsPerSecond sdkmath.LegacyDec,
) Params

NewParams returns a new params object

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetUpgradeTimeDisableInflation

func (m *Params) GetUpgradeTimeDisableInflation() time.Time

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

Validate checks the params are valid

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 QueryAnnualizedRewardsRequest

type QueryAnnualizedRewardsRequest struct {
}

QueryAnnualizedRewardsRequest defines the request type for querying the annualized rewards.

func (*QueryAnnualizedRewardsRequest) Descriptor

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

func (*QueryAnnualizedRewardsRequest) Marshal

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

func (*QueryAnnualizedRewardsRequest) MarshalTo

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

func (*QueryAnnualizedRewardsRequest) MarshalToSizedBuffer

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

func (*QueryAnnualizedRewardsRequest) ProtoMessage

func (*QueryAnnualizedRewardsRequest) ProtoMessage()

func (*QueryAnnualizedRewardsRequest) Reset

func (m *QueryAnnualizedRewardsRequest) Reset()

func (*QueryAnnualizedRewardsRequest) Size

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

func (*QueryAnnualizedRewardsRequest) String

func (*QueryAnnualizedRewardsRequest) Unmarshal

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

func (*QueryAnnualizedRewardsRequest) XXX_DiscardUnknown

func (m *QueryAnnualizedRewardsRequest) XXX_DiscardUnknown()

func (*QueryAnnualizedRewardsRequest) XXX_Marshal

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

func (*QueryAnnualizedRewardsRequest) XXX_Merge

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

func (*QueryAnnualizedRewardsRequest) XXX_Size

func (m *QueryAnnualizedRewardsRequest) XXX_Size() int

func (*QueryAnnualizedRewardsRequest) XXX_Unmarshal

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

type QueryAnnualizedRewardsResponse

type QueryAnnualizedRewardsResponse struct {
	// staking_rewards is the calculated annualized staking rewards percentage rate
	StakingRewards cosmossdk_io_math.LegacyDec `` /* 132-byte string literal not displayed */
}

QueryAnnualizedRewardsResponse defines the response type for querying the annualized rewards.

func (*QueryAnnualizedRewardsResponse) Descriptor

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

func (*QueryAnnualizedRewardsResponse) Marshal

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

func (*QueryAnnualizedRewardsResponse) MarshalTo

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

func (*QueryAnnualizedRewardsResponse) MarshalToSizedBuffer

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

func (*QueryAnnualizedRewardsResponse) ProtoMessage

func (*QueryAnnualizedRewardsResponse) ProtoMessage()

func (*QueryAnnualizedRewardsResponse) Reset

func (m *QueryAnnualizedRewardsResponse) Reset()

func (*QueryAnnualizedRewardsResponse) Size

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

func (*QueryAnnualizedRewardsResponse) String

func (*QueryAnnualizedRewardsResponse) Unmarshal

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

func (*QueryAnnualizedRewardsResponse) XXX_DiscardUnknown

func (m *QueryAnnualizedRewardsResponse) XXX_DiscardUnknown()

func (*QueryAnnualizedRewardsResponse) XXX_Marshal

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

func (*QueryAnnualizedRewardsResponse) XXX_Merge

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

func (*QueryAnnualizedRewardsResponse) XXX_Size

func (m *QueryAnnualizedRewardsResponse) XXX_Size() int

func (*QueryAnnualizedRewardsResponse) XXX_Unmarshal

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

type QueryBalanceRequest

type QueryBalanceRequest struct {
}

QueryBalanceRequest defines the request type for querying x/community balance.

func (*QueryBalanceRequest) Descriptor

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

func (*QueryBalanceRequest) Marshal

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

func (*QueryBalanceRequest) MarshalTo

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

func (*QueryBalanceRequest) MarshalToSizedBuffer

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

func (*QueryBalanceRequest) ProtoMessage

func (*QueryBalanceRequest) ProtoMessage()

func (*QueryBalanceRequest) Reset

func (m *QueryBalanceRequest) Reset()

func (*QueryBalanceRequest) Size

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

func (*QueryBalanceRequest) String

func (m *QueryBalanceRequest) String() string

func (*QueryBalanceRequest) Unmarshal

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

func (*QueryBalanceRequest) XXX_DiscardUnknown

func (m *QueryBalanceRequest) XXX_DiscardUnknown()

func (*QueryBalanceRequest) XXX_Marshal

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

func (*QueryBalanceRequest) XXX_Merge

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

func (*QueryBalanceRequest) XXX_Size

func (m *QueryBalanceRequest) XXX_Size() int

func (*QueryBalanceRequest) XXX_Unmarshal

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

type QueryBalanceResponse

type QueryBalanceResponse struct {
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

QueryBalanceResponse defines the response type for querying x/community balance.

func (*QueryBalanceResponse) Descriptor

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

func (*QueryBalanceResponse) GetCoins

func (*QueryBalanceResponse) Marshal

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

func (*QueryBalanceResponse) MarshalTo

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

func (*QueryBalanceResponse) MarshalToSizedBuffer

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

func (*QueryBalanceResponse) ProtoMessage

func (*QueryBalanceResponse) ProtoMessage()

func (*QueryBalanceResponse) Reset

func (m *QueryBalanceResponse) Reset()

func (*QueryBalanceResponse) Size

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

func (*QueryBalanceResponse) String

func (m *QueryBalanceResponse) String() string

func (*QueryBalanceResponse) Unmarshal

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

func (*QueryBalanceResponse) XXX_DiscardUnknown

func (m *QueryBalanceResponse) XXX_DiscardUnknown()

func (*QueryBalanceResponse) XXX_Marshal

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

func (*QueryBalanceResponse) XXX_Merge

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

func (*QueryBalanceResponse) XXX_Size

func (m *QueryBalanceResponse) XXX_Size() int

func (*QueryBalanceResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queires the module params.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Balance queries the balance of all coins of x/community module.
	Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error)
	// TotalBalance queries the balance of all coins, including x/distribution,
	// x/community, and supplied balances.
	TotalBalance(ctx context.Context, in *QueryTotalBalanceRequest, opts ...grpc.CallOption) (*QueryTotalBalanceResponse, error)
	// AnnualizedRewards calculates and returns the current annualized reward percentages,
	// like staking rewards, for the chain.
	AnnualizedRewards(ctx context.Context, in *QueryAnnualizedRewardsRequest, opts ...grpc.CallOption) (*QueryAnnualizedRewardsResponse, 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 QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParams defines the request type for querying x/community params.

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 represents the community module parameters
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/community params.

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 {
	// Params queires the module params.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Balance queries the balance of all coins of x/community module.
	Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
	// TotalBalance queries the balance of all coins, including x/distribution,
	// x/community, and supplied balances.
	TotalBalance(context.Context, *QueryTotalBalanceRequest) (*QueryTotalBalanceResponse, error)
	// AnnualizedRewards calculates and returns the current annualized reward percentages,
	// like staking rewards, for the chain.
	AnnualizedRewards(context.Context, *QueryAnnualizedRewardsRequest) (*QueryAnnualizedRewardsResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalBalanceRequest

type QueryTotalBalanceRequest struct {
}

QueryTotalBalanceRequest defines the request type for querying total community pool balance.

func (*QueryTotalBalanceRequest) Descriptor

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

func (*QueryTotalBalanceRequest) Marshal

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

func (*QueryTotalBalanceRequest) MarshalTo

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

func (*QueryTotalBalanceRequest) MarshalToSizedBuffer

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

func (*QueryTotalBalanceRequest) ProtoMessage

func (*QueryTotalBalanceRequest) ProtoMessage()

func (*QueryTotalBalanceRequest) Reset

func (m *QueryTotalBalanceRequest) Reset()

func (*QueryTotalBalanceRequest) Size

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

func (*QueryTotalBalanceRequest) String

func (m *QueryTotalBalanceRequest) String() string

func (*QueryTotalBalanceRequest) Unmarshal

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

func (*QueryTotalBalanceRequest) XXX_DiscardUnknown

func (m *QueryTotalBalanceRequest) XXX_DiscardUnknown()

func (*QueryTotalBalanceRequest) XXX_Marshal

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

func (*QueryTotalBalanceRequest) XXX_Merge

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

func (*QueryTotalBalanceRequest) XXX_Size

func (m *QueryTotalBalanceRequest) XXX_Size() int

func (*QueryTotalBalanceRequest) XXX_Unmarshal

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

type QueryTotalBalanceResponse

type QueryTotalBalanceResponse struct {
	// pool defines community pool's coins.
	Pool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=pool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pool"`
}

QueryTotalBalanceResponse defines the response type for querying total community pool balance. This matches the x/distribution CommunityPool query response.

func (*QueryTotalBalanceResponse) Descriptor

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

func (*QueryTotalBalanceResponse) GetPool

func (*QueryTotalBalanceResponse) Marshal

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

func (*QueryTotalBalanceResponse) MarshalTo

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

func (*QueryTotalBalanceResponse) MarshalToSizedBuffer

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

func (*QueryTotalBalanceResponse) ProtoMessage

func (*QueryTotalBalanceResponse) ProtoMessage()

func (*QueryTotalBalanceResponse) Reset

func (m *QueryTotalBalanceResponse) Reset()

func (*QueryTotalBalanceResponse) Size

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

func (*QueryTotalBalanceResponse) String

func (m *QueryTotalBalanceResponse) String() string

func (*QueryTotalBalanceResponse) Unmarshal

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

func (*QueryTotalBalanceResponse) XXX_DiscardUnknown

func (m *QueryTotalBalanceResponse) XXX_DiscardUnknown()

func (*QueryTotalBalanceResponse) XXX_Marshal

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

func (*QueryTotalBalanceResponse) XXX_Merge

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

func (*QueryTotalBalanceResponse) XXX_Size

func (m *QueryTotalBalanceResponse) XXX_Size() int

func (*QueryTotalBalanceResponse) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	BondDenom(ctx sdk.Context) string
	TotalBondedTokens(ctx sdk.Context) sdkmath.Int
}

StakingKeeper expected interface for the staking keeper

type StakingRewardsState

type StakingRewardsState struct {
	// last_accumulation_time represents the last block time which rewards where calculated and distributed.
	// This may be zero to signal accumulation should start on the next interval.
	LastAccumulationTime time.Time `protobuf:"bytes,1,opt,name=last_accumulation_time,json=lastAccumulationTime,proto3,stdtime" json:"last_accumulation_time"`
	// accumulated_truncation_error represents the sum of previous errors due to truncation on payout
	// This value will always be on the interval [0, 1).
	LastTruncationError cosmossdk_io_math.LegacyDec `` /* 149-byte string literal not displayed */
}

StakingRewardsState represents the state of staking reward accumulation between blocks.

func DefaultStakingRewardsState

func DefaultStakingRewardsState() StakingRewardsState

DefaultStakingRewardsState returns default params

func NewStakingRewardsState

func NewStakingRewardsState(
	lastAccumulationTime time.Time,
	lastTruncationError sdkmath.LegacyDec,
) StakingRewardsState

NewStakingRewardsState returns a new staking rewards state object

func (*StakingRewardsState) Descriptor

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

func (*StakingRewardsState) GetLastAccumulationTime

func (m *StakingRewardsState) GetLastAccumulationTime() time.Time

func (*StakingRewardsState) Marshal

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

func (*StakingRewardsState) MarshalTo

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

func (*StakingRewardsState) MarshalToSizedBuffer

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

func (*StakingRewardsState) ProtoMessage

func (*StakingRewardsState) ProtoMessage()

func (*StakingRewardsState) Reset

func (m *StakingRewardsState) Reset()

func (*StakingRewardsState) Size

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

func (*StakingRewardsState) String

func (m *StakingRewardsState) String() string

func (*StakingRewardsState) Unmarshal

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

func (StakingRewardsState) Validate

func (p StakingRewardsState) Validate() error

Validate checks the params are valid

func (*StakingRewardsState) XXX_DiscardUnknown

func (m *StakingRewardsState) XXX_DiscardUnknown()

func (*StakingRewardsState) XXX_Marshal

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

func (*StakingRewardsState) XXX_Merge

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

func (*StakingRewardsState) XXX_Size

func (m *StakingRewardsState) XXX_Size() int

func (*StakingRewardsState) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) FundCommunityPool

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AnnualizedRewards

func (*UnimplementedQueryServer) Balance

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) TotalBalance

Jump to

Keyboard shortcuts

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