types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeAddWithdrawal    = "add_withdrawal"
	EventTypeRemoveWithdrawal = "remove_withdrawal"

	AttributeKeyValidator        = "validator"
	AttributeKeyDelegator        = "delegator"
	AttributeKeyExecutionAddress = "execution_address"
	AttributeKeyCreationHeight   = "creation_height"
)

evmstaking module event types.

View Source
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
)
View Source
const (
	DefaultMaxWithdrawalPerBlock uint32 = 4

	DefaultMaxSweepPerBlock uint32 = 64

	DefaultMinPartialWithdrawalAmount uint64 = 600_000
)

Staking params default values.

Variables

View Source
var (
	ErrInvalidLengthEvmstaking        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvmstaking          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvmstaking = fmt.Errorf("proto: unexpected end of group")
)
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              = collections.NewPrefix(0)
	WithdrawalQueueKey     = collections.NewPrefix(1)
	DelegatorMapKey        = collections.NewPrefix(2)
	ValidatorSweepIndexKey = collections.NewPrefix(3)
)

KVStore keys.

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 (
	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 (
	SetWithdrawalAddress = mustGetEvent(ipTokenStakingABI, "SetWithdrawalAddress")
	CreateValidatorEvent = mustGetEvent(ipTokenStakingABI, "CreateValidator")
	DepositEvent         = mustGetEvent(ipTokenStakingABI, "Deposit")
	RedelegateEvent      = mustGetEvent(ipTokenStakingABI, "Redelegate")
	WithdrawEvent        = mustGetEvent(ipTokenStakingABI, "Withdraw")
)
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 (
	UnjailEvent = mustGetEvent(ipTokenSlashingABI, "Unjail")
)

Functions

func MustMarshalWithdrawal

func MustMarshalWithdrawal(cdc codec.BinaryCodec, withdrawal *Withdrawal) []byte

func RegisterCodec

func RegisterCodec(_ *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registrar cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/staking interfaces types with the interface registry.

func RegisterMsgServiceServer

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateMaxSweepPerBlock

func ValidateMaxSweepPerBlock(i any, maxWithdrawalPerBlock uint32) error

func ValidateMaxWithdrawalPerBlock

func ValidateMaxWithdrawalPerBlock(i any) error

func ValidateMinPartialWithdrawalAmount

func ValidateMinPartialWithdrawalAmount(i any) error

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

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,omitempty"`
}

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

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) 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 MsgAddWithdrawal

type MsgAddWithdrawal struct {
	Authority  string      `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	Withdrawal *Withdrawal `protobuf:"bytes,2,opt,name=withdrawal,proto3" json:"withdrawal,omitempty" yaml:"withdrawal"`
}

MsgAddWithdrawal represents a message to add a withdrawal request to the withdrawal queue.

func (*MsgAddWithdrawal) Descriptor

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

func (*MsgAddWithdrawal) GetAuthority

func (m *MsgAddWithdrawal) GetAuthority() string

func (*MsgAddWithdrawal) GetWithdrawal

func (m *MsgAddWithdrawal) GetWithdrawal() *Withdrawal

func (*MsgAddWithdrawal) Marshal

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

func (*MsgAddWithdrawal) MarshalTo

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

func (*MsgAddWithdrawal) MarshalToSizedBuffer

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

func (*MsgAddWithdrawal) ProtoMessage

func (*MsgAddWithdrawal) ProtoMessage()

func (*MsgAddWithdrawal) Reset

func (m *MsgAddWithdrawal) Reset()

func (*MsgAddWithdrawal) Size

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

func (*MsgAddWithdrawal) String

func (m *MsgAddWithdrawal) String() string

func (*MsgAddWithdrawal) Unmarshal

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

func (*MsgAddWithdrawal) XXX_DiscardUnknown

func (m *MsgAddWithdrawal) XXX_DiscardUnknown()

func (*MsgAddWithdrawal) XXX_Marshal

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

func (*MsgAddWithdrawal) XXX_Merge

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

func (*MsgAddWithdrawal) XXX_Size

func (m *MsgAddWithdrawal) XXX_Size() int

func (*MsgAddWithdrawal) XXX_Unmarshal

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

type MsgAddWithdrawalResponse

type MsgAddWithdrawalResponse struct {
	RequestIndex                uint64 `protobuf:"varint,1,opt,name=request_index,json=requestIndex,proto3" json:"request_index,omitempty" yaml:"request_index"`
	RequestIdDelegatorValidator uint64 `` /* 185-byte string literal not displayed */
}

MsgAddWithdrawalResponse defines the Msg/AddWithdrawal response type.

func (*MsgAddWithdrawalResponse) Descriptor

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

func (*MsgAddWithdrawalResponse) GetRequestIdDelegatorValidator

func (m *MsgAddWithdrawalResponse) GetRequestIdDelegatorValidator() uint64

func (*MsgAddWithdrawalResponse) GetRequestIndex

func (m *MsgAddWithdrawalResponse) GetRequestIndex() uint64

func (*MsgAddWithdrawalResponse) Marshal

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

func (*MsgAddWithdrawalResponse) MarshalTo

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

func (*MsgAddWithdrawalResponse) MarshalToSizedBuffer

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

func (*MsgAddWithdrawalResponse) ProtoMessage

func (*MsgAddWithdrawalResponse) ProtoMessage()

func (*MsgAddWithdrawalResponse) Reset

func (m *MsgAddWithdrawalResponse) Reset()

func (*MsgAddWithdrawalResponse) Size

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

func (*MsgAddWithdrawalResponse) String

func (m *MsgAddWithdrawalResponse) String() string

func (*MsgAddWithdrawalResponse) Unmarshal

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

func (*MsgAddWithdrawalResponse) XXX_DiscardUnknown

func (m *MsgAddWithdrawalResponse) XXX_DiscardUnknown()

func (*MsgAddWithdrawalResponse) XXX_Marshal

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

func (*MsgAddWithdrawalResponse) XXX_Merge

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

func (*MsgAddWithdrawalResponse) XXX_Size

func (m *MsgAddWithdrawalResponse) XXX_Size() int

func (*MsgAddWithdrawalResponse) XXX_Unmarshal

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

type MsgRemoveWithdrawal

type MsgRemoveWithdrawal struct {
	Authority                   string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	Delegator                   string `protobuf:"bytes,2,opt,name=delegator,proto3" json:"delegator,omitempty" yaml:"delegator"`
	Validator                   string `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty" yaml:"validator"`
	RequestIdDelegatorValidator uint64 `` /* 185-byte string literal not displayed */
}

MsgRemoveWithdrawal represents a message to remove a withdrawal request from the withdrawal queue.

func (*MsgRemoveWithdrawal) Descriptor

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

func (*MsgRemoveWithdrawal) GetAuthority

func (m *MsgRemoveWithdrawal) GetAuthority() string

func (*MsgRemoveWithdrawal) GetDelegator

func (m *MsgRemoveWithdrawal) GetDelegator() string

func (*MsgRemoveWithdrawal) GetRequestIdDelegatorValidator

func (m *MsgRemoveWithdrawal) GetRequestIdDelegatorValidator() uint64

func (*MsgRemoveWithdrawal) GetValidator

func (m *MsgRemoveWithdrawal) GetValidator() string

func (*MsgRemoveWithdrawal) Marshal

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

func (*MsgRemoveWithdrawal) MarshalTo

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

func (*MsgRemoveWithdrawal) MarshalToSizedBuffer

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

func (*MsgRemoveWithdrawal) ProtoMessage

func (*MsgRemoveWithdrawal) ProtoMessage()

func (*MsgRemoveWithdrawal) Reset

func (m *MsgRemoveWithdrawal) Reset()

func (*MsgRemoveWithdrawal) Size

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

func (*MsgRemoveWithdrawal) String

func (m *MsgRemoveWithdrawal) String() string

func (*MsgRemoveWithdrawal) Unmarshal

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

func (*MsgRemoveWithdrawal) XXX_DiscardUnknown

func (m *MsgRemoveWithdrawal) XXX_DiscardUnknown()

func (*MsgRemoveWithdrawal) XXX_Marshal

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

func (*MsgRemoveWithdrawal) XXX_Merge

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

func (*MsgRemoveWithdrawal) XXX_Size

func (m *MsgRemoveWithdrawal) XXX_Size() int

func (*MsgRemoveWithdrawal) XXX_Unmarshal

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

type MsgRemoveWithdrawalResponse

type MsgRemoveWithdrawalResponse struct {
}

MsgRemoveWithdrawalResponse defines the Msg/RemoveWithdrawal response type.

func (*MsgRemoveWithdrawalResponse) Descriptor

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

func (*MsgRemoveWithdrawalResponse) Marshal

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

func (*MsgRemoveWithdrawalResponse) MarshalTo

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

func (*MsgRemoveWithdrawalResponse) MarshalToSizedBuffer

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

func (*MsgRemoveWithdrawalResponse) ProtoMessage

func (*MsgRemoveWithdrawalResponse) ProtoMessage()

func (*MsgRemoveWithdrawalResponse) Reset

func (m *MsgRemoveWithdrawalResponse) Reset()

func (*MsgRemoveWithdrawalResponse) Size

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

func (*MsgRemoveWithdrawalResponse) String

func (m *MsgRemoveWithdrawalResponse) String() string

func (*MsgRemoveWithdrawalResponse) Unmarshal

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

func (*MsgRemoveWithdrawalResponse) XXX_DiscardUnknown

func (m *MsgRemoveWithdrawalResponse) XXX_DiscardUnknown()

func (*MsgRemoveWithdrawalResponse) XXX_Marshal

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

func (*MsgRemoveWithdrawalResponse) XXX_Merge

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

func (*MsgRemoveWithdrawalResponse) XXX_Size

func (m *MsgRemoveWithdrawalResponse) XXX_Size() int

func (*MsgRemoveWithdrawalResponse) XXX_Unmarshal

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

type MsgServiceClient

type MsgServiceClient interface {
	// AddWithdrawal defines a method to add a withdrawal to the withdrawal queue.
	AddWithdrawal(ctx context.Context, in *MsgAddWithdrawal, opts ...grpc.CallOption) (*MsgAddWithdrawalResponse, error)
	// RemoveWithdrawal defines a method to remove a withdrawal request from the withdrawal queue.
	RemoveWithdrawal(ctx context.Context, in *MsgRemoveWithdrawal, opts ...grpc.CallOption) (*MsgRemoveWithdrawalResponse, error)
}

MsgServiceClient is the client API for MsgService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgServiceClient

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer

type MsgServiceServer interface {
	// AddWithdrawal defines a method to add a withdrawal to the withdrawal queue.
	AddWithdrawal(context.Context, *MsgAddWithdrawal) (*MsgAddWithdrawalResponse, error)
	// RemoveWithdrawal defines a method to remove a withdrawal request from the withdrawal queue.
	RemoveWithdrawal(context.Context, *MsgRemoveWithdrawal) (*MsgRemoveWithdrawalResponse, error)
}

MsgServiceServer is the server API for MsgService service.

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 */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func MustUnmarshalParams

func MustUnmarshalParams(cdc *codec.LegacyAmino, value []byte) Params

unmarshal the current params value from store key or panic.

func NewParams

func NewParams(maxWithdrawalPerBlock uint32, maxSweepPerBlock uint32, minPartialWithdrawalAmount uint64) Params

NewParams creates a new Params instance.

func UnmarshalParams

func UnmarshalParams(cdc *codec.LegacyAmino, value []byte) (params Params, err error)

unmarshal the current params value from store key.

func (*Params) Descriptor

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

func (*Params) GetMaxSweepPerBlock

func (m *Params) GetMaxSweepPerBlock() uint32

func (*Params) GetMaxWithdrawalPerBlock

func (m *Params) GetMaxWithdrawalPerBlock() uint32

func (*Params) GetMinPartialWithdrawalAmount

func (m *Params) GetMinPartialWithdrawalAmount() uint64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type 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 (*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 (*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 (*QueryGetWithdrawalQueueResponse) Size

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

func (*QueryGetWithdrawalQueueResponse) 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)
}

StakingKeeper defines the expected interface for the staking module.

type UnimplementedMsgServiceServer

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) AddWithdrawal

func (*UnimplementedMsgServiceServer) RemoveWithdrawal

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetWithdrawalQueue

func (*UnimplementedQueryServer) Params

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 (*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"`
	DelegatorAddress string `` /* 134-byte string literal not displayed */
	ValidatorAddress string `` /* 134-byte string literal not displayed */
	// TODO: use ethcommon.Address type
	ExecutionAddress string `` /* 134-byte string literal not displayed */
	Amount           uint64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"`
}

func MustUnmarshalWithdrawal

func MustUnmarshalWithdrawal(cdc codec.BinaryCodec, value []byte) Withdrawal

MustUnmarshalWithdrawal return the unmarshaled withdrawal from bytes. Panics if fails.

func NewWithdrawal

func NewWithdrawal(creationHeight uint64, delegatorAddr string, validatorAddr string, executionAddr string, amount uint64) Withdrawal

TODO amount as math.Int.

func NewWithdrawalFromMsg

func NewWithdrawalFromMsg(msg *MsgAddWithdrawal) Withdrawal

func UnmarshalWithdrawal

func UnmarshalWithdrawal(cdc codec.BinaryCodec, value []byte) (withdrawal Withdrawal, err error)

UnmarshalWithdrawal returns the withdrawal.

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

func (m *Withdrawal) MarshalTo(dAtA []byte) (int, 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 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)

Jump to

Keyboard shortcuts

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