Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(_ *codec.LegacyAmino)
- func RegisterInterfaces(_ cdctypes.InterfaceRegistry)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateMaxSweepPerBlock(maxSweepPerBlock uint32, maxWithdrawalPerBlock uint32) error
- func ValidateMaxWithdrawalPerBlock(v uint32) error
- func ValidateMinPartialWithdrawalAmount(v uint64) error
- type AccountKeeper
- type BankKeeper
- type DistributionKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetValidatorSweepIndex() ValidatorSweepIndex
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetMaxSweepPerBlock() uint32
- func (m *Params) GetMaxWithdrawalPerBlock() uint32
- func (m *Params) GetMinPartialWithdrawalAmount() uint64
- func (m *Params) GetUbiWithdrawAddress() string
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryGetWithdrawalQueueRequest
- func (*QueryGetWithdrawalQueueRequest) Descriptor() ([]byte, []int)
- func (m *QueryGetWithdrawalQueueRequest) GetPagination() *query.PageRequest
- func (m *QueryGetWithdrawalQueueRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGetWithdrawalQueueRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetWithdrawalQueueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetWithdrawalQueueRequest) ProtoMessage()
- func (m *QueryGetWithdrawalQueueRequest) Reset()
- func (m *QueryGetWithdrawalQueueRequest) Size() (n int)
- func (m *QueryGetWithdrawalQueueRequest) String() string
- func (m *QueryGetWithdrawalQueueRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGetWithdrawalQueueRequest) XXX_DiscardUnknown()
- func (m *QueryGetWithdrawalQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetWithdrawalQueueRequest) XXX_Merge(src proto.Message)
- func (m *QueryGetWithdrawalQueueRequest) XXX_Size() int
- func (m *QueryGetWithdrawalQueueRequest) XXX_Unmarshal(b []byte) error
- type QueryGetWithdrawalQueueResponse
- func (*QueryGetWithdrawalQueueResponse) Descriptor() ([]byte, []int)
- func (m *QueryGetWithdrawalQueueResponse) GetPagination() *query.PageResponse
- func (m *QueryGetWithdrawalQueueResponse) GetWithdrawals() []*Withdrawal
- func (m *QueryGetWithdrawalQueueResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGetWithdrawalQueueResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetWithdrawalQueueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetWithdrawalQueueResponse) ProtoMessage()
- func (m *QueryGetWithdrawalQueueResponse) Reset()
- func (m *QueryGetWithdrawalQueueResponse) Size() (n int)
- func (m *QueryGetWithdrawalQueueResponse) String() string
- func (m *QueryGetWithdrawalQueueResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGetWithdrawalQueueResponse) XXX_DiscardUnknown()
- func (m *QueryGetWithdrawalQueueResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetWithdrawalQueueResponse) XXX_Merge(src proto.Message)
- func (m *QueryGetWithdrawalQueueResponse) XXX_Size() int
- func (m *QueryGetWithdrawalQueueResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type SlashingKeeper
- type StakingKeeper
- type UnimplementedQueryServer
- type ValidatorSweepIndex
- func (*ValidatorSweepIndex) Descriptor() ([]byte, []int)
- func (m *ValidatorSweepIndex) GetNextValDelIndex() uint64
- func (m *ValidatorSweepIndex) GetNextValIndex() uint64
- func (m *ValidatorSweepIndex) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSweepIndex) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSweepIndex) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSweepIndex) ProtoMessage()
- func (m *ValidatorSweepIndex) Reset()
- func (m *ValidatorSweepIndex) Size() (n int)
- func (m *ValidatorSweepIndex) String() string
- func (m *ValidatorSweepIndex) Unmarshal(dAtA []byte) error
- func (m *ValidatorSweepIndex) XXX_DiscardUnknown()
- func (m *ValidatorSweepIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSweepIndex) XXX_Merge(src proto.Message)
- func (m *ValidatorSweepIndex) XXX_Size() int
- func (m *ValidatorSweepIndex) XXX_Unmarshal(b []byte) error
- type Withdrawal
- func (*Withdrawal) Descriptor() ([]byte, []int)
- func (this *Withdrawal) Equal(that interface{}) bool
- func (m *Withdrawal) Marshal() (dAtA []byte, err error)
- func (m *Withdrawal) MarshalTo(dAtA []byte) (int, error)
- func (m *Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Withdrawal) ProtoMessage()
- func (m *Withdrawal) Reset()
- func (m *Withdrawal) Size() (n int)
- func (m *Withdrawal) String() string
- func (m *Withdrawal) Unmarshal(dAtA []byte) error
- func (m *Withdrawal) XXX_DiscardUnknown()
- func (m *Withdrawal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Withdrawal) XXX_Merge(src proto.Message)
- func (m *Withdrawal) XXX_Size() int
- func (m *Withdrawal) XXX_Unmarshal(b []byte) error
- type WithdrawalType
- type Withdrawals
Constants ¶
const ( EventTypeUpdateValidatorCommissionFailure = "update_validator_commission_failure" EventTypeSetWithdrawalAddressFailure = "set_withdrawal_address_failure" EventTypeSetRewardAddressFailure = "set_reward_address_failure" EventTypeAddOperatorFailure = "add_operator_failure" EventTypeRemoveOperatorFailure = "remove_operator_failure" EventTypeCreateValidatorFailure = "create_validator_failure" EventTypeDelegateFailure = "delegate_failure" EventTypeRedelegateFailure = "redelegate_failure" EventTypeUndelegateFailure = "undelegate_failure" EventTypeUnjailFailure = "unjail_failure" AttributeKeyStatusCode = "status_code" AttributeKeyBlockHeight = "block_height" AttributeKeyTxHash = "tx_hash" AttributeKeyDelegatorUncmpPubKey = "delegator_uncmp_pubkey" AttributeKeyValidatorUncmpPubKey = "validator_uncmp_pubkey" AttributeKeySrcValidatorUncmpPubKey = "src_validator_uncmp_pubkey" AttributeKeyDstValidatorUncmpPubKey = "dst_validator_uncmp_pubkey" AttributeKeyDelegateID = "delegation_id" AttributeKeyPeriodType = "staking_period" AttributeKeyAmount = "amount" AttributeKeySenderAddress = "sender_address" AttributeKeyWithdrawalAddress = "withdrawal_address" AttributeKeyRewardAddress = "reward_address" AttributeKeyOperatorAddress = "operator_address" AttributeKeyMoniker = "moniker" AttributeKeyCommissionRate = "commission_rate" AttributeKeyMaxCommissionRate = "max_commission_rate" AttributeKeyMaxCommissionChangeRate = "max_commission_change_rate" AttributeKeyTokenType = "token_type" )
evmstaking module event types.
const ( // ModuleName is the name of the evmstaking module. ModuleName = "evmstaking" // StoreKey is the string store representation. StoreKey = ModuleName // RouterKey is the msg router key for the evmstaking module. RouterKey = ModuleName )
const ( DefaultMaxWithdrawalPerBlock uint32 = 4 DefaultMaxSweepPerBlock uint32 = 1024 DefaultMinPartialWithdrawalAmount uint64 = 600_000 )
Staking params default values.
Variables ¶
var ( ErrInvalidLengthEvmstaking = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvmstaking = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvmstaking = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsKey = collections.NewPrefix(0) ValidatorSweepIndexKey = collections.NewPrefix(1) DelegatorWithdrawAddressMapKey = collections.NewPrefix(2) DelegatorRewardAddressMapKey = collections.NewPrefix(3) DelegatorOperatorAddressMapKey = collections.NewPrefix(4) WithdrawalQueueKey = collections.NewPrefix(5) RewardWithdrawalQueueKey = collections.NewPrefix(6) )
KVStore keys.
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( UpdateValidatorCommission = mustGetEvent(ipTokenStakingABI, "UpdateValidatorCommssion") SetWithdrawalAddress = mustGetEvent(ipTokenStakingABI, "SetWithdrawalAddress") SetRewardAddress = mustGetEvent(ipTokenStakingABI, "SetRewardAddress") AddOperator = mustGetEvent(ipTokenStakingABI, "AddOperator") RemoveOperator = mustGetEvent(ipTokenStakingABI, "RemoveOperator") CreateValidatorEvent = mustGetEvent(ipTokenStakingABI, "CreateValidator") DepositEvent = mustGetEvent(ipTokenStakingABI, "Deposit") RedelegateEvent = mustGetEvent(ipTokenStakingABI, "Redelegate") WithdrawEvent = mustGetEvent(ipTokenStakingABI, "Withdraw") UnjailEvent = mustGetEvent(ipTokenStakingABI, "Unjail") )
var Query_serviceDesc = _Query_serviceDesc
var WithdrawalType_name = map[int32]string{
0: "WITHDRAWAL_TYPE_UNSTAKE",
1: "WITHDRAWAL_TYPE_REWARD",
2: "WITHDRAWAL_TYPE_UBI",
}
var WithdrawalType_value = map[string]int32{
"WITHDRAWAL_TYPE_UNSTAKE": 0,
"WITHDRAWAL_TYPE_REWARD": 1,
"WITHDRAWAL_TYPE_UBI": 2,
}
Functions ¶
func RegisterCodec ¶
func RegisterCodec(_ *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(_ cdctypes.InterfaceRegistry)
RegisterInterfaces registers the x/staking interfaces types with the interface registry.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { AddressCodec() address.Codec HasAccount(ctx context.Context, addr sdk.AccAddress) bool NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI SetAccount(ctx context.Context, acc sdk.AccountI) GetModuleAddress(moduleName string) sdk.AccAddress // only used for simulation GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI IterateAccounts(ctx context.Context, process func(sdk.AccountI) (stop bool)) GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI SetModuleAccount(ctx context.Context, modAcc sdk.ModuleAccountI) }
AccountKeeper defines the expected account keeper (noalias).
type BankKeeper ¶
type BankKeeper interface { SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin // only used for simulation GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins LockedCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins SpendableCoin(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin GetSupply(ctx context.Context, denom string) sdk.Coin SendCoinsFromModuleToModule(ctx context.Context, senderPool, recipientPool string, amt sdk.Coins) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type DistributionKeeper ¶
type DistributionKeeper interface { GetValidatorCurrentRewards(ctx context.Context, val sdk.ValAddress) (rewards distributiontypes.ValidatorCurrentRewards, err error) GetValidatorAccumulatedCommission(ctx context.Context, val sdk.ValAddress) (commission distributiontypes.ValidatorAccumulatedCommission, err error) CalculateDelegationRewards(ctx context.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins, err error) WithdrawDelegationRewards(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) WithdrawValidatorCommission(ctx context.Context, valAddr sdk.ValAddress) (sdk.Coins, error) IncrementValidatorPeriod(ctx context.Context, val stakingtypes.ValidatorI) (uint64, error) GetUbiBalanceByDenom(ctx context.Context, denom string) (math.Int, error) WithdrawUbiByDenomToModule(ctx context.Context, denom string, recipientModule string) (sdk.Coin, error) }
DistributionKeeper defines the expected interface needed to calculate validator commission and delegator rewards.
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // TODO: Add withdrawals collections field as ORM if needed ValidatorSweepIndex ValidatorSweepIndex `protobuf:"bytes,2,opt,name=validator_sweep_index,json=validatorSweepIndex,proto3" json:"validator_sweep_index"` }
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the default genesis state.
func NewGenesisState ¶
func NewGenesisState(params Params) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetValidatorSweepIndex ¶ added in v0.10.0
func (m *GenesisState) GetValidatorSweepIndex() ValidatorSweepIndex
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { MaxWithdrawalPerBlock uint32 `` /* 161-byte string literal not displayed */ MaxSweepPerBlock uint32 `` /* 141-byte string literal not displayed */ MinPartialWithdrawalAmount uint64 `` /* 181-byte string literal not displayed */ UbiWithdrawAddress string `` /* 145-byte string literal not displayed */ }
Params defines the parameters for the module.
func NewParams ¶
func NewParams(maxWithdrawalPerBlock uint32, maxSweepPerBlock uint32, minPartialWithdrawalAmount uint64) Params
NewParams creates a new Params instance.
func (*Params) Descriptor ¶
func (*Params) GetMaxSweepPerBlock ¶
func (*Params) GetMaxWithdrawalPerBlock ¶
func (*Params) GetMinPartialWithdrawalAmount ¶
func (*Params) GetUbiWithdrawAddress ¶ added in v0.12.0
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // GetWithdrawalQueue queries the withdrawal queue of the module. GetWithdrawalQueue(ctx context.Context, in *QueryGetWithdrawalQueueRequest, opts ...grpc.CallOption) (*QueryGetWithdrawalQueueResponse, 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 QueryGetWithdrawalQueueRequest ¶
type QueryGetWithdrawalQueueRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryGetWithdrawalQueueRequest is the request type for the Query/WithdrawalQueue RPC method.
func (*QueryGetWithdrawalQueueRequest) Descriptor ¶
func (*QueryGetWithdrawalQueueRequest) Descriptor() ([]byte, []int)
func (*QueryGetWithdrawalQueueRequest) GetPagination ¶
func (m *QueryGetWithdrawalQueueRequest) GetPagination() *query.PageRequest
func (*QueryGetWithdrawalQueueRequest) Marshal ¶
func (m *QueryGetWithdrawalQueueRequest) Marshal() (dAtA []byte, err error)
func (*QueryGetWithdrawalQueueRequest) MarshalTo ¶
func (m *QueryGetWithdrawalQueueRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetWithdrawalQueueRequest) MarshalToSizedBuffer ¶
func (m *QueryGetWithdrawalQueueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetWithdrawalQueueRequest) ProtoMessage ¶
func (*QueryGetWithdrawalQueueRequest) ProtoMessage()
func (*QueryGetWithdrawalQueueRequest) Reset ¶
func (m *QueryGetWithdrawalQueueRequest) Reset()
func (*QueryGetWithdrawalQueueRequest) Size ¶
func (m *QueryGetWithdrawalQueueRequest) Size() (n int)
func (*QueryGetWithdrawalQueueRequest) String ¶
func (m *QueryGetWithdrawalQueueRequest) String() string
func (*QueryGetWithdrawalQueueRequest) Unmarshal ¶
func (m *QueryGetWithdrawalQueueRequest) Unmarshal(dAtA []byte) error
func (*QueryGetWithdrawalQueueRequest) XXX_DiscardUnknown ¶
func (m *QueryGetWithdrawalQueueRequest) XXX_DiscardUnknown()
func (*QueryGetWithdrawalQueueRequest) XXX_Marshal ¶
func (m *QueryGetWithdrawalQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetWithdrawalQueueRequest) XXX_Merge ¶
func (m *QueryGetWithdrawalQueueRequest) XXX_Merge(src proto.Message)
func (*QueryGetWithdrawalQueueRequest) XXX_Size ¶
func (m *QueryGetWithdrawalQueueRequest) XXX_Size() int
func (*QueryGetWithdrawalQueueRequest) XXX_Unmarshal ¶
func (m *QueryGetWithdrawalQueueRequest) XXX_Unmarshal(b []byte) error
type QueryGetWithdrawalQueueResponse ¶
type QueryGetWithdrawalQueueResponse struct { Withdrawals []*Withdrawal `protobuf:"bytes,1,rep,name=withdrawals,proto3" json:"withdrawals,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryGetWithdrawalQueueResponse is the response type for the Query/WithdrawalQueue RPC method.
func (*QueryGetWithdrawalQueueResponse) Descriptor ¶
func (*QueryGetWithdrawalQueueResponse) Descriptor() ([]byte, []int)
func (*QueryGetWithdrawalQueueResponse) GetPagination ¶
func (m *QueryGetWithdrawalQueueResponse) GetPagination() *query.PageResponse
func (*QueryGetWithdrawalQueueResponse) GetWithdrawals ¶
func (m *QueryGetWithdrawalQueueResponse) GetWithdrawals() []*Withdrawal
func (*QueryGetWithdrawalQueueResponse) Marshal ¶
func (m *QueryGetWithdrawalQueueResponse) Marshal() (dAtA []byte, err error)
func (*QueryGetWithdrawalQueueResponse) MarshalTo ¶
func (m *QueryGetWithdrawalQueueResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetWithdrawalQueueResponse) MarshalToSizedBuffer ¶
func (m *QueryGetWithdrawalQueueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetWithdrawalQueueResponse) ProtoMessage ¶
func (*QueryGetWithdrawalQueueResponse) ProtoMessage()
func (*QueryGetWithdrawalQueueResponse) Reset ¶
func (m *QueryGetWithdrawalQueueResponse) Reset()
func (*QueryGetWithdrawalQueueResponse) Size ¶
func (m *QueryGetWithdrawalQueueResponse) Size() (n int)
func (*QueryGetWithdrawalQueueResponse) String ¶
func (m *QueryGetWithdrawalQueueResponse) String() string
func (*QueryGetWithdrawalQueueResponse) Unmarshal ¶
func (m *QueryGetWithdrawalQueueResponse) Unmarshal(dAtA []byte) error
func (*QueryGetWithdrawalQueueResponse) XXX_DiscardUnknown ¶
func (m *QueryGetWithdrawalQueueResponse) XXX_DiscardUnknown()
func (*QueryGetWithdrawalQueueResponse) XXX_Marshal ¶
func (m *QueryGetWithdrawalQueueResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetWithdrawalQueueResponse) XXX_Merge ¶
func (m *QueryGetWithdrawalQueueResponse) XXX_Merge(src proto.Message)
func (*QueryGetWithdrawalQueueResponse) XXX_Size ¶
func (m *QueryGetWithdrawalQueueResponse) XXX_Size() int
func (*QueryGetWithdrawalQueueResponse) XXX_Unmarshal ¶
func (m *QueryGetWithdrawalQueueResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is the response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // GetWithdrawalQueue queries the withdrawal queue of the module. GetWithdrawalQueue(context.Context, *QueryGetWithdrawalQueueRequest) (*QueryGetWithdrawalQueueResponse, error) }
QueryServer is the server API for Query service.
type SlashingKeeper ¶
type SlashingKeeper interface {
Unjail(ctx context.Context, validatorAddr sdk.ValAddress) error
}
SlashingKeeper defines the expected interface for the slashing module.
type StakingKeeper ¶
type StakingKeeper interface { ValidatorAddressCodec() address.Codec GetValidator(ctx context.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, err error) GetAllValidators(ctx context.Context) (validators []stakingtypes.Validator, err error) BondDenom(ctx context.Context) (string, error) UBDQueueIterator(ctx context.Context, endTime time.Time) (corestore.Iterator, error) // GetUnbondingDelegation returns a unbonding delegation. GetUnbondingDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd stakingtypes.UnbondingDelegation, err error) DeleteUnbondingIndex(ctx context.Context, id uint64) error GetAllDelegations(ctx context.Context) (delegations []stakingtypes.Delegation, err error) GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) (delegations []stakingtypes.Delegation, err error) GetUnbondingDelegations(ctx context.Context, delegator sdk.AccAddress, maxRetrieve uint16) (unbondingDelegations []stakingtypes.UnbondingDelegation, err error) GetUnbondingDelegationsFromValidator(ctx context.Context, valAddr sdk.ValAddress) (ubds []stakingtypes.UnbondingDelegation, err error) EndBlocker(ctx context.Context) ([]abci.ValidatorUpdate, error) EndBlockerWithUnbondedEntries(ctx context.Context) ([]abci.ValidatorUpdate, []stakingtypes.UnbondedEntry, error) MinDelegation(ctx context.Context) (math.Int, error) GetFlexiblePeriodType(ctx context.Context) (int32, error) GetPeriodInfo(ctx context.Context, periodType int32) (stakingtypes.Period, error) GetLockedTokenType(ctx context.Context) (int32, error) GetTokenTypeInfo(ctx context.Context, tokenType int32) (stakingtypes.TokenTypeInfo, error) GetSingularityHeight(ctx context.Context) (uint64, error) }
StakingKeeper defines the expected interface for the staking module.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) GetWithdrawalQueue ¶
func (*UnimplementedQueryServer) GetWithdrawalQueue(ctx context.Context, req *QueryGetWithdrawalQueueRequest) (*QueryGetWithdrawalQueueResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
type ValidatorSweepIndex ¶ added in v0.10.0
type ValidatorSweepIndex struct { NextValIndex uint64 `protobuf:"varint,1,opt,name=next_val_index,json=nextValIndex,proto3" json:"next_val_index,omitempty" yaml:"next_val_index"` NextValDelIndex uint64 `` /* 137-byte string literal not displayed */ }
func DefaultValidatorSweepIndex ¶ added in v0.12.0
func DefaultValidatorSweepIndex() ValidatorSweepIndex
func NewValidatorSweepIndex ¶ added in v0.12.0
func NewValidatorSweepIndex(nextValIndex, nextValDelIndex uint64) ValidatorSweepIndex
func (*ValidatorSweepIndex) Descriptor ¶ added in v0.10.0
func (*ValidatorSweepIndex) Descriptor() ([]byte, []int)
func (*ValidatorSweepIndex) GetNextValDelIndex ¶ added in v0.10.0
func (m *ValidatorSweepIndex) GetNextValDelIndex() uint64
func (*ValidatorSweepIndex) GetNextValIndex ¶ added in v0.10.0
func (m *ValidatorSweepIndex) GetNextValIndex() uint64
func (*ValidatorSweepIndex) Marshal ¶ added in v0.10.0
func (m *ValidatorSweepIndex) Marshal() (dAtA []byte, err error)
func (*ValidatorSweepIndex) MarshalTo ¶ added in v0.10.0
func (m *ValidatorSweepIndex) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorSweepIndex) MarshalToSizedBuffer ¶ added in v0.10.0
func (m *ValidatorSweepIndex) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorSweepIndex) ProtoMessage ¶ added in v0.10.0
func (*ValidatorSweepIndex) ProtoMessage()
func (*ValidatorSweepIndex) Reset ¶ added in v0.10.0
func (m *ValidatorSweepIndex) Reset()
func (*ValidatorSweepIndex) Size ¶ added in v0.10.0
func (m *ValidatorSweepIndex) Size() (n int)
func (*ValidatorSweepIndex) String ¶ added in v0.10.0
func (m *ValidatorSweepIndex) String() string
func (*ValidatorSweepIndex) Unmarshal ¶ added in v0.10.0
func (m *ValidatorSweepIndex) Unmarshal(dAtA []byte) error
func (*ValidatorSweepIndex) XXX_DiscardUnknown ¶ added in v0.10.0
func (m *ValidatorSweepIndex) XXX_DiscardUnknown()
func (*ValidatorSweepIndex) XXX_Marshal ¶ added in v0.10.0
func (m *ValidatorSweepIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorSweepIndex) XXX_Merge ¶ added in v0.10.0
func (m *ValidatorSweepIndex) XXX_Merge(src proto.Message)
func (*ValidatorSweepIndex) XXX_Size ¶ added in v0.10.0
func (m *ValidatorSweepIndex) XXX_Size() int
func (*ValidatorSweepIndex) XXX_Unmarshal ¶ added in v0.10.0
func (m *ValidatorSweepIndex) XXX_Unmarshal(b []byte) error
type Withdrawal ¶
type Withdrawal struct { CreationHeight uint64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` // TODO: use ethcommon.Address type ExecutionAddress string `` /* 134-byte string literal not displayed */ Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` WithdrawalType WithdrawalType `` /* 173-byte string literal not displayed */ }
func NewWithdrawal ¶
func NewWithdrawal(creationHeight uint64, executionAddr string, amount uint64, withdrawalType WithdrawalType) Withdrawal
TODO amount as math.Int.
func (*Withdrawal) Descriptor ¶
func (*Withdrawal) Descriptor() ([]byte, []int)
func (*Withdrawal) Equal ¶
func (this *Withdrawal) Equal(that interface{}) bool
func (*Withdrawal) Marshal ¶
func (m *Withdrawal) Marshal() (dAtA []byte, err error)
func (*Withdrawal) MarshalToSizedBuffer ¶
func (m *Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Withdrawal) ProtoMessage ¶
func (*Withdrawal) ProtoMessage()
func (*Withdrawal) Reset ¶
func (m *Withdrawal) Reset()
func (*Withdrawal) Size ¶
func (m *Withdrawal) Size() (n int)
func (*Withdrawal) String ¶
func (m *Withdrawal) String() string
func (*Withdrawal) Unmarshal ¶
func (m *Withdrawal) Unmarshal(dAtA []byte) error
func (*Withdrawal) XXX_DiscardUnknown ¶
func (m *Withdrawal) XXX_DiscardUnknown()
func (*Withdrawal) XXX_Marshal ¶
func (m *Withdrawal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Withdrawal) XXX_Merge ¶
func (m *Withdrawal) XXX_Merge(src proto.Message)
func (*Withdrawal) XXX_Size ¶
func (m *Withdrawal) XXX_Size() int
func (*Withdrawal) XXX_Unmarshal ¶
func (m *Withdrawal) XXX_Unmarshal(b []byte) error
type WithdrawalType ¶ added in v0.14.0
type WithdrawalType int32
const ( WithdrawalType_WITHDRAWAL_TYPE_UNSTAKE WithdrawalType = 0 WithdrawalType_WITHDRAWAL_TYPE_REWARD WithdrawalType = 1 WithdrawalType_WITHDRAWAL_TYPE_UBI WithdrawalType = 2 )
func (WithdrawalType) EnumDescriptor ¶ added in v0.14.0
func (WithdrawalType) EnumDescriptor() ([]byte, []int)
func (WithdrawalType) String ¶ added in v0.14.0
func (x WithdrawalType) String() string
type Withdrawals ¶
type Withdrawals struct { Withdrawals []Withdrawal WithdrawalCodec address.Codec }
Withdrawals is a collection of Withdrawal.
func (Withdrawals) Len ¶
func (ws Withdrawals) Len() int
func (Withdrawals) String ¶
func (ws Withdrawals) String() (out string)