types

package
v0.25.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 41 Imported by: 8

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 added in v0.23.0

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 added in v0.23.0

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 added in v0.23.0

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 added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) GetDescription added in v0.23.0

func (p *CommunityCDPRepayDebtProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (*CommunityCDPRepayDebtProposal) GetTitle added in v0.23.0

func (p *CommunityCDPRepayDebtProposal) GetTitle() string

GetTitle returns the title of the proposal.

func (*CommunityCDPRepayDebtProposal) Marshal added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) MarshalTo added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) MarshalToSizedBuffer added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) ProposalRoute added in v0.23.0

func (p *CommunityCDPRepayDebtProposal) ProposalRoute() string

GetDescription returns the routing key of the proposal.

func (*CommunityCDPRepayDebtProposal) ProposalType added in v0.23.0

func (p *CommunityCDPRepayDebtProposal) ProposalType() string

ProposalType returns the type of the proposal.

func (*CommunityCDPRepayDebtProposal) ProtoMessage added in v0.23.0

func (*CommunityCDPRepayDebtProposal) ProtoMessage()

func (*CommunityCDPRepayDebtProposal) Reset added in v0.23.0

func (m *CommunityCDPRepayDebtProposal) Reset()

func (*CommunityCDPRepayDebtProposal) Size added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) String added in v0.23.0

String implements fmt.Stringer

func (*CommunityCDPRepayDebtProposal) Unmarshal added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) ValidateBasic added in v0.23.0

func (p *CommunityCDPRepayDebtProposal) ValidateBasic() error

ValidateBasic stateless validation of the proposal.

func (*CommunityCDPRepayDebtProposal) XXX_DiscardUnknown added in v0.23.0

func (m *CommunityCDPRepayDebtProposal) XXX_DiscardUnknown()

func (*CommunityCDPRepayDebtProposal) XXX_Marshal added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) XXX_Merge added in v0.23.0

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

func (*CommunityCDPRepayDebtProposal) XXX_Size added in v0.23.0

func (m *CommunityCDPRepayDebtProposal) XXX_Size() int

func (*CommunityCDPRepayDebtProposal) XXX_Unmarshal added in v0.23.0

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

type CommunityCDPWithdrawCollateralProposal added in v0.23.0

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 added in v0.23.0

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

NewCommunityCDPRepayDebtProposal creates a new community pool cdp debt repay proposal.

func (*CommunityCDPWithdrawCollateralProposal) Descriptor added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) GetDescription added in v0.23.0

func (p *CommunityCDPWithdrawCollateralProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) GetTitle added in v0.23.0

GetTitle returns the title of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) Marshal added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) MarshalTo added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) MarshalToSizedBuffer added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) ProposalRoute added in v0.23.0

GetDescription returns the routing key of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) ProposalType added in v0.23.0

ProposalType returns the type of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) ProtoMessage added in v0.23.0

func (*CommunityCDPWithdrawCollateralProposal) Reset added in v0.23.0

func (*CommunityCDPWithdrawCollateralProposal) Size added in v0.23.0

func (*CommunityCDPWithdrawCollateralProposal) String added in v0.23.0

String implements fmt.Stringer

func (*CommunityCDPWithdrawCollateralProposal) Unmarshal added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) ValidateBasic added in v0.23.0

func (p *CommunityCDPWithdrawCollateralProposal) ValidateBasic() error

ValidateBasic stateless validation of the proposal.

func (*CommunityCDPWithdrawCollateralProposal) XXX_DiscardUnknown added in v0.23.0

func (m *CommunityCDPWithdrawCollateralProposal) XXX_DiscardUnknown()

func (*CommunityCDPWithdrawCollateralProposal) XXX_Marshal added in v0.23.0

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

func (*CommunityCDPWithdrawCollateralProposal) XXX_Merge added in v0.23.0

func (*CommunityCDPWithdrawCollateralProposal) XXX_Size added in v0.23.0

func (*CommunityCDPWithdrawCollateralProposal) XXX_Unmarshal added in v0.23.0

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)
	GetCommunityTax(ctx sdk.Context) sdk.Dec
}

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

type GenesisState added in v0.25.0

type GenesisState struct {
	// params defines all the paramaters 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 added in v0.25.0

func DefaultGenesisState() GenesisState

DefaultGenesisState returns default genesis state

func NewGenesisState added in v0.25.0

func NewGenesisState(params Params, stakingRewardsState StakingRewardsState) GenesisState

NewGenesisState returns a new genesis state object

func (*GenesisState) Descriptor added in v0.25.0

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

func (*GenesisState) GetParams added in v0.25.0

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetStakingRewardsState added in v0.25.0

func (m *GenesisState) GetStakingRewardsState() StakingRewardsState

func (*GenesisState) Marshal added in v0.25.0

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

func (*GenesisState) MarshalTo added in v0.25.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.25.0

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

func (*GenesisState) ProtoMessage added in v0.25.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.25.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.25.0

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

func (*GenesisState) String added in v0.25.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.25.0

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

func (GenesisState) Validate added in v0.25.0

func (gs GenesisState) Validate() error

Validate checks the params are valid

func (*GenesisState) XXX_DiscardUnknown added in v0.25.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.25.0

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

func (*GenesisState) XXX_Merge added in v0.25.0

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

func (*GenesisState) XXX_Size added in v0.25.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.25.0

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 added in v0.25.0

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

type MintKeeper added in v0.24.1

type MintKeeper interface {
	GetParams(ctx sdk.Context) (params minttypes.Params)
	SetParams(ctx sdk.Context, params minttypes.Params)
	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 added in v0.25.0

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 added in v0.25.0

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

NewMsgUpdateParams returns a new MsgUpdateParams

func (*MsgUpdateParams) Descriptor added in v0.25.0

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

func (*MsgUpdateParams) Equal added in v0.25.0

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

func (MsgUpdateParams) GetSignBytes added in v0.25.0

func (msg MsgUpdateParams) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgUpdateParams) GetSigners added in v0.25.0

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

GetSigners returns the addresses of signers that must sign.

func (*MsgUpdateParams) Marshal added in v0.25.0

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

func (*MsgUpdateParams) MarshalTo added in v0.25.0

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

func (*MsgUpdateParams) MarshalToSizedBuffer added in v0.25.0

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

func (*MsgUpdateParams) ProtoMessage added in v0.25.0

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset added in v0.25.0

func (m *MsgUpdateParams) Reset()

func (MsgUpdateParams) Route added in v0.25.0

func (msg MsgUpdateParams) Route() string

Route return the message type used for routing the message.

func (*MsgUpdateParams) Size added in v0.25.0

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

func (*MsgUpdateParams) String added in v0.25.0

func (m *MsgUpdateParams) String() string

func (MsgUpdateParams) Type added in v0.25.0

func (msg MsgUpdateParams) Type() string

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

func (*MsgUpdateParams) Unmarshal added in v0.25.0

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

func (MsgUpdateParams) ValidateBasic added in v0.25.0

func (msg MsgUpdateParams) ValidateBasic() error

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

func (*MsgUpdateParams) XXX_DiscardUnknown added in v0.25.0

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal added in v0.25.0

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

func (*MsgUpdateParams) XXX_Merge added in v0.25.0

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

func (*MsgUpdateParams) XXX_Size added in v0.25.0

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal added in v0.25.0

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

type MsgUpdateParamsResponse added in v0.25.0

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the Msg/UpdateParams response type.

func (*MsgUpdateParamsResponse) Descriptor added in v0.25.0

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

func (*MsgUpdateParamsResponse) Equal added in v0.25.0

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

func (*MsgUpdateParamsResponse) Marshal added in v0.25.0

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

func (*MsgUpdateParamsResponse) MarshalTo added in v0.25.0

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer added in v0.25.0

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

func (*MsgUpdateParamsResponse) ProtoMessage added in v0.25.0

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset added in v0.25.0

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size added in v0.25.0

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

func (*MsgUpdateParamsResponse) String added in v0.25.0

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal added in v0.25.0

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown added in v0.25.0

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal added in v0.25.0

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

func (*MsgUpdateParamsResponse) XXX_Merge added in v0.25.0

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

func (*MsgUpdateParamsResponse) XXX_Size added in v0.25.0

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal added in v0.25.0

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

type Params added in v0.25.0

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 added in v0.25.0

func DefaultParams() Params

DefaultParams returns default params

func NewParams added in v0.25.0

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

NewParams returns a new params object

func (*Params) Descriptor added in v0.25.0

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

func (*Params) Equal added in v0.25.0

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

func (*Params) GetUpgradeTimeDisableInflation added in v0.25.0

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

func (*Params) Marshal added in v0.25.0

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

func (*Params) MarshalTo added in v0.25.0

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

func (*Params) MarshalToSizedBuffer added in v0.25.0

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

func (*Params) ProtoMessage added in v0.25.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.25.0

func (m *Params) Reset()

func (*Params) Size added in v0.25.0

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

func (*Params) String added in v0.25.0

func (m *Params) String() string

func (*Params) Unmarshal added in v0.25.0

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

func (Params) Validate added in v0.25.0

func (p Params) Validate() error

Validate checks the params are valid

func (*Params) XXX_DiscardUnknown added in v0.25.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.25.0

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

func (*Params) XXX_Merge added in v0.25.0

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

func (*Params) XXX_Size added in v0.25.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.25.0

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

type QueryAnnualizedRewardsRequest added in v0.24.1

type QueryAnnualizedRewardsRequest struct {
}

QueryAnnualizedRewardsRequest defines the request type for querying the annualized rewards.

func (*QueryAnnualizedRewardsRequest) Descriptor added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) Marshal added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) MarshalTo added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) MarshalToSizedBuffer added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) ProtoMessage added in v0.24.1

func (*QueryAnnualizedRewardsRequest) ProtoMessage()

func (*QueryAnnualizedRewardsRequest) Reset added in v0.24.1

func (m *QueryAnnualizedRewardsRequest) Reset()

func (*QueryAnnualizedRewardsRequest) Size added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) String added in v0.24.1

func (*QueryAnnualizedRewardsRequest) Unmarshal added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) XXX_DiscardUnknown added in v0.24.1

func (m *QueryAnnualizedRewardsRequest) XXX_DiscardUnknown()

func (*QueryAnnualizedRewardsRequest) XXX_Marshal added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) XXX_Merge added in v0.24.1

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

func (*QueryAnnualizedRewardsRequest) XXX_Size added in v0.24.1

func (m *QueryAnnualizedRewardsRequest) XXX_Size() int

func (*QueryAnnualizedRewardsRequest) XXX_Unmarshal added in v0.24.1

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

type QueryAnnualizedRewardsResponse added in v0.24.1

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 added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) Marshal added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) MarshalTo added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) MarshalToSizedBuffer added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) ProtoMessage added in v0.24.1

func (*QueryAnnualizedRewardsResponse) ProtoMessage()

func (*QueryAnnualizedRewardsResponse) Reset added in v0.24.1

func (m *QueryAnnualizedRewardsResponse) Reset()

func (*QueryAnnualizedRewardsResponse) Size added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) String added in v0.24.1

func (*QueryAnnualizedRewardsResponse) Unmarshal added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) XXX_DiscardUnknown added in v0.24.1

func (m *QueryAnnualizedRewardsResponse) XXX_DiscardUnknown()

func (*QueryAnnualizedRewardsResponse) XXX_Marshal added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) XXX_Merge added in v0.24.1

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

func (*QueryAnnualizedRewardsResponse) XXX_Size added in v0.24.1

func (m *QueryAnnualizedRewardsResponse) XXX_Size() int

func (*QueryAnnualizedRewardsResponse) XXX_Unmarshal added in v0.24.1

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 added in v0.25.0

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor added in v0.25.0

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

func (*QueryParamsRequest) Marshal added in v0.25.0

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

func (*QueryParamsRequest) MarshalTo added in v0.25.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.25.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.25.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.25.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.25.0

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

func (*QueryParamsRequest) String added in v0.25.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.25.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.25.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.25.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.25.0

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

func (*QueryParamsRequest) XXX_Size added in v0.25.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.25.0

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

type QueryParamsResponse added in v0.25.0

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 added in v0.25.0

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

func (*QueryParamsResponse) GetParams added in v0.25.0

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal added in v0.25.0

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

func (*QueryParamsResponse) MarshalTo added in v0.25.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.25.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.25.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.25.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.25.0

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

func (*QueryParamsResponse) String added in v0.25.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.25.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.25.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.25.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.25.0

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

func (*QueryParamsResponse) XXX_Size added in v0.25.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.25.0

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 added in v0.23.0

type QueryTotalBalanceRequest struct {
}

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

func (*QueryTotalBalanceRequest) Descriptor added in v0.23.0

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

func (*QueryTotalBalanceRequest) Marshal added in v0.23.0

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

func (*QueryTotalBalanceRequest) MarshalTo added in v0.23.0

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

func (*QueryTotalBalanceRequest) MarshalToSizedBuffer added in v0.23.0

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

func (*QueryTotalBalanceRequest) ProtoMessage added in v0.23.0

func (*QueryTotalBalanceRequest) ProtoMessage()

func (*QueryTotalBalanceRequest) Reset added in v0.23.0

func (m *QueryTotalBalanceRequest) Reset()

func (*QueryTotalBalanceRequest) Size added in v0.23.0

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

func (*QueryTotalBalanceRequest) String added in v0.23.0

func (m *QueryTotalBalanceRequest) String() string

func (*QueryTotalBalanceRequest) Unmarshal added in v0.23.0

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

func (*QueryTotalBalanceRequest) XXX_DiscardUnknown added in v0.23.0

func (m *QueryTotalBalanceRequest) XXX_DiscardUnknown()

func (*QueryTotalBalanceRequest) XXX_Marshal added in v0.23.0

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

func (*QueryTotalBalanceRequest) XXX_Merge added in v0.23.0

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

func (*QueryTotalBalanceRequest) XXX_Size added in v0.23.0

func (m *QueryTotalBalanceRequest) XXX_Size() int

func (*QueryTotalBalanceRequest) XXX_Unmarshal added in v0.23.0

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

type QueryTotalBalanceResponse added in v0.23.0

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 added in v0.23.0

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

func (*QueryTotalBalanceResponse) GetPool added in v0.23.0

func (*QueryTotalBalanceResponse) Marshal added in v0.23.0

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

func (*QueryTotalBalanceResponse) MarshalTo added in v0.23.0

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

func (*QueryTotalBalanceResponse) MarshalToSizedBuffer added in v0.23.0

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

func (*QueryTotalBalanceResponse) ProtoMessage added in v0.23.0

func (*QueryTotalBalanceResponse) ProtoMessage()

func (*QueryTotalBalanceResponse) Reset added in v0.23.0

func (m *QueryTotalBalanceResponse) Reset()

func (*QueryTotalBalanceResponse) Size added in v0.23.0

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

func (*QueryTotalBalanceResponse) String added in v0.23.0

func (m *QueryTotalBalanceResponse) String() string

func (*QueryTotalBalanceResponse) Unmarshal added in v0.23.0

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

func (*QueryTotalBalanceResponse) XXX_DiscardUnknown added in v0.23.0

func (m *QueryTotalBalanceResponse) XXX_DiscardUnknown()

func (*QueryTotalBalanceResponse) XXX_Marshal added in v0.23.0

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

func (*QueryTotalBalanceResponse) XXX_Merge added in v0.23.0

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

func (*QueryTotalBalanceResponse) XXX_Size added in v0.23.0

func (m *QueryTotalBalanceResponse) XXX_Size() int

func (*QueryTotalBalanceResponse) XXX_Unmarshal added in v0.23.0

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

type StakingKeeper added in v0.24.1

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

StakingKeeper expected interface for the staking keeper

type StakingRewardsState added in v0.25.0

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 added in v0.25.0

func DefaultStakingRewardsState() StakingRewardsState

DefaultStakingRewardsState returns default params

func NewStakingRewardsState added in v0.25.0

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

NewStakingRewardsState returns a new staking rewards state object

func (*StakingRewardsState) Descriptor added in v0.25.0

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

func (*StakingRewardsState) GetLastAccumulationTime added in v0.25.0

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

func (*StakingRewardsState) Marshal added in v0.25.0

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

func (*StakingRewardsState) MarshalTo added in v0.25.0

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

func (*StakingRewardsState) MarshalToSizedBuffer added in v0.25.0

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

func (*StakingRewardsState) ProtoMessage added in v0.25.0

func (*StakingRewardsState) ProtoMessage()

func (*StakingRewardsState) Reset added in v0.25.0

func (m *StakingRewardsState) Reset()

func (*StakingRewardsState) Size added in v0.25.0

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

func (*StakingRewardsState) String added in v0.25.0

func (m *StakingRewardsState) String() string

func (*StakingRewardsState) Unmarshal added in v0.25.0

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

func (StakingRewardsState) Validate added in v0.25.0

func (p StakingRewardsState) Validate() error

Validate checks the params are valid

func (*StakingRewardsState) XXX_DiscardUnknown added in v0.25.0

func (m *StakingRewardsState) XXX_DiscardUnknown()

func (*StakingRewardsState) XXX_Marshal added in v0.25.0

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

func (*StakingRewardsState) XXX_Merge added in v0.25.0

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

func (*StakingRewardsState) XXX_Size added in v0.25.0

func (m *StakingRewardsState) XXX_Size() int

func (*StakingRewardsState) XXX_Unmarshal added in v0.25.0

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 added in v0.25.0

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AnnualizedRewards added in v0.24.1

func (*UnimplementedQueryServer) Balance

func (*UnimplementedQueryServer) Params added in v0.25.0

func (*UnimplementedQueryServer) TotalBalance added in v0.23.0

Jump to

Keyboard shortcuts

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