types

package
v23.0.7-iavl-v1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeMsgDelegateBondedTokens = "delegate_bonded_tokens"
)

constants

View Source
const (
	TypeMsgDelegateToValidatorSet = "delegate_to_validator_set"
)

constants

View Source
const (
	TypeMsgRedelegateValidatorSet = "redelegate_validator_set"
)

constants

View Source
const (
	TypeMsgSetValidatorSetPreference = "set_validator_set_preference"
)

constants

View Source
const (
	TypeMsgUndelegateFromRebalancedValidatorSet = "undelegate_from_rebalanced_validator_set"
)

constants

View Source
const (
	TypeMsgUndelegateFromValidatorSet = "undelegate_from_validator_set"
)

constants

View Source
const (
	TypeMsgWithdrawDelegationRewards = "withdraw_delegation_rewards"
)

constants

Variables

View Source
var (
	// ModuleName defines the module name
	ModuleName = "valsetpref"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

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

	// KeyPrefixValidatorSet defines prefix key for validator set.
	KeyPrefixValidatorSet = []byte{0x01}

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)
View Source
var (
	ErrInvalidLengthState        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowState          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupState = 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 (
	ErrNoDelegation = errors.New("No existing delegation")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type BankKeeper

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

type DistributionKeeper

type DistributionKeeper interface {
	WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error)
	IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.ValidatorI) uint64
	CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins)
	AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins)
}

type LockupKeeper

type LockupKeeper interface {
	GetLockByID(ctx sdk.Context, lockID uint64) (*lockuptypes.PeriodLock, error)
	GetSyntheticLockupByUnderlyingLockId(ctx sdk.Context, lockID uint64) (lockuptypes.SyntheticLock, bool, error)
	ForceUnlock(ctx sdk.Context, lock lockuptypes.PeriodLock) error
	BeginUnlock(ctx sdk.Context, lockID uint64, coins sdk.Coins) (uint64, error)
	GetPeriodLocks(ctx sdk.Context) ([]lockuptypes.PeriodLock, error)
}

type MsgClient

type MsgClient interface {
	// SetValidatorSetPreference creates a set of validator preference.
	// This message will process both create + update request.
	SetValidatorSetPreference(ctx context.Context, in *MsgSetValidatorSetPreference, opts ...grpc.CallOption) (*MsgSetValidatorSetPreferenceResponse, error)
	// DelegateToValidatorSet gets the owner, coins and delegates to a
	// validator-set.
	DelegateToValidatorSet(ctx context.Context, in *MsgDelegateToValidatorSet, opts ...grpc.CallOption) (*MsgDelegateToValidatorSetResponse, error)
	// UndelegateFromValidatorSet gets the owner and coins and undelegates from
	// validator-set. The unbonding logic will follow the `Undelegate` logic from
	// the sdk.
	UndelegateFromValidatorSet(ctx context.Context, in *MsgUndelegateFromValidatorSet, opts ...grpc.CallOption) (*MsgUndelegateFromValidatorSetResponse, error)
	// UndelegateFromRebalancedValidatorSet undelegates the proivded amount from
	// the validator set, but takes into consideration the current delegations
	// to the user's validator set to determine the weights assigned to each.
	UndelegateFromRebalancedValidatorSet(ctx context.Context, in *MsgUndelegateFromRebalancedValidatorSet, opts ...grpc.CallOption) (*MsgUndelegateFromRebalancedValidatorSetResponse, error)
	// RedelegateValidatorSet takes the existing validator set and redelegates to
	// a new set.
	RedelegateValidatorSet(ctx context.Context, in *MsgRedelegateValidatorSet, opts ...grpc.CallOption) (*MsgRedelegateValidatorSetResponse, error)
	// WithdrawDelegationRewards allows users to claim rewards from the
	// validator-set.
	WithdrawDelegationRewards(ctx context.Context, in *MsgWithdrawDelegationRewards, opts ...grpc.CallOption) (*MsgWithdrawDelegationRewardsResponse, error)
	// DelegateBondedTokens allows users to break the lockup bond and delegate
	// osmo tokens to a predefined validator-set.
	DelegateBondedTokens(ctx context.Context, in *MsgDelegateBondedTokens, opts ...grpc.CallOption) (*MsgDelegateBondedTokensResponse, 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 MsgDelegateBondedTokens

type MsgDelegateBondedTokens struct {
	// delegator is the user who is trying to force unbond osmo and delegate.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// lockup id of osmo in the pool
	LockID uint64 `protobuf:"varint,2,opt,name=lockID,proto3" json:"lockID,omitempty"`
}

MsgDelegateBondedTokens breaks bonded lockup (by ID) of osmo, of length <= 2 weeks and takes all that osmo and delegates according to delegator's current validator set preference.

func NewMsgDelegateBondedTokens

func NewMsgDelegateBondedTokens(delegator sdk.AccAddress, lockId uint64) *MsgDelegateBondedTokens

NewMsgMsgStakeToValidatorSet creates a msg to stake to a validator.

func (*MsgDelegateBondedTokens) Descriptor

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

func (*MsgDelegateBondedTokens) GetDelegator

func (m *MsgDelegateBondedTokens) GetDelegator() string

func (*MsgDelegateBondedTokens) GetLockID

func (m *MsgDelegateBondedTokens) GetLockID() uint64

func (MsgDelegateBondedTokens) GetSignBytes

func (m MsgDelegateBondedTokens) GetSignBytes() []byte

func (MsgDelegateBondedTokens) GetSigners

func (m MsgDelegateBondedTokens) GetSigners() []sdk.AccAddress

func (*MsgDelegateBondedTokens) Marshal

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

func (*MsgDelegateBondedTokens) MarshalTo

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

func (*MsgDelegateBondedTokens) MarshalToSizedBuffer

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

func (*MsgDelegateBondedTokens) ProtoMessage

func (*MsgDelegateBondedTokens) ProtoMessage()

func (*MsgDelegateBondedTokens) Reset

func (m *MsgDelegateBondedTokens) Reset()

func (*MsgDelegateBondedTokens) Size

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

func (*MsgDelegateBondedTokens) String

func (m *MsgDelegateBondedTokens) String() string

func (MsgDelegateBondedTokens) Type

func (*MsgDelegateBondedTokens) Unmarshal

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

func (MsgDelegateBondedTokens) ValidateBasic

func (m MsgDelegateBondedTokens) ValidateBasic() error

func (*MsgDelegateBondedTokens) XXX_DiscardUnknown

func (m *MsgDelegateBondedTokens) XXX_DiscardUnknown()

func (*MsgDelegateBondedTokens) XXX_Marshal

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

func (*MsgDelegateBondedTokens) XXX_Merge

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

func (*MsgDelegateBondedTokens) XXX_Size

func (m *MsgDelegateBondedTokens) XXX_Size() int

func (*MsgDelegateBondedTokens) XXX_Unmarshal

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

type MsgDelegateBondedTokensResponse

type MsgDelegateBondedTokensResponse struct {
}

func (*MsgDelegateBondedTokensResponse) Descriptor

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

func (*MsgDelegateBondedTokensResponse) Marshal

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

func (*MsgDelegateBondedTokensResponse) MarshalTo

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

func (*MsgDelegateBondedTokensResponse) MarshalToSizedBuffer

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

func (*MsgDelegateBondedTokensResponse) ProtoMessage

func (*MsgDelegateBondedTokensResponse) ProtoMessage()

func (*MsgDelegateBondedTokensResponse) Reset

func (*MsgDelegateBondedTokensResponse) Size

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

func (*MsgDelegateBondedTokensResponse) String

func (*MsgDelegateBondedTokensResponse) Unmarshal

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

func (*MsgDelegateBondedTokensResponse) XXX_DiscardUnknown

func (m *MsgDelegateBondedTokensResponse) XXX_DiscardUnknown()

func (*MsgDelegateBondedTokensResponse) XXX_Marshal

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

func (*MsgDelegateBondedTokensResponse) XXX_Merge

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

func (*MsgDelegateBondedTokensResponse) XXX_Size

func (m *MsgDelegateBondedTokensResponse) XXX_Size() int

func (*MsgDelegateBondedTokensResponse) XXX_Unmarshal

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

type MsgDelegateToValidatorSet

type MsgDelegateToValidatorSet struct {
	// delegator is the user who is trying to delegate.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// the amount of tokens the user is trying to delegate.
	// For ex: delegate 10osmo with validator-set {ValA -> 0.5, ValB -> 0.3, ValC
	// -> 0.2} our staking logic would attempt to delegate 5osmo to A , 3osmo to
	// B, 2osmo to C.
	Coin types.Coin `protobuf:"bytes,2,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin"`
}

MsgDelegateToValidatorSet allows users to delegate to an existing validator-set

func NewMsgDelegateToValidatorSet

func NewMsgDelegateToValidatorSet(delegator sdk.AccAddress, coin sdk.Coin) *MsgDelegateToValidatorSet

NewMsgMsgStakeToValidatorSet creates a msg to stake to a validator set.

func (*MsgDelegateToValidatorSet) Descriptor

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

func (*MsgDelegateToValidatorSet) GetCoin

func (m *MsgDelegateToValidatorSet) GetCoin() types.Coin

func (*MsgDelegateToValidatorSet) GetDelegator

func (m *MsgDelegateToValidatorSet) GetDelegator() string

func (MsgDelegateToValidatorSet) GetSignBytes

func (m MsgDelegateToValidatorSet) GetSignBytes() []byte

func (MsgDelegateToValidatorSet) GetSigners

func (m MsgDelegateToValidatorSet) GetSigners() []sdk.AccAddress

func (*MsgDelegateToValidatorSet) Marshal

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

func (*MsgDelegateToValidatorSet) MarshalTo

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

func (*MsgDelegateToValidatorSet) MarshalToSizedBuffer

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

func (*MsgDelegateToValidatorSet) ProtoMessage

func (*MsgDelegateToValidatorSet) ProtoMessage()

func (*MsgDelegateToValidatorSet) Reset

func (m *MsgDelegateToValidatorSet) Reset()

func (MsgDelegateToValidatorSet) Route

func (*MsgDelegateToValidatorSet) Size

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

func (*MsgDelegateToValidatorSet) String

func (m *MsgDelegateToValidatorSet) String() string

func (MsgDelegateToValidatorSet) Type

func (*MsgDelegateToValidatorSet) Unmarshal

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

func (MsgDelegateToValidatorSet) ValidateBasic

func (m MsgDelegateToValidatorSet) ValidateBasic() error

func (*MsgDelegateToValidatorSet) XXX_DiscardUnknown

func (m *MsgDelegateToValidatorSet) XXX_DiscardUnknown()

func (*MsgDelegateToValidatorSet) XXX_Marshal

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

func (*MsgDelegateToValidatorSet) XXX_Merge

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

func (*MsgDelegateToValidatorSet) XXX_Size

func (m *MsgDelegateToValidatorSet) XXX_Size() int

func (*MsgDelegateToValidatorSet) XXX_Unmarshal

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

type MsgDelegateToValidatorSetResponse

type MsgDelegateToValidatorSetResponse struct {
}

func (*MsgDelegateToValidatorSetResponse) Descriptor

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

func (*MsgDelegateToValidatorSetResponse) Marshal

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

func (*MsgDelegateToValidatorSetResponse) MarshalTo

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

func (*MsgDelegateToValidatorSetResponse) MarshalToSizedBuffer

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

func (*MsgDelegateToValidatorSetResponse) ProtoMessage

func (*MsgDelegateToValidatorSetResponse) ProtoMessage()

func (*MsgDelegateToValidatorSetResponse) Reset

func (*MsgDelegateToValidatorSetResponse) Size

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

func (*MsgDelegateToValidatorSetResponse) String

func (*MsgDelegateToValidatorSetResponse) Unmarshal

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

func (*MsgDelegateToValidatorSetResponse) XXX_DiscardUnknown

func (m *MsgDelegateToValidatorSetResponse) XXX_DiscardUnknown()

func (*MsgDelegateToValidatorSetResponse) XXX_Marshal

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

func (*MsgDelegateToValidatorSetResponse) XXX_Merge

func (*MsgDelegateToValidatorSetResponse) XXX_Size

func (m *MsgDelegateToValidatorSetResponse) XXX_Size() int

func (*MsgDelegateToValidatorSetResponse) XXX_Unmarshal

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

type MsgRedelegateValidatorSet

type MsgRedelegateValidatorSet struct {
	// delegator is the user who is trying to create a validator-set.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// list of {valAddr, weight} to delegate to
	Preferences []ValidatorPreference `protobuf:"bytes,2,rep,name=preferences,proto3" json:"preferences" yaml:"preferences"`
}

func NewMsgRedelegateValidatorSet

func NewMsgRedelegateValidatorSet(delegator sdk.AccAddress, preferences []ValidatorPreference) *MsgRedelegateValidatorSet

NewMsgMsgStakeToValidatorSet creates a msg to stake to a validator.

func (*MsgRedelegateValidatorSet) Descriptor

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

func (*MsgRedelegateValidatorSet) GetDelegator

func (m *MsgRedelegateValidatorSet) GetDelegator() string

func (*MsgRedelegateValidatorSet) GetPreferences

func (m *MsgRedelegateValidatorSet) GetPreferences() []ValidatorPreference

func (MsgRedelegateValidatorSet) GetSignBytes

func (m MsgRedelegateValidatorSet) GetSignBytes() []byte

func (MsgRedelegateValidatorSet) GetSigners

func (m MsgRedelegateValidatorSet) GetSigners() []sdk.AccAddress

func (*MsgRedelegateValidatorSet) Marshal

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

func (*MsgRedelegateValidatorSet) MarshalTo

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

func (*MsgRedelegateValidatorSet) MarshalToSizedBuffer

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

func (*MsgRedelegateValidatorSet) ProtoMessage

func (*MsgRedelegateValidatorSet) ProtoMessage()

func (*MsgRedelegateValidatorSet) Reset

func (m *MsgRedelegateValidatorSet) Reset()

func (MsgRedelegateValidatorSet) Route

func (*MsgRedelegateValidatorSet) Size

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

func (*MsgRedelegateValidatorSet) String

func (m *MsgRedelegateValidatorSet) String() string

func (MsgRedelegateValidatorSet) Type

func (*MsgRedelegateValidatorSet) Unmarshal

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

func (MsgRedelegateValidatorSet) ValidateBasic

func (m MsgRedelegateValidatorSet) ValidateBasic() error

func (*MsgRedelegateValidatorSet) XXX_DiscardUnknown

func (m *MsgRedelegateValidatorSet) XXX_DiscardUnknown()

func (*MsgRedelegateValidatorSet) XXX_Marshal

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

func (*MsgRedelegateValidatorSet) XXX_Merge

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

func (*MsgRedelegateValidatorSet) XXX_Size

func (m *MsgRedelegateValidatorSet) XXX_Size() int

func (*MsgRedelegateValidatorSet) XXX_Unmarshal

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

type MsgRedelegateValidatorSetResponse

type MsgRedelegateValidatorSetResponse struct {
}

func (*MsgRedelegateValidatorSetResponse) Descriptor

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

func (*MsgRedelegateValidatorSetResponse) Marshal

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

func (*MsgRedelegateValidatorSetResponse) MarshalTo

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

func (*MsgRedelegateValidatorSetResponse) MarshalToSizedBuffer

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

func (*MsgRedelegateValidatorSetResponse) ProtoMessage

func (*MsgRedelegateValidatorSetResponse) ProtoMessage()

func (*MsgRedelegateValidatorSetResponse) Reset

func (*MsgRedelegateValidatorSetResponse) Size

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

func (*MsgRedelegateValidatorSetResponse) String

func (*MsgRedelegateValidatorSetResponse) Unmarshal

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

func (*MsgRedelegateValidatorSetResponse) XXX_DiscardUnknown

func (m *MsgRedelegateValidatorSetResponse) XXX_DiscardUnknown()

func (*MsgRedelegateValidatorSetResponse) XXX_Marshal

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

func (*MsgRedelegateValidatorSetResponse) XXX_Merge

func (*MsgRedelegateValidatorSetResponse) XXX_Size

func (m *MsgRedelegateValidatorSetResponse) XXX_Size() int

func (*MsgRedelegateValidatorSetResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// SetValidatorSetPreference creates a set of validator preference.
	// This message will process both create + update request.
	SetValidatorSetPreference(context.Context, *MsgSetValidatorSetPreference) (*MsgSetValidatorSetPreferenceResponse, error)
	// DelegateToValidatorSet gets the owner, coins and delegates to a
	// validator-set.
	DelegateToValidatorSet(context.Context, *MsgDelegateToValidatorSet) (*MsgDelegateToValidatorSetResponse, error)
	// UndelegateFromValidatorSet gets the owner and coins and undelegates from
	// validator-set. The unbonding logic will follow the `Undelegate` logic from
	// the sdk.
	UndelegateFromValidatorSet(context.Context, *MsgUndelegateFromValidatorSet) (*MsgUndelegateFromValidatorSetResponse, error)
	// UndelegateFromRebalancedValidatorSet undelegates the proivded amount from
	// the validator set, but takes into consideration the current delegations
	// to the user's validator set to determine the weights assigned to each.
	UndelegateFromRebalancedValidatorSet(context.Context, *MsgUndelegateFromRebalancedValidatorSet) (*MsgUndelegateFromRebalancedValidatorSetResponse, error)
	// RedelegateValidatorSet takes the existing validator set and redelegates to
	// a new set.
	RedelegateValidatorSet(context.Context, *MsgRedelegateValidatorSet) (*MsgRedelegateValidatorSetResponse, error)
	// WithdrawDelegationRewards allows users to claim rewards from the
	// validator-set.
	WithdrawDelegationRewards(context.Context, *MsgWithdrawDelegationRewards) (*MsgWithdrawDelegationRewardsResponse, error)
	// DelegateBondedTokens allows users to break the lockup bond and delegate
	// osmo tokens to a predefined validator-set.
	DelegateBondedTokens(context.Context, *MsgDelegateBondedTokens) (*MsgDelegateBondedTokensResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetValidatorSetPreference

type MsgSetValidatorSetPreference struct {
	// delegator is the user who is trying to create a validator-set.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// list of {valAddr, weight} to delegate to
	Preferences []ValidatorPreference `protobuf:"bytes,2,rep,name=preferences,proto3" json:"preferences" yaml:"preferences"`
}

MsgCreateValidatorSetPreference is a list that holds validator-set.

func NewMsgSetValidatorSetPreference

func NewMsgSetValidatorSetPreference(delegator sdk.AccAddress, preferences []ValidatorPreference) *MsgSetValidatorSetPreference

NewMsgCreateValidatorSetPreference creates a msg to create a validator-set preference.

func (*MsgSetValidatorSetPreference) Descriptor

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

func (*MsgSetValidatorSetPreference) GetDelegator

func (m *MsgSetValidatorSetPreference) GetDelegator() string

func (*MsgSetValidatorSetPreference) GetPreferences

func (m *MsgSetValidatorSetPreference) GetPreferences() []ValidatorPreference

func (MsgSetValidatorSetPreference) GetSignBytes

func (m MsgSetValidatorSetPreference) GetSignBytes() []byte

func (MsgSetValidatorSetPreference) GetSigners

func (m MsgSetValidatorSetPreference) GetSigners() []sdk.AccAddress

GetSigners takes a create validator-set message and returns the delegator in a byte array.

func (*MsgSetValidatorSetPreference) Marshal

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

func (*MsgSetValidatorSetPreference) MarshalTo

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

func (*MsgSetValidatorSetPreference) MarshalToSizedBuffer

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

func (*MsgSetValidatorSetPreference) ProtoMessage

func (*MsgSetValidatorSetPreference) ProtoMessage()

func (*MsgSetValidatorSetPreference) Reset

func (m *MsgSetValidatorSetPreference) Reset()

func (MsgSetValidatorSetPreference) Route

func (*MsgSetValidatorSetPreference) Size

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

func (*MsgSetValidatorSetPreference) String

func (MsgSetValidatorSetPreference) Type

func (*MsgSetValidatorSetPreference) Unmarshal

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

func (MsgSetValidatorSetPreference) ValidateBasic

func (m MsgSetValidatorSetPreference) ValidateBasic() error

func (*MsgSetValidatorSetPreference) XXX_DiscardUnknown

func (m *MsgSetValidatorSetPreference) XXX_DiscardUnknown()

func (*MsgSetValidatorSetPreference) XXX_Marshal

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

func (*MsgSetValidatorSetPreference) XXX_Merge

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

func (*MsgSetValidatorSetPreference) XXX_Size

func (m *MsgSetValidatorSetPreference) XXX_Size() int

func (*MsgSetValidatorSetPreference) XXX_Unmarshal

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

type MsgSetValidatorSetPreferenceResponse

type MsgSetValidatorSetPreferenceResponse struct {
}

func (*MsgSetValidatorSetPreferenceResponse) Descriptor

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

func (*MsgSetValidatorSetPreferenceResponse) Marshal

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

func (*MsgSetValidatorSetPreferenceResponse) MarshalTo

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

func (*MsgSetValidatorSetPreferenceResponse) MarshalToSizedBuffer

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

func (*MsgSetValidatorSetPreferenceResponse) ProtoMessage

func (*MsgSetValidatorSetPreferenceResponse) ProtoMessage()

func (*MsgSetValidatorSetPreferenceResponse) Reset

func (*MsgSetValidatorSetPreferenceResponse) Size

func (*MsgSetValidatorSetPreferenceResponse) String

func (*MsgSetValidatorSetPreferenceResponse) Unmarshal

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

func (*MsgSetValidatorSetPreferenceResponse) XXX_DiscardUnknown

func (m *MsgSetValidatorSetPreferenceResponse) XXX_DiscardUnknown()

func (*MsgSetValidatorSetPreferenceResponse) XXX_Marshal

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

func (*MsgSetValidatorSetPreferenceResponse) XXX_Merge

func (*MsgSetValidatorSetPreferenceResponse) XXX_Size

func (*MsgSetValidatorSetPreferenceResponse) XXX_Unmarshal

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

type MsgUndelegateFromRebalancedValidatorSet

type MsgUndelegateFromRebalancedValidatorSet struct {
	// delegator is the user who is trying to undelegate.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// the amount the user wants to undelegate
	// For ex: Undelegate 50 osmo with validator-set {ValA -> 0.5, ValB -> 0.5}
	// Our undelegate logic would first check the current delegation balance.
	// If the user has 90 osmo delegated to ValA and 10 osmo delegated to ValB,
	// the rebalanced validator set would be {ValA -> 0.9, ValB -> 0.1}
	// So now the 45 osmo would be undelegated from ValA and 5 osmo would be
	// undelegated from ValB.
	Coin types.Coin `protobuf:"bytes,2,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin"`
}

func NewMsgUndelegateFromRebalancedValidatorSet

func NewMsgUndelegateFromRebalancedValidatorSet(delegator sdk.AccAddress, coin sdk.Coin) *MsgUndelegateFromRebalancedValidatorSet

NewMsgUndelegateFromRebalancedValidatorSet creates a msg to undelegated from a rebalanced validator set.

func (*MsgUndelegateFromRebalancedValidatorSet) Descriptor

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

func (*MsgUndelegateFromRebalancedValidatorSet) GetCoin

func (*MsgUndelegateFromRebalancedValidatorSet) GetDelegator

func (MsgUndelegateFromRebalancedValidatorSet) GetSignBytes

func (m MsgUndelegateFromRebalancedValidatorSet) GetSignBytes() []byte

func (MsgUndelegateFromRebalancedValidatorSet) GetSigners

func (*MsgUndelegateFromRebalancedValidatorSet) Marshal

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

func (*MsgUndelegateFromRebalancedValidatorSet) MarshalTo

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

func (*MsgUndelegateFromRebalancedValidatorSet) MarshalToSizedBuffer

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

func (*MsgUndelegateFromRebalancedValidatorSet) ProtoMessage

func (*MsgUndelegateFromRebalancedValidatorSet) Reset

func (MsgUndelegateFromRebalancedValidatorSet) Route

func (*MsgUndelegateFromRebalancedValidatorSet) Size

func (*MsgUndelegateFromRebalancedValidatorSet) String

func (MsgUndelegateFromRebalancedValidatorSet) Type

func (*MsgUndelegateFromRebalancedValidatorSet) Unmarshal

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

func (MsgUndelegateFromRebalancedValidatorSet) ValidateBasic

func (*MsgUndelegateFromRebalancedValidatorSet) XXX_DiscardUnknown

func (m *MsgUndelegateFromRebalancedValidatorSet) XXX_DiscardUnknown()

func (*MsgUndelegateFromRebalancedValidatorSet) XXX_Marshal

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

func (*MsgUndelegateFromRebalancedValidatorSet) XXX_Merge

func (*MsgUndelegateFromRebalancedValidatorSet) XXX_Size

func (*MsgUndelegateFromRebalancedValidatorSet) XXX_Unmarshal

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

type MsgUndelegateFromRebalancedValidatorSetResponse

type MsgUndelegateFromRebalancedValidatorSetResponse struct {
}

func (*MsgUndelegateFromRebalancedValidatorSetResponse) Descriptor

func (*MsgUndelegateFromRebalancedValidatorSetResponse) Marshal

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

func (*MsgUndelegateFromRebalancedValidatorSetResponse) MarshalTo

func (*MsgUndelegateFromRebalancedValidatorSetResponse) MarshalToSizedBuffer

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

func (*MsgUndelegateFromRebalancedValidatorSetResponse) ProtoMessage

func (*MsgUndelegateFromRebalancedValidatorSetResponse) Reset

func (*MsgUndelegateFromRebalancedValidatorSetResponse) Size

func (*MsgUndelegateFromRebalancedValidatorSetResponse) String

func (*MsgUndelegateFromRebalancedValidatorSetResponse) Unmarshal

func (*MsgUndelegateFromRebalancedValidatorSetResponse) XXX_DiscardUnknown

func (m *MsgUndelegateFromRebalancedValidatorSetResponse) XXX_DiscardUnknown()

func (*MsgUndelegateFromRebalancedValidatorSetResponse) XXX_Marshal

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

func (*MsgUndelegateFromRebalancedValidatorSetResponse) XXX_Merge

func (*MsgUndelegateFromRebalancedValidatorSetResponse) XXX_Size

func (*MsgUndelegateFromRebalancedValidatorSetResponse) XXX_Unmarshal

type MsgUndelegateFromValidatorSet

type MsgUndelegateFromValidatorSet struct {
	// delegator is the user who is trying to undelegate.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	// the amount the user wants to undelegate
	// For ex: Undelegate 10osmo with validator-set {ValA -> 0.5, ValB -> 0.3,
	// ValC
	// -> 0.2} our undelegate logic would attempt to undelegate 5osmo from A ,
	// 3osmo from B, 2osmo from C
	Coin types.Coin `protobuf:"bytes,3,opt,name=coin,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin"`
}

func NewMsgUndelegateFromValidatorSet

func NewMsgUndelegateFromValidatorSet(delegator sdk.AccAddress, coin sdk.Coin) *MsgUndelegateFromValidatorSet

NewMsgMsgStakeToValidatorSet creates a msg to stake to a validator.

func (*MsgUndelegateFromValidatorSet) Descriptor

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

func (*MsgUndelegateFromValidatorSet) GetCoin

func (*MsgUndelegateFromValidatorSet) GetDelegator

func (m *MsgUndelegateFromValidatorSet) GetDelegator() string

func (MsgUndelegateFromValidatorSet) GetSignBytes

func (m MsgUndelegateFromValidatorSet) GetSignBytes() []byte

func (MsgUndelegateFromValidatorSet) GetSigners

func (m MsgUndelegateFromValidatorSet) GetSigners() []sdk.AccAddress

func (*MsgUndelegateFromValidatorSet) Marshal

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

func (*MsgUndelegateFromValidatorSet) MarshalTo

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

func (*MsgUndelegateFromValidatorSet) MarshalToSizedBuffer

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

func (*MsgUndelegateFromValidatorSet) ProtoMessage

func (*MsgUndelegateFromValidatorSet) ProtoMessage()

func (*MsgUndelegateFromValidatorSet) Reset

func (m *MsgUndelegateFromValidatorSet) Reset()

func (MsgUndelegateFromValidatorSet) Route

func (*MsgUndelegateFromValidatorSet) Size

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

func (*MsgUndelegateFromValidatorSet) String

func (MsgUndelegateFromValidatorSet) Type

func (*MsgUndelegateFromValidatorSet) Unmarshal

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

func (MsgUndelegateFromValidatorSet) ValidateBasic

func (m MsgUndelegateFromValidatorSet) ValidateBasic() error

func (*MsgUndelegateFromValidatorSet) XXX_DiscardUnknown

func (m *MsgUndelegateFromValidatorSet) XXX_DiscardUnknown()

func (*MsgUndelegateFromValidatorSet) XXX_Marshal

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

func (*MsgUndelegateFromValidatorSet) XXX_Merge

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

func (*MsgUndelegateFromValidatorSet) XXX_Size

func (m *MsgUndelegateFromValidatorSet) XXX_Size() int

func (*MsgUndelegateFromValidatorSet) XXX_Unmarshal

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

type MsgUndelegateFromValidatorSetResponse

type MsgUndelegateFromValidatorSetResponse struct {
}

func (*MsgUndelegateFromValidatorSetResponse) Descriptor

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

func (*MsgUndelegateFromValidatorSetResponse) Marshal

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

func (*MsgUndelegateFromValidatorSetResponse) MarshalTo

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

func (*MsgUndelegateFromValidatorSetResponse) MarshalToSizedBuffer

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

func (*MsgUndelegateFromValidatorSetResponse) ProtoMessage

func (*MsgUndelegateFromValidatorSetResponse) ProtoMessage()

func (*MsgUndelegateFromValidatorSetResponse) Reset

func (*MsgUndelegateFromValidatorSetResponse) Size

func (*MsgUndelegateFromValidatorSetResponse) String

func (*MsgUndelegateFromValidatorSetResponse) Unmarshal

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

func (*MsgUndelegateFromValidatorSetResponse) XXX_DiscardUnknown

func (m *MsgUndelegateFromValidatorSetResponse) XXX_DiscardUnknown()

func (*MsgUndelegateFromValidatorSetResponse) XXX_Marshal

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

func (*MsgUndelegateFromValidatorSetResponse) XXX_Merge

func (*MsgUndelegateFromValidatorSetResponse) XXX_Size

func (*MsgUndelegateFromValidatorSetResponse) XXX_Unmarshal

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

type MsgWithdrawDelegationRewards

type MsgWithdrawDelegationRewards struct {
	// delegator is the user who is trying to claim staking rewards.
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
}

MsgWithdrawDelegationRewards allows user to claim staking rewards from the validator set.

func NewMsgWithdrawDelegationRewards

func NewMsgWithdrawDelegationRewards(delegator sdk.AccAddress) *MsgWithdrawDelegationRewards

NewMsgMsgStakeToValidatorSet creates a msg to stake to a validator.

func (*MsgWithdrawDelegationRewards) Descriptor

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

func (*MsgWithdrawDelegationRewards) GetDelegator

func (m *MsgWithdrawDelegationRewards) GetDelegator() string

func (MsgWithdrawDelegationRewards) GetSignBytes

func (m MsgWithdrawDelegationRewards) GetSignBytes() []byte

func (MsgWithdrawDelegationRewards) GetSigners

func (m MsgWithdrawDelegationRewards) GetSigners() []sdk.AccAddress

func (*MsgWithdrawDelegationRewards) Marshal

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

func (*MsgWithdrawDelegationRewards) MarshalTo

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

func (*MsgWithdrawDelegationRewards) MarshalToSizedBuffer

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

func (*MsgWithdrawDelegationRewards) ProtoMessage

func (*MsgWithdrawDelegationRewards) ProtoMessage()

func (*MsgWithdrawDelegationRewards) Reset

func (m *MsgWithdrawDelegationRewards) Reset()

func (MsgWithdrawDelegationRewards) Route

func (*MsgWithdrawDelegationRewards) Size

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

func (*MsgWithdrawDelegationRewards) String

func (MsgWithdrawDelegationRewards) Type

func (*MsgWithdrawDelegationRewards) Unmarshal

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

func (MsgWithdrawDelegationRewards) ValidateBasic

func (m MsgWithdrawDelegationRewards) ValidateBasic() error

func (*MsgWithdrawDelegationRewards) XXX_DiscardUnknown

func (m *MsgWithdrawDelegationRewards) XXX_DiscardUnknown()

func (*MsgWithdrawDelegationRewards) XXX_Marshal

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

func (*MsgWithdrawDelegationRewards) XXX_Merge

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

func (*MsgWithdrawDelegationRewards) XXX_Size

func (m *MsgWithdrawDelegationRewards) XXX_Size() int

func (*MsgWithdrawDelegationRewards) XXX_Unmarshal

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

type MsgWithdrawDelegationRewardsResponse

type MsgWithdrawDelegationRewardsResponse struct {
}

func (*MsgWithdrawDelegationRewardsResponse) Descriptor

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

func (*MsgWithdrawDelegationRewardsResponse) Marshal

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

func (*MsgWithdrawDelegationRewardsResponse) MarshalTo

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

func (*MsgWithdrawDelegationRewardsResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawDelegationRewardsResponse) ProtoMessage

func (*MsgWithdrawDelegationRewardsResponse) ProtoMessage()

func (*MsgWithdrawDelegationRewardsResponse) Reset

func (*MsgWithdrawDelegationRewardsResponse) Size

func (*MsgWithdrawDelegationRewardsResponse) String

func (*MsgWithdrawDelegationRewardsResponse) Unmarshal

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

func (*MsgWithdrawDelegationRewardsResponse) XXX_DiscardUnknown

func (m *MsgWithdrawDelegationRewardsResponse) XXX_DiscardUnknown()

func (*MsgWithdrawDelegationRewardsResponse) XXX_Marshal

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

func (*MsgWithdrawDelegationRewardsResponse) XXX_Merge

func (*MsgWithdrawDelegationRewardsResponse) XXX_Size

func (*MsgWithdrawDelegationRewardsResponse) XXX_Unmarshal

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

type NoValidatorSetOrExistingDelegationsError

type NoValidatorSetOrExistingDelegationsError struct {
	DelegatorAddr string
}

func (NoValidatorSetOrExistingDelegationsError) Error

type StakingInterface

type StakingInterface interface {
	GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator)
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
	Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt osmomath.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares osmomath.Dec, err error)
	GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool)
	Undelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount osmomath.Dec) (time.Time, error)
	BeginRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount osmomath.Dec) (completionTime time.Time, err error)
	GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []stakingtypes.Delegation)
	GetValidators(ctx sdk.Context, maxRetrieve uint32) (validators []stakingtypes.Validator)
}

StakingInterface expected staking keeper.

type UndelegateMoreThanDelegatedError

type UndelegateMoreThanDelegatedError struct {
	TotalDelegatedAmt math.LegacyDec
	UndelegationAmt   math.Int
}

func (UndelegateMoreThanDelegatedError) Error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) DelegateBondedTokens

func (*UnimplementedMsgServer) DelegateToValidatorSet

func (*UnimplementedMsgServer) RedelegateValidatorSet

func (*UnimplementedMsgServer) SetValidatorSetPreference

func (*UnimplementedMsgServer) UndelegateFromValidatorSet

func (*UnimplementedMsgServer) WithdrawDelegationRewards

type ValidatorNotFoundError

type ValidatorNotFoundError struct {
	ValidatorAddr string
}

func (ValidatorNotFoundError) Error

func (e ValidatorNotFoundError) Error() string

type ValidatorPreference

type ValidatorPreference struct {
	// val_oper_address holds the validator address the user wants to delegate
	// funds to.
	ValOperAddress string `` /* 129-byte string literal not displayed */
	// weight is decimal between 0 and 1, and they all sum to 1.
	Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"`
}

ValidatorPreference defines the message structure for CreateValidatorSetPreference. It allows a user to set {val_addr, weight} in state. If a user does not have a validator set preference list set, and has staked, make their preference list default to their current staking distribution.

func (*ValidatorPreference) Descriptor

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

func (*ValidatorPreference) Marshal

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

func (*ValidatorPreference) MarshalTo

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

func (*ValidatorPreference) MarshalToSizedBuffer

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

func (*ValidatorPreference) ProtoMessage

func (*ValidatorPreference) ProtoMessage()

func (*ValidatorPreference) Reset

func (m *ValidatorPreference) Reset()

func (*ValidatorPreference) Size

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

func (*ValidatorPreference) String

func (m *ValidatorPreference) String() string

func (*ValidatorPreference) Unmarshal

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

func (*ValidatorPreference) XXX_DiscardUnknown

func (m *ValidatorPreference) XXX_DiscardUnknown()

func (*ValidatorPreference) XXX_Marshal

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

func (*ValidatorPreference) XXX_Merge

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

func (*ValidatorPreference) XXX_Size

func (m *ValidatorPreference) XXX_Size() int

func (*ValidatorPreference) XXX_Unmarshal

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

type ValidatorSetPreferences

type ValidatorSetPreferences struct {
	// preference holds {valAddr, weight} for the user who created it.
	Preferences []ValidatorPreference `protobuf:"bytes,2,rep,name=preferences,proto3" json:"preferences" yaml:"preferences"`
}

ValidatorSetPreferences defines a delegator's validator set preference. It contains a list of (validator, percent_allocation) pairs. The percent allocation are arranged in decimal notation from 0 to 1 and must add up to 1.

func (*ValidatorSetPreferences) Descriptor

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

func (*ValidatorSetPreferences) Marshal

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

func (*ValidatorSetPreferences) MarshalTo

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

func (*ValidatorSetPreferences) MarshalToSizedBuffer

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

func (*ValidatorSetPreferences) ProtoMessage

func (*ValidatorSetPreferences) ProtoMessage()

func (*ValidatorSetPreferences) Reset

func (m *ValidatorSetPreferences) Reset()

func (*ValidatorSetPreferences) Size

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

func (*ValidatorSetPreferences) String

func (m *ValidatorSetPreferences) String() string

func (*ValidatorSetPreferences) Unmarshal

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

func (*ValidatorSetPreferences) XXX_DiscardUnknown

func (m *ValidatorSetPreferences) XXX_DiscardUnknown()

func (*ValidatorSetPreferences) XXX_Marshal

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

func (*ValidatorSetPreferences) XXX_Merge

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

func (*ValidatorSetPreferences) XXX_Size

func (m *ValidatorSetPreferences) XXX_Size() int

func (*ValidatorSetPreferences) XXX_Unmarshal

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

type ValsetRatioGreaterThanOneError

type ValsetRatioGreaterThanOneError struct {
	ValsetRatio math.LegacyDec
}

func (ValsetRatioGreaterThanOneError) Error

Jump to

Keyboard shortcuts

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