types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: AGPL-3.0 Imports: 41 Imported by: 0

Documentation ¶

Overview ¶

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index ¶

Constants ¶

View Source
const (
	EventTypeDepositToMegavault = "deposit_to_megavault"
	AttributeKeyDepositor       = "depositor"
	AttributeKeyQuoteQuantums   = "quote_quantums"
	AttributeKeyMintedShares    = "minted_shares"

	EventTypeWithdrawFromMegavault    = "withdraw_from_megavault"
	AttributeKeyWithdrawer            = "withdrawer"
	AttributeKeySharesToWithdraw      = "shares_to_withdraw"
	AttributeKeyTotalShares           = "total_shares"
	AttributeKeyMegavaultEquity       = "megavault_equity"
	AttributeKeyRedeemedQuoteQuantums = "redeemed_quote_quantums"

	EventTypeSweepToMegavault      = "sweep_to_megavault"
	AttributeKeySweptQuoteQuantums = "swept_quote_quantums"
)
View Source
const (
	// ModuleName defines the module name.
	ModuleName = "vault"

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

Module name and store keys.

View Source
const (
	// TotalSharesKey is the key to retrieve total shares.
	TotalSharesKey = "TotalShares"

	// OwnerSharesKeyPrefix is the prefix to retrieve all OwnerShares.
	// OwnerShares store: owner string -> shares NumShares.
	OwnerSharesKeyPrefix = "OwnerShares:"

	// OwnerShareUnlocksKeyPrefix is the prefix to retrieve all OwnerShareUnlocks.
	// OwnerShareUnlocks store: owner string -> ownerShareUnlocks OwnerShareUnlocks.
	OwnerShareUnlocksKeyPrefix = "OwnerShareUnlocks:"

	// DefaultQuotingParams is the key to retrieve DefaultQuotingParams.
	// A vault uses DefaultQuotingParams if it does not have its own QuotingParams.
	DefaultQuotingParamsKey = "DefaultQuotingParams"

	// VaultParamsKeyPrefix is the prefix to retrieve all VaultParams.
	// VaultParams store: vaultId VaultId -> VaultParams.
	VaultParamsKeyPrefix = "VaultParams:"

	// VaultAddressKeyPrefix is the prefix to retrieve all vault addresses.
	VaultAddressKeyPrefix = "VaultAddress:"

	// MostRecentClientIdsKeyPrefix is the prefix to retrieve all most recent client IDs.
	// MostRecentClientIdsStore: vaultId VaultId -> clientIds []uint32
	MostRecentClientIdsKeyPrefix = "MostRecentClientIds:"

	// OperatorParamsKey is the key to retrieve OperatorParams.
	OperatorParamsKey = "OperatorParams"
)

State.

View Source
const (
	// MegavaultAccountName defines the root string for megavault module account.
	MegavaultAccountName = "megavault"
)

Module accounts

Variables ¶

View Source
var (
	ErrNegativeShares = errorsmod.Register(
		ModuleName,
		1,
		"Shares are negative",
	)
	ErrClobPairNotFound = errorsmod.Register(
		ModuleName,
		2,
		"ClobPair not found",
	)
	ErrMarketParamNotFound = errorsmod.Register(
		ModuleName,
		3,
		"MarketParam not found",
	)
	ErrInvalidQuoteQuantums = errorsmod.Register(
		ModuleName,
		4,
		"QuoteQuantums must be positive and less than 2^64",
	)
	ErrNonPositiveEquity = errorsmod.Register(
		ModuleName,
		5,
		"Equity is non-positive",
	)
	ErrZeroDenominator = errorsmod.Register(
		ModuleName,
		6,
		"Denominator is zero",
	)
	ErrNilFraction = errorsmod.Register(
		ModuleName,
		7,
		"Fraction is nil",
	)
	ErrInvalidOrderSizePctPpm = errorsmod.Register(
		ModuleName,
		8,
		"OrderSizePctPpm must be strictly greater than 0",
	)
	ErrInvalidOrderExpirationSeconds = errorsmod.Register(
		ModuleName,
		9,
		"OrderExpirationSeconds must be strictly greater than 0",
	)
	ErrInvalidSpreadMinPpm = errorsmod.Register(
		ModuleName,
		10,
		"SpreadMinPpm must be strictly greater than 0",
	)
	ErrInvalidLayers = errorsmod.Register(
		ModuleName,
		11,
		"Layers must be less than or equal to MaxUint8",
	)
	ErrZeroSharesToMint = errorsmod.Register(
		ModuleName,
		12,
		"Cannot mint zero shares",
	)
	ErrInvalidActivationThresholdQuoteQuantums = errorsmod.Register(
		ModuleName,
		13,
		"ActivationThresholdQuoteQuantums must be non-negative",
	)
	ErrInvalidOrderSize = errorsmod.Register(
		ModuleName,
		14,
		"OrderSize is invalid",
	)
	ErrInvalidOwner = errorsmod.Register(
		ModuleName,
		15,
		"Owner is invalid",
	)
	ErrMismatchedTotalAndOwnerShares = errorsmod.Register(
		ModuleName,
		16,
		"TotalShares does not match sum of OwnerShares",
	)
	ErrZeroMarketPrice = errorsmod.Register(
		ModuleName,
		17,
		"MarketPrice is zero",
	)
	ErrOrdersAndOrderIdsDiffLen = errorsmod.Register(
		ModuleName,
		18,
		"Orders and OrderIds must have the same length",
	)
	ErrUnspecifiedVaultStatus = errorsmod.Register(
		ModuleName,
		19,
		"VaultStatus is unspecified",
	)
	ErrVaultParamsNotFound = errorsmod.Register(
		ModuleName,
		20,
		"VaultParams not found",
	)
	ErrEmptyOwnerAddress = errorsmod.Register(
		ModuleName,
		21,
		"Empty owner address",
	)
	ErrOwnerNotFound = errorsmod.Register(
		ModuleName,
		22,
		"Owner not found",
	)
	ErrLockedSharesExceedsOwnerShares = errorsmod.Register(
		ModuleName,
		23,
		"Locked shares exceeds owner shares",
	)
	ErrEmptyOperator = errorsmod.Register(
		ModuleName,
		24,
		"Empty operator address",
	)
	ErrInvalidSharesToWithdraw = errorsmod.Register(
		ModuleName,
		25,
		"Shares to withdraw must be positive and less than or equal to total shares",
	)
	ErrInvalidAuthority = errorsmod.Register(
		ModuleName,
		26,
		"Authority must be a module authority or operator",
	)
	ErrInsufficientWithdrawableShares = errorsmod.Register(
		ModuleName,
		27,
		"Insufficient withdrawable shares",
	)
	ErrInsufficientRedeemedQuoteQuantums = errorsmod.Register(
		ModuleName,
		28,
		"Insufficient redeemed quote quantums",
	)
	ErrDeactivatePositiveEquityVault = errorsmod.Register(
		ModuleName,
		29,
		"Cannot deactivate vaults with positive equity",
	)
	ErrNonPositiveShares = errorsmod.Register(
		ModuleName,
		30,
		"Shares must be positive",
	)
	ErrInvalidSkewFactor = errorsmod.Register(
		ModuleName,
		31,
		"Skew factor times order_size_pct must be less than 2 to avoid skewing over the spread",
	)
)
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 (
	MegavaultMainAddress = authtypes.NewModuleAddress(MegavaultAccountName)
	// MegavaultMainSubaccount is subaccount 0 of the module account derived from string "megavault".
	MegavaultMainSubaccount = satypes.SubaccountId{
		Owner:  MegavaultMainAddress.String(),
		Number: 0,
	}
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	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 (
	ErrInvalidLengthShare        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowShare          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupShare = 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 (
	ErrInvalidLengthVault        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVault          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVault = fmt.Errorf("proto: unexpected end of group")
)
View Source
var VaultStatus_name = map[int32]string{
	0: "VAULT_STATUS_UNSPECIFIED",
	1: "VAULT_STATUS_DEACTIVATED",
	2: "VAULT_STATUS_STAND_BY",
	3: "VAULT_STATUS_QUOTING",
	4: "VAULT_STATUS_CLOSE_ONLY",
}
View Source
var VaultStatus_value = map[string]int32{
	"VAULT_STATUS_UNSPECIFIED": 0,
	"VAULT_STATUS_DEACTIVATED": 1,
	"VAULT_STATUS_STAND_BY":    2,
	"VAULT_STATUS_QUOTING":     3,
	"VAULT_STATUS_CLOSE_ONLY":  4,
}
View Source
var VaultType_name = map[int32]string{
	0: "VAULT_TYPE_UNSPECIFIED",
	1: "VAULT_TYPE_CLOB",
}
View Source
var VaultType_value = map[string]int32{
	"VAULT_TYPE_UNSPECIFIED": 0,
	"VAULT_TYPE_CLOB":        1,
}

Functions ¶

func GetVaultClobOrderClientId ¶

func GetVaultClobOrderClientId(
	side clobtypes.Order_Side,
	layer uint8,
) uint32

GetVaultClobOrderClientId returns the client ID for a CLOB order where - 1st bit is `side-1` (subtract 1 as buy_side = 1, sell_side = 2)

- next 8 bits are `layer`

func NewDepositToMegavaultEvent ¶

func NewDepositToMegavaultEvent(
	depositorAddress string,
	quoteQuantums uint64,
	mintedShares uint64,
) sdk.Event

NewDepositToMegavaultEvent constructs a new deposit_to_megavault sdk.Event.

func NewSweepToMegavaultEvent ¶

func NewSweepToMegavaultEvent(
	quoteQuantums uint64,
) sdk.Event

func NewWithdrawFromMegavaultEvent ¶

func NewWithdrawFromMegavaultEvent(
	withdrawerAddress string,
	sharesToWithdraw uint64,
	totalShares uint64,
	megavaultEquity uint64,
	redeemedQuoteQuantums uint64,
) sdk.Event

NewWithdrawFromMegavaultEvent constructs a new withdraw_from_megavault sdk.Event.

func RegisterCodec ¶

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces ¶

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer ¶

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler ¶

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient ¶

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint ¶

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer ¶

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer ¶

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types ¶

type AssetsKeeper ¶

type AssetsKeeper interface {
	GetAsset(
		ctx sdk.Context,
		assetId uint32,
	) (
		asset assettypes.Asset,
		exists bool,
	)
}

type BankKeeper ¶

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

type ClobKeeper ¶

type ClobKeeper interface {
	// Clob Pair.
	GetClobPair(ctx sdk.Context, id clobtypes.ClobPairId) (val clobtypes.ClobPair, found bool)

	// Order.
	GetLongTermOrderPlacement(
		ctx sdk.Context,
		orderId clobtypes.OrderId,
	) (val clobtypes.LongTermOrderPlacement, found bool)
	HandleMsgCancelOrder(
		ctx sdk.Context,
		msg *clobtypes.MsgCancelOrder,
	) (err error)
	HandleMsgPlaceOrder(
		ctx sdk.Context,
		msg *clobtypes.MsgPlaceOrder,
		isInternalOrder bool,
	) (err error)
}

type DelayMsgKeeper ¶

type DelayMsgKeeper interface {
	DelayMessageByBlocks(
		ctx sdk.Context,
		msg sdk.Msg,
		blockDelay uint32,
	) (
		id uint32,
		err error,
	)
}

type GenesisState ¶

type GenesisState struct {
	// The total number of shares, including any locked ones.
	TotalShares NumShares `protobuf:"bytes,1,opt,name=total_shares,json=totalShares,proto3" json:"total_shares"`
	// The shares of each owner, including any locked ones.
	OwnerShares []OwnerShare `protobuf:"bytes,2,rep,name=owner_shares,json=ownerShares,proto3" json:"owner_shares"`
	// The vaults.
	Vaults []Vault `protobuf:"bytes,3,rep,name=vaults,proto3" json:"vaults"`
	// The default quoting parameters for all vaults.
	DefaultQuotingParams QuotingParams `protobuf:"bytes,4,opt,name=default_quoting_params,json=defaultQuotingParams,proto3" json:"default_quoting_params"`
	// All owner share unlocks.
	AllOwnerShareUnlocks []OwnerShareUnlocks `protobuf:"bytes,5,rep,name=all_owner_share_unlocks,json=allOwnerShareUnlocks,proto3" json:"all_owner_share_unlocks"`
	// The parameters regarding megavault operator.
	OperatorParams OperatorParams `protobuf:"bytes,6,opt,name=operator_params,json=operatorParams,proto3" json:"operator_params"`
}

GenesisState defines `x/vault`'s genesis state.

func DefaultGenesis ¶

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default stats genesis state.

func (*GenesisState) Descriptor ¶

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

func (*GenesisState) GetAllOwnerShareUnlocks ¶

func (m *GenesisState) GetAllOwnerShareUnlocks() []OwnerShareUnlocks

func (*GenesisState) GetDefaultQuotingParams ¶

func (m *GenesisState) GetDefaultQuotingParams() QuotingParams

func (*GenesisState) GetOperatorParams ¶

func (m *GenesisState) GetOperatorParams() OperatorParams

func (*GenesisState) GetOwnerShares ¶

func (m *GenesisState) GetOwnerShares() []OwnerShare

func (*GenesisState) GetTotalShares ¶

func (m *GenesisState) GetTotalShares() NumShares

func (*GenesisState) GetVaults ¶

func (m *GenesisState) GetVaults() []Vault

func (*GenesisState) Marshal ¶

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

func (*GenesisState) MarshalTo ¶

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

func (*GenesisState) MarshalToSizedBuffer ¶

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

func (*GenesisState) ProtoMessage ¶

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset ¶

func (m *GenesisState) Reset()

func (*GenesisState) Size ¶

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

func (*GenesisState) String ¶

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal ¶

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

func (GenesisState) Validate ¶

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 GenesisStateV6 ¶

type GenesisStateV6 struct {
	// The vaults.
	Vaults []*Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults,omitempty"`
	// The default quoting parameters for all vaults.
	DefaultQuotingParams QuotingParams `protobuf:"bytes,3,opt,name=default_quoting_params,json=defaultQuotingParams,proto3" json:"default_quoting_params"`
}

GenesisStateV6 defines `x/vault`'s genesis state in v6.x. Deprecated since v7.x in favor of GenesisState.

func (*GenesisStateV6) Descriptor ¶

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

func (*GenesisStateV6) GetDefaultQuotingParams ¶

func (m *GenesisStateV6) GetDefaultQuotingParams() QuotingParams

func (*GenesisStateV6) GetVaults ¶

func (m *GenesisStateV6) GetVaults() []*Vault

func (*GenesisStateV6) Marshal ¶

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

func (*GenesisStateV6) MarshalTo ¶

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

func (*GenesisStateV6) MarshalToSizedBuffer ¶

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

func (*GenesisStateV6) ProtoMessage ¶

func (*GenesisStateV6) ProtoMessage()

func (*GenesisStateV6) Reset ¶

func (m *GenesisStateV6) Reset()

func (*GenesisStateV6) Size ¶

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

func (*GenesisStateV6) String ¶

func (m *GenesisStateV6) String() string

func (*GenesisStateV6) Unmarshal ¶

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

func (*GenesisStateV6) XXX_DiscardUnknown ¶

func (m *GenesisStateV6) XXX_DiscardUnknown()

func (*GenesisStateV6) XXX_Marshal ¶

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

func (*GenesisStateV6) XXX_Merge ¶

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

func (*GenesisStateV6) XXX_Size ¶

func (m *GenesisStateV6) XXX_Size() int

func (*GenesisStateV6) XXX_Unmarshal ¶

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

type MsgAllocateToVault ¶

type MsgAllocateToVault struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The vault to allocate to.
	VaultId VaultId `protobuf:"bytes,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	// Number of quote quantums to allocate.
	QuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 166-byte string literal not displayed */
}

MsgAllocateToVault is the Msg/AllocateToVault request type.

func (*MsgAllocateToVault) Descriptor ¶

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

func (*MsgAllocateToVault) GetAuthority ¶

func (m *MsgAllocateToVault) GetAuthority() string

func (*MsgAllocateToVault) GetVaultId ¶

func (m *MsgAllocateToVault) GetVaultId() VaultId

func (*MsgAllocateToVault) Marshal ¶

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

func (*MsgAllocateToVault) MarshalTo ¶

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

func (*MsgAllocateToVault) MarshalToSizedBuffer ¶

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

func (*MsgAllocateToVault) ProtoMessage ¶

func (*MsgAllocateToVault) ProtoMessage()

func (*MsgAllocateToVault) Reset ¶

func (m *MsgAllocateToVault) Reset()

func (*MsgAllocateToVault) Size ¶

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

func (*MsgAllocateToVault) String ¶

func (m *MsgAllocateToVault) String() string

func (*MsgAllocateToVault) Unmarshal ¶

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

func (*MsgAllocateToVault) ValidateBasic ¶

func (msg *MsgAllocateToVault) ValidateBasic() error

ValidateBasic performs stateless validation on a MsgAllocateToVault.

func (*MsgAllocateToVault) XXX_DiscardUnknown ¶

func (m *MsgAllocateToVault) XXX_DiscardUnknown()

func (*MsgAllocateToVault) XXX_Marshal ¶

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

func (*MsgAllocateToVault) XXX_Merge ¶

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

func (*MsgAllocateToVault) XXX_Size ¶

func (m *MsgAllocateToVault) XXX_Size() int

func (*MsgAllocateToVault) XXX_Unmarshal ¶

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

type MsgAllocateToVaultResponse ¶

type MsgAllocateToVaultResponse struct {
}

MsgAllocateToVaultResponse is the Msg/AllocateToVault response type.

func (*MsgAllocateToVaultResponse) Descriptor ¶

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

func (*MsgAllocateToVaultResponse) Marshal ¶

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

func (*MsgAllocateToVaultResponse) MarshalTo ¶

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

func (*MsgAllocateToVaultResponse) MarshalToSizedBuffer ¶

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

func (*MsgAllocateToVaultResponse) ProtoMessage ¶

func (*MsgAllocateToVaultResponse) ProtoMessage()

func (*MsgAllocateToVaultResponse) Reset ¶

func (m *MsgAllocateToVaultResponse) Reset()

func (*MsgAllocateToVaultResponse) Size ¶

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

func (*MsgAllocateToVaultResponse) String ¶

func (m *MsgAllocateToVaultResponse) String() string

func (*MsgAllocateToVaultResponse) Unmarshal ¶

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

func (*MsgAllocateToVaultResponse) XXX_DiscardUnknown ¶

func (m *MsgAllocateToVaultResponse) XXX_DiscardUnknown()

func (*MsgAllocateToVaultResponse) XXX_Marshal ¶

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

func (*MsgAllocateToVaultResponse) XXX_Merge ¶

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

func (*MsgAllocateToVaultResponse) XXX_Size ¶

func (m *MsgAllocateToVaultResponse) XXX_Size() int

func (*MsgAllocateToVaultResponse) XXX_Unmarshal ¶

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

type MsgClient ¶

type MsgClient interface {
	// DepositToMegavault deposits funds into megavault.
	DepositToMegavault(ctx context.Context, in *MsgDepositToMegavault, opts ...grpc.CallOption) (*MsgDepositToMegavaultResponse, error)
	// WithdrawFromMegavault withdraws shares from megavault.
	WithdrawFromMegavault(ctx context.Context, in *MsgWithdrawFromMegavault, opts ...grpc.CallOption) (*MsgWithdrawFromMegavaultResponse, error)
	// UpdateDefaultQuotingParams updates the default quoting params in state.
	UpdateDefaultQuotingParams(ctx context.Context, in *MsgUpdateDefaultQuotingParams, opts ...grpc.CallOption) (*MsgUpdateDefaultQuotingParamsResponse, error)
	// UpdateOperatorParams sets the parameters regarding megavault operator.
	UpdateOperatorParams(ctx context.Context, in *MsgUpdateOperatorParams, opts ...grpc.CallOption) (*MsgUpdateOperatorParamsResponse, error)
	// SetVaultParams sets the parameters of a specific vault.
	SetVaultParams(ctx context.Context, in *MsgSetVaultParams, opts ...grpc.CallOption) (*MsgSetVaultParamsResponse, error)
	// UnlockShares unlocks an owner's shares that are due to unlock by the block
	// height that this transaction is included in.
	UnlockShares(ctx context.Context, in *MsgUnlockShares, opts ...grpc.CallOption) (*MsgUnlockSharesResponse, error)
	// AllocateToVault allocates funds from main vault to a vault.
	AllocateToVault(ctx context.Context, in *MsgAllocateToVault, opts ...grpc.CallOption) (*MsgAllocateToVaultResponse, error)
	// RetrieveFromVault retrieves funds from a vault to main vault.
	RetrieveFromVault(ctx context.Context, in *MsgRetrieveFromVault, opts ...grpc.CallOption) (*MsgRetrieveFromVaultResponse, 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 MsgDepositToMegavault ¶

type MsgDepositToMegavault struct {
	// The subaccount to deposit from.
	SubaccountId *types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"`
	// Number of quote quantums to deposit.
	QuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 166-byte string literal not displayed */
}

MsgDepositToMegavault deposits the specified asset from the subaccount to megavault.

func (*MsgDepositToMegavault) Descriptor ¶

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

func (*MsgDepositToMegavault) GetSubaccountId ¶

func (m *MsgDepositToMegavault) GetSubaccountId() *types.SubaccountId

func (*MsgDepositToMegavault) Marshal ¶

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

func (*MsgDepositToMegavault) MarshalTo ¶

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

func (*MsgDepositToMegavault) MarshalToSizedBuffer ¶

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

func (*MsgDepositToMegavault) ProtoMessage ¶

func (*MsgDepositToMegavault) ProtoMessage()

func (*MsgDepositToMegavault) Reset ¶

func (m *MsgDepositToMegavault) Reset()

func (*MsgDepositToMegavault) Size ¶

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

func (*MsgDepositToMegavault) String ¶

func (m *MsgDepositToMegavault) String() string

func (*MsgDepositToMegavault) Unmarshal ¶

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

func (*MsgDepositToMegavault) ValidateBasic ¶

func (msg *MsgDepositToMegavault) ValidateBasic() error

ValidateBasic performs stateless validation on a MsgDepositToMegavault.

func (*MsgDepositToMegavault) XXX_DiscardUnknown ¶

func (m *MsgDepositToMegavault) XXX_DiscardUnknown()

func (*MsgDepositToMegavault) XXX_Marshal ¶

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

func (*MsgDepositToMegavault) XXX_Merge ¶

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

func (*MsgDepositToMegavault) XXX_Size ¶

func (m *MsgDepositToMegavault) XXX_Size() int

func (*MsgDepositToMegavault) XXX_Unmarshal ¶

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

type MsgDepositToMegavaultResponse ¶

type MsgDepositToMegavaultResponse struct {
	// The number of shares minted from the deposit.
	MintedShares NumShares `protobuf:"bytes,1,opt,name=minted_shares,json=mintedShares,proto3" json:"minted_shares"`
}

MsgDepositToMegavaultResponse is the Msg/DepositToMegavault response type.

func (*MsgDepositToMegavaultResponse) Descriptor ¶

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

func (*MsgDepositToMegavaultResponse) GetMintedShares ¶

func (m *MsgDepositToMegavaultResponse) GetMintedShares() NumShares

func (*MsgDepositToMegavaultResponse) Marshal ¶

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

func (*MsgDepositToMegavaultResponse) MarshalTo ¶

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

func (*MsgDepositToMegavaultResponse) MarshalToSizedBuffer ¶

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

func (*MsgDepositToMegavaultResponse) ProtoMessage ¶

func (*MsgDepositToMegavaultResponse) ProtoMessage()

func (*MsgDepositToMegavaultResponse) Reset ¶

func (m *MsgDepositToMegavaultResponse) Reset()

func (*MsgDepositToMegavaultResponse) Size ¶

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

func (*MsgDepositToMegavaultResponse) String ¶

func (*MsgDepositToMegavaultResponse) Unmarshal ¶

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

func (*MsgDepositToMegavaultResponse) XXX_DiscardUnknown ¶

func (m *MsgDepositToMegavaultResponse) XXX_DiscardUnknown()

func (*MsgDepositToMegavaultResponse) XXX_Marshal ¶

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

func (*MsgDepositToMegavaultResponse) XXX_Merge ¶

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

func (*MsgDepositToMegavaultResponse) XXX_Size ¶

func (m *MsgDepositToMegavaultResponse) XXX_Size() int

func (*MsgDepositToMegavaultResponse) XXX_Unmarshal ¶

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

type MsgRetrieveFromVault ¶

type MsgRetrieveFromVault struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The vault to retrieve from.
	VaultId VaultId `protobuf:"bytes,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	// Number of quote quantums to retrieve.
	QuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 166-byte string literal not displayed */
}

MsgRetrieveFromVault is the Msg/RetrieveFromVault request type.

func (*MsgRetrieveFromVault) Descriptor ¶

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

func (*MsgRetrieveFromVault) GetAuthority ¶

func (m *MsgRetrieveFromVault) GetAuthority() string

func (*MsgRetrieveFromVault) GetVaultId ¶

func (m *MsgRetrieveFromVault) GetVaultId() VaultId

func (*MsgRetrieveFromVault) Marshal ¶

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

func (*MsgRetrieveFromVault) MarshalTo ¶

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

func (*MsgRetrieveFromVault) MarshalToSizedBuffer ¶

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

func (*MsgRetrieveFromVault) ProtoMessage ¶

func (*MsgRetrieveFromVault) ProtoMessage()

func (*MsgRetrieveFromVault) Reset ¶

func (m *MsgRetrieveFromVault) Reset()

func (*MsgRetrieveFromVault) Size ¶

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

func (*MsgRetrieveFromVault) String ¶

func (m *MsgRetrieveFromVault) String() string

func (*MsgRetrieveFromVault) Unmarshal ¶

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

func (*MsgRetrieveFromVault) ValidateBasic ¶

func (msg *MsgRetrieveFromVault) ValidateBasic() error

ValidateBasic performs stateless validation on a MsgRetrieveFromVault.

func (*MsgRetrieveFromVault) XXX_DiscardUnknown ¶

func (m *MsgRetrieveFromVault) XXX_DiscardUnknown()

func (*MsgRetrieveFromVault) XXX_Marshal ¶

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

func (*MsgRetrieveFromVault) XXX_Merge ¶

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

func (*MsgRetrieveFromVault) XXX_Size ¶

func (m *MsgRetrieveFromVault) XXX_Size() int

func (*MsgRetrieveFromVault) XXX_Unmarshal ¶

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

type MsgRetrieveFromVaultResponse ¶

type MsgRetrieveFromVaultResponse struct {
}

MsgRetrieveFromVaultResponse is the Msg/RetrieveFromVault response type.

func (*MsgRetrieveFromVaultResponse) Descriptor ¶

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

func (*MsgRetrieveFromVaultResponse) Marshal ¶

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

func (*MsgRetrieveFromVaultResponse) MarshalTo ¶

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

func (*MsgRetrieveFromVaultResponse) MarshalToSizedBuffer ¶

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

func (*MsgRetrieveFromVaultResponse) ProtoMessage ¶

func (*MsgRetrieveFromVaultResponse) ProtoMessage()

func (*MsgRetrieveFromVaultResponse) Reset ¶

func (m *MsgRetrieveFromVaultResponse) Reset()

func (*MsgRetrieveFromVaultResponse) Size ¶

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

func (*MsgRetrieveFromVaultResponse) String ¶

func (*MsgRetrieveFromVaultResponse) Unmarshal ¶

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

func (*MsgRetrieveFromVaultResponse) XXX_DiscardUnknown ¶

func (m *MsgRetrieveFromVaultResponse) XXX_DiscardUnknown()

func (*MsgRetrieveFromVaultResponse) XXX_Marshal ¶

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

func (*MsgRetrieveFromVaultResponse) XXX_Merge ¶

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

func (*MsgRetrieveFromVaultResponse) XXX_Size ¶

func (m *MsgRetrieveFromVaultResponse) XXX_Size() int

func (*MsgRetrieveFromVaultResponse) XXX_Unmarshal ¶

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

type MsgServer ¶

type MsgServer interface {
	// DepositToMegavault deposits funds into megavault.
	DepositToMegavault(context.Context, *MsgDepositToMegavault) (*MsgDepositToMegavaultResponse, error)
	// WithdrawFromMegavault withdraws shares from megavault.
	WithdrawFromMegavault(context.Context, *MsgWithdrawFromMegavault) (*MsgWithdrawFromMegavaultResponse, error)
	// UpdateDefaultQuotingParams updates the default quoting params in state.
	UpdateDefaultQuotingParams(context.Context, *MsgUpdateDefaultQuotingParams) (*MsgUpdateDefaultQuotingParamsResponse, error)
	// UpdateOperatorParams sets the parameters regarding megavault operator.
	UpdateOperatorParams(context.Context, *MsgUpdateOperatorParams) (*MsgUpdateOperatorParamsResponse, error)
	// SetVaultParams sets the parameters of a specific vault.
	SetVaultParams(context.Context, *MsgSetVaultParams) (*MsgSetVaultParamsResponse, error)
	// UnlockShares unlocks an owner's shares that are due to unlock by the block
	// height that this transaction is included in.
	UnlockShares(context.Context, *MsgUnlockShares) (*MsgUnlockSharesResponse, error)
	// AllocateToVault allocates funds from main vault to a vault.
	AllocateToVault(context.Context, *MsgAllocateToVault) (*MsgAllocateToVaultResponse, error)
	// RetrieveFromVault retrieves funds from a vault to main vault.
	RetrieveFromVault(context.Context, *MsgRetrieveFromVault) (*MsgRetrieveFromVaultResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetVaultParams ¶

type MsgSetVaultParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The vault to set params of.
	VaultId VaultId `protobuf:"bytes,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	// The parameters to set.
	VaultParams VaultParams `protobuf:"bytes,3,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"`
}

MsgSetVaultParams is the Msg/SetVaultParams request type.

func (*MsgSetVaultParams) Descriptor ¶

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

func (*MsgSetVaultParams) GetAuthority ¶

func (m *MsgSetVaultParams) GetAuthority() string

func (*MsgSetVaultParams) GetVaultId ¶

func (m *MsgSetVaultParams) GetVaultId() VaultId

func (*MsgSetVaultParams) GetVaultParams ¶

func (m *MsgSetVaultParams) GetVaultParams() VaultParams

func (*MsgSetVaultParams) Marshal ¶

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

func (*MsgSetVaultParams) MarshalTo ¶

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

func (*MsgSetVaultParams) MarshalToSizedBuffer ¶

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

func (*MsgSetVaultParams) ProtoMessage ¶

func (*MsgSetVaultParams) ProtoMessage()

func (*MsgSetVaultParams) Reset ¶

func (m *MsgSetVaultParams) Reset()

func (*MsgSetVaultParams) Size ¶

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

func (*MsgSetVaultParams) String ¶

func (m *MsgSetVaultParams) String() string

func (*MsgSetVaultParams) Unmarshal ¶

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

func (*MsgSetVaultParams) XXX_DiscardUnknown ¶

func (m *MsgSetVaultParams) XXX_DiscardUnknown()

func (*MsgSetVaultParams) XXX_Marshal ¶

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

func (*MsgSetVaultParams) XXX_Merge ¶

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

func (*MsgSetVaultParams) XXX_Size ¶

func (m *MsgSetVaultParams) XXX_Size() int

func (*MsgSetVaultParams) XXX_Unmarshal ¶

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

type MsgSetVaultParamsResponse ¶

type MsgSetVaultParamsResponse struct {
}

MsgSetVaultParamsResponse is the Msg/SetVaultParams response type.

func (*MsgSetVaultParamsResponse) Descriptor ¶

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

func (*MsgSetVaultParamsResponse) Marshal ¶

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

func (*MsgSetVaultParamsResponse) MarshalTo ¶

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

func (*MsgSetVaultParamsResponse) MarshalToSizedBuffer ¶

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

func (*MsgSetVaultParamsResponse) ProtoMessage ¶

func (*MsgSetVaultParamsResponse) ProtoMessage()

func (*MsgSetVaultParamsResponse) Reset ¶

func (m *MsgSetVaultParamsResponse) Reset()

func (*MsgSetVaultParamsResponse) Size ¶

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

func (*MsgSetVaultParamsResponse) String ¶

func (m *MsgSetVaultParamsResponse) String() string

func (*MsgSetVaultParamsResponse) Unmarshal ¶

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

func (*MsgSetVaultParamsResponse) XXX_DiscardUnknown ¶

func (m *MsgSetVaultParamsResponse) XXX_DiscardUnknown()

func (*MsgSetVaultParamsResponse) XXX_Marshal ¶

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

func (*MsgSetVaultParamsResponse) XXX_Merge ¶

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

func (*MsgSetVaultParamsResponse) XXX_Size ¶

func (m *MsgSetVaultParamsResponse) XXX_Size() int

func (*MsgSetVaultParamsResponse) XXX_Unmarshal ¶

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

type MsgSetVaultQuotingParams deprecated

type MsgSetVaultQuotingParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The vault to set quoting params of.
	VaultId VaultId `protobuf:"bytes,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	// The quoting parameters to set. Each field must be set.
	QuotingParams QuotingParams `protobuf:"bytes,3,opt,name=quoting_params,json=quotingParams,proto3" json:"quoting_params"`
}

MsgSetVaultQuotingParams is the Msg/SetVaultQuotingParams request type. Deprecated since v6.x as is replaced by MsgSetVaultParams.

Deprecated: Do not use.

func (*MsgSetVaultQuotingParams) Descriptor ¶

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

func (*MsgSetVaultQuotingParams) GetAuthority ¶

func (m *MsgSetVaultQuotingParams) GetAuthority() string

func (*MsgSetVaultQuotingParams) GetQuotingParams ¶

func (m *MsgSetVaultQuotingParams) GetQuotingParams() QuotingParams

func (*MsgSetVaultQuotingParams) GetVaultId ¶

func (m *MsgSetVaultQuotingParams) GetVaultId() VaultId

func (*MsgSetVaultQuotingParams) Marshal ¶

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

func (*MsgSetVaultQuotingParams) MarshalTo ¶

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

func (*MsgSetVaultQuotingParams) MarshalToSizedBuffer ¶

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

func (*MsgSetVaultQuotingParams) ProtoMessage ¶

func (*MsgSetVaultQuotingParams) ProtoMessage()

func (*MsgSetVaultQuotingParams) Reset ¶

func (m *MsgSetVaultQuotingParams) Reset()

func (*MsgSetVaultQuotingParams) Size ¶

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

func (*MsgSetVaultQuotingParams) String ¶

func (m *MsgSetVaultQuotingParams) String() string

func (*MsgSetVaultQuotingParams) Unmarshal ¶

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

func (*MsgSetVaultQuotingParams) XXX_DiscardUnknown ¶

func (m *MsgSetVaultQuotingParams) XXX_DiscardUnknown()

func (*MsgSetVaultQuotingParams) XXX_Marshal ¶

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

func (*MsgSetVaultQuotingParams) XXX_Merge ¶

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

func (*MsgSetVaultQuotingParams) XXX_Size ¶

func (m *MsgSetVaultQuotingParams) XXX_Size() int

func (*MsgSetVaultQuotingParams) XXX_Unmarshal ¶

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

type MsgUnlockShares ¶

type MsgUnlockShares struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Address of the owner to unlock shares of.
	OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
}

MsgUnlockShares is the Msg/UnlockShares request type.

func (*MsgUnlockShares) Descriptor ¶

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

func (*MsgUnlockShares) GetAuthority ¶

func (m *MsgUnlockShares) GetAuthority() string

func (*MsgUnlockShares) GetOwnerAddress ¶

func (m *MsgUnlockShares) GetOwnerAddress() string

func (*MsgUnlockShares) Marshal ¶

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

func (*MsgUnlockShares) MarshalTo ¶

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

func (*MsgUnlockShares) MarshalToSizedBuffer ¶

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

func (*MsgUnlockShares) ProtoMessage ¶

func (*MsgUnlockShares) ProtoMessage()

func (*MsgUnlockShares) Reset ¶

func (m *MsgUnlockShares) Reset()

func (*MsgUnlockShares) Size ¶

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

func (*MsgUnlockShares) String ¶

func (m *MsgUnlockShares) String() string

func (*MsgUnlockShares) Unmarshal ¶

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

func (*MsgUnlockShares) XXX_DiscardUnknown ¶

func (m *MsgUnlockShares) XXX_DiscardUnknown()

func (*MsgUnlockShares) XXX_Marshal ¶

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

func (*MsgUnlockShares) XXX_Merge ¶

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

func (*MsgUnlockShares) XXX_Size ¶

func (m *MsgUnlockShares) XXX_Size() int

func (*MsgUnlockShares) XXX_Unmarshal ¶

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

type MsgUnlockSharesResponse ¶

type MsgUnlockSharesResponse struct {
	// The number of shares unlocked.
	UnlockedShares NumShares `protobuf:"bytes,1,opt,name=unlocked_shares,json=unlockedShares,proto3" json:"unlocked_shares"`
}

MsgUnlockSharesResponse is the Msg/UnlockShares response type.

func (*MsgUnlockSharesResponse) Descriptor ¶

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

func (*MsgUnlockSharesResponse) GetUnlockedShares ¶

func (m *MsgUnlockSharesResponse) GetUnlockedShares() NumShares

func (*MsgUnlockSharesResponse) Marshal ¶

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

func (*MsgUnlockSharesResponse) MarshalTo ¶

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

func (*MsgUnlockSharesResponse) MarshalToSizedBuffer ¶

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

func (*MsgUnlockSharesResponse) ProtoMessage ¶

func (*MsgUnlockSharesResponse) ProtoMessage()

func (*MsgUnlockSharesResponse) Reset ¶

func (m *MsgUnlockSharesResponse) Reset()

func (*MsgUnlockSharesResponse) Size ¶

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

func (*MsgUnlockSharesResponse) String ¶

func (m *MsgUnlockSharesResponse) String() string

func (*MsgUnlockSharesResponse) Unmarshal ¶

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

func (*MsgUnlockSharesResponse) XXX_DiscardUnknown ¶

func (m *MsgUnlockSharesResponse) XXX_DiscardUnknown()

func (*MsgUnlockSharesResponse) XXX_Marshal ¶

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

func (*MsgUnlockSharesResponse) XXX_Merge ¶

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

func (*MsgUnlockSharesResponse) XXX_Size ¶

func (m *MsgUnlockSharesResponse) XXX_Size() int

func (*MsgUnlockSharesResponse) XXX_Unmarshal ¶

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

type MsgUpdateDefaultQuotingParams ¶

type MsgUpdateDefaultQuotingParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The quoting parameters to update to. Every field must be set.
	DefaultQuotingParams QuotingParams `protobuf:"bytes,2,opt,name=default_quoting_params,json=defaultQuotingParams,proto3" json:"default_quoting_params"`
}

MsgUpdateDefaultQuotingParams is the Msg/UpdateDefaultQuotingParams request type.

func (*MsgUpdateDefaultQuotingParams) Descriptor ¶

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

func (*MsgUpdateDefaultQuotingParams) GetAuthority ¶

func (m *MsgUpdateDefaultQuotingParams) GetAuthority() string

func (*MsgUpdateDefaultQuotingParams) GetDefaultQuotingParams ¶

func (m *MsgUpdateDefaultQuotingParams) GetDefaultQuotingParams() QuotingParams

func (*MsgUpdateDefaultQuotingParams) Marshal ¶

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

func (*MsgUpdateDefaultQuotingParams) MarshalTo ¶

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

func (*MsgUpdateDefaultQuotingParams) MarshalToSizedBuffer ¶

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

func (*MsgUpdateDefaultQuotingParams) ProtoMessage ¶

func (*MsgUpdateDefaultQuotingParams) ProtoMessage()

func (*MsgUpdateDefaultQuotingParams) Reset ¶

func (m *MsgUpdateDefaultQuotingParams) Reset()

func (*MsgUpdateDefaultQuotingParams) Size ¶

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

func (*MsgUpdateDefaultQuotingParams) String ¶

func (*MsgUpdateDefaultQuotingParams) Unmarshal ¶

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

func (*MsgUpdateDefaultQuotingParams) XXX_DiscardUnknown ¶

func (m *MsgUpdateDefaultQuotingParams) XXX_DiscardUnknown()

func (*MsgUpdateDefaultQuotingParams) XXX_Marshal ¶

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

func (*MsgUpdateDefaultQuotingParams) XXX_Merge ¶

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

func (*MsgUpdateDefaultQuotingParams) XXX_Size ¶

func (m *MsgUpdateDefaultQuotingParams) XXX_Size() int

func (*MsgUpdateDefaultQuotingParams) XXX_Unmarshal ¶

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

type MsgUpdateDefaultQuotingParamsResponse ¶

type MsgUpdateDefaultQuotingParamsResponse struct {
}

MsgUpdateDefaultQuotingParamsResponse is the Msg/UpdateDefaultQuotingParams response type.

func (*MsgUpdateDefaultQuotingParamsResponse) Descriptor ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) Marshal ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) MarshalTo ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) MarshalToSizedBuffer ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) ProtoMessage ¶

func (*MsgUpdateDefaultQuotingParamsResponse) ProtoMessage()

func (*MsgUpdateDefaultQuotingParamsResponse) Reset ¶

func (*MsgUpdateDefaultQuotingParamsResponse) Size ¶

func (*MsgUpdateDefaultQuotingParamsResponse) String ¶

func (*MsgUpdateDefaultQuotingParamsResponse) Unmarshal ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) XXX_DiscardUnknown ¶

func (m *MsgUpdateDefaultQuotingParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateDefaultQuotingParamsResponse) XXX_Marshal ¶

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

func (*MsgUpdateDefaultQuotingParamsResponse) XXX_Merge ¶

func (*MsgUpdateDefaultQuotingParamsResponse) XXX_Size ¶

func (*MsgUpdateDefaultQuotingParamsResponse) XXX_Unmarshal ¶

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

type MsgUpdateOperatorParams ¶

type MsgUpdateOperatorParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Operator parameters to set.
	Params OperatorParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateOperatorParams is the Msg/UpdateOperatorParams request type.

func (*MsgUpdateOperatorParams) Descriptor ¶

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

func (*MsgUpdateOperatorParams) GetAuthority ¶

func (m *MsgUpdateOperatorParams) GetAuthority() string

func (*MsgUpdateOperatorParams) GetParams ¶

func (m *MsgUpdateOperatorParams) GetParams() OperatorParams

func (*MsgUpdateOperatorParams) Marshal ¶

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

func (*MsgUpdateOperatorParams) MarshalTo ¶

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

func (*MsgUpdateOperatorParams) MarshalToSizedBuffer ¶

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

func (*MsgUpdateOperatorParams) ProtoMessage ¶

func (*MsgUpdateOperatorParams) ProtoMessage()

func (*MsgUpdateOperatorParams) Reset ¶

func (m *MsgUpdateOperatorParams) Reset()

func (*MsgUpdateOperatorParams) Size ¶

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

func (*MsgUpdateOperatorParams) String ¶

func (m *MsgUpdateOperatorParams) String() string

func (*MsgUpdateOperatorParams) Unmarshal ¶

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

func (*MsgUpdateOperatorParams) XXX_DiscardUnknown ¶

func (m *MsgUpdateOperatorParams) XXX_DiscardUnknown()

func (*MsgUpdateOperatorParams) XXX_Marshal ¶

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

func (*MsgUpdateOperatorParams) XXX_Merge ¶

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

func (*MsgUpdateOperatorParams) XXX_Size ¶

func (m *MsgUpdateOperatorParams) XXX_Size() int

func (*MsgUpdateOperatorParams) XXX_Unmarshal ¶

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

type MsgUpdateOperatorParamsResponse ¶

type MsgUpdateOperatorParamsResponse struct {
}

MsgUpdateVaultParamsResponse is the Msg/UpdateOperatorParams response type.

func (*MsgUpdateOperatorParamsResponse) Descriptor ¶

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

func (*MsgUpdateOperatorParamsResponse) Marshal ¶

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

func (*MsgUpdateOperatorParamsResponse) MarshalTo ¶

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

func (*MsgUpdateOperatorParamsResponse) MarshalToSizedBuffer ¶

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

func (*MsgUpdateOperatorParamsResponse) ProtoMessage ¶

func (*MsgUpdateOperatorParamsResponse) ProtoMessage()

func (*MsgUpdateOperatorParamsResponse) Reset ¶

func (*MsgUpdateOperatorParamsResponse) Size ¶

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

func (*MsgUpdateOperatorParamsResponse) String ¶

func (*MsgUpdateOperatorParamsResponse) Unmarshal ¶

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

func (*MsgUpdateOperatorParamsResponse) XXX_DiscardUnknown ¶

func (m *MsgUpdateOperatorParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateOperatorParamsResponse) XXX_Marshal ¶

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

func (*MsgUpdateOperatorParamsResponse) XXX_Merge ¶

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

func (*MsgUpdateOperatorParamsResponse) XXX_Size ¶

func (m *MsgUpdateOperatorParamsResponse) XXX_Size() int

func (*MsgUpdateOperatorParamsResponse) XXX_Unmarshal ¶

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

type MsgUpdateParams deprecated

type MsgUpdateParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The parameters to update. Each field must be set.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type. Deprecated since v6.x as is replaced by MsgUpdateDefaultQuotingParams.

Deprecated: Do not use.

func (*MsgUpdateParams) Descriptor ¶

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

func (*MsgUpdateParams) GetAuthority ¶

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams ¶

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal ¶

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

func (*MsgUpdateParams) MarshalTo ¶

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

func (*MsgUpdateParams) MarshalToSizedBuffer ¶

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

func (*MsgUpdateParams) ProtoMessage ¶

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset ¶

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size ¶

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

func (*MsgUpdateParams) String ¶

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal ¶

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

func (*MsgUpdateParams) XXX_DiscardUnknown ¶

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal ¶

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

func (*MsgUpdateParams) XXX_Merge ¶

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

func (*MsgUpdateParams) XXX_Size ¶

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal ¶

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

type MsgWithdrawFromMegavault ¶

type MsgWithdrawFromMegavault struct {
	// The subaccount to withdraw to.
	SubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"`
	// Number of shares to withdraw.
	Shares NumShares `protobuf:"bytes,2,opt,name=shares,proto3" json:"shares"`
	// The minimum number of quote quantums above shares should redeem, i.e.
	// transaction fails if above shares redeem less than min_quote_quantums.
	MinQuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 177-byte string literal not displayed */
}

MsgWithdrawFromMegavault withdraws the specified shares from megavault to a subaccount.

func (*MsgWithdrawFromMegavault) Descriptor ¶

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

func (*MsgWithdrawFromMegavault) GetShares ¶

func (m *MsgWithdrawFromMegavault) GetShares() NumShares

func (*MsgWithdrawFromMegavault) GetSubaccountId ¶

func (m *MsgWithdrawFromMegavault) GetSubaccountId() types.SubaccountId

func (*MsgWithdrawFromMegavault) Marshal ¶

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

func (*MsgWithdrawFromMegavault) MarshalTo ¶

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

func (*MsgWithdrawFromMegavault) MarshalToSizedBuffer ¶

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

func (*MsgWithdrawFromMegavault) ProtoMessage ¶

func (*MsgWithdrawFromMegavault) ProtoMessage()

func (*MsgWithdrawFromMegavault) Reset ¶

func (m *MsgWithdrawFromMegavault) Reset()

func (*MsgWithdrawFromMegavault) Size ¶

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

func (*MsgWithdrawFromMegavault) String ¶

func (m *MsgWithdrawFromMegavault) String() string

func (*MsgWithdrawFromMegavault) Unmarshal ¶

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

func (*MsgWithdrawFromMegavault) ValidateBasic ¶

func (msg *MsgWithdrawFromMegavault) ValidateBasic() error

ValidateBasic performs stateless validation on a MsgWithdrawFromMegavault.

func (*MsgWithdrawFromMegavault) XXX_DiscardUnknown ¶

func (m *MsgWithdrawFromMegavault) XXX_DiscardUnknown()

func (*MsgWithdrawFromMegavault) XXX_Marshal ¶

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

func (*MsgWithdrawFromMegavault) XXX_Merge ¶

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

func (*MsgWithdrawFromMegavault) XXX_Size ¶

func (m *MsgWithdrawFromMegavault) XXX_Size() int

func (*MsgWithdrawFromMegavault) XXX_Unmarshal ¶

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

type MsgWithdrawFromMegavaultResponse ¶

type MsgWithdrawFromMegavaultResponse struct {
	// The number of quote quantums redeemed from the withdrawal.
	QuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 166-byte string literal not displayed */
}

MsgWithdrawFromMegavaultResponse is the Msg/WithdrawFromMegavault response type.

func (*MsgWithdrawFromMegavaultResponse) Descriptor ¶

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

func (*MsgWithdrawFromMegavaultResponse) Marshal ¶

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

func (*MsgWithdrawFromMegavaultResponse) MarshalTo ¶

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

func (*MsgWithdrawFromMegavaultResponse) MarshalToSizedBuffer ¶

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

func (*MsgWithdrawFromMegavaultResponse) ProtoMessage ¶

func (*MsgWithdrawFromMegavaultResponse) ProtoMessage()

func (*MsgWithdrawFromMegavaultResponse) Reset ¶

func (*MsgWithdrawFromMegavaultResponse) Size ¶

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

func (*MsgWithdrawFromMegavaultResponse) String ¶

func (*MsgWithdrawFromMegavaultResponse) Unmarshal ¶

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

func (*MsgWithdrawFromMegavaultResponse) XXX_DiscardUnknown ¶

func (m *MsgWithdrawFromMegavaultResponse) XXX_DiscardUnknown()

func (*MsgWithdrawFromMegavaultResponse) XXX_Marshal ¶

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

func (*MsgWithdrawFromMegavaultResponse) XXX_Merge ¶

func (*MsgWithdrawFromMegavaultResponse) XXX_Size ¶

func (m *MsgWithdrawFromMegavaultResponse) XXX_Size() int

func (*MsgWithdrawFromMegavaultResponse) XXX_Unmarshal ¶

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

type NumShares ¶

type NumShares struct {
	// Number of shares.
	NumShares github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 154-byte string literal not displayed */
}

NumShares represents the number of shares.

func BigIntToNumShares ¶

func BigIntToNumShares(num *big.Int) (n NumShares)

BigIntToNumShares returns a NumShares given a big.Int.

func (*NumShares) Descriptor ¶

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

func (*NumShares) Marshal ¶

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

func (*NumShares) MarshalTo ¶

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

func (*NumShares) MarshalToSizedBuffer ¶

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

func (*NumShares) ProtoMessage ¶

func (*NumShares) ProtoMessage()

func (*NumShares) Reset ¶

func (m *NumShares) Reset()

func (*NumShares) Size ¶

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

func (*NumShares) String ¶

func (m *NumShares) String() string

func (*NumShares) Unmarshal ¶

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

func (*NumShares) XXX_DiscardUnknown ¶

func (m *NumShares) XXX_DiscardUnknown()

func (*NumShares) XXX_Marshal ¶

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

func (*NumShares) XXX_Merge ¶

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

func (*NumShares) XXX_Size ¶

func (m *NumShares) XXX_Size() int

func (*NumShares) XXX_Unmarshal ¶

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

type OperatorMetadata ¶

type OperatorMetadata struct {
	// Name of the operator.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the operator.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}

OperatorMetadata stores metadata regarding megavault operator.

func (*OperatorMetadata) Descriptor ¶

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

func (*OperatorMetadata) GetDescription ¶

func (m *OperatorMetadata) GetDescription() string

func (*OperatorMetadata) GetName ¶

func (m *OperatorMetadata) GetName() string

func (*OperatorMetadata) Marshal ¶

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

func (*OperatorMetadata) MarshalTo ¶

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

func (*OperatorMetadata) MarshalToSizedBuffer ¶

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

func (*OperatorMetadata) ProtoMessage ¶

func (*OperatorMetadata) ProtoMessage()

func (*OperatorMetadata) Reset ¶

func (m *OperatorMetadata) Reset()

func (*OperatorMetadata) Size ¶

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

func (*OperatorMetadata) String ¶

func (m *OperatorMetadata) String() string

func (*OperatorMetadata) Unmarshal ¶

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

func (*OperatorMetadata) XXX_DiscardUnknown ¶

func (m *OperatorMetadata) XXX_DiscardUnknown()

func (*OperatorMetadata) XXX_Marshal ¶

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

func (*OperatorMetadata) XXX_Merge ¶

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

func (*OperatorMetadata) XXX_Size ¶

func (m *OperatorMetadata) XXX_Size() int

func (*OperatorMetadata) XXX_Unmarshal ¶

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

type OperatorParams ¶

type OperatorParams struct {
	// Address of the operator.
	Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"`
	// Metadata of the operator.
	Metadata OperatorMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"`
}

OperatorParams stores parameters regarding megavault operator.

func DefaultOperatorParams ¶

func DefaultOperatorParams() OperatorParams

DefaultOperatorParams returns a default set of `x/vault` operator parameters.

func (*OperatorParams) Descriptor ¶

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

func (*OperatorParams) GetMetadata ¶

func (m *OperatorParams) GetMetadata() OperatorMetadata

func (*OperatorParams) GetOperator ¶

func (m *OperatorParams) GetOperator() string

func (*OperatorParams) Marshal ¶

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

func (*OperatorParams) MarshalTo ¶

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

func (*OperatorParams) MarshalToSizedBuffer ¶

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

func (*OperatorParams) ProtoMessage ¶

func (*OperatorParams) ProtoMessage()

func (*OperatorParams) Reset ¶

func (m *OperatorParams) Reset()

func (*OperatorParams) Size ¶

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

func (*OperatorParams) String ¶

func (m *OperatorParams) String() string

func (*OperatorParams) Unmarshal ¶

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

func (OperatorParams) Validate ¶

func (o OperatorParams) Validate() error

Validate validates OperatorParams.

func (*OperatorParams) XXX_DiscardUnknown ¶

func (m *OperatorParams) XXX_DiscardUnknown()

func (*OperatorParams) XXX_Marshal ¶

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

func (*OperatorParams) XXX_Merge ¶

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

func (*OperatorParams) XXX_Size ¶

func (m *OperatorParams) XXX_Size() int

func (*OperatorParams) XXX_Unmarshal ¶

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

type OwnerShare ¶

type OwnerShare struct {
	Owner  string    `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	Shares NumShares `protobuf:"bytes,2,opt,name=shares,proto3" json:"shares"`
}

OwnerShare is a type for owner shares.

func (*OwnerShare) Descriptor ¶

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

func (*OwnerShare) GetOwner ¶

func (m *OwnerShare) GetOwner() string

func (*OwnerShare) GetShares ¶

func (m *OwnerShare) GetShares() NumShares

func (*OwnerShare) Marshal ¶

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

func (*OwnerShare) MarshalTo ¶

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

func (*OwnerShare) MarshalToSizedBuffer ¶

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

func (*OwnerShare) ProtoMessage ¶

func (*OwnerShare) ProtoMessage()

func (*OwnerShare) Reset ¶

func (m *OwnerShare) Reset()

func (*OwnerShare) Size ¶

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

func (*OwnerShare) String ¶

func (m *OwnerShare) String() string

func (*OwnerShare) Unmarshal ¶

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

func (*OwnerShare) XXX_DiscardUnknown ¶

func (m *OwnerShare) XXX_DiscardUnknown()

func (*OwnerShare) XXX_Marshal ¶

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

func (*OwnerShare) XXX_Merge ¶

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

func (*OwnerShare) XXX_Size ¶

func (m *OwnerShare) XXX_Size() int

func (*OwnerShare) XXX_Unmarshal ¶

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

type OwnerShareUnlocks ¶

type OwnerShareUnlocks struct {
	// Address of the owner of below shares.
	OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
	// All share unlocks.
	ShareUnlocks []ShareUnlock `protobuf:"bytes,2,rep,name=share_unlocks,json=shareUnlocks,proto3" json:"share_unlocks"`
}

OwnerShareUnlocks stores share unlocks for an owner.

func (*OwnerShareUnlocks) Descriptor ¶

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

func (*OwnerShareUnlocks) GetOwnerAddress ¶

func (m *OwnerShareUnlocks) GetOwnerAddress() string

func (*OwnerShareUnlocks) GetShareUnlocks ¶

func (m *OwnerShareUnlocks) GetShareUnlocks() []ShareUnlock

func (OwnerShareUnlocks) GetTotalLockedShares ¶

func (o OwnerShareUnlocks) GetTotalLockedShares() *big.Int

func (*OwnerShareUnlocks) Marshal ¶

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

func (*OwnerShareUnlocks) MarshalTo ¶

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

func (*OwnerShareUnlocks) MarshalToSizedBuffer ¶

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

func (*OwnerShareUnlocks) ProtoMessage ¶

func (*OwnerShareUnlocks) ProtoMessage()

func (*OwnerShareUnlocks) Reset ¶

func (m *OwnerShareUnlocks) Reset()

func (*OwnerShareUnlocks) Size ¶

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

func (*OwnerShareUnlocks) String ¶

func (m *OwnerShareUnlocks) String() string

func (*OwnerShareUnlocks) Unmarshal ¶

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

func (OwnerShareUnlocks) Validate ¶

func (o OwnerShareUnlocks) Validate() error

Validate validates `OwnerShareUnlocks`.

func (*OwnerShareUnlocks) XXX_DiscardUnknown ¶

func (m *OwnerShareUnlocks) XXX_DiscardUnknown()

func (*OwnerShareUnlocks) XXX_Marshal ¶

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

func (*OwnerShareUnlocks) XXX_Merge ¶

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

func (*OwnerShareUnlocks) XXX_Size ¶

func (m *OwnerShareUnlocks) XXX_Size() int

func (*OwnerShareUnlocks) XXX_Unmarshal ¶

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

type Params deprecated

type Params struct {
	// The number of layers of orders a vault places. For example if
	// `layers=2`, a vault places 2 asks and 2 bids.
	Layers uint32 `protobuf:"varint,1,opt,name=layers,proto3" json:"layers,omitempty"`
	// The minimum base spread when a vault quotes around reservation price.
	SpreadMinPpm uint32 `protobuf:"varint,2,opt,name=spread_min_ppm,json=spreadMinPpm,proto3" json:"spread_min_ppm,omitempty"`
	// The buffer amount to add to min_price_change_ppm to arrive at `spread`
	// according to formula:
	// `spread = max(spread_min_ppm, min_price_change_ppm + spread_buffer_ppm)`.
	SpreadBufferPpm uint32 `protobuf:"varint,3,opt,name=spread_buffer_ppm,json=spreadBufferPpm,proto3" json:"spread_buffer_ppm,omitempty"`
	// The factor that determines how aggressive a vault skews its orders.
	SkewFactorPpm uint32 `protobuf:"varint,4,opt,name=skew_factor_ppm,json=skewFactorPpm,proto3" json:"skew_factor_ppm,omitempty"`
	// The percentage of vault equity that each order is sized at.
	OrderSizePctPpm uint32 `protobuf:"varint,5,opt,name=order_size_pct_ppm,json=orderSizePctPpm,proto3" json:"order_size_pct_ppm,omitempty"`
	// The duration that a vault's orders are valid for.
	OrderExpirationSeconds uint32 `` /* 130-byte string literal not displayed */
	// The number of quote quantums in quote asset that a vault with no perpetual
	// positions must have to activate, i.e. if a vault has no perpetual positions
	// and has strictly less than this amount of quote asset, it will not
	// activate.
	ActivationThresholdQuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 227-byte string literal not displayed */
}

Deprecated: Params stores `x/vault` parameters. Deprecated since v6.x as is replaced by QuotingParams.

func (*Params) Descriptor ¶

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

func (*Params) GetLayers ¶

func (m *Params) GetLayers() uint32

func (*Params) GetOrderExpirationSeconds ¶

func (m *Params) GetOrderExpirationSeconds() uint32

func (*Params) GetOrderSizePctPpm ¶

func (m *Params) GetOrderSizePctPpm() uint32

func (*Params) GetSkewFactorPpm ¶

func (m *Params) GetSkewFactorPpm() uint32

func (*Params) GetSpreadBufferPpm ¶

func (m *Params) GetSpreadBufferPpm() uint32

func (*Params) GetSpreadMinPpm ¶

func (m *Params) GetSpreadMinPpm() uint32

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 PerpetualsKeeper ¶

type PerpetualsKeeper interface {
	GetPerpetual(
		ctx sdk.Context,
		id uint32,
	) (val perptypes.Perpetual, err error)
	GetLiquidityTier(
		ctx sdk.Context,
		id uint32,
	) (val perptypes.LiquidityTier, err error)
}

type PricesKeeper ¶

type PricesKeeper interface {
	GetMarketParam(
		ctx sdk.Context,
		id uint32,
	) (market pricestypes.MarketParam, exists bool)
	GetMarketPrice(
		ctx sdk.Context,
		id uint32,
	) (pricestypes.MarketPrice, error)
}

type QueryAllVaultsRequest ¶

type QueryAllVaultsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllVaultsRequest is a request type for the AllVaults RPC method.

func (*QueryAllVaultsRequest) Descriptor ¶

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

func (*QueryAllVaultsRequest) GetPagination ¶

func (m *QueryAllVaultsRequest) GetPagination() *query.PageRequest

func (*QueryAllVaultsRequest) Marshal ¶

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

func (*QueryAllVaultsRequest) MarshalTo ¶

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

func (*QueryAllVaultsRequest) MarshalToSizedBuffer ¶

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

func (*QueryAllVaultsRequest) ProtoMessage ¶

func (*QueryAllVaultsRequest) ProtoMessage()

func (*QueryAllVaultsRequest) Reset ¶

func (m *QueryAllVaultsRequest) Reset()

func (*QueryAllVaultsRequest) Size ¶

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

func (*QueryAllVaultsRequest) String ¶

func (m *QueryAllVaultsRequest) String() string

func (*QueryAllVaultsRequest) Unmarshal ¶

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

func (*QueryAllVaultsRequest) XXX_DiscardUnknown ¶

func (m *QueryAllVaultsRequest) XXX_DiscardUnknown()

func (*QueryAllVaultsRequest) XXX_Marshal ¶

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

func (*QueryAllVaultsRequest) XXX_Merge ¶

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

func (*QueryAllVaultsRequest) XXX_Size ¶

func (m *QueryAllVaultsRequest) XXX_Size() int

func (*QueryAllVaultsRequest) XXX_Unmarshal ¶

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

type QueryAllVaultsResponse ¶

type QueryAllVaultsResponse struct {
	Vaults     []*QueryVaultResponse `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults,omitempty"`
	Pagination *query.PageResponse   `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllVaultsResponse is a response type for the AllVaults RPC method.

func (*QueryAllVaultsResponse) Descriptor ¶

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

func (*QueryAllVaultsResponse) GetPagination ¶

func (m *QueryAllVaultsResponse) GetPagination() *query.PageResponse

func (*QueryAllVaultsResponse) GetVaults ¶

func (m *QueryAllVaultsResponse) GetVaults() []*QueryVaultResponse

func (*QueryAllVaultsResponse) Marshal ¶

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

func (*QueryAllVaultsResponse) MarshalTo ¶

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

func (*QueryAllVaultsResponse) MarshalToSizedBuffer ¶

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

func (*QueryAllVaultsResponse) ProtoMessage ¶

func (*QueryAllVaultsResponse) ProtoMessage()

func (*QueryAllVaultsResponse) Reset ¶

func (m *QueryAllVaultsResponse) Reset()

func (*QueryAllVaultsResponse) Size ¶

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

func (*QueryAllVaultsResponse) String ¶

func (m *QueryAllVaultsResponse) String() string

func (*QueryAllVaultsResponse) Unmarshal ¶

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

func (*QueryAllVaultsResponse) XXX_DiscardUnknown ¶

func (m *QueryAllVaultsResponse) XXX_DiscardUnknown()

func (*QueryAllVaultsResponse) XXX_Marshal ¶

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

func (*QueryAllVaultsResponse) XXX_Merge ¶

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

func (*QueryAllVaultsResponse) XXX_Size ¶

func (m *QueryAllVaultsResponse) XXX_Size() int

func (*QueryAllVaultsResponse) XXX_Unmarshal ¶

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

type QueryClient ¶

type QueryClient interface {
	// Queries the Params.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a Vault by type and number.
	Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error)
	// Queries all vaults.
	AllVaults(ctx context.Context, in *QueryAllVaultsRequest, opts ...grpc.CallOption) (*QueryAllVaultsResponse, error)
	// Queries total shares of megavault.
	MegavaultTotalShares(ctx context.Context, in *QueryMegavaultTotalSharesRequest, opts ...grpc.CallOption) (*QueryMegavaultTotalSharesResponse, error)
	// Queries owner shares of megavault.
	MegavaultOwnerShares(ctx context.Context, in *QueryMegavaultOwnerSharesRequest, opts ...grpc.CallOption) (*QueryMegavaultOwnerSharesResponse, error)
	// Queries all owner shares of megavault.
	MegavaultAllOwnerShares(ctx context.Context, in *QueryMegavaultAllOwnerSharesRequest, opts ...grpc.CallOption) (*QueryMegavaultAllOwnerSharesResponse, error)
	// Queries vault params of a vault.
	VaultParams(ctx context.Context, in *QueryVaultParamsRequest, opts ...grpc.CallOption) (*QueryVaultParamsResponse, error)
	// Queries withdrawal info for megavault.
	MegavaultWithdrawalInfo(ctx context.Context, in *QueryMegavaultWithdrawalInfoRequest, opts ...grpc.CallOption) (*QueryMegavaultWithdrawalInfoResponse, 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 QueryMegavaultAllOwnerSharesRequest ¶

type QueryMegavaultAllOwnerSharesRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryMegavaultAllOwnerSharesRequest is a request type for the MegavaultAllOwnerShares RPC method.

func (*QueryMegavaultAllOwnerSharesRequest) Descriptor ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) GetPagination ¶

func (*QueryMegavaultAllOwnerSharesRequest) Marshal ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) MarshalTo ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) ProtoMessage ¶

func (*QueryMegavaultAllOwnerSharesRequest) ProtoMessage()

func (*QueryMegavaultAllOwnerSharesRequest) Reset ¶

func (*QueryMegavaultAllOwnerSharesRequest) Size ¶

func (*QueryMegavaultAllOwnerSharesRequest) String ¶

func (*QueryMegavaultAllOwnerSharesRequest) Unmarshal ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) XXX_DiscardUnknown ¶

func (m *QueryMegavaultAllOwnerSharesRequest) XXX_DiscardUnknown()

func (*QueryMegavaultAllOwnerSharesRequest) XXX_Marshal ¶

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

func (*QueryMegavaultAllOwnerSharesRequest) XXX_Merge ¶

func (*QueryMegavaultAllOwnerSharesRequest) XXX_Size ¶

func (*QueryMegavaultAllOwnerSharesRequest) XXX_Unmarshal ¶

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

type QueryMegavaultAllOwnerSharesResponse ¶

type QueryMegavaultAllOwnerSharesResponse struct {
	OwnerShares []*OwnerShare       `protobuf:"bytes,1,rep,name=owner_shares,json=ownerShares,proto3" json:"owner_shares,omitempty"`
	Pagination  *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryMegavaultAllOwnerSharesResponse is a response type for the MegavaultAllOwnerShares RPC method.

func (*QueryMegavaultAllOwnerSharesResponse) Descriptor ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) GetOwnerShares ¶

func (m *QueryMegavaultAllOwnerSharesResponse) GetOwnerShares() []*OwnerShare

func (*QueryMegavaultAllOwnerSharesResponse) GetPagination ¶

func (*QueryMegavaultAllOwnerSharesResponse) Marshal ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) MarshalTo ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) ProtoMessage ¶

func (*QueryMegavaultAllOwnerSharesResponse) ProtoMessage()

func (*QueryMegavaultAllOwnerSharesResponse) Reset ¶

func (*QueryMegavaultAllOwnerSharesResponse) Size ¶

func (*QueryMegavaultAllOwnerSharesResponse) String ¶

func (*QueryMegavaultAllOwnerSharesResponse) Unmarshal ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) XXX_DiscardUnknown ¶

func (m *QueryMegavaultAllOwnerSharesResponse) XXX_DiscardUnknown()

func (*QueryMegavaultAllOwnerSharesResponse) XXX_Marshal ¶

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

func (*QueryMegavaultAllOwnerSharesResponse) XXX_Merge ¶

func (*QueryMegavaultAllOwnerSharesResponse) XXX_Size ¶

func (*QueryMegavaultAllOwnerSharesResponse) XXX_Unmarshal ¶

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

type QueryMegavaultOwnerSharesRequest ¶

type QueryMegavaultOwnerSharesRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryMegavaultOwnerSharesRequest is a request type for the MegavaultOwnerShares RPC method.

func (*QueryMegavaultOwnerSharesRequest) Descriptor ¶

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

func (*QueryMegavaultOwnerSharesRequest) GetAddress ¶

func (m *QueryMegavaultOwnerSharesRequest) GetAddress() string

func (*QueryMegavaultOwnerSharesRequest) Marshal ¶

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

func (*QueryMegavaultOwnerSharesRequest) MarshalTo ¶

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

func (*QueryMegavaultOwnerSharesRequest) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultOwnerSharesRequest) ProtoMessage ¶

func (*QueryMegavaultOwnerSharesRequest) ProtoMessage()

func (*QueryMegavaultOwnerSharesRequest) Reset ¶

func (*QueryMegavaultOwnerSharesRequest) Size ¶

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

func (*QueryMegavaultOwnerSharesRequest) String ¶

func (*QueryMegavaultOwnerSharesRequest) Unmarshal ¶

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

func (*QueryMegavaultOwnerSharesRequest) XXX_DiscardUnknown ¶

func (m *QueryMegavaultOwnerSharesRequest) XXX_DiscardUnknown()

func (*QueryMegavaultOwnerSharesRequest) XXX_Marshal ¶

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

func (*QueryMegavaultOwnerSharesRequest) XXX_Merge ¶

func (*QueryMegavaultOwnerSharesRequest) XXX_Size ¶

func (m *QueryMegavaultOwnerSharesRequest) XXX_Size() int

func (*QueryMegavaultOwnerSharesRequest) XXX_Unmarshal ¶

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

type QueryMegavaultOwnerSharesResponse ¶

type QueryMegavaultOwnerSharesResponse struct {
	// Owner address.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Total number of shares that belong to the owner.
	Shares NumShares `protobuf:"bytes,2,opt,name=shares,proto3" json:"shares"`
	// All share unlocks.
	ShareUnlocks []ShareUnlock `protobuf:"bytes,3,rep,name=share_unlocks,json=shareUnlocks,proto3" json:"share_unlocks"`
	// Owner equity in megavault (in quote quantums).
	Equity github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 131-byte string literal not displayed */
	// Equity that owner can withdraw in quote quantums (as one cannot
	// withdraw locked shares).
	WithdrawableEquity github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 181-byte string literal not displayed */
}

QueryMegavaultOwnerSharesResponse is a response type for the MegavaultOwnerShares RPC method.

func (*QueryMegavaultOwnerSharesResponse) Descriptor ¶

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

func (*QueryMegavaultOwnerSharesResponse) GetAddress ¶

func (m *QueryMegavaultOwnerSharesResponse) GetAddress() string

func (*QueryMegavaultOwnerSharesResponse) GetShareUnlocks ¶

func (m *QueryMegavaultOwnerSharesResponse) GetShareUnlocks() []ShareUnlock

func (*QueryMegavaultOwnerSharesResponse) GetShares ¶

func (*QueryMegavaultOwnerSharesResponse) Marshal ¶

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

func (*QueryMegavaultOwnerSharesResponse) MarshalTo ¶

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

func (*QueryMegavaultOwnerSharesResponse) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultOwnerSharesResponse) ProtoMessage ¶

func (*QueryMegavaultOwnerSharesResponse) ProtoMessage()

func (*QueryMegavaultOwnerSharesResponse) Reset ¶

func (*QueryMegavaultOwnerSharesResponse) Size ¶

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

func (*QueryMegavaultOwnerSharesResponse) String ¶

func (*QueryMegavaultOwnerSharesResponse) Unmarshal ¶

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

func (*QueryMegavaultOwnerSharesResponse) XXX_DiscardUnknown ¶

func (m *QueryMegavaultOwnerSharesResponse) XXX_DiscardUnknown()

func (*QueryMegavaultOwnerSharesResponse) XXX_Marshal ¶

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

func (*QueryMegavaultOwnerSharesResponse) XXX_Merge ¶

func (*QueryMegavaultOwnerSharesResponse) XXX_Size ¶

func (m *QueryMegavaultOwnerSharesResponse) XXX_Size() int

func (*QueryMegavaultOwnerSharesResponse) XXX_Unmarshal ¶

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

type QueryMegavaultTotalSharesRequest ¶

type QueryMegavaultTotalSharesRequest struct {
}

QueryMegavaultTotalSharesRequest is a request type for the MegavaultTotalShares RPC method.

func (*QueryMegavaultTotalSharesRequest) Descriptor ¶

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

func (*QueryMegavaultTotalSharesRequest) Marshal ¶

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

func (*QueryMegavaultTotalSharesRequest) MarshalTo ¶

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

func (*QueryMegavaultTotalSharesRequest) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultTotalSharesRequest) ProtoMessage ¶

func (*QueryMegavaultTotalSharesRequest) ProtoMessage()

func (*QueryMegavaultTotalSharesRequest) Reset ¶

func (*QueryMegavaultTotalSharesRequest) Size ¶

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

func (*QueryMegavaultTotalSharesRequest) String ¶

func (*QueryMegavaultTotalSharesRequest) Unmarshal ¶

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

func (*QueryMegavaultTotalSharesRequest) XXX_DiscardUnknown ¶

func (m *QueryMegavaultTotalSharesRequest) XXX_DiscardUnknown()

func (*QueryMegavaultTotalSharesRequest) XXX_Marshal ¶

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

func (*QueryMegavaultTotalSharesRequest) XXX_Merge ¶

func (*QueryMegavaultTotalSharesRequest) XXX_Size ¶

func (m *QueryMegavaultTotalSharesRequest) XXX_Size() int

func (*QueryMegavaultTotalSharesRequest) XXX_Unmarshal ¶

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

type QueryMegavaultTotalSharesResponse ¶

type QueryMegavaultTotalSharesResponse struct {
	TotalShares *NumShares `protobuf:"bytes,1,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"`
}

QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method.

func (*QueryMegavaultTotalSharesResponse) Descriptor ¶

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

func (*QueryMegavaultTotalSharesResponse) GetTotalShares ¶

func (m *QueryMegavaultTotalSharesResponse) GetTotalShares() *NumShares

func (*QueryMegavaultTotalSharesResponse) Marshal ¶

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

func (*QueryMegavaultTotalSharesResponse) MarshalTo ¶

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

func (*QueryMegavaultTotalSharesResponse) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultTotalSharesResponse) ProtoMessage ¶

func (*QueryMegavaultTotalSharesResponse) ProtoMessage()

func (*QueryMegavaultTotalSharesResponse) Reset ¶

func (*QueryMegavaultTotalSharesResponse) Size ¶

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

func (*QueryMegavaultTotalSharesResponse) String ¶

func (*QueryMegavaultTotalSharesResponse) Unmarshal ¶

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

func (*QueryMegavaultTotalSharesResponse) XXX_DiscardUnknown ¶

func (m *QueryMegavaultTotalSharesResponse) XXX_DiscardUnknown()

func (*QueryMegavaultTotalSharesResponse) XXX_Marshal ¶

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

func (*QueryMegavaultTotalSharesResponse) XXX_Merge ¶

func (*QueryMegavaultTotalSharesResponse) XXX_Size ¶

func (m *QueryMegavaultTotalSharesResponse) XXX_Size() int

func (*QueryMegavaultTotalSharesResponse) XXX_Unmarshal ¶

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

type QueryMegavaultWithdrawalInfoRequest ¶

type QueryMegavaultWithdrawalInfoRequest struct {
	// Number of shares to withdraw.
	SharesToWithdraw NumShares `protobuf:"bytes,1,opt,name=shares_to_withdraw,json=sharesToWithdraw,proto3" json:"shares_to_withdraw"`
}

QueryMegavaultWithdrawalInfoRequest is a request type for the MegavaultWithdrawalInfo RPC method.

func (*QueryMegavaultWithdrawalInfoRequest) Descriptor ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) GetSharesToWithdraw ¶

func (m *QueryMegavaultWithdrawalInfoRequest) GetSharesToWithdraw() NumShares

func (*QueryMegavaultWithdrawalInfoRequest) Marshal ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) MarshalTo ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) ProtoMessage ¶

func (*QueryMegavaultWithdrawalInfoRequest) ProtoMessage()

func (*QueryMegavaultWithdrawalInfoRequest) Reset ¶

func (*QueryMegavaultWithdrawalInfoRequest) Size ¶

func (*QueryMegavaultWithdrawalInfoRequest) String ¶

func (*QueryMegavaultWithdrawalInfoRequest) Unmarshal ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) XXX_DiscardUnknown ¶

func (m *QueryMegavaultWithdrawalInfoRequest) XXX_DiscardUnknown()

func (*QueryMegavaultWithdrawalInfoRequest) XXX_Marshal ¶

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

func (*QueryMegavaultWithdrawalInfoRequest) XXX_Merge ¶

func (*QueryMegavaultWithdrawalInfoRequest) XXX_Size ¶

func (*QueryMegavaultWithdrawalInfoRequest) XXX_Unmarshal ¶

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

type QueryMegavaultWithdrawalInfoResponse ¶

type QueryMegavaultWithdrawalInfoResponse struct {
	// Number of shares to withdraw.
	SharesToWithdraw NumShares `protobuf:"bytes,1,opt,name=shares_to_withdraw,json=sharesToWithdraw,proto3" json:"shares_to_withdraw"`
	// Number of quote quantums above `shares` are expected to redeem.
	// Withdrawl slippage can be calculated by comparing
	// `expected_quote_quantums` with
	// `megavault_equity * shares_to_withdraw / total_shares`
	ExpectedQuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 192-byte string literal not displayed */
	// Equity of megavault (in quote quantums).
	MegavaultEquity github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 172-byte string literal not displayed */
	// Total shares in megavault.
	TotalShares NumShares `protobuf:"bytes,4,opt,name=total_shares,json=totalShares,proto3" json:"total_shares"`
}

QueryMegavaultWithdrawalInfoResponse is a response type for the MegavaultWithdrawalInfo RPC method.

func (*QueryMegavaultWithdrawalInfoResponse) Descriptor ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) GetSharesToWithdraw ¶

func (m *QueryMegavaultWithdrawalInfoResponse) GetSharesToWithdraw() NumShares

func (*QueryMegavaultWithdrawalInfoResponse) GetTotalShares ¶

func (m *QueryMegavaultWithdrawalInfoResponse) GetTotalShares() NumShares

func (*QueryMegavaultWithdrawalInfoResponse) Marshal ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) MarshalTo ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) MarshalToSizedBuffer ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) ProtoMessage ¶

func (*QueryMegavaultWithdrawalInfoResponse) ProtoMessage()

func (*QueryMegavaultWithdrawalInfoResponse) Reset ¶

func (*QueryMegavaultWithdrawalInfoResponse) Size ¶

func (*QueryMegavaultWithdrawalInfoResponse) String ¶

func (*QueryMegavaultWithdrawalInfoResponse) Unmarshal ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) XXX_DiscardUnknown ¶

func (m *QueryMegavaultWithdrawalInfoResponse) XXX_DiscardUnknown()

func (*QueryMegavaultWithdrawalInfoResponse) XXX_Marshal ¶

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

func (*QueryMegavaultWithdrawalInfoResponse) XXX_Merge ¶

func (*QueryMegavaultWithdrawalInfoResponse) XXX_Size ¶

func (*QueryMegavaultWithdrawalInfoResponse) XXX_Unmarshal ¶

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

type QueryParamsRequest ¶

type QueryParamsRequest struct {
}

QueryParamsRequest is a request type for the 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 {
	DefaultQuotingParams QuotingParams  `protobuf:"bytes,1,opt,name=default_quoting_params,json=defaultQuotingParams,proto3" json:"default_quoting_params"`
	OperatorParams       OperatorParams `protobuf:"bytes,2,opt,name=operator_params,json=operatorParams,proto3" json:"operator_params"`
}

QueryParamsResponse is a response type for the Params RPC method.

func (*QueryParamsResponse) Descriptor ¶

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

func (*QueryParamsResponse) GetDefaultQuotingParams ¶

func (m *QueryParamsResponse) GetDefaultQuotingParams() QuotingParams

func (*QueryParamsResponse) GetOperatorParams ¶

func (m *QueryParamsResponse) GetOperatorParams() OperatorParams

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 {
	// Queries the Params.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a Vault by type and number.
	Vault(context.Context, *QueryVaultRequest) (*QueryVaultResponse, error)
	// Queries all vaults.
	AllVaults(context.Context, *QueryAllVaultsRequest) (*QueryAllVaultsResponse, error)
	// Queries total shares of megavault.
	MegavaultTotalShares(context.Context, *QueryMegavaultTotalSharesRequest) (*QueryMegavaultTotalSharesResponse, error)
	// Queries owner shares of megavault.
	MegavaultOwnerShares(context.Context, *QueryMegavaultOwnerSharesRequest) (*QueryMegavaultOwnerSharesResponse, error)
	// Queries all owner shares of megavault.
	MegavaultAllOwnerShares(context.Context, *QueryMegavaultAllOwnerSharesRequest) (*QueryMegavaultAllOwnerSharesResponse, error)
	// Queries vault params of a vault.
	VaultParams(context.Context, *QueryVaultParamsRequest) (*QueryVaultParamsResponse, error)
	// Queries withdrawal info for megavault.
	MegavaultWithdrawalInfo(context.Context, *QueryMegavaultWithdrawalInfoRequest) (*QueryMegavaultWithdrawalInfoResponse, error)
}

QueryServer is the server API for Query service.

type QueryVaultParamsRequest ¶

type QueryVaultParamsRequest struct {
	Type   VaultType `protobuf:"varint,1,opt,name=type,proto3,enum=dydxprotocol.vault.VaultType" json:"type,omitempty"`
	Number uint32    `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
}

QueryVaultParamsRequest is a request for the VaultParams RPC method.

func (*QueryVaultParamsRequest) Descriptor ¶

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

func (*QueryVaultParamsRequest) GetNumber ¶

func (m *QueryVaultParamsRequest) GetNumber() uint32

func (*QueryVaultParamsRequest) GetType ¶

func (m *QueryVaultParamsRequest) GetType() VaultType

func (*QueryVaultParamsRequest) Marshal ¶

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

func (*QueryVaultParamsRequest) MarshalTo ¶

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

func (*QueryVaultParamsRequest) MarshalToSizedBuffer ¶

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

func (*QueryVaultParamsRequest) ProtoMessage ¶

func (*QueryVaultParamsRequest) ProtoMessage()

func (*QueryVaultParamsRequest) Reset ¶

func (m *QueryVaultParamsRequest) Reset()

func (*QueryVaultParamsRequest) Size ¶

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

func (*QueryVaultParamsRequest) String ¶

func (m *QueryVaultParamsRequest) String() string

func (*QueryVaultParamsRequest) Unmarshal ¶

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

func (*QueryVaultParamsRequest) XXX_DiscardUnknown ¶

func (m *QueryVaultParamsRequest) XXX_DiscardUnknown()

func (*QueryVaultParamsRequest) XXX_Marshal ¶

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

func (*QueryVaultParamsRequest) XXX_Merge ¶

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

func (*QueryVaultParamsRequest) XXX_Size ¶

func (m *QueryVaultParamsRequest) XXX_Size() int

func (*QueryVaultParamsRequest) XXX_Unmarshal ¶

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

type QueryVaultParamsResponse ¶

type QueryVaultParamsResponse struct {
	VaultId     VaultId     `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	VaultParams VaultParams `protobuf:"bytes,2,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"`
}

QueryVaultParamsResponse is a response for the VaultParams RPC method.

func (*QueryVaultParamsResponse) Descriptor ¶

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

func (*QueryVaultParamsResponse) GetVaultId ¶

func (m *QueryVaultParamsResponse) GetVaultId() VaultId

func (*QueryVaultParamsResponse) GetVaultParams ¶

func (m *QueryVaultParamsResponse) GetVaultParams() VaultParams

func (*QueryVaultParamsResponse) Marshal ¶

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

func (*QueryVaultParamsResponse) MarshalTo ¶

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

func (*QueryVaultParamsResponse) MarshalToSizedBuffer ¶

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

func (*QueryVaultParamsResponse) ProtoMessage ¶

func (*QueryVaultParamsResponse) ProtoMessage()

func (*QueryVaultParamsResponse) Reset ¶

func (m *QueryVaultParamsResponse) Reset()

func (*QueryVaultParamsResponse) Size ¶

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

func (*QueryVaultParamsResponse) String ¶

func (m *QueryVaultParamsResponse) String() string

func (*QueryVaultParamsResponse) Unmarshal ¶

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

func (*QueryVaultParamsResponse) XXX_DiscardUnknown ¶

func (m *QueryVaultParamsResponse) XXX_DiscardUnknown()

func (*QueryVaultParamsResponse) XXX_Marshal ¶

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

func (*QueryVaultParamsResponse) XXX_Merge ¶

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

func (*QueryVaultParamsResponse) XXX_Size ¶

func (m *QueryVaultParamsResponse) XXX_Size() int

func (*QueryVaultParamsResponse) XXX_Unmarshal ¶

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

type QueryVaultRequest ¶

type QueryVaultRequest struct {
	Type   VaultType `protobuf:"varint,1,opt,name=type,proto3,enum=dydxprotocol.vault.VaultType" json:"type,omitempty"`
	Number uint32    `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
}

QueryVaultRequest is a request type for the Vault RPC method.

func (*QueryVaultRequest) Descriptor ¶

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

func (*QueryVaultRequest) GetNumber ¶

func (m *QueryVaultRequest) GetNumber() uint32

func (*QueryVaultRequest) GetType ¶

func (m *QueryVaultRequest) GetType() VaultType

func (*QueryVaultRequest) Marshal ¶

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

func (*QueryVaultRequest) MarshalTo ¶

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

func (*QueryVaultRequest) MarshalToSizedBuffer ¶

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

func (*QueryVaultRequest) ProtoMessage ¶

func (*QueryVaultRequest) ProtoMessage()

func (*QueryVaultRequest) Reset ¶

func (m *QueryVaultRequest) Reset()

func (*QueryVaultRequest) Size ¶

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

func (*QueryVaultRequest) String ¶

func (m *QueryVaultRequest) String() string

func (*QueryVaultRequest) Unmarshal ¶

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

func (*QueryVaultRequest) XXX_DiscardUnknown ¶

func (m *QueryVaultRequest) XXX_DiscardUnknown()

func (*QueryVaultRequest) XXX_Marshal ¶

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

func (*QueryVaultRequest) XXX_Merge ¶

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

func (*QueryVaultRequest) XXX_Size ¶

func (m *QueryVaultRequest) XXX_Size() int

func (*QueryVaultRequest) XXX_Unmarshal ¶

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

type QueryVaultResponse ¶

type QueryVaultResponse struct {
	VaultId             VaultId                                                          `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	SubaccountId        types.SubaccountId                                               `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"`
	Equity              github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 131-byte string literal not displayed */
	Inventory           github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 137-byte string literal not displayed */
	VaultParams         VaultParams                                                      `protobuf:"bytes,5,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"`
	MostRecentClientIds []uint32                                                         `` /* 130-byte string literal not displayed */
}

QueryVaultResponse is a response type for the Vault RPC method.

func (*QueryVaultResponse) Descriptor ¶

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

func (*QueryVaultResponse) GetMostRecentClientIds ¶

func (m *QueryVaultResponse) GetMostRecentClientIds() []uint32

func (*QueryVaultResponse) GetSubaccountId ¶

func (m *QueryVaultResponse) GetSubaccountId() types.SubaccountId

func (*QueryVaultResponse) GetVaultId ¶

func (m *QueryVaultResponse) GetVaultId() VaultId

func (*QueryVaultResponse) GetVaultParams ¶

func (m *QueryVaultResponse) GetVaultParams() VaultParams

func (*QueryVaultResponse) Marshal ¶

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

func (*QueryVaultResponse) MarshalTo ¶

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

func (*QueryVaultResponse) MarshalToSizedBuffer ¶

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

func (*QueryVaultResponse) ProtoMessage ¶

func (*QueryVaultResponse) ProtoMessage()

func (*QueryVaultResponse) Reset ¶

func (m *QueryVaultResponse) Reset()

func (*QueryVaultResponse) Size ¶

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

func (*QueryVaultResponse) String ¶

func (m *QueryVaultResponse) String() string

func (*QueryVaultResponse) Unmarshal ¶

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

func (*QueryVaultResponse) XXX_DiscardUnknown ¶

func (m *QueryVaultResponse) XXX_DiscardUnknown()

func (*QueryVaultResponse) XXX_Marshal ¶

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

func (*QueryVaultResponse) XXX_Merge ¶

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

func (*QueryVaultResponse) XXX_Size ¶

func (m *QueryVaultResponse) XXX_Size() int

func (*QueryVaultResponse) XXX_Unmarshal ¶

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

type QuotingParams ¶

type QuotingParams struct {
	// The number of layers of orders a vault places. For example if
	// `layers=2`, a vault places 2 asks and 2 bids.
	Layers uint32 `protobuf:"varint,1,opt,name=layers,proto3" json:"layers,omitempty"`
	// The minimum base spread when a vault quotes around reservation price.
	SpreadMinPpm uint32 `protobuf:"varint,2,opt,name=spread_min_ppm,json=spreadMinPpm,proto3" json:"spread_min_ppm,omitempty"`
	// The buffer amount to add to min_price_change_ppm to arrive at `spread`
	// according to formula:
	// `spread = max(spread_min_ppm, min_price_change_ppm + spread_buffer_ppm)`.
	SpreadBufferPpm uint32 `protobuf:"varint,3,opt,name=spread_buffer_ppm,json=spreadBufferPpm,proto3" json:"spread_buffer_ppm,omitempty"`
	// The factor that determines how aggressive a vault skews its orders.
	SkewFactorPpm uint32 `protobuf:"varint,4,opt,name=skew_factor_ppm,json=skewFactorPpm,proto3" json:"skew_factor_ppm,omitempty"`
	// The percentage of vault equity that each order is sized at.
	OrderSizePctPpm uint32 `protobuf:"varint,5,opt,name=order_size_pct_ppm,json=orderSizePctPpm,proto3" json:"order_size_pct_ppm,omitempty"`
	// The duration that a vault's orders are valid for.
	OrderExpirationSeconds uint32 `` /* 130-byte string literal not displayed */
	// The number of quote quantums in quote asset that a vault with no perpetual
	// positions must have to activate, i.e. if a vault has no perpetual positions
	// and has strictly less than this amount of quote asset, it will not
	// activate.
	ActivationThresholdQuoteQuantums github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `` /* 227-byte string literal not displayed */
}

QuotingParams stores vault quoting parameters.

func DefaultQuotingParams ¶

func DefaultQuotingParams() QuotingParams

DefaultQuotingParams returns a default set of `x/vault` parameters.

func (*QuotingParams) Descriptor ¶

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

func (*QuotingParams) GetLayers ¶

func (m *QuotingParams) GetLayers() uint32

func (*QuotingParams) GetOrderExpirationSeconds ¶

func (m *QuotingParams) GetOrderExpirationSeconds() uint32

func (*QuotingParams) GetOrderSizePctPpm ¶

func (m *QuotingParams) GetOrderSizePctPpm() uint32

func (*QuotingParams) GetSkewFactorPpm ¶

func (m *QuotingParams) GetSkewFactorPpm() uint32

func (*QuotingParams) GetSpreadBufferPpm ¶

func (m *QuotingParams) GetSpreadBufferPpm() uint32

func (*QuotingParams) GetSpreadMinPpm ¶

func (m *QuotingParams) GetSpreadMinPpm() uint32

func (*QuotingParams) Marshal ¶

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

func (*QuotingParams) MarshalTo ¶

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

func (*QuotingParams) MarshalToSizedBuffer ¶

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

func (*QuotingParams) ProtoMessage ¶

func (*QuotingParams) ProtoMessage()

func (*QuotingParams) Reset ¶

func (m *QuotingParams) Reset()

func (*QuotingParams) Size ¶

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

func (*QuotingParams) String ¶

func (m *QuotingParams) String() string

func (*QuotingParams) Unmarshal ¶

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

func (QuotingParams) Validate ¶

func (p QuotingParams) Validate() error

Validate validates `x/vault` parameters.

func (*QuotingParams) XXX_DiscardUnknown ¶

func (m *QuotingParams) XXX_DiscardUnknown()

func (*QuotingParams) XXX_Marshal ¶

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

func (*QuotingParams) XXX_Merge ¶

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

func (*QuotingParams) XXX_Size ¶

func (m *QuotingParams) XXX_Size() int

func (*QuotingParams) XXX_Unmarshal ¶

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

type SendingKeeper ¶

type SendingKeeper interface {
	ProcessTransfer(
		ctx sdk.Context,
		pendingTransfer *sendingtypes.Transfer,
	) (err error)
}

type ShareUnlock ¶

type ShareUnlock struct {
	// Number of shares to unlock.
	Shares NumShares `protobuf:"bytes,1,opt,name=shares,proto3" json:"shares"`
	// Block height at which above shares unlock.
	UnlockBlockHeight uint32 `protobuf:"varint,2,opt,name=unlock_block_height,json=unlockBlockHeight,proto3" json:"unlock_block_height,omitempty"`
}

ShareUnlock stores a single instance of `shares` number of shares unlocking at block height `unlock_block_height`.

func (*ShareUnlock) Descriptor ¶

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

func (*ShareUnlock) GetShares ¶

func (m *ShareUnlock) GetShares() NumShares

func (*ShareUnlock) GetUnlockBlockHeight ¶

func (m *ShareUnlock) GetUnlockBlockHeight() uint32

func (*ShareUnlock) Marshal ¶

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

func (*ShareUnlock) MarshalTo ¶

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

func (*ShareUnlock) MarshalToSizedBuffer ¶

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

func (*ShareUnlock) ProtoMessage ¶

func (*ShareUnlock) ProtoMessage()

func (*ShareUnlock) Reset ¶

func (m *ShareUnlock) Reset()

func (*ShareUnlock) Size ¶

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

func (*ShareUnlock) String ¶

func (m *ShareUnlock) String() string

func (*ShareUnlock) Unmarshal ¶

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

func (*ShareUnlock) XXX_DiscardUnknown ¶

func (m *ShareUnlock) XXX_DiscardUnknown()

func (*ShareUnlock) XXX_Marshal ¶

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

func (*ShareUnlock) XXX_Merge ¶

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

func (*ShareUnlock) XXX_Size ¶

func (m *ShareUnlock) XXX_Size() int

func (*ShareUnlock) XXX_Unmarshal ¶

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

type SubaccountsKeeper ¶

type SubaccountsKeeper interface {
	DepositFundsFromAccountToSubaccount(
		ctx sdk.Context,
		fromAccount sdk.AccAddress,
		toSubaccountId satypes.SubaccountId,
		assetId uint32,
		quantums *big.Int,
	) error
	GetNetCollateralAndMarginRequirements(
		ctx sdk.Context,
		update satypes.Update,
	) (
		risk margin.Risk,
		err error,
	)
	GetSubaccount(
		ctx sdk.Context,
		id satypes.SubaccountId,
	) satypes.Subaccount
}

type UnimplementedMsgServer ¶

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AllocateToVault ¶

func (*UnimplementedMsgServer) DepositToMegavault ¶

func (*UnimplementedMsgServer) RetrieveFromVault ¶

func (*UnimplementedMsgServer) SetVaultParams ¶

func (*UnimplementedMsgServer) UnlockShares ¶

func (*UnimplementedMsgServer) UpdateOperatorParams ¶

func (*UnimplementedMsgServer) WithdrawFromMegavault ¶

type UnimplementedQueryServer ¶

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllVaults ¶

func (*UnimplementedQueryServer) Params ¶

func (*UnimplementedQueryServer) Vault ¶

func (*UnimplementedQueryServer) VaultParams ¶

type Vault ¶

type Vault struct {
	// The ID of the vault.
	VaultId VaultId `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"`
	// The parameters of the vault.
	VaultParams VaultParams `protobuf:"bytes,2,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"`
	// The client IDs of the most recently placed orders of the vault.
	MostRecentClientIds []uint32 `` /* 130-byte string literal not displayed */
}

Vault defines the state of a vault.

func (*Vault) Descriptor ¶

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

func (*Vault) GetMostRecentClientIds ¶

func (m *Vault) GetMostRecentClientIds() []uint32

func (*Vault) GetVaultId ¶

func (m *Vault) GetVaultId() VaultId

func (*Vault) GetVaultParams ¶

func (m *Vault) GetVaultParams() VaultParams

func (*Vault) Marshal ¶

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

func (*Vault) MarshalTo ¶

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

func (*Vault) MarshalToSizedBuffer ¶

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

func (*Vault) ProtoMessage ¶

func (*Vault) ProtoMessage()

func (*Vault) Reset ¶

func (m *Vault) Reset()

func (*Vault) Size ¶

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

func (*Vault) String ¶

func (m *Vault) String() string

func (*Vault) Unmarshal ¶

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

func (*Vault) XXX_DiscardUnknown ¶

func (m *Vault) XXX_DiscardUnknown()

func (*Vault) XXX_Marshal ¶

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

func (*Vault) XXX_Merge ¶

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

func (*Vault) XXX_Size ¶

func (m *Vault) XXX_Size() int

func (*Vault) XXX_Unmarshal ¶

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

type VaultId ¶

type VaultId struct {
	// Type of the vault.
	Type VaultType `protobuf:"varint,1,opt,name=type,proto3,enum=dydxprotocol.vault.VaultType" json:"type,omitempty"`
	// Unique ID of the vault within above type.
	Number uint32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
}

VaultId uniquely identifies a vault by its type and number.

func GetVaultIdFromStateKey ¶

func GetVaultIdFromStateKey(stateKey []byte) (*VaultId, error)

GetVaultIdFromStateKey returns a vault ID from a given state key.

func (*VaultId) Descriptor ¶

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

func (*VaultId) GetClobOrderId ¶

func (id *VaultId) GetClobOrderId(clientId uint32) *clobtypes.OrderId

GetClobOrderId returns a vault CLOB order ID given a client ID.

func (*VaultId) GetNumber ¶

func (m *VaultId) GetNumber() uint32

func (*VaultId) GetType ¶

func (m *VaultId) GetType() VaultType

func (*VaultId) IncrCounterWithLabels ¶

func (id *VaultId) IncrCounterWithLabels(metricName string, labels ...metrics.Label)

IncrCounterWithLabels increments counter with labels with added vault ID labels.

func (*VaultId) Marshal ¶

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

func (*VaultId) MarshalTo ¶

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

func (*VaultId) MarshalToSizedBuffer ¶

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

func (*VaultId) ProtoMessage ¶

func (*VaultId) ProtoMessage()

func (*VaultId) Reset ¶

func (m *VaultId) Reset()

func (*VaultId) SetGaugeWithLabels ¶

func (id *VaultId) SetGaugeWithLabels(
	metricName string,
	value float32,
	labels ...metrics.Label,
)

IncrCounterWithLabels sets gauge with labels with added vault ID labels.

func (*VaultId) Size ¶

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

func (*VaultId) String ¶

func (m *VaultId) String() string

func (*VaultId) ToModuleAccountAddress ¶

func (id *VaultId) ToModuleAccountAddress() string

ToModuleAccountAddress returns the module account address for the vault ID (generated from string "vault-<type>-<number>").

func (*VaultId) ToStateKey ¶

func (id *VaultId) ToStateKey() []byte

ToStateKey returns the state key for the vault ID.

func (*VaultId) ToStateKeyPrefix ¶

func (id *VaultId) ToStateKeyPrefix() []byte

ToStateKeyPrefix returns the state key prefix for the vault ID.

func (*VaultId) ToString ¶

func (id *VaultId) ToString() string

ToString returns the string representation of a vault ID.

func (*VaultId) ToSubaccountId ¶

func (id *VaultId) ToSubaccountId() *satypes.SubaccountId

ToSubaccountId returns the subaccount ID for the vault ID (owner is corresponding module account address and number is 0).

func (*VaultId) Unmarshal ¶

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

func (*VaultId) XXX_DiscardUnknown ¶

func (m *VaultId) XXX_DiscardUnknown()

func (*VaultId) XXX_Marshal ¶

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

func (*VaultId) XXX_Merge ¶

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

func (*VaultId) XXX_Size ¶

func (m *VaultId) XXX_Size() int

func (*VaultId) XXX_Unmarshal ¶

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

type VaultKeeper ¶

type VaultKeeper interface {
	// Orders.
	GetVaultClobOrders(
		ctx sdk.Context,
		vaultId VaultId,
	) (orders []*clobtypes.Order, err error)
	RefreshAllVaultOrders(ctx sdk.Context)
	RefreshVaultClobOrders(
		ctx sdk.Context,
		vaultId VaultId,
	) (err error)

	// Params.
	GetDefaultQuotingParams(
		ctx sdk.Context,
	) QuotingParams
	SetDefaultQuotingParams(
		ctx sdk.Context,
		params QuotingParams,
	) error

	// Shares.
	GetTotalShares(
		ctx sdk.Context,
	) (val NumShares)
	SetTotalShares(
		ctx sdk.Context,
		totalShares NumShares,
	) error
	MintShares(
		ctx sdk.Context,
		owner string,
		quantumsToDeposit *big.Int,
	) (*big.Int, error)

	// Vault info.
	GetVaultEquity(
		ctx sdk.Context,
		vaultId VaultId,
	) (*big.Int, error)
}

type VaultParams ¶

type VaultParams struct {
	// Status of the vault.
	Status VaultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=dydxprotocol.vault.VaultStatus" json:"status,omitempty"`
	// Quoting parameters of the vault.
	QuotingParams *QuotingParams `protobuf:"bytes,2,opt,name=quoting_params,json=quotingParams,proto3" json:"quoting_params,omitempty"`
}

VaultParams stores vault parameters.

func (*VaultParams) Descriptor ¶

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

func (*VaultParams) GetQuotingParams ¶

func (m *VaultParams) GetQuotingParams() *QuotingParams

func (*VaultParams) GetStatus ¶

func (m *VaultParams) GetStatus() VaultStatus

func (*VaultParams) Marshal ¶

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

func (*VaultParams) MarshalTo ¶

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

func (*VaultParams) MarshalToSizedBuffer ¶

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

func (*VaultParams) ProtoMessage ¶

func (*VaultParams) ProtoMessage()

func (*VaultParams) Reset ¶

func (m *VaultParams) Reset()

func (*VaultParams) Size ¶

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

func (*VaultParams) String ¶

func (m *VaultParams) String() string

func (*VaultParams) Unmarshal ¶

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

func (VaultParams) Validate ¶

func (v VaultParams) Validate() error

Validate validates individual vault parameters.

func (*VaultParams) XXX_DiscardUnknown ¶

func (m *VaultParams) XXX_DiscardUnknown()

func (*VaultParams) XXX_Marshal ¶

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

func (*VaultParams) XXX_Merge ¶

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

func (*VaultParams) XXX_Size ¶

func (m *VaultParams) XXX_Size() int

func (*VaultParams) XXX_Unmarshal ¶

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

type VaultStatus ¶

type VaultStatus int32

VaultStatus represents the status of a vault.

const (
	// Default value, invalid and unused.
	VaultStatus_VAULT_STATUS_UNSPECIFIED VaultStatus = 0
	// Don’t place orders. Does not count toward global vault balances.
	// A vault can only be set to this status if its equity is non-positive.
	VaultStatus_VAULT_STATUS_DEACTIVATED VaultStatus = 1
	// Don’t place orders. Does count towards global vault balances.
	VaultStatus_VAULT_STATUS_STAND_BY VaultStatus = 2
	// Places orders on both sides of the book.
	VaultStatus_VAULT_STATUS_QUOTING VaultStatus = 3
	// Only place orders that close the position.
	VaultStatus_VAULT_STATUS_CLOSE_ONLY VaultStatus = 4
)

func (VaultStatus) EnumDescriptor ¶

func (VaultStatus) EnumDescriptor() ([]byte, []int)

func (VaultStatus) String ¶

func (x VaultStatus) String() string

type VaultType ¶

type VaultType int32

VaultType represents different types of vaults.

const (
	// Default value, invalid and unused.
	VaultType_VAULT_TYPE_UNSPECIFIED VaultType = 0
	// Vault is associated with a CLOB pair.
	VaultType_VAULT_TYPE_CLOB VaultType = 1
)

func (VaultType) EnumDescriptor ¶

func (VaultType) EnumDescriptor() ([]byte, []int)

func (VaultType) String ¶

func (x VaultType) String() string

type VaultV6 ¶

type VaultV6 struct {
	// The ID of the vault.
	VaultId *VaultId `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"`
	// The total number of shares in the vault.
	TotalShares *NumShares `protobuf:"bytes,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"`
	// The shares of each owner in the vault.
	OwnerShares []*OwnerShare `protobuf:"bytes,3,rep,name=owner_shares,json=ownerShares,proto3" json:"owner_shares,omitempty"`
	// The parameters of the vault.
	VaultParams VaultParams `protobuf:"bytes,4,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"`
	// The client IDs of the most recently placed orders of the vault.
	MostRecentClientIds []uint32 `` /* 130-byte string literal not displayed */
}

VaultV6 defines the state of a vault. Deprecated since v7.x in favor of Vault.

func (*VaultV6) Descriptor ¶

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

func (*VaultV6) GetMostRecentClientIds ¶

func (m *VaultV6) GetMostRecentClientIds() []uint32

func (*VaultV6) GetOwnerShares ¶

func (m *VaultV6) GetOwnerShares() []*OwnerShare

func (*VaultV6) GetTotalShares ¶

func (m *VaultV6) GetTotalShares() *NumShares

func (*VaultV6) GetVaultId ¶

func (m *VaultV6) GetVaultId() *VaultId

func (*VaultV6) GetVaultParams ¶

func (m *VaultV6) GetVaultParams() VaultParams

func (*VaultV6) Marshal ¶

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

func (*VaultV6) MarshalTo ¶

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

func (*VaultV6) MarshalToSizedBuffer ¶

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

func (*VaultV6) ProtoMessage ¶

func (*VaultV6) ProtoMessage()

func (*VaultV6) Reset ¶

func (m *VaultV6) Reset()

func (*VaultV6) Size ¶

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

func (*VaultV6) String ¶

func (m *VaultV6) String() string

func (*VaultV6) Unmarshal ¶

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

func (*VaultV6) XXX_DiscardUnknown ¶

func (m *VaultV6) XXX_DiscardUnknown()

func (*VaultV6) XXX_Marshal ¶

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

func (*VaultV6) XXX_Merge ¶

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

func (*VaultV6) XXX_Size ¶

func (m *VaultV6) XXX_Size() int

func (*VaultV6) XXX_Unmarshal ¶

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

Jump to

Keyboard shortcuts

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