From dec5d55ba4814cfb09f05fbd536a73af4fdcbe86 Mon Sep 17 00:00:00 2001 From: Abel Armoa <30988000+aarmoa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:43:46 -0300 Subject: [PATCH 1/3] (feat) Added support for Exchange V2 queries, messages and types --- .golangci.yml | 3 + Makefile | 2 + chain/auction/types/auction.pb.go | 164 +- chain/auction/types/params.go | 26 + chain/auction/types/query.pb.go | 96 +- chain/exchange/types/common_order.go | 16 +- chain/exchange/types/common_utils.go | 71 +- chain/exchange/types/deposit.go | 16 - chain/exchange/types/derivative_orders.go | 500 +- chain/exchange/types/errors.go | 3 +- chain/exchange/types/exchange.go | 221 +- chain/exchange/types/exchange.pb.go | 694 +- chain/exchange/types/fee_discounts.go | 69 - chain/exchange/types/fee_validation.go | 17 +- chain/exchange/types/genesis.go | 12 - chain/exchange/types/market.go | 238 +- chain/exchange/types/market_admin.go | 61 +- chain/exchange/types/msgs.go | 145 +- chain/exchange/types/msgs_validation.go | 49 + chain/exchange/types/params.go | 121 +- chain/exchange/types/positions.go | 381 +- chain/exchange/types/proposal.go | 28 +- chain/exchange/types/proposal.pb.go | 427 +- chain/exchange/types/query.pb.go | 2064 +- chain/exchange/types/spot_orders.go | 245 +- chain/exchange/types/tx.pb.go | 577 +- chain/exchange/types/v2/authz.go | 547 + chain/exchange/types/v2/authz.pb.go | 2702 ++ chain/exchange/types/v2/codec.go | 191 + chain/exchange/types/v2/common_order.go | 109 + chain/exchange/types/v2/common_utils.go | 60 + chain/exchange/types/v2/conditional_orders.go | 29 + chain/exchange/types/v2/deposit.go | 26 + chain/exchange/types/v2/derivative_orders.go | 566 + chain/exchange/types/v2/events.go | 37 + chain/exchange/types/v2/events.pb.go | 11733 ++++++ chain/exchange/types/v2/exchange.go | 228 + chain/exchange/types/v2/exchange.pb.go | 10777 ++++++ chain/exchange/types/v2/fee_discounts.go | 76 + chain/exchange/types/v2/fee_validation.go | 23 + chain/exchange/types/v2/genesis.go | 13 + chain/exchange/types/v2/genesis.pb.go | 4645 +++ chain/exchange/types/v2/market.go | 456 + chain/exchange/types/v2/market.pb.go | 5261 +++ chain/exchange/types/v2/market_admin.go | 8 + chain/exchange/types/v2/msgs.go | 2112 + chain/exchange/types/v2/order.go | 25 + chain/exchange/types/v2/order.pb.go | 2930 ++ chain/exchange/types/v2/orderbook.go | 165 + chain/exchange/types/v2/orderbook.pb.go | 1424 + chain/exchange/types/v2/params.go | 251 + chain/exchange/types/v2/position.go | 406 + chain/exchange/types/v2/proposal.go | 1767 + chain/exchange/types/v2/proposal.pb.go | 10580 +++++ chain/exchange/types/v2/query.go | 122 + chain/exchange/types/v2/query.pb.go | 31892 ++++++++++++++++ chain/exchange/types/v2/spot_orders.go | 280 + chain/exchange/types/v2/stake_grants.go | 21 + chain/exchange/types/{ => v2}/subaccount.go | 23 +- chain/exchange/types/v2/tx.pb.go | 21719 +++++++++++ chain/exchange/types/v2/volume_record.go | 64 + chain/exchange/types/versions.go | 8 + chain/exchange/types/wasm_trades.go | 9 - chain/stream/types/query.pb.go | 321 +- chain/tokenfactory/types/msgs.go | 6 +- chain/types/gas.go | 2 +- chain/wasmx/types/util.go | 4 +- client/chain/chain.go | 937 +- client/chain/chain_test_support.go | 309 +- client/chain/markets_assistant.go | 107 - client/chain/orderhash.go | 7 +- client/exchange/exchange.go | 27 - .../10_StreamEventOrderbookUpdate/example.go | 48 - .../example.go | 30 +- examples/chain/1_LocalOrderHash/example.go | 37 +- .../2_MsgBatchCancelSpotOrders/example.go | 14 +- .../example.go | 19 +- .../example.go | 33 +- .../example.go | 31 +- examples/chain/6_MsgRegisterAsDMM/example.go | 4 +- examples/chain/8_OfflineSigning/example.go | 31 +- examples/chain/authz/2_MsgExec/example.go | 33 +- .../example.go | 31 +- .../example.go | 31 +- .../12_MsgCancelDerivativeOrder/example.go | 11 +- .../example.go | 16 +- .../14_MsgSubaccountTransfer/example.go | 11 +- .../15_MsgExternalTransfer/example.go | 4 +- .../16_MsgLiquidatePosition/example.go | 27 +- .../17_MsgIncreasePositionMargin/example.go | 10 +- .../chain/exchange/1_MsgDeposit/example.go | 13 +- .../exchange/21_MsgRewardsOptOut/example.go | 10 +- .../23_MsgDecreasePositionMargin/example.go | 10 +- .../24_MsgUpdateSpotMarket/example.go | 35 +- .../25_MsgUpdateDerivativeMarket/example.go | 31 +- .../26_MsgAuthorizeStakeGrants/example.go | 14 +- .../27_MsgActivateStakeGrant/example.go | 11 +- .../chain/exchange/2_MsgWithdraw/example.go | 4 +- .../3_MsgInstantSpotMarketLaunch/example.go | 21 +- .../example.go | 16 +- .../example.go | 16 +- .../6_MsgCreateSpotLimitOrder/example.go | 33 +- .../7_MsgCreateSpotMarketOrder/example.go | 33 +- .../exchange/8_MsgCancelSpotOrder/example.go | 11 +- .../9_MsgBatchUpdateOrders/example.go | 40 +- .../exchange/query/10_SpotMarkets/example.go | 2 +- .../exchange/query/11_SpotMarket/example.go | 2 +- .../query/12_FullSpotMarkets/example.go | 2 +- .../query/13_FullSpotMarket/example.go | 2 +- .../query/14_SpotOrderbook/example.go | 12 +- .../query/15_TraderSpotOrders/example.go | 2 +- .../16_AccountAddressSpotOrders/example.go | 2 +- .../query/17_SpotOrdersByHashes/example.go | 2 +- .../query/18_SubaccountOrders/example.go | 2 +- .../19_TraderSpotTransientOrders/example.go | 2 +- .../query/1_SubaccountDeposits/example.go | 2 +- .../query/20_SpotMidPriceAndTOB/example.go | 2 +- .../21_DerivativeMidPriceAndTOB/example.go | 2 +- .../query/22_DerivativeOrderbook/example.go | 2 +- .../23_TraderDerivativeOrders/example.go | 2 +- .../example.go | 2 +- .../25_DerivativeOrdersByHashes/example.go | 2 +- .../example.go | 2 +- .../query/27_DerivativeMarkets/example.go | 2 +- .../query/28_DerivativeMarket/example.go | 2 +- .../29_DerivativeMarketAddress/example.go | 2 +- .../query/2_SubaccountDeposit/example.go | 2 +- .../query/30_SubaccountTradeNonce/example.go | 2 +- .../exchange/query/31_Positions/example.go | 2 +- .../query/32_SubaccountPositions/example.go | 2 +- .../33_SubaccountPositionInMarket/example.go | 2 +- .../example.go | 2 +- .../query/35_PerpetualMarketInfo/example.go | 2 +- .../36_ExpiryFuturesMarketInfo/example.go | 2 +- .../37_PerpetualMarketFunding/example.go | 2 +- .../38_SubaccountOrderMetadata/example.go | 2 +- .../query/39_TradeRewardPoints/example.go | 2 +- .../query/3_ExchangeBalances/example.go | 2 +- .../40_PendingTradeRewardPoints/example.go | 2 +- .../query/41_TradeRewardCampaign/example.go | 2 +- .../42_FeeDiscountAccountInfo/example.go | 2 +- .../query/43_FeeDiscountSchedule/example.go | 2 +- .../query/44_BalanceMismatches/example.go | 2 +- .../45_BalanceWithBalanceHolds/example.go | 2 +- .../46_FeeDiscountTierStatistics/example.go | 2 +- .../query/47_MitoVaultInfos/example.go | 2 +- .../48_QueryMarketIDFromVault/example.go | 2 +- .../49_HistoricalTradeRecords/example.go | 2 +- .../query/4_AggregateVolume/example.go | 4 +- .../query/50_IsOptedOutOfRewards/example.go | 2 +- .../51_OptedOutOfRewardsAccounts/example.go | 2 +- .../query/52_MarketVolatility/example.go | 11 +- .../query/53_BinaryOptionsMarkets/example.go | 2 +- .../example.go | 2 +- .../example.go | 2 +- .../query/56_ActivateStakeGrant/example.go | 70 + .../query/57_GrantAuthorization/example.go | 71 + .../query/58_GrantAuthorizations/example.go | 70 + .../query/59_L3DerivativeOrderBook/example.go | 70 + .../query/5_AggregateVolumes/example.go | 2 +- .../query/60_L3SpotOrderBook/example.go | 70 + .../query/6_AggregateMarketVolume/example.go | 2 +- .../query/7_AggregateMarketVolumes/example.go | 2 +- .../exchange/query/8_DenomDecimal/example.go | 2 +- .../exchange/query/9_DenomDecimals/example.go | 2 +- 165 files changed, 116415 insertions(+), 4037 deletions(-) create mode 100644 chain/exchange/types/msgs_validation.go create mode 100644 chain/exchange/types/v2/authz.go create mode 100644 chain/exchange/types/v2/authz.pb.go create mode 100644 chain/exchange/types/v2/codec.go create mode 100644 chain/exchange/types/v2/common_order.go create mode 100644 chain/exchange/types/v2/common_utils.go create mode 100644 chain/exchange/types/v2/conditional_orders.go create mode 100644 chain/exchange/types/v2/deposit.go create mode 100644 chain/exchange/types/v2/derivative_orders.go create mode 100644 chain/exchange/types/v2/events.go create mode 100644 chain/exchange/types/v2/events.pb.go create mode 100644 chain/exchange/types/v2/exchange.go create mode 100644 chain/exchange/types/v2/exchange.pb.go create mode 100644 chain/exchange/types/v2/fee_discounts.go create mode 100644 chain/exchange/types/v2/fee_validation.go create mode 100644 chain/exchange/types/v2/genesis.go create mode 100644 chain/exchange/types/v2/genesis.pb.go create mode 100644 chain/exchange/types/v2/market.go create mode 100644 chain/exchange/types/v2/market.pb.go create mode 100644 chain/exchange/types/v2/market_admin.go create mode 100644 chain/exchange/types/v2/msgs.go create mode 100644 chain/exchange/types/v2/order.go create mode 100644 chain/exchange/types/v2/order.pb.go create mode 100644 chain/exchange/types/v2/orderbook.go create mode 100644 chain/exchange/types/v2/orderbook.pb.go create mode 100644 chain/exchange/types/v2/params.go create mode 100644 chain/exchange/types/v2/position.go create mode 100644 chain/exchange/types/v2/proposal.go create mode 100644 chain/exchange/types/v2/proposal.pb.go create mode 100644 chain/exchange/types/v2/query.go create mode 100644 chain/exchange/types/v2/query.pb.go create mode 100644 chain/exchange/types/v2/spot_orders.go create mode 100644 chain/exchange/types/v2/stake_grants.go rename chain/exchange/types/{ => v2}/subaccount.go (65%) create mode 100644 chain/exchange/types/v2/tx.pb.go create mode 100644 chain/exchange/types/v2/volume_record.go create mode 100644 chain/exchange/types/versions.go delete mode 100644 examples/chain/10_StreamEventOrderbookUpdate/example.go create mode 100644 examples/chain/exchange/query/56_ActivateStakeGrant/example.go create mode 100644 examples/chain/exchange/query/57_GrantAuthorization/example.go create mode 100644 examples/chain/exchange/query/58_GrantAuthorizations/example.go create mode 100644 examples/chain/exchange/query/59_L3DerivativeOrderBook/example.go create mode 100644 examples/chain/exchange/query/60_L3SpotOrderBook/example.go diff --git a/.golangci.yml b/.golangci.yml index d679ee99..3c1c684f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,7 +46,10 @@ "style", ], "disabled-checks": [ + "dupImport", "hugeParam", + "singleCaseSwitch", + "unnamedResult", ] } }, diff --git a/Makefile b/Makefile index 4492bf96..56e4b2f1 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,8 @@ copy-chain-types: rm -rf chain/auction/types/*test.go rm -rf chain/auction/types/*gw.go cp ../injective-core/injective-chain/modules/exchange/types/*.go chain/exchange/types rm -rf chain/exchange/types/*test.go rm -rf chain/exchange/types/*gw.go + cp ../injective-core/injective-chain/modules/exchange/types/v2/*.go chain/exchange/types/v2 + rm -rf chain/exchange/types/v2/*test.go rm -rf chain/exchange/types/v2/*gw.go cp ../injective-core/injective-chain/modules/insurance/types/*.go chain/insurance/types rm -rf chain/insurance/types/*test.go rm -rf chain/insurance/types/*gw.go cp ../injective-core/injective-chain/modules/ocr/types/*.go chain/ocr/types diff --git a/chain/auction/types/auction.pb.go b/chain/auction/types/auction.pb.go index 164a7820..25703a53 100644 --- a/chain/auction/types/auction.pb.go +++ b/chain/auction/types/auction.pb.go @@ -32,6 +32,9 @@ type Params struct { AuctionPeriod int64 `protobuf:"varint,1,opt,name=auction_period,json=auctionPeriod,proto3" json:"auction_period,omitempty"` // min_next_bid_increment_rate defines the minimum increment rate for new bids MinNextBidIncrementRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_next_bid_increment_rate,json=minNextBidIncrementRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_next_bid_increment_rate"` + // inj_basket_max_cap defines the maximum cap for INJ contained in an auction + // basket + InjBasketMaxCap cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=inj_basket_max_cap,json=injBasketMaxCap,proto3,customtype=cosmossdk.io/math.Int" json:"inj_basket_max_cap"` } func (m *Params) Reset() { *m = Params{} } @@ -365,43 +368,45 @@ func init() { } var fileDescriptor_49edfee5f1ef4b5a = []byte{ - // 567 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0x18, 0x22, 0x7a, 0xa8, 0x40, 0xad, 0x8a, 0xa6, 0xad, 0x64, 0x47, 0x46, 0xa8, - 0x01, 0xa9, 0x3e, 0x4a, 0xb7, 0x6e, 0x18, 0x10, 0xaa, 0x14, 0x50, 0x65, 0x98, 0x58, 0xac, 0xb3, - 0xfd, 0xe4, 0x5c, 0x93, 0xbb, 0x8b, 0x7c, 0xe7, 0xa4, 0x19, 0x11, 0x5b, 0x59, 0xf8, 0x13, 0x98, - 0x61, 0xe1, 0x4f, 0x60, 0xec, 0xd8, 0x11, 0x31, 0x04, 0x94, 0x0c, 0x20, 0x46, 0xfe, 0x02, 0x14, - 0xff, 0x88, 0xbc, 0x20, 0x31, 0x74, 0x60, 0x49, 0xfc, 0xbe, 0xf7, 0xee, 0xfb, 0x3e, 0xef, 0x49, - 0xf7, 0xf0, 0x0e, 0x13, 0xc7, 0x10, 0x69, 0x36, 0x02, 0x42, 0xb3, 0x48, 0x33, 0x29, 0xc8, 0x68, - 0x2f, 0x04, 0x4d, 0xf7, 0xaa, 0xd8, 0x1d, 0xa6, 0x52, 0x4b, 0x73, 0x73, 0x99, 0xe8, 0x56, 0x07, - 0x65, 0xe2, 0xd6, 0x7a, 0x22, 0x13, 0x99, 0x67, 0x91, 0xc5, 0x57, 0x71, 0x61, 0xcb, 0x8a, 0xa4, - 0xe2, 0x52, 0x91, 0x90, 0x2a, 0x58, 0x7a, 0x46, 0x92, 0x95, 0x86, 0x5b, 0x6b, 0x94, 0x33, 0x21, - 0x49, 0xfe, 0x5b, 0x48, 0xce, 0x47, 0x84, 0x9b, 0x47, 0x34, 0xa5, 0x5c, 0x99, 0x77, 0xf0, 0xf5, - 0xb2, 0x4c, 0x30, 0x84, 0x94, 0xc9, 0xb8, 0x85, 0xda, 0xa8, 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b, 0x60, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, - 0x8c, 0x47, 0xe7, 0x94, 0x04, 0x00, 0x00, + // 607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xb1, 0x4f, 0x14, 0x4f, + 0x14, 0xbe, 0xf9, 0xdd, 0xcf, 0x8b, 0x8c, 0x41, 0x64, 0x82, 0x72, 0x40, 0xdc, 0x23, 0x67, 0x0c, + 0x68, 0xc2, 0x8e, 0x48, 0x47, 0xe7, 0xa2, 0x05, 0x06, 0x0c, 0x59, 0xad, 0x6c, 0x36, 0xb3, 0xbb, + 0x2f, 0xc7, 0x1c, 0xcc, 0xcc, 0x66, 0x67, 0x16, 0x8e, 0x7f, 0xc1, 0xca, 0x3f, 0xc0, 0x18, 0x1b, + 0x2d, 0xac, 0xfc, 0x13, 0x2c, 0x29, 0x29, 0x8d, 0xc5, 0x69, 0xa0, 0xd0, 0x58, 0xda, 0xd8, 0x9a, + 0x9b, 0x9d, 0xbd, 0x6c, 0x62, 0x34, 0x56, 0xc4, 0xe6, 0x6e, 0xdf, 0x37, 0xef, 0x7d, 0xf3, 0x7d, + 0xef, 0x65, 0x1e, 0x5e, 0xe2, 0xb2, 0x0f, 0x89, 0xe1, 0x07, 0x40, 0x59, 0x91, 0x18, 0xae, 0x24, + 0x3d, 0x58, 0x8d, 0xc1, 0xb0, 0xd5, 0x2a, 0xf6, 0xb3, 0x5c, 0x19, 0x45, 0xe6, 0xc6, 0x89, 0x7e, + 0x75, 0xe0, 0x12, 0xe7, 0x67, 0x7a, 0xaa, 0xa7, 0x6c, 0x16, 0x1d, 0x7d, 0x95, 0x05, 0xf3, 0x5e, + 0xa2, 0xb4, 0x50, 0x9a, 0xc6, 0x4c, 0xc3, 0x98, 0x33, 0x51, 0xdc, 0x11, 0xce, 0x4f, 0x33, 0xc1, + 0xa5, 0xa2, 0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a, 0x87, + 0x13, 0x12, 0x0e, 0xcb, 0x27, 0x17, 0xf4, 0x8e, 0x4f, 0x3d, 0x74, 0x72, 0xea, 0xa1, 0xcf, 0xa7, + 0x1e, 0x7a, 0x7e, 0xe6, 0x35, 0x4e, 0xce, 0xbc, 0xc6, 0x87, 0x33, 0xaf, 0xf1, 0x74, 0xbb, 0x46, + 0xb7, 0x59, 0xad, 0xb5, 0x2d, 0x16, 0x6b, 0x3a, 0x5e, 0x72, 0x2b, 0x89, 0xca, 0xa1, 0x1e, 0xee, + 0x32, 0x2e, 0xa9, 0x50, 0x69, 0xb1, 0x0f, 0x7a, 0xbc, 0x2a, 0xed, 0xcd, 0x71, 0xcb, 0x6e, 0xaf, + 0xb5, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x60, 0x2e, 0x41, 0x2d, 0x4c, 0x05, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -429,6 +434,9 @@ func (this *Params) Equal(that interface{}) bool { if !this.MinNextBidIncrementRate.Equal(that1.MinNextBidIncrementRate) { return false } + if !this.InjBasketMaxCap.Equal(that1.InjBasketMaxCap) { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -451,6 +459,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.InjBasketMaxCap.Size() + i -= size + if _, err := m.InjBasketMaxCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size := m.MinNextBidIncrementRate.Size() i -= size @@ -713,6 +731,8 @@ func (m *Params) Size() (n int) { } l = m.MinNextBidIncrementRate.Size() n += 1 + l + sovAuction(uint64(l)) + l = m.InjBasketMaxCap.Size() + n += 1 + l + sovAuction(uint64(l)) return n } @@ -894,6 +914,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InjBasketMaxCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InjBasketMaxCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuction(dAtA[iNdEx:]) @@ -980,7 +1034,7 @@ func (m *Bid) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -990,16 +1044,15 @@ func (m *Bid) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuction } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAuction } @@ -1096,7 +1149,7 @@ func (m *LastAuctionResult) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -1106,16 +1159,15 @@ func (m *LastAuctionResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuction } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAuction } @@ -1231,7 +1283,7 @@ func (m *EventBid) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -1241,16 +1293,15 @@ func (m *EventBid) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuction } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAuction } @@ -1366,7 +1417,7 @@ func (m *EventAuctionResult) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuction @@ -1376,16 +1427,15 @@ func (m *EventAuctionResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuction } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAuction } diff --git a/chain/auction/types/params.go b/chain/auction/types/params.go index fe3f865b..3fc75dc0 100644 --- a/chain/auction/types/params.go +++ b/chain/auction/types/params.go @@ -15,12 +15,15 @@ var ( DefaultAuctionPeriod int64 = 60 * 60 * 24 * 7 // DefaultMinNextBidIncrementRate represents default min increment rate 0.25% DefaultMinNextBidIncrementRate = math.LegacyNewDecWithPrec(25, 4) + // DefaultInjBasketMaxCap represents default inj basket max cap + DefaultInjBasketMaxCap = math.NewIntWithDecimal(10_000, 18) ) // Parameter keys var ( KeyAuctionPeriod = []byte("AuctionPeriod") KeyMinNextBidIncrementRate = []byte("MinNextBidIncrementRate") + KeyInjBasketMaxCap = []byte("InjBasketMaxCap") ) // ParamKeyTable returns the parameter key table. @@ -32,10 +35,12 @@ func ParamKeyTable() paramtypes.KeyTable { func NewParams( auctionPeriod int64, minNextBidIncrementRate math.LegacyDec, + injBasketMaxCap math.Int, ) Params { return Params{ AuctionPeriod: auctionPeriod, MinNextBidIncrementRate: minNextBidIncrementRate, + InjBasketMaxCap: injBasketMaxCap, } } @@ -44,6 +49,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyAuctionPeriod, &p.AuctionPeriod, validateAuctionPeriodDuration), paramtypes.NewParamSetPair(KeyMinNextBidIncrementRate, &p.MinNextBidIncrementRate, validateMinNextBidIncrementRate), + paramtypes.NewParamSetPair(KeyInjBasketMaxCap, &p.InjBasketMaxCap, validateInjBasketMaxCap), } } @@ -52,6 +58,7 @@ func DefaultParams() Params { return Params{ AuctionPeriod: DefaultAuctionPeriod, MinNextBidIncrementRate: DefaultMinNextBidIncrementRate, + InjBasketMaxCap: DefaultInjBasketMaxCap, } } @@ -65,6 +72,10 @@ func (p Params) Validate() error { return err } + if err := validateInjBasketMaxCap(p.InjBasketMaxCap); err != nil { + return err + } + return nil } @@ -101,3 +112,18 @@ func validateMinNextBidIncrementRate(i interface{}) error { return nil } + +func validateInjBasketMaxCap(i interface{}) error { + v, ok := i.(math.Int) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.IsNil() { + return fmt.Errorf("InjBasketMaxCap cannot be nil") + } + if v.IsNegative() { + return fmt.Errorf("InjBasketMaxCap cannot be negative") + } + return nil +} diff --git a/chain/auction/types/query.pb.go b/chain/auction/types/query.pb.go index 6aba7c13..30c0a662 100644 --- a/chain/auction/types/query.pb.go +++ b/chain/auction/types/query.pb.go @@ -162,7 +162,7 @@ type QueryCurrentAuctionBasketResponse struct { // auctionRound describes current auction round AuctionRound uint64 `protobuf:"varint,2,opt,name=auctionRound,proto3" json:"auctionRound,omitempty"` // auctionClosingTime describes auction close time for the round - AuctionClosingTime int64 `protobuf:"varint,3,opt,name=auctionClosingTime,proto3" json:"auctionClosingTime,omitempty"` + AuctionClosingTime uint64 `protobuf:"varint,3,opt,name=auctionClosingTime,proto3" json:"auctionClosingTime,omitempty"` // highestBidder describes highest bidder on current round HighestBidder string `protobuf:"bytes,4,opt,name=highestBidder,proto3" json:"highestBidder,omitempty"` // highestBidAmount describes highest bid amount on current round @@ -216,7 +216,7 @@ func (m *QueryCurrentAuctionBasketResponse) GetAuctionRound() uint64 { return 0 } -func (m *QueryCurrentAuctionBasketResponse) GetAuctionClosingTime() int64 { +func (m *QueryCurrentAuctionBasketResponse) GetAuctionClosingTime() uint64 { if m != nil { return m.AuctionClosingTime } @@ -410,51 +410,51 @@ func init() { } var fileDescriptor_2ae80edbdb9fffb7 = []byte{ - // 698 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x4f, 0x13, 0x4d, - 0x18, 0xef, 0x00, 0x25, 0x79, 0x87, 0x97, 0xe4, 0x65, 0x5e, 0x8c, 0xed, 0x2a, 0xdb, 0xb2, 0x6a, - 0x28, 0x89, 0xec, 0x42, 0x51, 0xa3, 0x51, 0x63, 0x28, 0x07, 0x43, 0x02, 0x89, 0xae, 0x5e, 0x34, - 0x1a, 0x32, 0xdd, 0x4e, 0xb6, 0x23, 0xdd, 0x99, 0xb2, 0x33, 0x4b, 0xc2, 0xc5, 0x83, 0x9f, 0xc0, - 0xc4, 0x0f, 0x61, 0xe2, 0xc1, 0x4f, 0xe0, 0xc1, 0x23, 0x17, 0x13, 0x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xde, - 0xe7, 0x5a, 0x6a, 0xe1, 0xde, 0xa1, 0x0d, 0xf6, 0x0f, 0x6d, 0xf0, 0xfb, 0xd0, 0x06, 0xef, 0x8f, - 0xec, 0xdc, 0xfe, 0x91, 0x9d, 0xfb, 0x71, 0x64, 0xe7, 0x5e, 0x6e, 0x9c, 0xfa, 0x1c, 0xae, 0x75, - 0x38, 0xd7, 0x71, 0x5d, 0x9c, 0x64, 0x58, 0x08, 0x78, 0x4c, 0x4e, 0xbf, 0x36, 0x31, 0x65, 0xa6, - 0x45, 0xa2, 0x9b, 0x5e, 0x7d, 0x39, 0xeb, 0xe3, 0xea, 0xdf, 0x65, 0xf9, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xa1, 0xdd, 0x40, 0x94, 0x47, 0x07, 0x00, 0x00, + // 693 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x4f, 0x13, 0x41, + 0x14, 0xef, 0x02, 0x25, 0x71, 0x90, 0x44, 0x46, 0x8c, 0xed, 0x2a, 0xdb, 0xb2, 0x6a, 0x28, 0x89, + 0xec, 0x42, 0x51, 0xa3, 0x51, 0x63, 0x28, 0x07, 0x43, 0x02, 0x89, 0xae, 0x5e, 0x34, 0x1a, 0x32, + 0xdd, 0x4e, 0xb6, 0x23, 0xdd, 0x99, 0xb2, 0x33, 0x4b, 0xc2, 0xc5, 0x83, 0x9f, 0xc0, 0xc4, 0x0f, + 0x61, 0xe2, 0xc1, 0x4f, 0xe0, 0xc1, 0x23, 0x17, 0x13, 0x12, 0x2f, 0xc6, 0x03, 0x1a, 0xe0, 0x83, + 0x98, 0x9d, 0x99, 0x16, 0xb0, 0xdd, 0x6d, 0xca, 0xa9, 0xbb, 0xef, 0xbd, 0xdf, 0xef, 0xfd, 0xde, + 0xbf, 0x2d, 0xb8, 0x45, 0xe8, 0x3b, 0xec, 0x0b, 0xb2,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, 0x38, 0xd7, 0x51, 0x9d, 0x9f, + 0x64, 0x58, 0xf0, 0x59, 0x84, 0x4f, 0xbf, 0x36, 0x11, 0xa1, 0xba, 0x45, 0xbc, 0x9b, 0x5e, 0x7e, + 0x39, 0xeb, 0xe3, 0xf2, 0xdf, 0x65, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xf4, 0xc4, + 0x76, 0x47, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1306,7 +1306,7 @@ func (m *QueryCurrentAuctionBasketResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AuctionClosingTime |= int64(b&0x7F) << shift + m.AuctionClosingTime |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/chain/exchange/types/common_order.go b/chain/exchange/types/common_order.go index ba357a76..66624f9b 100644 --- a/chain/exchange/types/common_order.go +++ b/chain/exchange/types/common_order.go @@ -4,10 +4,10 @@ import ( "strconv" "cosmossdk.io/math" - "github.com/cosmos/gogoproto/proto" "github.com/ethereum/go-ethereum/common" ethmath "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/signer/core/apitypes" + "github.com/gogo/protobuf/proto" "golang.org/x/crypto/sha3" ) @@ -16,14 +16,14 @@ func GetRequiredBinaryOptionsOrderMargin( price math.LegacyDec, quantity math.LegacyDec, oracleScaleFactor uint32, - orderType OrderType, + isBuy bool, isReduceOnly bool, ) math.LegacyDec { if isReduceOnly { return math.LegacyZeroDec() } - if orderType.IsBuy() { + if isBuy { return price.Mul(quantity) } return GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(price).Mul(quantity) @@ -80,6 +80,14 @@ func (m *OrderInfo) IsFromDefaultSubaccount() bool { return IsDefaultSubaccountID(common.HexToHash(m.SubaccountId)) } +func (m *OrderInfo) GetPrice() math.LegacyDec { + return m.Price +} + +func (m *OrderInfo) GetQuantity() math.LegacyDec { + return m.Quantity +} + var eip712OrderTypes = apitypes.Types{ "EIP712Domain": { {Name: "name", Type: "string"}, @@ -111,7 +119,7 @@ var eip712OrderTypes = apitypes.Types{ }, } -func computeOrderHash(marketId, subaccountId, feeRecipient, price, quantity, margin, triggerPrice, orderType string, nonce uint32) (common.Hash, error) { +func ComputeOrderHash(marketId, subaccountId, feeRecipient, price, quantity, margin, triggerPrice, orderType string, nonce uint32) (common.Hash, error) { chainID := ethmath.NewHexOrDecimal256(888) var domain = apitypes.TypedDataDomain{ Name: "Injective Protocol", diff --git a/chain/exchange/types/common_utils.go b/chain/exchange/types/common_utils.go index c949b754..40f488e0 100644 --- a/chain/exchange/types/common_utils.go +++ b/chain/exchange/types/common_utils.go @@ -36,57 +36,13 @@ func IsIBCDenom(denom string) bool { return strings.HasPrefix(denom, "ibc/") } -type SpotLimitOrderDelta struct { - Order *SpotLimitOrder - FillQuantity math.LegacyDec -} - -type DerivativeLimitOrderDelta struct { - Order *DerivativeLimitOrder - FillQuantity math.LegacyDec - CancelQuantity math.LegacyDec -} - -type DerivativeMarketOrderDelta struct { - Order *DerivativeMarketOrder - FillQuantity math.LegacyDec -} - -func (d *DerivativeMarketOrderDelta) UnfilledQuantity() math.LegacyDec { - return d.Order.OrderInfo.Quantity.Sub(d.FillQuantity) -} - -func (d *DerivativeLimitOrderDelta) IsBuy() bool { - return d.Order.IsBuy() -} - -func (d *DerivativeLimitOrderDelta) SubaccountID() common.Hash { - return d.Order.SubaccountID() -} - -func (d *DerivativeLimitOrderDelta) Price() math.LegacyDec { - return d.Order.Price() -} - -func (d *DerivativeLimitOrderDelta) FillableQuantity() math.LegacyDec { - return d.Order.Fillable.Sub(d.CancelQuantity) -} - -func (d *DerivativeLimitOrderDelta) OrderHash() common.Hash { - return d.Order.Hash() -} - -func (d *DerivativeLimitOrderDelta) Cid() string { - return d.Order.Cid() -} - var AuctionSubaccountID = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111") var ZeroSubaccountID = common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000") // inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49 var TempRewardsSenderAddress = sdk.AccAddress(common.HexToAddress(ZeroSubaccountID.Hex()).Bytes()) -// inj1qqq3zyg3zyg3zyg3zyg3zyg3zyg3zyg3c9gg96 +// inj1zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3t5qxqh var AuctionFeesAddress = sdk.AccAddress(common.HexToAddress(AuctionSubaccountID.Hex()).Bytes()) var hexRegex = regexp.MustCompile("^(0x)?[0-9a-fA-F]+$") @@ -183,14 +139,6 @@ func BreachesMinimumTickSize(value, minTickSize math.LegacyDec) bool { return !bytes.Equal(residue.Bytes(), big.NewInt(0).Bytes()) } -func (s *Subaccount) GetSubaccountID() (*common.Hash, error) { - trader, err := sdk.AccAddressFromBech32(s.Trader) - if err != nil { - return nil, err - } - return SdkAddressWithNonceToSubaccountID(trader, s.SubaccountNonce) -} - type Account [20]byte func SdkAccAddressToAccount(account sdk.AccAddress) Account { @@ -354,20 +302,3 @@ func HasDuplicatesCoin(slice []sdk.Coin) bool { } return false } - -func HasDuplicatesOrder(slice []*OrderData) bool { - seenHashes := make(map[string]struct{}) - seenCids := make(map[string]struct{}) - for _, item := range slice { - hash, cid := item.GetOrderHash(), item.GetCid() - _, hashExists := seenHashes[hash] - _, cidExists := seenCids[cid] - - if (hash != "" && hashExists) || (cid != "" && cidExists) { - return true - } - seenHashes[hash] = struct{}{} - seenCids[cid] = struct{}{} - } - return false -} diff --git a/chain/exchange/types/deposit.go b/chain/exchange/types/deposit.go index e0afd9d7..9ca61316 100644 --- a/chain/exchange/types/deposit.go +++ b/chain/exchange/types/deposit.go @@ -2,28 +2,12 @@ package types import ( "bytes" - "fmt" "sort" "cosmossdk.io/math" "github.com/ethereum/go-ethereum/common" ) -func NewDeposit() *Deposit { - return &Deposit{ - AvailableBalance: math.LegacyZeroDec(), - TotalBalance: math.LegacyZeroDec(), - } -} - -func (d *Deposit) IsEmpty() bool { - return d.AvailableBalance.IsZero() && d.TotalBalance.IsZero() -} - -func (d *Deposit) Display() string { - return fmt.Sprintf("Deposit Available: %s, Total: %s", getReadableDec(d.AvailableBalance), getReadableDec(d.TotalBalance)) -} - type DepositDelta struct { AvailableBalanceDelta math.LegacyDec TotalBalanceDelta math.LegacyDec diff --git a/chain/exchange/types/derivative_orders.go b/chain/exchange/types/derivative_orders.go index 630b470a..226ac642 100644 --- a/chain/exchange/types/derivative_orders.go +++ b/chain/exchange/types/derivative_orders.go @@ -3,210 +3,81 @@ package types import ( "cosmossdk.io/errors" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ) -func NewMarketOrderForLiquidation( - position *Position, - positionSubaccountID common.Hash, - liquidator sdk.AccAddress, - worstPrice math.LegacyDec, -) *DerivativeMarketOrder { - var ( - orderType OrderType - ) - - // if long position, market sell order - // if short position, market buy order - if position.IsLong { - orderType = OrderType_SELL - } else { - orderType = OrderType_BUY - } - - order := DerivativeMarketOrder{ - OrderInfo: OrderInfo{ - SubaccountId: positionSubaccountID.Hex(), - FeeRecipient: liquidator.String(), - Price: worstPrice, - Quantity: position.Quantity, - }, - OrderType: orderType, - Margin: math.LegacyZeroDec(), - MarginHold: math.LegacyZeroDec(), - TriggerPrice: nil, - } - - return &order +func GetScaledPrice(price math.LegacyDec, scaleFactor uint32) math.LegacyDec { + return price.Mul(math.LegacyNewDec(10).Power(uint64(scaleFactor))) } -func (m *DerivativeLimitOrder) ToTrimmed() *TrimmedDerivativeLimitOrder { - return &TrimmedDerivativeLimitOrder{ - Price: m.OrderInfo.Price, - Quantity: m.OrderInfo.Quantity, - Margin: m.Margin, - Fillable: m.Fillable, - IsBuy: m.IsBuy(), - OrderHash: common.BytesToHash(m.OrderHash).Hex(), - Cid: m.Cid(), - } +func (o *DerivativeOrder) MarketID() common.Hash { + return common.HexToHash(o.MarketId) } -func (o *DerivativeMarketOrderCancel) GetCancelDepositDelta() *DepositDelta { - order := o.MarketOrder - // no market order quantity was executed, so refund the entire margin hold - if order.IsVanilla() && o.CancelQuantity.Equal(order.OrderInfo.Quantity) { - return &DepositDelta{ - AvailableBalanceDelta: order.MarginHold, - TotalBalanceDelta: math.LegacyZeroDec(), - } - } - // TODO: double check that partial market order executions are covered earlier upstream - return nil +func (o *DerivativeLimitOrder) Cid() string { + return o.OrderInfo.GetCid() } -func (o *DerivativeMarketOrder) GetCancelRefundAmount() math.LegacyDec { - if o.IsVanilla() { - return o.MarginHold - } - return math.LegacyZeroDec() +func (o *DerivativeMarketOrder) Cid() string { + return o.OrderInfo.GetCid() } -func (o *DerivativeMarketOrderCancel) ApplyDerivativeMarketCancellation( - depositDeltas DepositDeltas, -) { - order := o.MarketOrder - subaccountID := order.SubaccountID() - // For vanilla orders that were not executed at all, increment the available balance - if order.IsVanilla() { - depositDelta := o.GetCancelDepositDelta() - if depositDelta != nil { - depositDeltas.ApplyDepositDelta(subaccountID, depositDelta) - } - } +func (o *DerivativeOrder) Cid() string { + return o.OrderInfo.GetCid() } -func NewDerivativeMarketOrder(o *DerivativeOrder, sender sdk.AccAddress, orderHash common.Hash) *DerivativeMarketOrder { - if o.OrderInfo.FeeRecipient == "" { - o.OrderInfo.FeeRecipient = sender.String() - } - return &DerivativeMarketOrder{ - OrderInfo: o.OrderInfo, - OrderType: o.OrderType, - Margin: o.Margin, - MarginHold: math.LegacyZeroDec(), - TriggerPrice: o.TriggerPrice, - OrderHash: orderHash.Bytes(), - } +func (m *DerivativeMarketOrder) Price() math.LegacyDec { + return m.OrderInfo.Price } -func NewDerivativeLimitOrder(o *DerivativeOrder, sender sdk.AccAddress, orderHash common.Hash) *DerivativeLimitOrder { - if o.OrderInfo.FeeRecipient == "" { - o.OrderInfo.FeeRecipient = sender.String() - } - return &DerivativeLimitOrder{ - OrderInfo: o.OrderInfo, - OrderType: o.OrderType, - Margin: o.Margin, - Fillable: o.OrderInfo.Quantity, - TriggerPrice: o.TriggerPrice, - OrderHash: orderHash.Bytes(), - } +func (m *DerivativeLimitOrder) Price() math.LegacyDec { + return m.OrderInfo.Price } -func (o *DerivativeLimitOrder) ToDerivativeOrder(marketID string) *DerivativeOrder { - return &DerivativeOrder{ - MarketId: marketID, - OrderInfo: o.OrderInfo, - OrderType: o.OrderType, - Margin: o.Margin, - TriggerPrice: o.TriggerPrice, - } -} -func (o *DerivativeMarketOrder) ToDerivativeOrder(marketID string) *DerivativeOrder { - return &DerivativeOrder{ - MarketId: marketID, - OrderInfo: o.OrderInfo, - OrderType: o.OrderType, - Margin: o.Margin, - TriggerPrice: o.TriggerPrice, - } +func (m *DerivativeOrder) Price() math.LegacyDec { + return m.OrderInfo.Price } -func (o *DerivativeLimitOrder) HasEqualOrWorsePrice(price math.LegacyDec) bool { - // the buy order has a worse price than the input price if it's less than - if o.IsBuy() { - return o.Price().LTE(price) - } - return o.Price().GTE(price) +func (o *DerivativeOrder) SubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() } -func (o *DerivativeMarketOrder) HasEqualOrWorsePrice(price math.LegacyDec) bool { - // the buy order has a worse price than the input price if it's less than - if o.IsBuy() { - return o.Price().LTE(price) - } - return o.Price().GTE(price) +func (o *DerivativeMarketOrder) SubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() } -func ResizeReduceOnlyOrder(o IMutableDerivativeOrder, newQuantity math.LegacyDec) error { - if o.IsVanilla() { - return ErrOrderInvalid.Wrap("ResizeReduceOnlyOrder should only be used for reduce only orders!") - } - - quantityDecrement := o.GetQuantity().Sub(newQuantity) - if !quantityDecrement.IsPositive() { - return nil - } - - o.SetQuantity(newQuantity) - return nil +func (m *DerivativeLimitOrder) SubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() } -func (o *DerivativeMarketOrder) ResizeReduceOnlyOrder( - newQuantity math.LegacyDec, - oracleScaleFactor uint32, - isBinaryOptionsOrder bool, -) { - quantityDecrement := o.OrderInfo.Quantity.Sub(newQuantity) +func (m *OrderInfo) SubaccountID() common.Hash { + return common.HexToHash(m.SubaccountId) +} - // No-op if increasing quantity or order is a vanilla order - if !quantityDecrement.IsPositive() || o.IsVanilla() { - return +// Test Code Only (for v1 tests) +func (o *DerivativeMarketOrder) ComputeOrderHash(nonce uint32, marketId string) (common.Hash, error) { + triggerPrice := "" + if o.TriggerPrice != nil { + triggerPrice = o.TriggerPrice.String() } - if isBinaryOptionsOrder { - o.OrderInfo.Quantity = newQuantity - if o.IsVanilla() { - o.Margin = o.GetRequiredBinaryOptionsMargin(oracleScaleFactor) - } - } else { - o.Margin = o.Margin.Mul(newQuantity).Quo(o.OrderInfo.Quantity) - o.OrderInfo.Quantity = newQuantity - } + return ComputeOrderHash(marketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) } -func (o *DerivativeLimitOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { - // Margin = Price * Quantity for buys - if o.IsBuy() { - notional := o.Price().Mul(o.OrderInfo.Quantity) - return notional +// Test Code Only (for v1 tests) +func (o *DerivativeOrder) ComputeOrderHash(nonce, scaleFactor uint32) (common.Hash, error) { + triggerPrice := "" + if o.TriggerPrice != nil { + triggerPrice = o.TriggerPrice.String() } - // Margin = (scaled(1) - Price) * Quantity for sells - return o.OrderInfo.Quantity.Mul(GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(o.Price())) -} -func (o *DerivativeMarketOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { - // Margin = Price * Quantity for buys - if o.IsBuy() { - notional := o.Price().Mul(o.OrderInfo.Quantity) - return notional - } - // Margin = (scaled(1) - Price) * Quantity for sells - return o.OrderInfo.Quantity.Mul(GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(o.Price())) + o.OrderInfo.Price = PriceFromChainFormat(o.OrderInfo.Price, 0, scaleFactor) + o.Margin = NotionalFromChainFormat(o.Margin, scaleFactor) + + return ComputeOrderHash(o.MarketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) } +// Test Code Only (for v1 tests) func (o *DerivativeLimitOrder) GetCancelDepositDelta(feeRate math.LegacyDec) *DepositDelta { return &DepositDelta{ AvailableBalanceDelta: o.GetCancelRefundAmount(feeRate), @@ -214,85 +85,26 @@ func (o *DerivativeLimitOrder) GetCancelDepositDelta(feeRate math.LegacyDec) *De } } +// Test Code Only (for v1 tests) func (o *DerivativeLimitOrder) GetCancelRefundAmount(feeRate math.LegacyDec) math.LegacyDec { marginHoldRefund := math.LegacyZeroDec() - if o.IsVanilla() { - // negative fees are only accounted for upon matching + if !o.Margin.IsZero() { positiveFeePart := math.LegacyMaxDec(math.LegacyZeroDec(), feeRate) - //nolint:all - // Refund = (FillableQuantity / Quantity) * (Margin + Price * Quantity * feeRate) notional := o.OrderInfo.Price.Mul(o.OrderInfo.Quantity) marginHoldRefund = o.Fillable.Mul(o.Margin.Add(notional.Mul(positiveFeePart))).Quo(o.OrderInfo.Quantity) } return marginHoldRefund } -func (o *DerivativeOrder) CheckTickSize(minPriceTickSize, minQuantityTickSize math.LegacyDec) error { - if BreachesMinimumTickSize(o.OrderInfo.Price, minPriceTickSize) { - return errors.Wrapf(ErrInvalidPrice, "price %s must be a multiple of the minimum price tick size %s", o.OrderInfo.Price.String(), minPriceTickSize.String()) - } - if BreachesMinimumTickSize(o.OrderInfo.Quantity, minQuantityTickSize) { - return errors.Wrapf(ErrInvalidQuantity, "quantity %s must be a multiple of the minimum quantity tick size %s", o.OrderInfo.Quantity.String(), minQuantityTickSize.String()) - } - return nil -} - -func (o *DerivativeOrder) CheckNotional(minNotional math.LegacyDec) error { - orderNotional := o.GetQuantity().Mul(o.GetPrice()) - if !minNotional.IsNil() && orderNotional.LT(minNotional) { - return errors.Wrapf(ErrInvalidNotional, "order notional (%s) is less than the minimum notional for the market (%s)", orderNotional.String(), minNotional.String()) - } - return nil -} - -func GetScaledPrice(price math.LegacyDec, scaleFactor uint32) math.LegacyDec { - return price.Mul(math.LegacyNewDec(10).Power(uint64(scaleFactor))) -} - -func (o *DerivativeOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { - // Margin = Price * Quantity for buys - if o.IsBuy() { - notional := o.Price().Mul(o.OrderInfo.Quantity) - return notional - } - // Margin = (scaled(1) - Price) * Quantity for sells - return o.OrderInfo.Quantity.Mul(GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(o.Price())) -} - -func (o *DerivativeOrder) CheckMarginAndGetMarginHold(initialMarginRatio, executionMarkPrice, feeRate math.LegacyDec, marketType MarketType, oracleScaleFactor uint32) (marginHold math.LegacyDec, err error) { - notional := o.OrderInfo.Price.Mul(o.OrderInfo.Quantity) - positiveFeeRatePart := math.LegacyMaxDec(feeRate, math.LegacyZeroDec()) - feeAmount := notional.Mul(positiveFeeRatePart) - - marginHold = o.Margin.Add(feeAmount) - if marketType == MarketType_BinaryOption { - requiredMargin := o.GetRequiredBinaryOptionsMargin(oracleScaleFactor) - if !o.Margin.Equal(requiredMargin) { - return math.LegacyDec{}, errors.Wrapf(ErrInsufficientMargin, "margin check: need %s but got %s", requiredMargin.String(), o.Margin.String()) - } - return marginHold, nil - } - - // For perpetual and expiry futures margins - // Enforce that Margin ≥ InitialMarginRatio * Price * Quantity - if o.Margin.LT(initialMarginRatio.Mul(notional)) { - return math.LegacyDec{}, errors.Wrapf(ErrInsufficientMargin, "InitialMarginRatio Check: need at least %s but got %s", initialMarginRatio.Mul(notional).String(), o.Margin.String()) - } - - if err := o.CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, executionMarkPrice); err != nil { - return math.LegacyDec{}, err - } - - return marginHold, nil -} - +// Test Code Only (for v1 tests) func (o *DerivativeOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { // For Buys: MarkPrice ≥ (Margin - Price * Quantity) / ((InitialMarginRatio - 1) * Quantity) // For Sells: MarkPrice ≤ (Margin + Price * Quantity) / ((1 + InitialMarginRatio) * Quantity) markPriceThreshold := o.ComputeInitialMarginRequirementMarkPriceThreshold(initialMarginRatio) - return CheckInitialMarginMarkPriceRequirement(o.IsBuy(), markPriceThreshold, markPrice) + return CheckInitialMarginMarkPriceRequirement(o.OrderType.IsBuy(), markPriceThreshold, markPrice) } +// Test Code Only (for v1 tests) func CheckInitialMarginMarkPriceRequirement(isBuyOrLong bool, markPriceThreshold, markPrice math.LegacyDec) error { if isBuyOrLong && markPrice.LT(markPriceThreshold) { return errors.Wrapf(ErrInsufficientMargin, "Buy MarkPriceThreshold Check: mark/trigger price %s must be GTE %s", markPrice.String(), markPriceThreshold.String()) @@ -302,42 +114,12 @@ func CheckInitialMarginMarkPriceRequirement(isBuyOrLong bool, markPriceThreshold return nil } -// CheckValidConditionalPrice checks that conditional order type (STOP or TAKE) actually valid for current relation between triggerPrice and markPrice -func (o *DerivativeOrder) CheckValidConditionalPrice(markPrice math.LegacyDec) (err error) { - if !o.IsConditional() { - return nil - } - - ok := true - switch o.OrderType { - case OrderType_STOP_BUY, OrderType_TAKE_SELL: // higher - ok = o.TriggerPrice.GT(markPrice) - case OrderType_STOP_SELL, OrderType_TAKE_BUY: // lower - ok = o.TriggerPrice.LT(markPrice) - } - if !ok { - return errors.Wrapf(ErrInvalidTriggerPrice, "order type %s incompatible with trigger price %s and markPrice %s", o.OrderType.String(), o.TriggerPrice.String(), markPrice.String()) - } - return nil -} - -// CheckBinaryOptionsPricesWithinBounds checks that binary options order prices don't exceed 1 (scaled) -func (o *DerivativeOrder) CheckBinaryOptionsPricesWithinBounds(oracleScaleFactor uint32) (err error) { - maxScaledPrice := GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor) - if o.Price().GTE(maxScaledPrice) { - return errors.Wrapf(ErrInvalidPrice, "price must be less than %s", maxScaledPrice.String()) - } - - if o.IsConditional() && o.TriggerPrice.GTE(maxScaledPrice) { - return errors.Wrapf(ErrInvalidTriggerPrice, "trigger price must be less than %s", maxScaledPrice.String()) - } - return nil -} - +// Test Code Only (for v1 tests) func (o *DerivativeOrder) ComputeInitialMarginRequirementMarkPriceThreshold(initialMarginRatio math.LegacyDec) math.LegacyDec { - return ComputeMarkPriceThreshold(o.IsBuy(), o.Price(), o.GetQuantity(), o.Margin, initialMarginRatio) + return ComputeMarkPriceThreshold(o.OrderType.IsBuy(), o.Price(), o.OrderInfo.Quantity, o.Margin, initialMarginRatio) } +// Test Code Only (for v1 tests) func ComputeMarkPriceThreshold(isBuyOrLong bool, price, quantity, margin, initialMarginRatio math.LegacyDec) math.LegacyDec { notional := price.Mul(quantity) var numerator, denominator math.LegacyDec @@ -351,183 +133,17 @@ func ComputeMarkPriceThreshold(isBuyOrLong bool, price, quantity, margin, initia return numerator.Quo(denominator) } -func (o *DerivativeLimitOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { - return o.ToDerivativeOrder("").CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice) -} - -func (o *DerivativeMarketOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { - return o.ToDerivativeOrder("").CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice) -} - -func (o *DerivativeMarketOrder) ComputeOrderHash(nonce uint32, marketId string) (common.Hash, error) { - triggerPrice := "" - if o.TriggerPrice != nil { - triggerPrice = o.TriggerPrice.String() +// Test Code Only (for v1 tests) +func ResizeReduceOnlyOrder(o IMutableDerivativeOrder, newQuantity math.LegacyDec) error { + if o.IsVanilla() { + return ErrOrderInvalid.Wrap("ResizeReduceOnlyOrder should only be used for reduce only orders!") } - return computeOrderHash(marketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) -} - -// ComputeOrderHash computes the order hash for given derivative limit order -func (o *DerivativeOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { - triggerPrice := "" - if o.TriggerPrice != nil { - triggerPrice = o.TriggerPrice.String() + quantityDecrement := o.GetQuantity().Sub(newQuantity) + if !quantityDecrement.IsPositive() { + return nil } - return computeOrderHash(o.MarketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) -} - -func (o *DerivativeOrder) IsReduceOnly() bool { - return o.Margin.IsZero() -} - -func (o *DerivativeMarketOrder) IsReduceOnly() bool { - return o.Margin.IsZero() -} - -func (o *DerivativeLimitOrder) IsReduceOnly() bool { - return o.Margin.IsZero() -} - -func (o *DerivativeLimitOrder) Hash() common.Hash { - return common.BytesToHash(o.OrderHash) -} - -func (o *DerivativeMarketOrder) Hash() common.Hash { - return common.BytesToHash(o.OrderHash) -} - -func (o *DerivativeLimitOrder) FeeRecipient() common.Address { - return o.OrderInfo.FeeRecipientAddress() -} - -func (o *DerivativeMarketOrder) FeeRecipient() common.Address { - return o.OrderInfo.FeeRecipientAddress() -} - -func (o *DerivativeOrder) IsVanilla() bool { - return !o.IsReduceOnly() -} - -func (o *DerivativeMarketOrder) IsVanilla() bool { - return !o.IsReduceOnly() -} - -func (o *DerivativeLimitOrder) IsVanilla() bool { - return !o.IsReduceOnly() -} - -func (m *DerivativeMarketOrder) IsBuy() bool { - return m.OrderType.IsBuy() -} - -func (m *DerivativeLimitOrder) IsBuy() bool { - return m.OrderType.IsBuy() -} - -func (m *DerivativeOrder) IsBuy() bool { - return m.OrderType.IsBuy() -} - -func (m *DerivativeMarketOrder) Quantity() math.LegacyDec { - return m.OrderInfo.Quantity -} - -func (m *DerivativeMarketOrder) FillableQuantity() math.LegacyDec { - return m.OrderInfo.Quantity -} - -func (m *DerivativeMarketOrder) Price() math.LegacyDec { - return m.OrderInfo.Price -} - -func (m *DerivativeLimitOrder) Price() math.LegacyDec { - return m.OrderInfo.Price -} - -func (m *DerivativeOrder) Price() math.LegacyDec { - return m.OrderInfo.Price -} - -func (o *DerivativeOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (o *DerivativeMarketOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (o *DerivativeLimitOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (o *DerivativeLimitOrder) Cid() string { - return o.OrderInfo.GetCid() -} - -func (o *DerivativeMarketOrder) Cid() string { - return o.OrderInfo.GetCid() -} - -func (o *DerivativeOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} -func (o *DerivativeOrder) Cid() string { - return o.OrderInfo.GetCid() -} - -func (o *DerivativeOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() -} - -func (o *DerivativeOrder) MarketID() common.Hash { - return common.HexToHash(o.MarketId) -} - -func (o *DerivativeMarketOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *DerivativeLimitOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *OrderInfo) SubaccountID() common.Hash { - return common.HexToHash(o.SubaccountId) -} - -func (o *OrderInfo) FeeRecipientAddress() common.Address { - address, _ := sdk.AccAddressFromBech32(o.FeeRecipient) - return common.BytesToAddress(address.Bytes()) -} - -func (o *DerivativeLimitOrder) SdkAccAddress() sdk.AccAddress { - return sdk.AccAddress(o.SubaccountID().Bytes()[:common.AddressLength]) -} - -func (o *DerivativeLimitOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() -} - -func (o *DerivativeMarketOrder) SdkAccAddress() sdk.AccAddress { - return sdk.AccAddress(o.SubaccountID().Bytes()[:common.AddressLength]) -} - -func (o *DerivativeMarketOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() -} - -func (o *TrimmedDerivativeLimitOrder) IsReduceOnly() bool { - return o.Margin.IsZero() -} - -func EmptyDerivativeMarketOrderResults() *DerivativeMarketOrderResults { - return &DerivativeMarketOrderResults{ - Quantity: math.LegacyZeroDec(), - Price: math.LegacyZeroDec(), - Fee: math.LegacyZeroDec(), - PositionDelta: PositionDelta{}, - Payout: math.LegacyZeroDec(), - } + o.SetQuantity(newQuantity) + return nil } diff --git a/chain/exchange/types/errors.go b/chain/exchange/types/errors.go index b7b6035b..99bb5be8 100644 --- a/chain/exchange/types/errors.go +++ b/chain/exchange/types/errors.go @@ -81,7 +81,7 @@ var ( ErrSenderIsNotAnAdmin = errors.Register(ModuleName, 74, "sender should be a market admin") ErrMarketAlreadyScheduledToSettle = errors.Register(ModuleName, 75, "market is already scheduled to settle") ErrGenericMarketNotFound = errors.Register(ModuleName, 76, "market not found") - ErrInvalidDenomDecimal = errors.Register(ModuleName, 77, "denom decimal cannot be below 1 or above max scale factor") + ErrInvalidDenomDecimal = errors.Register(ModuleName, 77, "denom decimal cannot be higher than max scale factor") ErrInvalidState = errors.Register(ModuleName, 78, "state is invalid") ErrTransientOrdersUpToCancelNotSupported = errors.Register(ModuleName, 79, "transient orders up to cancellation not supported") ErrInvalidTrade = errors.Register(ModuleName, 80, "invalid trade") @@ -109,4 +109,5 @@ var ( ErrInvalidStakeGrant = errors.Register(ModuleName, 102, "invalid stake grant") ErrInsufficientStake = errors.Register(ModuleName, 103, "insufficient stake for grant") ErrInvalidPermissions = errors.Register(ModuleName, 104, "invalid permissions") + ErrDenomDecimalsDoNotMatch = errors.Register(ModuleName, 105, "the decimals specified for the denom is incorrect") ) diff --git a/chain/exchange/types/exchange.go b/chain/exchange/types/exchange.go index ac34af0e..feb89e59 100644 --- a/chain/exchange/types/exchange.go +++ b/chain/exchange/types/exchange.go @@ -1,62 +1,11 @@ package types import ( - "fmt" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ) -type MatchedMarketDirection struct { - MarketId common.Hash - BuysExists bool - SellsExists bool -} - -type TriggeredOrdersInMarket struct { - Market *DerivativeMarket - MarkPrice math.LegacyDec - MarketOrders []*DerivativeMarketOrder - LimitOrders []*DerivativeLimitOrder - HasLimitBuyOrders bool - HasLimitSellOrders bool -} - -func (e ExecutionType) IsMarket() bool { - return e == ExecutionType_Market -} - -func (e ExecutionType) IsMaker() bool { - return !e.IsTaker() -} - -func (e ExecutionType) IsTaker() bool { - return e == ExecutionType_Market || e == ExecutionType_LimitMatchNewOrder -} - -func (s MarketStatus) SupportsOrderCancellations() bool { - switch s { - case MarketStatus_Active, MarketStatus_Demolished, MarketStatus_Expired, MarketStatus_Paused: - return true - default: - return false - } -} - -type TradingRewardAccountPoints struct { - Account sdk.AccAddress - Points math.LegacyDec -} - -func (p *PointsMultiplier) GetMultiplier(e ExecutionType) math.LegacyDec { - if e.IsMaker() { - return p.MakerPointsMultiplier - } - - return p.TakerPointsMultiplier -} - type IOrder interface { GetPrice() math.LegacyDec GetQuantity() math.LegacyDec @@ -80,159 +29,53 @@ type IMutableDerivativeOrder interface { SetMargin(math.LegacyDec) } -// DerivativeOrder - IMutableDerivativeOrder implementation - -func (o *DerivativeOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price -} - -func (o *DerivativeOrder) GetQuantity() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *DerivativeOrder) GetFillable() math.LegacyDec { - return o.GetQuantity() -} - -func (o *DerivativeOrder) GetMargin() math.LegacyDec { - return o.Margin -} -func (o *DerivativeOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *DerivativeOrder) SetPrice(price math.LegacyDec) { - o.OrderInfo.Price = price +func (al AtomicMarketOrderAccessLevel) IsValid() bool { + switch al { + case AtomicMarketOrderAccessLevel_Nobody, + AtomicMarketOrderAccessLevel_SmartContractsOnly, + AtomicMarketOrderAccessLevel_BeginBlockerSmartContractsOnly, + AtomicMarketOrderAccessLevel_Everyone: + return true + default: + return false + } } -func (o *DerivativeOrder) SetQuantity(quantity math.LegacyDec) { - o.OrderInfo.Quantity = quantity +type MatchedMarketDirection struct { + MarketId common.Hash + BuysExists bool + SellsExists bool } -func (o *DerivativeOrder) SetMargin(margin math.LegacyDec) { - o.Margin = margin +type TriggeredOrdersInMarket struct { + Market *DerivativeMarket + MarkPrice math.LegacyDec + MarketOrders []*DerivativeMarketOrder + LimitOrders []*DerivativeLimitOrder + HasLimitBuyOrders bool + HasLimitSellOrders bool } -// DerivativeLimitOrder - IMutableDerivativeOrder implementation - -func (o *DerivativeLimitOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price +type TradingRewardAccountPoints struct { + Account sdk.AccAddress + Points math.LegacyDec } -func (o *DerivativeLimitOrder) GetQuantity() math.LegacyDec { +func (o *DerivativeOrder) GetQuantity() math.LegacyDec { return o.OrderInfo.Quantity } -func (o *DerivativeLimitOrder) GetFillable() math.LegacyDec { - return o.Fillable -} -func (o *DerivativeLimitOrder) GetMargin() math.LegacyDec { - return o.Margin -} - -func (o *DerivativeLimitOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *DerivativeLimitOrder) SetPrice(price math.LegacyDec) { - o.OrderInfo.Price = price -} - -func (o *DerivativeLimitOrder) SetQuantity(quantity math.LegacyDec) { - o.OrderInfo.Quantity = quantity - o.Fillable = quantity -} - -func (o *DerivativeLimitOrder) SetMargin(margin math.LegacyDec) { - o.Margin = margin -} - -// DerivativeMarketOrder - IMutableDerivativeOrder implementation - -func (o *DerivativeMarketOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price +func (o *DerivativeOrder) GetFillable() math.LegacyDec { + return o.GetQuantity() } -func (o *DerivativeMarketOrder) GetQuantity() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *DerivativeMarketOrder) GetFillable() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *DerivativeMarketOrder) GetMargin() math.LegacyDec { +func (o *DerivativeOrder) GetMargin() math.LegacyDec { return o.Margin } -func (o *DerivativeMarketOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} -func (o *DerivativeMarketOrder) SetPrice(price math.LegacyDec) { - o.OrderInfo.Price = price -} - -func (o *DerivativeMarketOrder) SetQuantity(quantity math.LegacyDec) { - o.OrderInfo.Quantity = quantity -} - -func (o *DerivativeMarketOrder) SetMargin(margin math.LegacyDec) { - o.Margin = margin -} - -func (o *DerivativeMarketOrder) DebugString() string { - return fmt.Sprintf("(q:%v, p:%v, m:%v, isLong: %v)", o.Quantity(), o.Price(), o.Margin, o.IsBuy()) -} - -// spot orders - -func (o *SpotOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price -} -func (o *SpotLimitOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price -} -func (o *SpotMarketOrder) GetPrice() math.LegacyDec { - return o.OrderInfo.Price -} - -func (o *SpotOrder) GetQuantity() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *SpotLimitOrder) GetQuantity() math.LegacyDec { - return o.OrderInfo.Quantity -} - -func (o *SpotMarketOrder) GetQuantity() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *SpotMarketOrder) IsBuy() bool { - return o.OrderType.IsBuy() -} -func (o *SpotOrder) GetFillable() math.LegacyDec { - return o.OrderInfo.Quantity -} -func (o *SpotMarketOrder) GetFillable() math.LegacyDec { - // no fillable for market order, but quantity works same in this case - return o.OrderInfo.Quantity -} -func (o *SpotLimitOrder) GetFillable() math.LegacyDec { - return o.Fillable -} -func (o *SpotOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} -func (o *SpotMarketOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} -func (o *SpotLimitOrder) GetSubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() +func (m *SpotOrder) GetQuantity() math.LegacyDec { + return m.OrderInfo.Quantity } -func (al AtomicMarketOrderAccessLevel) IsValid() bool { - switch al { - case AtomicMarketOrderAccessLevel_Nobody, - AtomicMarketOrderAccessLevel_SmartContractsOnly, - AtomicMarketOrderAccessLevel_BeginBlockerSmartContractsOnly, - AtomicMarketOrderAccessLevel_Everyone: - return true - default: - return false - } +func (m *SpotOrder) GetFillable() math.LegacyDec { + return m.OrderInfo.Quantity } diff --git a/chain/exchange/types/exchange.pb.go b/chain/exchange/types/exchange.pb.go index ff40e9d8..4417ebc5 100644 --- a/chain/exchange/types/exchange.pb.go +++ b/chain/exchange/types/exchange.pb.go @@ -512,6 +512,8 @@ type DerivativeMarket struct { Admin string `protobuf:"bytes,18,opt,name=admin,proto3" json:"admin,omitempty"` // level of admin permissions AdminPermissions uint32 `protobuf:"varint,19,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,20,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *DerivativeMarket) Reset() { *m = DerivativeMarket{} } @@ -590,6 +592,8 @@ type BinaryOptionsMarket struct { MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` // level of admin permissions AdminPermissions uint32 `protobuf:"varint,19,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,20,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *BinaryOptionsMarket) Reset() { *m = BinaryOptionsMarket{} } @@ -981,6 +985,10 @@ type SpotMarket struct { Admin string `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` // level of admin permissions AdminPermissions uint32 `protobuf:"varint,13,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,14,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,15,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *SpotMarket) Reset() { *m = SpotMarket{} } @@ -1065,6 +1073,20 @@ func (m *SpotMarket) GetAdminPermissions() uint32 { return 0 } +func (m *SpotMarket) GetBaseDecimals() uint32 { + if m != nil { + return m.BaseDecimals + } + return 0 +} + +func (m *SpotMarket) GetQuoteDecimals() uint32 { + if m != nil { + return m.QuoteDecimals + } + return 0 +} + // A subaccount's deposit for a given base currency type Deposit struct { AvailableBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=available_balance,json=availableBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available_balance"` @@ -3344,285 +3366,287 @@ func init() { } var fileDescriptor_2116e2804e9c53f9 = []byte{ - // 4438 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7c, 0xdb, 0x6f, 0x63, 0x59, - 0x56, 0x77, 0x1d, 0x3b, 0x17, 0x7b, 0xf9, 0x12, 0xe7, 0xe4, 0xe6, 0x24, 0x55, 0x89, 0xdb, 0xd5, - 0x35, 0x9d, 0xae, 0xee, 0x4e, 0xa6, 0xfa, 0xfb, 0x7a, 0xd4, 0xd3, 0xa3, 0xd1, 0xb4, 0x13, 0x27, - 0x55, 0xa6, 0x73, 0x9b, 0xe3, 0xa4, 0xa1, 0x66, 0x34, 0x73, 0xb4, 0x73, 0xce, 0x4e, 0xbc, 0x2b, - 0xe7, 0xe2, 0x3a, 0xfb, 0x38, 0x95, 0x34, 0x42, 0xe2, 0xa1, 0x85, 0x98, 0x00, 0x62, 0x78, 0x40, - 0x48, 0x48, 0x41, 0xc3, 0x03, 0x42, 0xf0, 0x02, 0xef, 0xf0, 0x80, 0x84, 0x80, 0x79, 0x18, 0xa4, - 0x79, 0x40, 0x02, 0x21, 0x31, 0xa0, 0x6e, 0x24, 0x10, 0x9a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32, 0xff, 0x1f, 0xa6, 0x1d, 0x7c, 0x1a, 0x1d, 0x8f, 0x45, 0x4a, - 0x1e, 0xe2, 0x4a, 0x9e, 0x64, 0xad, 0x72, 0x28, 0x91, 0x9a, 0x63, 0xa7, 0x63, 0xe1, 0x79, 0xda, - 0x70, 0xdb, 0xe9, 0x58, 0x70, 0x90, 0x56, 0xfe, 0x5c, 0x81, 0xe9, 0x0e, 0x41, 0x4a, 0x38, 0x55, - 0x03, 0x35, 0x32, 0x88, 0x60, 0x04, 0x42, 0xa8, 0xfd, 0x4d, 0x68, 0x3c, 0x22, 0x0f, 0x30, 0xb7, - 0xa1, 0x10, 0xc3, 0x14, 0x76, 0x30, 0x80, 0xec, 0xc7, 0x22, 0x62, 0xb1, 0xd2, 0x1f, 0x41, 0xde, - 0x42, 0xb4, 0xdb, 0xf8, 0x73, 0xac, 0x36, 0x14, 0x48, 0xf9, 0xd7, 0x14, 0x58, 0xe8, 0xdc, 0x5e, - 0xd4, 0x43, 0x93, 0xba, 0xde, 0x72, 0x2e, 0x33, 0xdf, 0xc4, 0x2d, 0xcc, 0xf7, 0xab, 0x30, 0xb9, - 0x7d, 0x99, 0xe2, 0x1e, 0x41, 0x9e, 0xab, 0x3b, 0x9a, 0x8e, 0x22, 0xa6, 0xc3, 0x6a, 0xa3, 0xe9, - 0xfc, 0x9b, 0x02, 0xf9, 0x2d, 0x62, 0x72, 0xac, 0x8a, 0x63, 0xee, 0xed, 0xac, 0xaa, 0x1f, 0x42, - 0xda, 0x26, 0xa6, 0x1c, 0x9a, 0xd2, 0xbf, 0xef, 0x4c, 0xd9, 0x12, 0x87, 0x45, 0xc6, 0x03, 0x66, - 0xb6, 0x07, 0xad, 0xb3, 0xae, 0x19, 0x5e, 0x0b, 0x93, 0x65, 0xa4, 0xab, 0xad, 0x33, 0x01, 0xf5, - 0x11, 0x8c, 0x71, 0x28, 0x8a, 0x2d, 0x4b, 0x62, 0x25, 0xfb, 0xc7, 0xca, 0x31, 0xda, 0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67, 0xd7, 0xb5, 0x42, 0x41, 0xf4, 0x6f, 0xab, 0x54, 0xe7, 0x21, 0xb3, 0xf7, - 0x7c, 0x77, 0x5d, 0xdf, 0xaa, 0x68, 0x1f, 0xad, 0xef, 0x15, 0x4a, 0x62, 0x2a, 0xa2, 0xa4, 0xce, - 0x02, 0xf0, 0xc6, 0xcd, 0xda, 0x56, 0x6d, 0xaf, 0xf0, 0xe1, 0x5c, 0xfa, 0xfc, 0xa2, 0x34, 0xcc, - 0x0b, 0xab, 0x8d, 0xef, 0x7f, 0xb6, 0xa0, 0xfc, 0xf0, 0xb3, 0x05, 0xe5, 0x9f, 0x3e, 0x5b, 0x50, - 0xbe, 0xfb, 0xf9, 0xc2, 0xbd, 0x1f, 0x7e, 0xbe, 0x70, 0xef, 0xef, 0x3e, 0x5f, 0xb8, 0xf7, 0x8d, - 0xed, 0x58, 0x9a, 0x54, 0x0b, 0x1c, 0xf8, 0x26, 0x3a, 0xa0, 0x2b, 0xa1, 0x3b, 0x7f, 0xc7, 0x70, - 0x3d, 0x1c, 0x2f, 0x36, 0x10, 0x71, 0x56, 0x6c, 0x97, 0xa5, 0xeb, 0x34, 0xfa, 0x4b, 0x14, 0x3c, - 0xa5, 0x3a, 0x18, 0xe1, 0xdf, 0x3f, 0xfe, 0xbf, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x35, 0xcc, - 0x95, 0x72, 0xac, 0x42, 0x00, 0x00, + // 4472 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5c, 0xd9, 0x6f, 0x64, 0xd9, + 0x59, 0xef, 0x5b, 0xe5, 0xa5, 0xea, 0xab, 0xc5, 0xe5, 0xeb, 0xad, 0x6c, 0x77, 0xdb, 0x35, 0xd5, + 0xd3, 0x19, 0x4f, 0xcf, 0x8c, 0x9d, 0x1e, 0x98, 0x68, 0x32, 0x51, 0x94, 0x29, 0x6f, 0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, 0x01, 0x78, 0x95, 0xaf, 0xff, 0x65, 0x05, 0x4a, 0xc8, + 0x77, 0x6d, 0x62, 0x04, 0x2c, 0x85, 0x8e, 0x91, 0x61, 0x60, 0x4a, 0x75, 0x0b, 0x9f, 0x62, 0xab, + 0x38, 0x51, 0x52, 0x96, 0xf2, 0x6f, 0xbf, 0xbb, 0x7c, 0x75, 0x20, 0x5e, 0xae, 0x70, 0x0c, 0xc1, + 0x85, 0x1b, 0x40, 0x85, 0x03, 0x6c, 0x31, 0x7a, 0xed, 0x3e, 0xea, 0xd1, 0xaa, 0x9e, 0xc1, 0x6b, + 0x3c, 0x06, 0x74, 0x1b, 0x06, 0x5b, 0xa2, 0x72, 0x45, 0x13, 0xec, 0x15, 0x27, 0xfb, 0x97, 0x76, + 0x99, 0x61, 0x76, 0x8c, 0x6a, 0x13, 0xe3, 0xed, 0x10, 0x4e, 0xfd, 0x44, 0x81, 0xb7, 0x62, 0xd6, + 0xdd, 0xc7, 0x00, 0xa6, 0xfa, 0x1f, 0xc0, 0x52, 0x84, 0x7c, 0xcd, 0x30, 0x7e, 0x4d, 0x81, 0x27, + 0x6d, 0xea, 0xef, 0x63, 0x28, 0xd3, 0xfd, 0x0f, 0xe5, 0x8d, 0x16, 0x53, 0xb8, 0x66, 0x34, 0xdf, + 0x86, 0x59, 0x9b, 0x38, 0xc4, 0x46, 0x96, 0xce, 0x73, 0x1e, 0xc3, 0xb5, 0xa2, 0x00, 0x36, 0xd3, + 0x3f, 0xd3, 0x69, 0x89, 0xb2, 0x27, 0x41, 0x82, 0xc8, 0xf5, 0x4d, 0x78, 0x83, 0xd0, 0xd0, 0xb0, + 0x3b, 0x73, 0x1b, 0x0b, 0x35, 0x1d, 0xa3, 0xae, 0x63, 0x07, 0x1d, 0x5a, 0xd8, 0x2c, 0x16, 0x4b, + 0xca, 0x52, 0x4a, 0xfb, 0x02, 0xa1, 0xd2, 0x76, 0xd7, 0xdb, 0xd2, 0x97, 0x2d, 0xde, 0x7d, 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a, 0x6b, 0xab, 0xb1, 0xa6, 0x88, 0xe2, 0x25, 0x7c, 0x21, + 0xce, 0x24, 0x22, 0x16, 0xf6, 0x64, 0x34, 0xed, 0xa6, 0xc5, 0xf3, 0xb9, 0x41, 0x8e, 0xf7, 0xca, + 0xb1, 0xb1, 0x05, 0x2c, 0xb9, 0xba, 0xd6, 0x42, 0xb8, 0xae, 0x86, 0x30, 0xc0, 0xc1, 0x5e, 0xbb, + 0x21, 0x94, 0xff, 0x36, 0x01, 0x13, 0x61, 0x74, 0xee, 0x57, 0xc4, 0xdf, 0x80, 0x99, 0xab, 0x4e, + 0x7d, 0x06, 0xc8, 0x86, 0x27, 0xeb, 0xdd, 0x8e, 0x7b, 0x0e, 0x60, 0xb2, 0xeb, 0x31, 0xcf, 0x00, + 0x27, 0xb1, 0x6a, 0xbd, 0xf3, 0x7c, 0xe7, 0x67, 0x61, 0xda, 0xc1, 0x67, 0xd1, 0x61, 0x5b, 0xa4, + 0xe4, 0x21, 0xae, 0xe4, 0x49, 0xd6, 0x2a, 0x87, 0x12, 0xa9, 0x39, 0x76, 0xd6, 0x16, 0x9e, 0xce, + 0x0d, 0xb7, 0x9c, 0xb5, 0x05, 0xc7, 0x72, 0xe5, 0xcf, 0x14, 0x98, 0x6e, 0x13, 0xa4, 0x84, 0x53, + 0x35, 0x50, 0x23, 0x83, 0x08, 0x46, 0x20, 0x84, 0xda, 0xdf, 0x84, 0xc6, 0x23, 0xf2, 0x00, 0x73, + 0x07, 0x0a, 0x31, 0x4c, 0x61, 0x07, 0x03, 0xc8, 0x7e, 0x2c, 0x22, 0x16, 0x0e, 0xe1, 0x11, 0xe4, + 0x2d, 0x44, 0x3b, 0x8d, 0x3f, 0xc7, 0x6a, 0x43, 0x81, 0x94, 0x7f, 0x43, 0x81, 0x85, 0xf6, 0xcd, + 0x4a, 0x2d, 0x34, 0xa9, 0xeb, 0x2d, 0xa7, 0x9b, 0xf9, 0x26, 0x6e, 0x61, 0xbe, 0x5f, 0x85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 0x7f, 0xa8, 0xc0, 0xe8, 0x3a, 0x6e, 0xb8, 0x94, 0xf8, 0xea, 0x1e, + 0x8c, 0xa3, 0x53, 0x44, 0x2c, 0x74, 0xc8, 0x4f, 0x61, 0x2c, 0xb6, 0xe7, 0x1f, 0xc4, 0x99, 0x17, + 0x42, 0xea, 0x55, 0x41, 0xac, 0x3e, 0x85, 0x9c, 0xef, 0xfa, 0xc8, 0x0a, 0xd1, 0x12, 0x83, 0x58, + 0x39, 0xa3, 0x94, 0x48, 0xe5, 0x37, 0x61, 0xb2, 0xd6, 0x3c, 0x44, 0x06, 0xbf, 0xb0, 0xd8, 0xf7, + 0x90, 0x89, 0x77, 0x5c, 0xc6, 0x61, 0x12, 0x86, 0x1d, 0x37, 0x18, 0x67, 0x4e, 0x13, 0x05, 0x16, + 0xb2, 0xd2, 0xfc, 0x50, 0x94, 0xfb, 0xed, 0x87, 0x90, 0xa3, 0x21, 0x6d, 0xe4, 0xbb, 0xb3, 0x51, + 0x65, 0xd5, 0x64, 0x9d, 0xf8, 0x5a, 0xc4, 0x06, 0x69, 0x10, 0xec, 0xf8, 0xc1, 0x36, 0xef, 0x08, + 0x63, 0x2d, 0xa8, 0x53, 0xbf, 0x0c, 0xc3, 0xed, 0xbe, 0xea, 0xda, 0x79, 0x08, 0x0a, 0xf5, 0x6b, + 0x90, 0x0a, 0xac, 0x72, 0x10, 0xb7, 0x11, 0x12, 0xa9, 0x05, 0x48, 0x1a, 0xc4, 0x14, 0x7e, 0x42, + 0x63, 0x3f, 0xcb, 0x9f, 0x24, 0x20, 0xcd, 0xdc, 0x1e, 0x9f, 0xe9, 0x75, 0x87, 0x7b, 0x20, 0x8e, + 0x9f, 0x89, 0x73, 0xe4, 0xca, 0x4b, 0xe6, 0x47, 0xbd, 0x56, 0x6c, 0x28, 0x3d, 0x79, 0x0f, 0x91, + 0x76, 0x43, 0x71, 0xae, 0x07, 0x58, 0x7c, 0x07, 0x9b, 0xe4, 0xab, 0xff, 0x7a, 0x2c, 0xbe, 0x85, + 0x15, 0x28, 0x7c, 0x07, 0xcb, 0x4c, 0xc3, 0x23, 0xc7, 0xc7, 0xd8, 0x93, 0xee, 0x7f, 0x68, 0x80, + 0x50, 0x22, 0x29, 0x85, 0xf7, 0xff, 0x41, 0x02, 0xf2, 0x4c, 0x0c, 0x5b, 0xc4, 0x26, 0x52, 0x16, + 0xad, 0xd3, 0x55, 0xee, 0x70, 0xba, 0x89, 0x1b, 0x4e, 0xf7, 0x6b, 0x90, 0x3a, 0x22, 0x16, 0x5f, + 0x1c, 0x83, 0x18, 0x4f, 0x48, 0x74, 0x77, 0xf2, 0x62, 0x61, 0x50, 0x4c, 0xa8, 0x8e, 0x68, 0x9d, + 0xdb, 0x53, 0x56, 0x8e, 0xf4, 0x29, 0xa2, 0xf5, 0xf2, 0x3f, 0x24, 0x60, 0x2c, 0x0a, 0xa6, 0x77, + 0x2f, 0xcf, 0x4d, 0xc8, 0x4a, 0x6f, 0xa0, 0xf3, 0x93, 0xfc, 0x01, 0x5c, 0x42, 0x46, 0x12, 0x3e, + 0x75, 0x2d, 0xb3, 0x6d, 0x1a, 0xc9, 0xb6, 0x69, 0xb4, 0xa9, 0x6d, 0xe8, 0xae, 0xac, 0x74, 0xf8, + 0xa6, 0x56, 0xfa, 0x77, 0x09, 0x18, 0x6b, 0xbb, 0x5d, 0xfd, 0xbf, 0xb6, 0x64, 0xbf, 0x02, 0x23, + 0xe2, 0x18, 0x79, 0x10, 0x07, 0x26, 0x49, 0xee, 0x50, 0x92, 0xff, 0x95, 0x84, 0xf9, 0x28, 0x16, + 0xf0, 0x91, 0x1e, 0xba, 0xee, 0xc9, 0x36, 0xf6, 0x91, 0x89, 0x7c, 0xa4, 0x7e, 0x19, 0x66, 0x4f, + 0x91, 0xc3, 0xd6, 0x8d, 0x6e, 0x31, 0x97, 0x20, 0x2f, 0xde, 0xc4, 0x55, 0xb7, 0x08, 0x13, 0xd3, + 0xb2, 0x43, 0xe4, 0x32, 0xc4, 0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x59, 0xdf, 0xb7, 0xa2, 0xab, 0xf2, 0xdf, 0x57, 0x20, + 0xfb, 0x11, 0x17, 0xb4, 0x86, 0x0d, 0xd7, 0x33, 0xf9, 0x55, 0x1f, 0x37, 0x22, 0xa9, 0x31, 0x65, + 0x90, 0xab, 0x3e, 0x46, 0x28, 0xd0, 0x18, 0x8e, 0x1f, 0xc7, 0x19, 0xe4, 0xa4, 0xdb, 0x8f, 0x70, + 0xca, 0xbf, 0xa5, 0x40, 0xbe, 0x22, 0x22, 0xb3, 0x74, 0x40, 0x6a, 0x11, 0x46, 0x65, 0xac, 0x96, + 0x21, 0x3f, 0x28, 0xaa, 0x18, 0x46, 0x3f, 0x47, 0x67, 0x18, 0x60, 0x97, 0x7f, 0x45, 0x81, 0x2c, + 0x4f, 0x89, 0x85, 0xcc, 0x68, 0xef, 0xdd, 0xdc, 0x33, 0x98, 0xb4, 0x90, 0x8f, 0xa9, 0xaf, 0x33, + 0xe7, 0xc2, 0x53, 0x46, 0x37, 0x1a, 0xe1, 0x6b, 0xd7, 0x79, 0x2b, 0xc9, 0x44, 0x53, 0x05, 0x48, + 0x9c, 0x6f, 0xf9, 0x4b, 0x90, 0x8b, 0x12, 0x97, 0xea, 0x3a, 0xbf, 0xf8, 0x6c, 0x49, 0xc0, 0x44, + 0xbc, 0xce, 0x6a, 0xb9, 0x78, 0x06, 0x46, 0xcb, 0x7f, 0xa4, 0x40, 0x26, 0x06, 0xa4, 0xde, 0x87, + 0x74, 0x7b, 0xd0, 0x89, 0x2a, 0x6e, 0xb3, 0x55, 0x8c, 0x6f, 0x53, 0x93, 0x37, 0xd8, 0xa6, 0x96, + 0x6d, 0x18, 0x16, 0x9f, 0xd8, 0x3c, 0x01, 0xa5, 0x31, 0x88, 0x31, 0x2a, 0x0d, 0x46, 0xf2, 0x62, + 0x90, 0x31, 0x2b, 0x2f, 0xca, 0xbf, 0xab, 0xc0, 0x62, 0x25, 0x38, 0x11, 0x8e, 0x44, 0xdb, 0xb2, + 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0x52, 0x35, 0x70, 0xe0, 0x5b, 0xe8, 0x90, 0xae, 0x84, 0xee, 0xfc, + 0x2d, 0xc3, 0xf5, 0x70, 0xbc, 0x58, 0x47, 0xc4, 0x59, 0xb1, 0x5d, 0x96, 0xae, 0xd3, 0xe8, 0x6f, + 0x64, 0xf0, 0x94, 0xea, 0x70, 0x84, 0x7f, 0x99, 0xf9, 0x33, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, + 0x6a, 0xde, 0xbc, 0xbe, 0x46, 0x43, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -4088,6 +4112,13 @@ func (m *DerivativeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } if m.AdminPermissions != 0 { i = encodeVarintExchange(dAtA, i, uint64(m.AdminPermissions)) i-- @@ -4271,6 +4302,13 @@ func (m *BinaryOptionsMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } if m.AdminPermissions != 0 { i = encodeVarintExchange(dAtA, i, uint64(m.AdminPermissions)) i-- @@ -4741,6 +4779,16 @@ func (m *SpotMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x78 + } + if m.BaseDecimals != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x70 + } if m.AdminPermissions != 0 { i = encodeVarintExchange(dAtA, i, uint64(m.AdminPermissions)) i-- @@ -7123,6 +7171,9 @@ func (m *DerivativeMarket) Size() (n int) { if m.AdminPermissions != 0 { n += 2 + sovExchange(uint64(m.AdminPermissions)) } + if m.QuoteDecimals != 0 { + n += 2 + sovExchange(uint64(m.QuoteDecimals)) + } return n } @@ -7190,6 +7241,9 @@ func (m *BinaryOptionsMarket) Size() (n int) { if m.AdminPermissions != 0 { n += 2 + sovExchange(uint64(m.AdminPermissions)) } + if m.QuoteDecimals != 0 { + n += 2 + sovExchange(uint64(m.QuoteDecimals)) + } return n } @@ -7347,6 +7401,12 @@ func (m *SpotMarket) Size() (n int) { if m.AdminPermissions != 0 { n += 1 + sovExchange(uint64(m.AdminPermissions)) } + if m.BaseDecimals != 0 { + n += 1 + sovExchange(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovExchange(uint64(m.QuoteDecimals)) + } return n } @@ -9739,6 +9799,25 @@ func (m *DerivativeMarket) Unmarshal(dAtA []byte) error { break } } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExchange(dAtA[iNdEx:]) @@ -10335,6 +10414,25 @@ func (m *BinaryOptionsMarket) Unmarshal(dAtA []byte) error { break } } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExchange(dAtA[iNdEx:]) @@ -11643,6 +11741,44 @@ func (m *SpotMarket) Unmarshal(dAtA []byte) error { break } } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipExchange(dAtA[iNdEx:]) diff --git a/chain/exchange/types/fee_discounts.go b/chain/exchange/types/fee_discounts.go index 3e0bdec4..628ca995 100644 --- a/chain/exchange/types/fee_discounts.go +++ b/chain/exchange/types/fee_discounts.go @@ -9,73 +9,4 @@ type FeeDiscountRates struct { TakerDiscountRate math.LegacyDec } -func (s *FeeDiscountSchedule) CalculateFeeDiscountTier( - stakedAmount math.Int, - tradingVolume math.LegacyDec, -) ( - feeDiscountRates *FeeDiscountRates, - tierLevel uint64, -) { - highestTierLevel := 0 - // O(N) but probably the most efficient way nonetheless since we just have 10 tiers and most will be on low tiers - for idx, tier := range s.TierInfos { - // both tier conditions must be satisfied to reach a tier level - if stakedAmount.LT(tier.StakedAmount) || tradingVolume.LT(tier.Volume) { - break - } - highestTierLevel = idx + 1 - } - - tierLevel = uint64(highestTierLevel) - - if tierLevel == 0 { - feeDiscountRates = &FeeDiscountRates{ - MakerDiscountRate: math.LegacyZeroDec(), - TakerDiscountRate: math.LegacyZeroDec(), - } - } else { - feeDiscountRates = &FeeDiscountRates{ - MakerDiscountRate: s.TierInfos[highestTierLevel-1].MakerDiscountRate, - TakerDiscountRate: s.TierInfos[highestTierLevel-1].TakerDiscountRate, - } - } - - return feeDiscountRates, tierLevel -} - -func (s *FeeDiscountSchedule) TierOneRequirements() ( - minStakedAmount math.Int, - minTradingFeePaid math.LegacyDec, -) { - // s.TierInfos[0] is tier one, since tier 0 is implicit - return s.TierInfos[0].StakedAmount, s.TierInfos[0].Volume -} - type FeeDiscountRatesMap map[uint64]*FeeDiscountRates - -func (s *FeeDiscountSchedule) GetFeeDiscountRatesMap() FeeDiscountRatesMap { - if s == nil { - return make(FeeDiscountRatesMap) - } - - feeDiscountRatesMap := make(FeeDiscountRatesMap, len(s.TierInfos)) - feeDiscountRatesMap[0] = &FeeDiscountRates{ - MakerDiscountRate: math.LegacyZeroDec(), - TakerDiscountRate: math.LegacyZeroDec(), - } - - for idx, tierInfo := range s.TierInfos { - feeDiscountRatesMap[uint64(idx+1)] = &FeeDiscountRates{ - MakerDiscountRate: tierInfo.MakerDiscountRate, - TakerDiscountRate: tierInfo.TakerDiscountRate, - } - } - return feeDiscountRatesMap -} - -func NewFeeDiscountTierTTL(tier uint64, ttlTimestamp int64) *FeeDiscountTierTTL { - return &FeeDiscountTierTTL{ - Tier: tier, - TtlTimestamp: ttlTimestamp, - } -} diff --git a/chain/exchange/types/fee_validation.go b/chain/exchange/types/fee_validation.go index 96f301af..62ca1412 100644 --- a/chain/exchange/types/fee_validation.go +++ b/chain/exchange/types/fee_validation.go @@ -7,7 +7,12 @@ import ( "cosmossdk.io/math" ) -func ValidateMakerWithTakerFee(makerFeeRate, takerFeeRate, relayerFeeShareRate, minimalProtocolFeeRate math.LegacyDec) error { +func ValidateMakerWithTakerFee( + makerFeeRate, + takerFeeRate, + relayerFeeShareRate, + minimalProtocolFeeRate math.LegacyDec, +) error { if makerFeeRate.GT(takerFeeRate) { return ErrFeeRatesRelation } @@ -29,9 +34,15 @@ func ValidateMakerWithTakerFee(makerFeeRate, takerFeeRate, relayerFeeShareRate, return nil } -func ValidateMakerWithTakerFeeAndDiscounts(makerFeeRate, takerFeeRate, relayerFeeShareRate, minimalProtocolFeeRate math.LegacyDec, discountSchedule *FeeDiscountSchedule) error { +// Test Code Only (for v1 tests) +func ValidateMakerWithTakerFeeAndDiscounts( + makerFeeRate, + takerFeeRate, + relayerFeeShareRate, + minimalProtocolFeeRate math.LegacyDec, + discountSchedule *FeeDiscountSchedule, +) error { smallestTakerFeeRate := takerFeeRate - if makerFeeRate.IsNegative() && discountSchedule != nil && len(discountSchedule.TierInfos) > 0 { maxTakerDiscount := discountSchedule.TierInfos[len(discountSchedule.TierInfos)-1].TakerDiscountRate smallestTakerFeeRate = smallestTakerFeeRate.Mul(math.LegacyOneDec().Sub(maxTakerDiscount)) diff --git a/chain/exchange/types/genesis.go b/chain/exchange/types/genesis.go index 358acf25..bcf115d6 100644 --- a/chain/exchange/types/genesis.go +++ b/chain/exchange/types/genesis.go @@ -1,9 +1,5 @@ package types -func NewGenesisState() GenesisState { - return GenesisState{} -} - func (gs GenesisState) Validate() error { // TODO: validate stuff in genesis if err := gs.Params.Validate(); err != nil { @@ -11,11 +7,3 @@ func (gs GenesisState) Validate() error { } return nil } - -func DefaultGenesisState() *GenesisState { - return &GenesisState{ - Params: DefaultParams(), - IsSpotExchangeEnabled: true, - IsDerivativesExchangeEnabled: true, - } -} diff --git a/chain/exchange/types/market.go b/chain/exchange/types/market.go index bff7bb51..86a6760f 100644 --- a/chain/exchange/types/market.go +++ b/chain/exchange/types/market.go @@ -67,98 +67,36 @@ func NewDerivativesMarketID(ticker, quoteDenom, oracleBase, oracleQuote string, } } -func (m *SpotMarket) IsActive() bool { - return m.Status == MarketStatus_Active +func PriceFromChainFormat(price math.LegacyDec, baseDecimals, quoteDecimals uint32) math.LegacyDec { + baseMultiplier := math.LegacyNewDec(10).Power(uint64(baseDecimals)) + quoteMultiplier := math.LegacyNewDec(10).Power(uint64(quoteDecimals)) + return price.Mul(baseMultiplier).Quo(quoteMultiplier) } -func (m *SpotMarket) IsInactive() bool { - return !m.IsActive() +func QuantityFromChainFormat(quantity math.LegacyDec, decimals uint32) math.LegacyDec { + multiplier := math.LegacyNewDec(10).Power(uint64(decimals)) + return quantity.Quo(multiplier) } -func (m *SpotMarket) MarketID() common.Hash { - return common.HexToHash(m.MarketId) -} - -func (m *SpotMarket) StatusSupportsOrderCancellations() bool { - if m == nil { - return false - } - return m.Status.SupportsOrderCancellations() -} - -func (m *SpotMarket) GetMarketType() MarketType { - return MarketType_Spot -} - -func (m *SpotMarket) GetMakerFeeRate() math.LegacyDec { - return m.MakerFeeRate -} - -func (m *SpotMarket) GetTakerFeeRate() math.LegacyDec { - return m.TakerFeeRate -} - -func (m *SpotMarket) GetRelayerFeeShareRate() math.LegacyDec { - return m.RelayerFeeShareRate -} - -func (m *SpotMarket) GetMinPriceTickSize() math.LegacyDec { - return m.MinPriceTickSize -} - -func (m *SpotMarket) GetMinQuantityTickSize() math.LegacyDec { - return m.MinQuantityTickSize -} - -func (m *SpotMarket) GetMinNotional() math.LegacyDec { - return m.MinNotional -} - -func (m *SpotMarket) GetMarketStatus() MarketStatus { - return m.Status -} - -func (m *ExpiryFuturesMarketInfo) IsPremature(currBlockTime int64) bool { - return currBlockTime < m.TwapStartTimestamp -} - -func (m *ExpiryFuturesMarketInfo) IsStartingMaturation(currBlockTime int64) bool { - return currBlockTime >= m.TwapStartTimestamp && (m.ExpirationTwapStartPriceCumulative.IsNil() || m.ExpirationTwapStartPriceCumulative.IsZero()) -} - -func (m *ExpiryFuturesMarketInfo) IsMatured(currBlockTime int64) bool { - return currBlockTime >= m.ExpirationTimestamp -} - -func (m *DerivativeMarket) MarketID() common.Hash { - return common.HexToHash(m.MarketId) -} - -func (m *DerivativeMarket) StatusSupportsOrderCancellations() bool { - if m == nil { - return false - } - return m.Status.SupportsOrderCancellations() +func NotionalFromChainFormat(notional math.LegacyDec, decimals uint32) math.LegacyDec { + multiplier := math.LegacyNewDec(10).Power(uint64(decimals)) + return notional.Quo(multiplier) } -func (m *DerivativeMarket) IsTimeExpiry() bool { - return !m.IsPerpetual +func PriceToChainFormat(humanReadableValue math.LegacyDec, baseDecimals, quoteDecimals uint32) math.LegacyDec { + baseMultiplier := math.LegacyNewDec(10).Power(uint64(baseDecimals)) + quoteMultiplier := math.LegacyNewDec(10).Power(uint64(quoteDecimals)) + return humanReadableValue.Mul(quoteMultiplier).Quo(baseMultiplier) } -func (m *DerivativeMarket) IsActive() bool { - return m.Status == MarketStatus_Active +func QuantityToChainFormat(humanReadableValue math.LegacyDec, decimals uint32) math.LegacyDec { + multiplier := math.LegacyNewDec(10).Power(uint64(decimals)) + return humanReadableValue.Mul(multiplier) } -func (m *DerivativeMarket) IsInactive() bool { - return !m.IsActive() -} - -func (m *DerivativeMarket) GetMinQuantityTickSize() math.LegacyDec { - return m.MinQuantityTickSize -} - -func (m *DerivativeMarket) GetMinNotional() math.LegacyDec { - return m.MinNotional +func NotionalToChainFormat(humanReadableValue math.LegacyDec, decimals uint32) math.LegacyDec { + multiplier := math.LegacyNewDec(10).Power(uint64(decimals)) + return humanReadableValue.Mul(multiplier) } type MarketType byte @@ -171,154 +109,18 @@ const ( MarketType_BinaryOption ) -func (m MarketType) String() string { - switch m { - case MarketType_Spot: - return "spot" - case MarketType_Perpetual: - return "perpetual" - case MarketType_BinaryOption: - return "binary_option" - case MarketType_Expiry: - return "expiry" - default: - return "" - } -} - -func (m MarketType) IsSpot() bool { - return m == MarketType_Spot -} - func (m MarketType) IsPerpetual() bool { return m == MarketType_Perpetual } -func (m MarketType) IsExpiry() bool { - return m == MarketType_Expiry -} - func (m MarketType) IsBinaryOptions() bool { return m == MarketType_BinaryOption } -func (m *DerivativeMarket) GetMarketType() MarketType { - if m.IsPerpetual { - return MarketType_Perpetual - } else { - return MarketType_Expiry - } -} - -func (m *DerivativeMarket) GetMakerFeeRate() math.LegacyDec { - return m.MakerFeeRate -} - -func (m *DerivativeMarket) GetTakerFeeRate() math.LegacyDec { - return m.TakerFeeRate -} - -func (m *DerivativeMarket) GetRelayerFeeShareRate() math.LegacyDec { - return m.RelayerFeeShareRate -} - -func (m *DerivativeMarket) GetInitialMarginRatio() math.LegacyDec { - return m.InitialMarginRatio -} - -func (m *DerivativeMarket) GetMinPriceTickSize() math.LegacyDec { - return m.MinPriceTickSize -} - -func (m *DerivativeMarket) GetQuoteDenom() string { - return m.QuoteDenom -} - -func (m *DerivativeMarket) GetTicker() string { - return m.Ticker -} - -func (m *DerivativeMarket) GetIsPerpetual() bool { - return m.IsPerpetual -} - -func (m *DerivativeMarket) GetOracleScaleFactor() uint32 { - return m.OracleScaleFactor -} - -func (m *DerivativeMarket) GetMarketStatus() MarketStatus { - return m.Status -} - -/// Binary Options Markets -// - -func (m *BinaryOptionsMarket) GetMarketType() MarketType { - return MarketType_BinaryOption -} - -func (m *BinaryOptionsMarket) GetInitialMarginRatio() math.LegacyDec { - return math.LegacyOneDec() -} -func (m *BinaryOptionsMarket) IsInactive() bool { - return !m.IsActive() -} - -func (m *BinaryOptionsMarket) IsActive() bool { - return m.Status == MarketStatus_Active -} - func (m *BinaryOptionsMarket) MarketID() common.Hash { return common.HexToHash(m.MarketId) } -func (m *BinaryOptionsMarket) GetMinPriceTickSize() math.LegacyDec { - return m.MinPriceTickSize -} - -func (m *BinaryOptionsMarket) GetMinQuantityTickSize() math.LegacyDec { - return m.MinQuantityTickSize -} - -func (m *BinaryOptionsMarket) GetMinNotional() math.LegacyDec { - return m.MinNotional -} - -func (m *BinaryOptionsMarket) GetTicker() string { - return m.Ticker -} - -func (m *BinaryOptionsMarket) GetQuoteDenom() string { - return m.QuoteDenom -} - -func (m *BinaryOptionsMarket) GetMakerFeeRate() math.LegacyDec { - return m.MakerFeeRate -} - -func (m *BinaryOptionsMarket) GetTakerFeeRate() math.LegacyDec { - return m.TakerFeeRate -} - -func (m *BinaryOptionsMarket) GetRelayerFeeShareRate() math.LegacyDec { - return m.RelayerFeeShareRate -} - -func (m *BinaryOptionsMarket) GetIsPerpetual() bool { - return false -} - -func (m *BinaryOptionsMarket) StatusSupportsOrderCancellations() bool { - if m == nil { - return false - } - return m.Status.SupportsOrderCancellations() -} - func (m *BinaryOptionsMarket) GetOracleScaleFactor() uint32 { return m.OracleScaleFactor } - -func (m *BinaryOptionsMarket) GetMarketStatus() MarketStatus { - return m.Status -} diff --git a/chain/exchange/types/market_admin.go b/chain/exchange/types/market_admin.go index 8b3068d3..6b343d67 100644 --- a/chain/exchange/types/market_admin.go +++ b/chain/exchange/types/market_admin.go @@ -1,7 +1,5 @@ package types -import "cosmossdk.io/errors" - const ( TickerPerm = 1 << iota MinPriceTickSizePerm = 1 << iota @@ -9,67 +7,12 @@ const ( MinNotionalPerm = 1 << iota InitialMarginRationPerm = 1 << iota MaintenanceMarginRationPerm = 1 << iota -) -const MaxPerm = TickerPerm | MinPriceTickSizePerm | MinQuantityTickSizePerm | MinNotionalPerm | InitialMarginRationPerm | MaintenanceMarginRationPerm + MaxPerm = TickerPerm | MinPriceTickSizePerm | MinQuantityTickSizePerm | MinNotionalPerm | InitialMarginRationPerm | MaintenanceMarginRationPerm +) type MarketAdminPermissions int func (p MarketAdminPermissions) HasPerm(pp MarketAdminPermissions) bool { return p&pp != 0 } - -func (p MarketAdminPermissions) CheckSpotMarketPermissions(msg *MsgUpdateSpotMarket) error { - if msg.HasTickerUpdate() && !p.HasPerm(TickerPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update market ticker") - } - - if msg.HasMinPriceTickSizeUpdate() && !p.HasPerm(MinPriceTickSizePerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update min_price_tick_size") - } - - if msg.HasMinQuantityTickSizeUpdate() && !p.HasPerm(MinQuantityTickSizePerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update market min_quantity_tick_size") - } - - if msg.HasMinNotionalUpdate() && !p.HasPerm(MinNotionalPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update market min_notional") - } - - return nil -} - -func (p MarketAdminPermissions) CheckDerivativeMarketPermissions(msg *MsgUpdateDerivativeMarket) error { - if msg.HasTickerUpdate() && !p.HasPerm(TickerPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update ticker") - } - - if msg.HasMinPriceTickSizeUpdate() && !p.HasPerm(MinPriceTickSizePerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update min_price_tick_size") - } - - if msg.HasMinQuantityTickSizeUpdate() && !p.HasPerm(MinQuantityTickSizePerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update min_quantity_tick_size") - } - - if msg.HasMinNotionalUpdate() && !p.HasPerm(MinNotionalPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update market min_notional") - } - - if msg.HasInitialMarginRatioUpdate() && !p.HasPerm(InitialMarginRationPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update initial_margin_ratio") - } - - if msg.HasMaintenanceMarginRatioUpdate() && !p.HasPerm(MaintenanceMarginRationPerm) { - return errors.Wrap(ErrInvalidAccessLevel, "admin does not have permission to update maintenance_margin_ratio") - } - - return nil -} - -func EmptyAdminInfo() AdminInfo { - return AdminInfo{ - Admin: "", - AdminPermissions: 0, - } -} \ No newline at end of file diff --git a/chain/exchange/types/msgs.go b/chain/exchange/types/msgs.go index c1fdf2c0..f2e0b37c 100644 --- a/chain/exchange/types/msgs.go +++ b/chain/exchange/types/msgs.go @@ -91,12 +91,25 @@ const ( TypeMsgActivateStakeGrant = "acceptStakeGrant" ) +type UpdateSpotMarketMessage interface { + GetAdmin() string + GetMarketId() string + GetNewTicker() string + GetNewMinPriceTickSize() math.LegacyDec + GetNewMinQuantityTickSize() math.LegacyDec + GetNewMinNotional() math.LegacyDec + HasTickerUpdate() bool + HasMinPriceTickSizeUpdate() bool + HasMinQuantityTickSizeUpdate() bool + HasMinNotionalUpdate() bool +} + func (msg MsgUpdateParams) Route() string { return RouterKey } func (msg MsgUpdateParams) Type() string { return TypeMsgUpdateParams } func (msg MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + if err := ValidateAddress(msg.Authority); err != nil { return errors.Wrap(err, "invalid authority address") } @@ -116,47 +129,23 @@ func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{addr} } -func (msg *MsgUpdateSpotMarket) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Admin); err != nil { - return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Admin) - } - - if !IsHexHash(msg.MarketId) { - return errors.Wrap(ErrMarketInvalid, msg.MarketId) - } - - hasNoUpdate := !msg.HasTickerUpdate() && - !msg.HasMinPriceTickSizeUpdate() && - !msg.HasMinQuantityTickSizeUpdate() && - !msg.HasMinNotionalUpdate() - - if hasNoUpdate { - return errors.Wrap(ErrBadField, "no update value present") - } - - if len(msg.NewTicker) > MaxTickerLength { - return errors.Wrapf(ErrInvalidTicker, "ticker should not exceed %d characters", MaxTickerLength) - } +// Declaration to validate adherence to interface +var _ UpdateSpotMarketMessage = &MsgUpdateSpotMarket{} - if msg.HasMinPriceTickSizeUpdate() { - if err := ValidateTickSize(msg.NewMinPriceTickSize); err != nil { - return errors.Wrap(ErrInvalidPriceTickSize, err.Error()) - } - } +func (msg MsgUpdateSpotMarket) GetNewMinPriceTickSize() math.LegacyDec { + return msg.NewMinPriceTickSize +} - if msg.HasMinQuantityTickSizeUpdate() { - if err := ValidateTickSize(msg.NewMinQuantityTickSize); err != nil { - return errors.Wrap(ErrInvalidQuantityTickSize, err.Error()) - } - } +func (msg MsgUpdateSpotMarket) GetNewMinQuantityTickSize() math.LegacyDec { + return msg.NewMinQuantityTickSize +} - if msg.HasMinNotionalUpdate() { - if err := ValidateMinNotional(msg.NewMinNotional); err != nil { - return errors.Wrap(ErrInvalidNotional, err.Error()) - } - } +func (msg MsgUpdateSpotMarket) GetNewMinNotional() math.LegacyDec { + return msg.NewMinNotional +} - return nil +func (msg *MsgUpdateSpotMarket) ValidateBasic() error { + return UpdateSpotMarketMessageValidateBasic(msg) } func (msg *MsgUpdateSpotMarket) GetSigners() []sdk.AccAddress { @@ -192,7 +181,7 @@ func (msg *MsgUpdateSpotMarket) HasMinNotionalUpdate() bool { } func (msg *MsgUpdateDerivativeMarket) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Admin); err != nil { + if err := ValidateAddress(msg.Admin); err != nil { return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Admin) } @@ -298,6 +287,7 @@ func (o *SpotOrder) ValidateBasic(senderAddr sdk.AccAddress) error { if !IsHexHash(o.MarketId) { return errors.Wrap(ErrMarketInvalid, o.MarketId) } + switch o.OrderType { case OrderType_BUY, OrderType_SELL, OrderType_BUY_PO, OrderType_SELL_PO, OrderType_BUY_ATOMIC, OrderType_SELL_ATOMIC: // do nothing @@ -311,8 +301,7 @@ func (o *SpotOrder) ValidateBasic(senderAddr sdk.AccAddress) error { } if o.OrderInfo.FeeRecipient != "" { - _, err := sdk.AccAddressFromBech32(o.OrderInfo.FeeRecipient) - if err != nil { + if err := ValidateAddress(o.OrderInfo.FeeRecipient); err != nil { return errors.Wrap(sdkerrors.ErrInvalidAddress, o.OrderInfo.FeeRecipient) } } @@ -377,8 +366,8 @@ func (o *DerivativeOrder) ValidateBasic(senderAddr sdk.AccAddress, hasBinaryPric return ErrInvalidTriggerPrice } - if o.IsConditional() && (o.TriggerPrice == nil || o.TriggerPrice.LT(MinDerivativeOrderPrice)) { /*|| - !o.IsConditional() && o.TriggerPrice != nil */ // commented out this check since FE is sending to us 0.0 trigger price for all orders + if o.OrderType.IsConditional() && (o.TriggerPrice == nil || o.TriggerPrice.LT(MinDerivativeOrderPrice)) { /*|| + !o.OrderType.IsConditional() && o.TriggerPrice != nil */ // commented out this check since FE is sending to us 0.0 trigger price for all orders return errors.Wrapf(ErrInvalidTriggerPrice, "Mismatch between triggerPrice: %v and orderType: %v, or triggerPrice is incorrect", o.TriggerPrice, o.OrderType) } @@ -562,6 +551,13 @@ func (msg MsgInstantSpotMarketLaunch) ValidateBasic() error { return errors.Wrap(ErrInvalidNotional, err.Error()) } + if msg.BaseDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "base decimals is invalid") + } + if msg.QuoteDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "quote decimals is invalid") + } + return nil } @@ -1027,7 +1023,7 @@ func NewMsgCreateBinaryOptionsLimitOrder( orderType OrderType, isReduceOnly bool, ) *MsgCreateBinaryOptionsLimitOrder { - margin := GetRequiredBinaryOptionsOrderMargin(price, quantity, market.OracleScaleFactor, orderType, isReduceOnly) + margin := GetRequiredBinaryOptionsOrderMargin(price, quantity, market.OracleScaleFactor, orderType.IsBuy(), isReduceOnly) return &MsgCreateBinaryOptionsLimitOrder{ Sender: sender.String(), @@ -1163,6 +1159,35 @@ func (msg MsgCreateDerivativeMarketOrder) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sender} } +func NewMsgCreateBinaryOptionsMarketOrderWithScaleFactor( + sender sdk.AccAddress, + market *BinaryOptionsMarket, + subaccountID string, + feeRecipient string, + price, quantity math.LegacyDec, + orderType OrderType, + isReduceOnly bool, + scaleFactor uint32, +) *MsgCreateBinaryOptionsMarketOrder { + margin := GetRequiredBinaryOptionsOrderMargin(price, quantity, scaleFactor, orderType.IsBuy(), isReduceOnly) + + return &MsgCreateBinaryOptionsMarketOrder{ + Sender: sender.String(), + Order: DerivativeOrder{ + MarketId: market.MarketId, + OrderInfo: OrderInfo{ + SubaccountId: subaccountID, + FeeRecipient: feeRecipient, + Price: price, + Quantity: quantity, + }, + OrderType: orderType, + Margin: margin, + TriggerPrice: nil, + }, + } +} + func NewMsgCreateBinaryOptionsMarketOrder( sender sdk.AccAddress, market *BinaryOptionsMarket, @@ -1172,7 +1197,7 @@ func NewMsgCreateBinaryOptionsMarketOrder( orderType OrderType, isReduceOnly bool, ) *MsgCreateBinaryOptionsMarketOrder { - margin := GetRequiredBinaryOptionsOrderMargin(price, quantity, market.OracleScaleFactor, orderType, isReduceOnly) + margin := GetRequiredBinaryOptionsOrderMargin(price, quantity, market.OracleScaleFactor, orderType.IsBuy(), isReduceOnly) return &MsgCreateBinaryOptionsMarketOrder{ Sender: sender.String(), @@ -1852,17 +1877,17 @@ func (msg MsgBatchUpdateOrders) ValidateBasic() error { return errors.Wrap(ErrInvalidBatchMsgUpdate, "msg is empty") } - hasDuplicateSpotOrderToCancel := HasDuplicatesOrder(msg.SpotOrdersToCancel) + hasDuplicateSpotOrderToCancel := hasDuplicatesOrder(msg.SpotOrdersToCancel) if hasDuplicateSpotOrderToCancel { return errors.Wrap(ErrInvalidBatchMsgUpdate, "msg contains duplicate spot order to cancel") } - hasDuplicateDerivativeOrderToCancel := HasDuplicatesOrder(msg.DerivativeOrdersToCancel) + hasDuplicateDerivativeOrderToCancel := hasDuplicatesOrder(msg.DerivativeOrdersToCancel) if hasDuplicateDerivativeOrderToCancel { return errors.Wrap(ErrInvalidBatchMsgUpdate, "msg contains duplicate derivative order to cancel") } - hasDuplicateBinaryOptionsOrderToCancel := HasDuplicatesOrder(msg.BinaryOptionsOrdersToCancel) + hasDuplicateBinaryOptionsOrderToCancel := hasDuplicatesOrder(msg.BinaryOptionsOrdersToCancel) if hasDuplicateBinaryOptionsOrderToCancel { return errors.Wrap(ErrInvalidBatchMsgUpdate, "msg contains duplicate binary options order to cancel") } @@ -2103,3 +2128,27 @@ func (msg *MsgActivateStakeGrant) GetSigners() []sdk.AccAddress { func (msg *MsgActivateStakeGrant) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } + +func ValidateAddress(address string) error { + _, err := sdk.AccAddressFromBech32(address) + + return err +} + +func hasDuplicatesOrder(slice []*OrderData) bool { + seenHashes := make(map[string]struct{}) + seenCids := make(map[string]struct{}) + for _, item := range slice { + var hash, cid string + hash, cid = item.GetOrderHash(), item.GetCid() + _, hashExists := seenHashes[hash] + _, cidExists := seenCids[cid] + + if (hash != "" && hashExists) || (cid != "" && cidExists) { + return true + } + seenHashes[hash] = struct{}{} + seenCids[cid] = struct{}{} + } + return false +} diff --git a/chain/exchange/types/msgs_validation.go b/chain/exchange/types/msgs_validation.go new file mode 100644 index 00000000..e8431ec0 --- /dev/null +++ b/chain/exchange/types/msgs_validation.go @@ -0,0 +1,49 @@ +package types + +import ( + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +func UpdateSpotMarketMessageValidateBasic(msg UpdateSpotMarketMessage) error { + if err := ValidateAddress(msg.GetAdmin()); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.GetAdmin()) + } + + if !IsHexHash(msg.GetMarketId()) { + return errors.Wrap(ErrMarketInvalid, msg.GetMarketId()) + } + + hasNoUpdate := !msg.HasTickerUpdate() && + !msg.HasMinPriceTickSizeUpdate() && + !msg.HasMinQuantityTickSizeUpdate() && + !msg.HasMinNotionalUpdate() + + if hasNoUpdate { + return errors.Wrap(ErrBadField, "no update value present") + } + + if len(msg.GetNewTicker()) > MaxTickerLength { + return errors.Wrapf(ErrInvalidTicker, "ticker should not exceed %d characters", MaxTickerLength) + } + + if msg.HasMinPriceTickSizeUpdate() { + if err := ValidateTickSize(msg.GetNewMinPriceTickSize()); err != nil { + return errors.Wrap(ErrInvalidPriceTickSize, err.Error()) + } + } + + if msg.HasMinQuantityTickSizeUpdate() { + if err := ValidateTickSize(msg.GetNewMinQuantityTickSize()); err != nil { + return errors.Wrap(ErrInvalidQuantityTickSize, err.Error()) + } + } + + if msg.HasMinNotionalUpdate() { + if err := ValidateMinNotional(msg.GetNewMinNotional()); err != nil { + return errors.Wrap(ErrInvalidNotional, err.Error()) + } + } + + return nil +} diff --git a/chain/exchange/types/params.go b/chain/exchange/types/params.go index fbec3e19..19e396f2 100644 --- a/chain/exchange/types/params.go +++ b/chain/exchange/types/params.go @@ -35,6 +35,8 @@ const ( MaxOracleScaleFactor uint32 = 18 + MaxDecimals uint32 = 18 + MaxTickerLength int = 40 // MaxHistoricalTradeRecordAge is the maximum age of trade records to track. @@ -47,6 +49,8 @@ const ( MaxGranterDelegations = 25 ) +var DefaultInjAuctionMaxCap = math.NewIntWithDecimal(10_000, 18) + var MaxBinaryOptionsOrderPrice = math.LegacyOneDec() // would be $0.000001 for USDT @@ -64,7 +68,7 @@ var MaxTokenInt, _ = math.NewIntFromString("100000000000000000000000000") var MaxOrderQuantity = math.LegacyMustNewDecFromStr("100000000000000000000000000000000") var MaxFeeMultiplier = math.LegacyMustNewDecFromStr("100") -var minMarginRatio = math.LegacyNewDecWithPrec(5, 3) +var MinMarginRatio = math.LegacyNewDecWithPrec(5, 3) // Parameter keys var ( @@ -159,71 +163,40 @@ func NewParams( // ParamSetPairs returns the parameter set pairs. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeySpotMarketInstantListingFee, &p.SpotMarketInstantListingFee, validateSpotMarketInstantListingFee), - paramtypes.NewParamSetPair(KeyDerivativeMarketInstantListingFee, &p.DerivativeMarketInstantListingFee, validateDerivativeMarketInstantListingFee), + paramtypes.NewParamSetPair(KeySpotMarketInstantListingFee, &p.SpotMarketInstantListingFee, ValidateSpotMarketInstantListingFee), + paramtypes.NewParamSetPair(KeyDerivativeMarketInstantListingFee, &p.DerivativeMarketInstantListingFee, ValidateDerivativeMarketInstantListingFee), paramtypes.NewParamSetPair(KeyDefaultSpotMakerFeeRate, &p.DefaultSpotMakerFeeRate, ValidateMakerFee), paramtypes.NewParamSetPair(KeyDefaultSpotTakerFeeRate, &p.DefaultSpotTakerFeeRate, ValidateFee), paramtypes.NewParamSetPair(KeyDefaultDerivativeMakerFeeRate, &p.DefaultDerivativeMakerFeeRate, ValidateMakerFee), paramtypes.NewParamSetPair(KeyDefaultDerivativeTakerFeeRate, &p.DefaultDerivativeTakerFeeRate, ValidateFee), paramtypes.NewParamSetPair(KeyDefaultInitialMarginRatio, &p.DefaultInitialMarginRatio, ValidateMarginRatio), paramtypes.NewParamSetPair(KeyDefaultMaintenanceMarginRatio, &p.DefaultMaintenanceMarginRatio, ValidateMarginRatio), - paramtypes.NewParamSetPair(KeyDefaultFundingInterval, &p.DefaultFundingInterval, validateFundingInterval), - paramtypes.NewParamSetPair(KeyFundingMultiple, &p.FundingMultiple, validateFundingMultiple), + paramtypes.NewParamSetPair(KeyDefaultFundingInterval, &p.DefaultFundingInterval, ValidateFundingInterval), + paramtypes.NewParamSetPair(KeyFundingMultiple, &p.FundingMultiple, ValidateFundingMultiple), paramtypes.NewParamSetPair(KeyRelayerFeeShareRate, &p.RelayerFeeShareRate, ValidateFee), paramtypes.NewParamSetPair(KeyDefaultHourlyFundingRateCap, &p.DefaultHourlyFundingRateCap, ValidateFee), paramtypes.NewParamSetPair(KeyDefaultHourlyInterestRate, &p.DefaultHourlyInterestRate, ValidateFee), - paramtypes.NewParamSetPair(KeyMaxDerivativeOrderSideCount, &p.MaxDerivativeOrderSideCount, validateDerivativeOrderSideCount), - paramtypes.NewParamSetPair(KeyInjRewardStakedRequirementThreshold, &p.InjRewardStakedRequirementThreshold, validateInjRewardStakedRequirementThreshold), - paramtypes.NewParamSetPair(KeyTradingRewardsVestingDuration, &p.TradingRewardsVestingDuration, validateTradingRewardsVestingDuration), - paramtypes.NewParamSetPair(KeyLiquidatorRewardShareRate, &p.LiquidatorRewardShareRate, validateLiquidatorRewardShareRate), - paramtypes.NewParamSetPair(KeyBinaryOptionsMarketInstantListingFee, &p.BinaryOptionsMarketInstantListingFee, validateBinaryOptionsMarketInstantListingFee), - paramtypes.NewParamSetPair(KeyAtomicMarketOrderAccessLevel, &p.AtomicMarketOrderAccessLevel, validateAtomicMarketOrderAccessLevel), - paramtypes.NewParamSetPair(KeySpotAtomicMarketOrderFeeMultiplier, &p.SpotAtomicMarketOrderFeeMultiplier, validateAtomicMarketOrderFeeMultiplier), - paramtypes.NewParamSetPair(KeyDerivativeAtomicMarketOrderFeeMultiplier, &p.DerivativeAtomicMarketOrderFeeMultiplier, validateAtomicMarketOrderFeeMultiplier), - paramtypes.NewParamSetPair(KeyBinaryOptionsAtomicMarketOrderFeeMultiplier, &p.BinaryOptionsAtomicMarketOrderFeeMultiplier, validateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyMaxDerivativeOrderSideCount, &p.MaxDerivativeOrderSideCount, ValidateDerivativeOrderSideCount), + paramtypes.NewParamSetPair(KeyInjRewardStakedRequirementThreshold, &p.InjRewardStakedRequirementThreshold, ValidateInjRewardStakedRequirementThreshold), + paramtypes.NewParamSetPair(KeyTradingRewardsVestingDuration, &p.TradingRewardsVestingDuration, ValidateTradingRewardsVestingDuration), + paramtypes.NewParamSetPair(KeyLiquidatorRewardShareRate, &p.LiquidatorRewardShareRate, ValidateLiquidatorRewardShareRate), + paramtypes.NewParamSetPair(KeyBinaryOptionsMarketInstantListingFee, &p.BinaryOptionsMarketInstantListingFee, ValidateBinaryOptionsMarketInstantListingFee), + paramtypes.NewParamSetPair(KeyAtomicMarketOrderAccessLevel, &p.AtomicMarketOrderAccessLevel, ValidateAtomicMarketOrderAccessLevel), + paramtypes.NewParamSetPair(KeySpotAtomicMarketOrderFeeMultiplier, &p.SpotAtomicMarketOrderFeeMultiplier, ValidateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyDerivativeAtomicMarketOrderFeeMultiplier, &p.DerivativeAtomicMarketOrderFeeMultiplier, ValidateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyBinaryOptionsAtomicMarketOrderFeeMultiplier, &p.BinaryOptionsAtomicMarketOrderFeeMultiplier, ValidateAtomicMarketOrderFeeMultiplier), paramtypes.NewParamSetPair(KeyMinimalProtocolFeeRate, &p.MinimalProtocolFeeRate, ValidateFee), - paramtypes.NewParamSetPair(KeyIsInstantDerivativeMarketLaunchEnabled, &p.IsInstantDerivativeMarketLaunchEnabled, validateBool), - paramtypes.NewParamSetPair(KeyPostOnlyModeHeightThreshold, &p.PostOnlyModeHeightThreshold, validatePostOnlyModeHeightThreshold), - } -} - -// DefaultParams returns a default set of parameters. -func DefaultParams() Params { - return Params{ - SpotMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(SpotMarketInstantListingFee, 18)), - DerivativeMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(DerivativeMarketInstantListingFee, 18)), - DefaultSpotMakerFeeRate: math.LegacyNewDecWithPrec(-1, 4), // default -0.01% maker fees - DefaultSpotTakerFeeRate: math.LegacyNewDecWithPrec(1, 3), // default 0.1% taker fees - DefaultDerivativeMakerFeeRate: math.LegacyNewDecWithPrec(-1, 4), // default -0.01% maker fees - DefaultDerivativeTakerFeeRate: math.LegacyNewDecWithPrec(1, 3), // default 0.1% taker fees - DefaultInitialMarginRatio: math.LegacyNewDecWithPrec(5, 2), // default 5% initial margin ratio - DefaultMaintenanceMarginRatio: math.LegacyNewDecWithPrec(2, 2), // default 2% maintenance margin ratio - DefaultFundingInterval: DefaultFundingIntervalSeconds, - FundingMultiple: DefaultFundingMultipleSeconds, - RelayerFeeShareRate: math.LegacyNewDecWithPrec(40, 2), // default 40% relayer fee share - DefaultHourlyFundingRateCap: math.LegacyNewDecWithPrec(625, 6), // default 0.0625% max hourly funding rate - DefaultHourlyInterestRate: math.LegacyNewDecWithPrec(416666, 11), // 0.01% daily interest rate = 0.0001 / 24 = 0.00000416666 - MaxDerivativeOrderSideCount: MaxDerivativeOrderSideCount, - InjRewardStakedRequirementThreshold: math.NewIntWithDecimal(100, 18), // 100 INJ - TradingRewardsVestingDuration: 604800, // 7 days - LiquidatorRewardShareRate: math.LegacyNewDecWithPrec(5, 2), // 5% liquidator reward - BinaryOptionsMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(BinaryOptionsMarketInstantListingFee, 18)), - AtomicMarketOrderAccessLevel: AtomicMarketOrderAccessLevel_SmartContractsOnly, - SpotAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier - DerivativeAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier - BinaryOptionsAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier - MinimalProtocolFeeRate: math.LegacyMustNewDecFromStr("0.00005"), // default 0.005% minimal fee rate - IsInstantDerivativeMarketLaunchEnabled: false, - PostOnlyModeHeightThreshold: 0, + paramtypes.NewParamSetPair(KeyIsInstantDerivativeMarketLaunchEnabled, &p.IsInstantDerivativeMarketLaunchEnabled, ValidateBool), + paramtypes.NewParamSetPair(KeyPostOnlyModeHeightThreshold, &p.PostOnlyModeHeightThreshold, ValidatePostOnlyModeHeightThreshold), } } // Validate performs basic validation on exchange parameters. func (p Params) Validate() error { - if err := validateSpotMarketInstantListingFee(p.SpotMarketInstantListingFee); err != nil { + if err := ValidateSpotMarketInstantListingFee(p.SpotMarketInstantListingFee); err != nil { return fmt.Errorf("spot_market_instant_listing_fee is incorrect: %w", err) } - if err := validateDerivativeMarketInstantListingFee(p.DerivativeMarketInstantListingFee); err != nil { + if err := ValidateDerivativeMarketInstantListingFee(p.DerivativeMarketInstantListingFee); err != nil { return fmt.Errorf("derivative_market_instant_listing_fee is incorrect: %w", err) } if err := ValidateMakerFee(p.DefaultSpotMakerFeeRate); err != nil { @@ -244,10 +217,10 @@ func (p Params) Validate() error { if err := ValidateMarginRatio(p.DefaultMaintenanceMarginRatio); err != nil { return fmt.Errorf("default_maintenance_margin_ratio is incorrect: %w", err) } - if err := validateFundingInterval(p.DefaultFundingInterval); err != nil { + if err := ValidateFundingInterval(p.DefaultFundingInterval); err != nil { return fmt.Errorf("default_funding_interval is incorrect: %w", err) } - if err := validateFundingMultiple(p.FundingMultiple); err != nil { + if err := ValidateFundingMultiple(p.FundingMultiple); err != nil { return fmt.Errorf("funding_multiple is incorrect: %w", err) } if err := ValidateFee(p.RelayerFeeShareRate); err != nil { @@ -259,34 +232,34 @@ func (p Params) Validate() error { if err := ValidateFee(p.DefaultHourlyInterestRate); err != nil { return fmt.Errorf("default_hourly_interest_rate is incorrect: %w", err) } - if err := validateDerivativeOrderSideCount(p.MaxDerivativeOrderSideCount); err != nil { + if err := ValidateDerivativeOrderSideCount(p.MaxDerivativeOrderSideCount); err != nil { return fmt.Errorf("max_derivative_order_side_count is incorrect: %w", err) } - if err := validateInjRewardStakedRequirementThreshold(p.InjRewardStakedRequirementThreshold); err != nil { + if err := ValidateInjRewardStakedRequirementThreshold(p.InjRewardStakedRequirementThreshold); err != nil { return fmt.Errorf("inj_reward_staked_requirement_threshold is incorrect: %w", err) } - if err := validateLiquidatorRewardShareRate(p.LiquidatorRewardShareRate); err != nil { + if err := ValidateLiquidatorRewardShareRate(p.LiquidatorRewardShareRate); err != nil { return fmt.Errorf("liquidator_reward_share_rate is incorrect: %w", err) } - if err := validateBinaryOptionsMarketInstantListingFee(p.BinaryOptionsMarketInstantListingFee); err != nil { + if err := ValidateBinaryOptionsMarketInstantListingFee(p.BinaryOptionsMarketInstantListingFee); err != nil { return fmt.Errorf("binary_options_market_instant_listing_fee is incorrect: %w", err) } - if err := validateAtomicMarketOrderAccessLevel(p.AtomicMarketOrderAccessLevel); err != nil { + if err := ValidateAtomicMarketOrderAccessLevel(p.AtomicMarketOrderAccessLevel); err != nil { return fmt.Errorf("atomic_market_order_access_level is incorrect: %w", err) } - if err := validateAtomicMarketOrderFeeMultiplier(p.SpotAtomicMarketOrderFeeMultiplier); err != nil { + if err := ValidateAtomicMarketOrderFeeMultiplier(p.SpotAtomicMarketOrderFeeMultiplier); err != nil { return fmt.Errorf("spot_atomic_market_order_fee_multiplier is incorrect: %w", err) } - if err := validateAtomicMarketOrderFeeMultiplier(p.DerivativeAtomicMarketOrderFeeMultiplier); err != nil { + if err := ValidateAtomicMarketOrderFeeMultiplier(p.DerivativeAtomicMarketOrderFeeMultiplier); err != nil { return fmt.Errorf("derivative_atomic_market_order_fee_multiplier is incorrect: %w", err) } - if err := validateAtomicMarketOrderFeeMultiplier(p.BinaryOptionsAtomicMarketOrderFeeMultiplier); err != nil { + if err := ValidateAtomicMarketOrderFeeMultiplier(p.BinaryOptionsAtomicMarketOrderFeeMultiplier); err != nil { return fmt.Errorf("binary_options_atomic_market_order_fee_multiplier is incorrect: %w", err) } if err := ValidateFee(p.MinimalProtocolFeeRate); err != nil { return fmt.Errorf("minimal_protocol_fee_rate is incorrect: %w", err) } - if err := validatePostOnlyModeHeightThreshold(p.PostOnlyModeHeightThreshold); err != nil { + if err := ValidatePostOnlyModeHeightThreshold(p.PostOnlyModeHeightThreshold); err != nil { return fmt.Errorf("post_only_mode_height_threshold is incorrect: %w", err) } if err := validateAdmins(p.ExchangeAdmins); err != nil { @@ -295,7 +268,7 @@ func (p Params) Validate() error { return nil } -func validateSpotMarketInstantListingFee(i interface{}) error { +func ValidateSpotMarketInstantListingFee(i interface{}) error { v, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -308,7 +281,7 @@ func validateSpotMarketInstantListingFee(i interface{}) error { return nil } -func validateDerivativeMarketInstantListingFee(i interface{}) error { +func ValidateDerivativeMarketInstantListingFee(i interface{}) error { v, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -321,7 +294,7 @@ func validateDerivativeMarketInstantListingFee(i interface{}) error { return nil } -func validateBinaryOptionsMarketInstantListingFee(i interface{}) error { +func ValidateBinaryOptionsMarketInstantListingFee(i interface{}) error { v, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -491,7 +464,7 @@ func ValidateMarginRatio(i interface{}) error { if v.IsNil() { return fmt.Errorf("margin ratio cannot be nil: %s", v) } - if v.LT(minMarginRatio) { + if v.LT(MinMarginRatio) { return fmt.Errorf("margin ratio cannot be less than minimum: %s", v) } if v.GTE(math.LegacyOneDec()) { @@ -501,7 +474,7 @@ func ValidateMarginRatio(i interface{}) error { return nil } -func validateFundingInterval(i interface{}) error { +func ValidateFundingInterval(i interface{}) error { v, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -514,7 +487,7 @@ func validateFundingInterval(i interface{}) error { return nil } -func validatePostOnlyModeHeightThreshold(i interface{}) error { +func ValidatePostOnlyModeHeightThreshold(i interface{}) error { v, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -550,7 +523,7 @@ func validateAdmins(i interface{}) error { return nil } -func validateFundingMultiple(i interface{}) error { +func ValidateFundingMultiple(i interface{}) error { v, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -563,7 +536,7 @@ func validateFundingMultiple(i interface{}) error { return nil } -func validateDerivativeOrderSideCount(i interface{}) error { +func ValidateDerivativeOrderSideCount(i interface{}) error { v, ok := i.(uint32) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -576,7 +549,7 @@ func validateDerivativeOrderSideCount(i interface{}) error { return nil } -func validateInjRewardStakedRequirementThreshold(i interface{}) error { +func ValidateInjRewardStakedRequirementThreshold(i interface{}) error { v, ok := i.(math.Int) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -593,7 +566,7 @@ func validateInjRewardStakedRequirementThreshold(i interface{}) error { return nil } -func validateTradingRewardsVestingDuration(i interface{}) error { +func ValidateTradingRewardsVestingDuration(i interface{}) error { v, ok := i.(int64) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -606,7 +579,7 @@ func validateTradingRewardsVestingDuration(i interface{}) error { return nil } -func validateLiquidatorRewardShareRate(i interface{}) error { +func ValidateLiquidatorRewardShareRate(i interface{}) error { v, ok := i.(math.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -625,7 +598,7 @@ func validateLiquidatorRewardShareRate(i interface{}) error { return nil } -func validateAtomicMarketOrderAccessLevel(i interface{}) error { +func ValidateAtomicMarketOrderAccessLevel(i interface{}) error { v, ok := i.(AtomicMarketOrderAccessLevel) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -636,7 +609,7 @@ func validateAtomicMarketOrderAccessLevel(i interface{}) error { return nil } -func validateAtomicMarketOrderFeeMultiplier(i interface{}) error { +func ValidateAtomicMarketOrderFeeMultiplier(i interface{}) error { v, ok := i.(math.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -654,7 +627,7 @@ func validateAtomicMarketOrderFeeMultiplier(i interface{}) error { return nil } -func validateBool(i interface{}) error { +func ValidateBool(i interface{}) error { _, ok := i.(bool) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/chain/exchange/types/positions.go b/chain/exchange/types/positions.go index 3928f708..77504de1 100644 --- a/chain/exchange/types/positions.go +++ b/chain/exchange/types/positions.go @@ -4,387 +4,8 @@ import ( "cosmossdk.io/math" ) -type positionPayout struct { +type PositionPayout struct { Payout math.LegacyDec PnlNotional math.LegacyDec IsProfitable bool } - -func (p *Position) IsShort() bool { return !p.IsLong } - -func (p *Position) Copy() *Position { - return &Position{ - IsLong: p.IsLong, - Quantity: p.Quantity, - EntryPrice: p.EntryPrice, - Margin: p.Margin, - CumulativeFundingEntry: p.CumulativeFundingEntry, - } -} - -func (p *DerivativePosition) Copy() *DerivativePosition { - return &DerivativePosition{ - SubaccountId: p.SubaccountId, - MarketId: p.MarketId, - Position: p.Position.Copy(), - } -} - -func (m *PositionDelta) IsShort() bool { return !m.IsLong } - -// NewPosition initializes a new position with a given cumulativeFundingEntry (should be nil for non-perpetual markets) -func NewPosition(isLong bool, cumulativeFundingEntry math.LegacyDec) *Position { - position := &Position{ - IsLong: isLong, - Quantity: math.LegacyZeroDec(), - EntryPrice: math.LegacyZeroDec(), - Margin: math.LegacyZeroDec(), - } - if !cumulativeFundingEntry.IsNil() { - position.CumulativeFundingEntry = cumulativeFundingEntry - } - return position -} - -// GetEffectiveMarginRatio returns the effective margin ratio of the position, based on the input closing price. -// CONTRACT: position must already be funding-adjusted (if perpetual) and have positive quantity. -func (p *Position) GetEffectiveMarginRatio(closingPrice, closingFee math.LegacyDec) (marginRatio math.LegacyDec) { - // nolint:all - // marginRatio = (margin + quantity * PnlPerContract) / (closingPrice * quantity) - effectiveMargin := p.Margin.Add(p.GetPayoutFromPnl(closingPrice, p.Quantity)).Sub(closingFee) - return effectiveMargin.Quo(closingPrice.Mul(p.Quantity)) -} - -// ApplyProfitHaircutForDerivatives results in reducing the payout (pnl * quantity) by the given rate (e.g. 0.1=10%) by modifying the entry price. -// Formula for adjustment: -// newPayoutFromPnl = oldPayoutFromPnl * (1 - missingFundsRate) -// => Entry price adjustment for buys -// (newEntryPrice - settlementPrice) * quantity = (entryPrice - settlementPrice) * quantity * (1 - missingFundsRate) -// newEntryPrice = entryPrice - entryPrice * haircutPercentage + settlementPrice * haircutPercentage -// => Entry price adjustment for sells -// (settlementPrice - newEntryPrice) * quantity = (settlementPrice - entryPrice) * quantity * (1 - missingFundsRate) -// newEntryPrice = entryPrice - entryPrice * haircutPercentage + settlementPrice * haircutPercentage -func (p *Position) ApplyProfitHaircutForDerivatives(deficitAmount, totalProfits, settlementPrice math.LegacyDec) { - // haircutPercentage = deficitAmount / totalProfits - // To preserve precision, the division by totalProfits is done last. - // newEntryPrice = haircutPercentage * (settlementPrice - entryPrice) + entryPrice - newEntryPrice := deficitAmount.Mul(settlementPrice.Sub(p.EntryPrice)).Quo(totalProfits).Add(p.EntryPrice) - p.EntryPrice = newEntryPrice - - // profitable position but with negative margin, we didn't account for negative margin previously, - // so we can safely add it if payout becomes negative from haircut - newPositionPayout := p.GetPayoutIfFullyClosing(settlementPrice, math.LegacyZeroDec()).Payout - if newPositionPayout.IsNegative() { - p.Margin = p.Margin.Add(newPositionPayout.Abs()) - } -} - -func (p *Position) ApplyTotalPositionPayoutHaircut(deficitAmount, totalPayouts, settlementPrice math.LegacyDec) { - p.ApplyProfitHaircutForDerivatives(deficitAmount, totalPayouts, settlementPrice) - - removedMargin := p.Margin.Mul(deficitAmount).Quo(totalPayouts) - p.Margin = p.Margin.Sub(removedMargin) -} - -func (p *Position) ApplyProfitHaircutForBinaryOptions(deficitAmount, totalAssets math.LegacyDec, oracleScaleFactor uint32) { - // haircutPercentage = deficitAmount / totalAssets - // To preserve precision, the division by totalAssets is done last. - // newMargin = p.Margin - p.Margin * haircutPercentage - newMargin := p.Margin.Sub(deficitAmount.Mul(p.Margin).Quo(totalAssets)) - p.Margin = newMargin - - // updating entry price just for consistency, but it has no effect since applied haircut is on margin, not on entry price during binary options refunds - if p.IsLong { - p.EntryPrice = p.Margin.Quo(p.Quantity) - } else { - scaledOne := GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor) - p.EntryPrice = scaledOne.Sub(p.Margin.Quo(p.Quantity)) - } -} - -func (p *Position) ClosePositionWithSettlePrice(settlementPrice, closingFeeRate math.LegacyDec) (payout, closeTradingFee math.LegacyDec, positionDelta *PositionDelta, pnl math.LegacyDec) { - closingDirection := !p.IsLong - fullyClosingQuantity := p.Quantity - - closeTradingFee = settlementPrice.Mul(fullyClosingQuantity).Mul(closingFeeRate) - positionDelta = &PositionDelta{ - IsLong: closingDirection, - ExecutionQuantity: fullyClosingQuantity, - ExecutionMargin: math.LegacyZeroDec(), - ExecutionPrice: settlementPrice, - } - - // there should not be positions with 0 quantity - if fullyClosingQuantity.IsZero() { - return math.LegacyZeroDec(), closeTradingFee, positionDelta, math.LegacyZeroDec() - } - - payout, _, _, pnl = p.ApplyPositionDelta(positionDelta, closeTradingFee) - - return payout, closeTradingFee, positionDelta, pnl -} - -func (p *Position) ClosePositionWithoutPayouts() { - p.IsLong = false - p.EntryPrice = math.LegacyZeroDec() - p.Quantity = math.LegacyZeroDec() - p.Margin = math.LegacyZeroDec() - p.CumulativeFundingEntry = math.LegacyZeroDec() -} - -func (p *Position) ClosePositionByRefunding(closingFeeRate math.LegacyDec) (payout, closeTradingFee math.LegacyDec, positionDelta *PositionDelta, pnl math.LegacyDec) { - return p.ClosePositionWithSettlePrice(p.EntryPrice, closingFeeRate) -} - -func (p *Position) GetDirectionString() string { - directionStr := "Long" - if p.IsShort() { - directionStr = "Short" - } - return directionStr -} - -func (p *Position) CheckValidPositionToReduce( - marketType MarketType, - reducePrice math.LegacyDec, - isBuyOrder bool, - tradeFeeRate math.LegacyDec, - funding *PerpetualMarketFunding, - orderMargin math.LegacyDec, -) error { - if isBuyOrder == p.IsLong { - return ErrInvalidReduceOnlyPositionDirection - } - - if marketType == MarketType_BinaryOption { - return nil - } - - if err := p.checkValidClosingPrice(reducePrice, tradeFeeRate, funding, orderMargin); err != nil { - return err - } - - return nil -} - -func (p *Position) checkValidClosingPrice(closingPrice, tradeFeeRate math.LegacyDec, funding *PerpetualMarketFunding, orderMargin math.LegacyDec) error { - bankruptcyPrice := p.GetBankruptcyPriceWithAddedMargin(funding, orderMargin) - - if p.IsLong { - // For long positions, Price ≥ BankruptcyPrice / (1 - TradeFeeRate) must hold - feeAdjustedBankruptcyPrice := bankruptcyPrice.Quo(math.LegacyOneDec().Sub(tradeFeeRate)) - - if closingPrice.LT(feeAdjustedBankruptcyPrice) { - return ErrPriceSurpassesBankruptcyPrice - } - } else { - // For short positions, Price ≤ BankruptcyPrice / (1 + TradeFeeRate) must hold - feeAdjustedBankruptcyPrice := bankruptcyPrice.Quo(math.LegacyOneDec().Add(tradeFeeRate)) - - if closingPrice.GT(feeAdjustedBankruptcyPrice) { - return ErrPriceSurpassesBankruptcyPrice - } - } - return nil -} - -func (p *Position) GetLiquidationMarketOrderWorstPrice(markPrice math.LegacyDec, funding *PerpetualMarketFunding) math.LegacyDec { - bankruptcyPrice := p.GetBankruptcyPrice(funding) - hasNegativeEquity := (p.IsLong && markPrice.LT(bankruptcyPrice)) || (p.IsShort() && markPrice.GT(bankruptcyPrice)) - - if hasNegativeEquity { - return markPrice - } - - return bankruptcyPrice -} - -func (p *Position) GetBankruptcyPrice(funding *PerpetualMarketFunding) (bankruptcyPrice math.LegacyDec) { - return p.GetLiquidationPrice(math.LegacyZeroDec(), funding) -} - -func (p *Position) GetBankruptcyPriceWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) (bankruptcyPrice math.LegacyDec) { - return p.getLiquidationPriceWithAddedMargin(math.LegacyZeroDec(), funding, addedMargin) -} - -func (p *Position) GetLiquidationPrice(maintenanceMarginRatio math.LegacyDec, funding *PerpetualMarketFunding) math.LegacyDec { - return p.getLiquidationPriceWithAddedMargin(maintenanceMarginRatio, funding, math.LegacyZeroDec()) -} - -func (p *Position) getLiquidationPriceWithAddedMargin(maintenanceMarginRatio math.LegacyDec, funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { - adjustedUnitMargin := p.getFundingAdjustedUnitMarginWithAddedMargin(funding, addedMargin) - - // TODO include closing fee for reduce only ? - - var liquidationPrice math.LegacyDec - if p.IsLong { - // liquidation price = (entry price - unit margin) / (1 - maintenanceMarginRatio) - liquidationPrice = p.EntryPrice.Sub(adjustedUnitMargin).Quo(math.LegacyOneDec().Sub(maintenanceMarginRatio)) - } else { - // liquidation price = (entry price + unit margin) / (1 + maintenanceMarginRatio) - liquidationPrice = p.EntryPrice.Add(adjustedUnitMargin).Quo(math.LegacyOneDec().Add(maintenanceMarginRatio)) - } - return liquidationPrice -} - -func (p *Position) GetEffectiveMargin(funding *PerpetualMarketFunding, closingPrice math.LegacyDec) math.LegacyDec { - fundingAdjustedMargin := p.Margin - if funding != nil { - fundingAdjustedMargin = p.getFundingAdjustedMargin(funding) - } - pnlNotional := math.LegacyZeroDec() - if !closingPrice.IsNil() { - pnlNotional = p.GetPayoutFromPnl(closingPrice, p.Quantity) - } - effectiveMargin := fundingAdjustedMargin.Add(pnlNotional) - return effectiveMargin -} - -// ApplyFunding updates the position to account for any funding payment. -func (p *Position) ApplyFunding(funding *PerpetualMarketFunding) { - if funding != nil { - p.Margin = p.getFundingAdjustedMargin(funding) - - // update the cumulative funding entry to current - p.CumulativeFundingEntry = funding.CumulativeFunding - } -} - -func (p *Position) getFundingAdjustedMargin(funding *PerpetualMarketFunding) math.LegacyDec { - return p.getFundingAdjustedMarginWithAddedMargin(funding, math.LegacyZeroDec()) -} - -func (p *Position) getFundingAdjustedMarginWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { - adjustedMargin := p.Margin.Add(addedMargin) - - // Compute the adjusted position margin for positions in perpetual markets - if funding != nil { - unrealizedFundingPayment := p.Quantity.Mul(funding.CumulativeFunding.Sub(p.CumulativeFundingEntry)) - - // For longs, Margin -= Funding - // For shorts, Margin += Funding - if p.IsLong { - adjustedMargin = adjustedMargin.Sub(unrealizedFundingPayment) - } else { - adjustedMargin = adjustedMargin.Add(unrealizedFundingPayment) - } - } - - return adjustedMargin -} - -func (p *Position) getFundingAdjustedUnitMarginWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { - adjustedMargin := p.getFundingAdjustedMarginWithAddedMargin(funding, addedMargin) - - // Unit Margin = PositionMargin / PositionQuantity - fundingAdjustedUnitMargin := adjustedMargin.Quo(p.Quantity) - return fundingAdjustedUnitMargin -} - -func (p *Position) GetAverageWeightedEntryPrice(executionQuantity, executionPrice math.LegacyDec) math.LegacyDec { - num := p.Quantity.Mul(p.EntryPrice).Add(executionQuantity.Mul(executionPrice)) - denom := p.Quantity.Add(executionQuantity) - - return num.Quo(denom) -} - -func (p *Position) GetPayoutIfFullyClosing(closingPrice, closingFeeRate math.LegacyDec) *positionPayout { - isProfitable := (p.IsLong && p.EntryPrice.LT(closingPrice)) || (!p.IsLong && p.EntryPrice.GT(closingPrice)) - - fullyClosingQuantity := p.Quantity - positionMargin := p.Margin - - closeTradingFee := closingPrice.Mul(fullyClosingQuantity).Mul(closingFeeRate) - payoutFromPnl := p.GetPayoutFromPnl(closingPrice, fullyClosingQuantity) - pnlNotional := payoutFromPnl.Sub(closeTradingFee) - payout := pnlNotional.Add(positionMargin) - - return &positionPayout{ - Payout: payout, - PnlNotional: pnlNotional, - IsProfitable: isProfitable, - } -} - -func (p *Position) GetPayoutFromPnl(closingPrice, closingQuantity math.LegacyDec) math.LegacyDec { - var pnlNotional math.LegacyDec - - if p.IsLong { - // nolint:all - // pnl = closingQuantity * (executionPrice - entryPrice) - pnlNotional = closingQuantity.Mul(closingPrice.Sub(p.EntryPrice)) - } else { - // nolint:all - // pnl = -closingQuantity * (executionPrice - entryPrice) - pnlNotional = closingQuantity.Mul(closingPrice.Sub(p.EntryPrice)).Neg() - } - - return pnlNotional -} - -func (p *Position) ApplyPositionDelta(delta *PositionDelta, tradingFeeForReduceOnly math.LegacyDec) ( - payout, closeExecutionMargin, collateralizationMargin, pnl math.LegacyDec, -) { - // No payouts or margin changes if the position delta is nil - if delta == nil || p == nil { - return math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec() - } - - if p.Quantity.IsZero() { - p.IsLong = delta.IsLong - } - - payout, closeExecutionMargin, collateralizationMargin = math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec() - isNettingInSameDirection := (p.IsLong && delta.IsLong) || (p.IsShort() && delta.IsShort()) - - if isNettingInSameDirection { - p.EntryPrice = p.GetAverageWeightedEntryPrice(delta.ExecutionQuantity, delta.ExecutionPrice) - p.Quantity = p.Quantity.Add(delta.ExecutionQuantity) - p.Margin = p.Margin.Add(delta.ExecutionMargin) - collateralizationMargin = delta.ExecutionMargin - - return payout, closeExecutionMargin, collateralizationMargin, math.LegacyZeroDec() - } - - // netting in opposing direction - closingQuantity := math.LegacyMinDec(p.Quantity, delta.ExecutionQuantity) - // closeExecutionMargin = execution margin * closing quantity / execution quantity - closeExecutionMargin = delta.ExecutionMargin.Mul(closingQuantity).Quo(delta.ExecutionQuantity) - - pnlNotional := p.GetPayoutFromPnl(delta.ExecutionPrice, closingQuantity) - isReduceOnlyTrade := delta.ExecutionMargin.IsZero() - - if isReduceOnlyTrade { - // deduct fees from PNL (position margin) for reduce-only orders - - // only use the closing trading fee for now - pnlNotional = pnlNotional.Sub(tradingFeeForReduceOnly) - } - - positionClosingMargin := p.Margin.Mul(closingQuantity).Quo(p.Quantity) - payout = pnlNotional.Add(positionClosingMargin) - - // for netting opposite direction - newPositionQuantity := p.Quantity.Sub(closingQuantity) - p.Margin = p.Margin.Mul(newPositionQuantity).Quo(p.Quantity) - p.Quantity = newPositionQuantity - - isFlippingPosition := delta.ExecutionQuantity.GT(closingQuantity) - - if isFlippingPosition { - remainingExecutionQuantity := delta.ExecutionQuantity.Sub(closingQuantity) - remainingExecutionMargin := delta.ExecutionMargin.Sub(closeExecutionMargin) - - newPositionDelta := &PositionDelta{ - IsLong: !p.IsLong, - ExecutionQuantity: remainingExecutionQuantity, - ExecutionMargin: remainingExecutionMargin, - ExecutionPrice: delta.ExecutionPrice, - } - - // recurse - _, _, collateralizationMargin, _ = p.ApplyPositionDelta(newPositionDelta, tradingFeeForReduceOnly) - } - - return payout, closeExecutionMargin, collateralizationMargin, pnlNotional -} diff --git a/chain/exchange/types/proposal.go b/chain/exchange/types/proposal.go index 333507e2..4ffbbbce 100644 --- a/chain/exchange/types/proposal.go +++ b/chain/exchange/types/proposal.go @@ -213,7 +213,7 @@ func (p *BatchExchangeModificationProposal) ValidateBasic() error { } // NewSpotMarketParamUpdateProposal returns new instance of SpotMarketParamUpdateProposal -func NewSpotMarketParamUpdateProposal(title, description string, marketID common.Hash, makerFeeRate, takerFeeRate, relayerFeeShareRate, minPriceTickSize, minQuantityTickSize, minNotional *math.LegacyDec, status MarketStatus, ticker string) *SpotMarketParamUpdateProposal { +func NewSpotMarketParamUpdateProposal(title, description string, marketID common.Hash, makerFeeRate, takerFeeRate, relayerFeeShareRate, minPriceTickSize, minQuantityTickSize, minNotional *math.LegacyDec, status MarketStatus, ticker string, baseDecimals, quoteDecimals uint32) *SpotMarketParamUpdateProposal { return &SpotMarketParamUpdateProposal{ title, description, @@ -227,6 +227,8 @@ func NewSpotMarketParamUpdateProposal(title, description string, marketID common ticker, minNotional, nil, + baseDecimals, + quoteDecimals, } } @@ -326,6 +328,13 @@ func (p *SpotMarketParamUpdateProposal) ValidateBasic() error { return errors.Wrap(ErrInvalidMarketStatus, p.Status.String()) } + if p.BaseDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "base decimals is invalid") + } + if p.QuoteDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "quote decimals is invalid") + } + return govtypes.ValidateAbstract(p) } @@ -341,6 +350,8 @@ func NewSpotMarketLaunchProposal( minNotional math.LegacyDec, makerFeeRate *math.LegacyDec, takerFeeRate *math.LegacyDec, + baseDecimals uint32, + quoteDecimals uint32, ) *SpotMarketLaunchProposal { return &SpotMarketLaunchProposal{ Title: title, @@ -353,6 +364,8 @@ func NewSpotMarketLaunchProposal( MinNotional: minNotional, MakerFeeRate: makerFeeRate, TakerFeeRate: takerFeeRate, + BaseDecimals: baseDecimals, + QuoteDecimals: quoteDecimals, } } @@ -424,6 +437,13 @@ func (p *SpotMarketLaunchProposal) ValidateBasic() error { } } + if p.BaseDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "base decimals is invalid") + } + if p.QuoteDecimals > MaxDecimals { + return errors.Wrap(ErrInvalidDenomDecimal, "quote decimals is invalid") + } + return govtypes.ValidateAbstract(p) } @@ -697,7 +717,7 @@ func (d *DenomDecimals) Validate() error { return errors.Wrap(sdkerrors.ErrInvalidCoins, d.Denom) } - if d.Decimals <= 0 || d.Decimals > uint64(MaxOracleScaleFactor) { + if d.Decimals > uint64(MaxDecimals) { return errors.Wrapf(ErrInvalidDenomDecimal, "invalid decimals passed: %d", d.Decimals) } return nil @@ -1241,7 +1261,7 @@ func (c *TradingRewardCampaignInfo) ValidateBasic() error { return errors.Wrap(ErrInvalidTradingRewardCampaign, "campaign quote denoms cannot be nil") } - hasTradingRewardBoostInfoDefined := c != nil && c.TradingRewardBoostInfo != nil + hasTradingRewardBoostInfoDefined := c.TradingRewardBoostInfo != nil if hasTradingRewardBoostInfoDefined { if err := c.TradingRewardBoostInfo.ValidateBasic(); err != nil { return err @@ -1254,7 +1274,7 @@ func (c *TradingRewardCampaignInfo) ValidateBasic() error { } } - hasDuplicatesInDisqualifiedMarkets := c != nil && HasDuplicates(c.DisqualifiedMarketIds) + hasDuplicatesInDisqualifiedMarkets := HasDuplicates(c.DisqualifiedMarketIds) if hasDuplicatesInDisqualifiedMarkets { return errors.Wrap(ErrInvalidTradingRewardCampaign, "campaign contains duplicate disqualified market ids") } diff --git a/chain/exchange/types/proposal.pb.go b/chain/exchange/types/proposal.pb.go index 1a20dfa1..ad50518d 100644 --- a/chain/exchange/types/proposal.pb.go +++ b/chain/exchange/types/proposal.pb.go @@ -81,6 +81,10 @@ type SpotMarketParamUpdateProposal struct { // orders in the market MinNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional,omitempty"` AdminInfo *AdminInfo `protobuf:"bytes,12,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,13,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,14,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *SpotMarketParamUpdateProposal) Reset() { *m = SpotMarketParamUpdateProposal{} } @@ -227,6 +231,10 @@ type SpotMarketLaunchProposal struct { // min_notional defines the minimum notional for orders in the market MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` AdminInfo *AdminInfo `protobuf:"bytes,11,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,14,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,15,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *SpotMarketLaunchProposal) Reset() { *m = SpotMarketLaunchProposal{} } @@ -1221,160 +1229,163 @@ func init() { } var fileDescriptor_32e9ec9b6b22477c = []byte{ - // 2444 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcb, 0x8f, 0x1b, 0x49, - 0xfd, 0x9f, 0x9e, 0x99, 0x4c, 0xec, 0xb2, 0xe7, 0xd5, 0xe3, 0x9d, 0x9f, 0x77, 0x92, 0x78, 0x66, - 0x3a, 0xaf, 0xd9, 0xfc, 0x36, 0x36, 0x09, 0x8b, 0x22, 0x2c, 0x21, 0x98, 0xe7, 0xee, 0x88, 0x64, - 0xe2, 0xb4, 0x67, 0x76, 0x57, 0x11, 0xa8, 0x55, 0xee, 0xae, 0x99, 0x29, 0xe2, 0x7e, 0xa4, 0xab, - 0x3c, 0xc9, 0xac, 0x38, 0x70, 0x60, 0x05, 0xca, 0x09, 0x10, 0x0f, 0x71, 0x88, 0xb4, 0x27, 0xce, - 0x48, 0xf0, 0x0f, 0xc0, 0x01, 0x2d, 0x2b, 0x0e, 0x2b, 0x71, 0x00, 0x71, 0x58, 0xa1, 0x44, 0x08, - 0xfe, 0x02, 0xc4, 0x81, 0x03, 0xea, 0xaa, 0xea, 0x76, 0xdb, 0x6e, 0xb7, 0xdb, 0x1e, 0x9b, 0x3d, - 0x90, 0x4b, 0xe2, 0xfe, 0xd6, 0xb7, 0x3e, 0xf5, 0xad, 0xef, 0xab, 0xbe, 0xf5, 0x18, 0xf0, 0x06, - 0xb6, 0xbe, 0x85, 0x74, 0x8a, 0x4f, 0x50, 0x09, 0x3d, 0xd5, 0x8f, 0xa1, 0x75, 0x84, 0x4a, 0x27, - 0xb7, 0x6a, 0x88, 0xc2, 0x5b, 0x25, 0xc7, 0xb5, 0x1d, 0x9b, 0xc0, 0x7a, 0xd1, 0x71, 0x6d, 0x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 0x2f, - 0x2f, 0x83, 0xcc, 0xe3, 0x86, 0x4d, 0xfd, 0x76, 0x56, 0x84, 0xaa, 0x80, 0x91, 0x38, 0x43, 0x97, - 0x1a, 0xb0, 0x59, 0x5a, 0x8e, 0x0d, 0xb3, 0x06, 0x3c, 0x9f, 0x1c, 0x36, 0xb2, 0x06, 0xec, 0xac, - 0xd0, 0x53, 0xc3, 0xab, 0xd0, 0xd3, 0x83, 0x56, 0xe8, 0xed, 0x95, 0x23, 0x48, 0x3e, 0xcb, 0x98, - 0xca, 0x31, 0x33, 0x60, 0xe5, 0x78, 0x37, 0xb9, 0x57, 0xaf, 0x46, 0x54, 0x8e, 0xad, 0xfe, 0xaa, - 0xfc, 0x22, 0x05, 0x2e, 0xc5, 0xae, 0x94, 0x43, 0xf7, 0xe8, 0x36, 0x97, 0x9d, 0xec, 0x70, 0xd9, - 0x65, 0x90, 0xe1, 0x1b, 0x48, 0xcd, 0xf3, 0x73, 0xdf, 0xa7, 0x39, 0x69, 0x03, 0x12, 0x24, 0xaf, - 0x82, 0xac, 0x60, 0x60, 0xbd, 0xb8, 0x33, 0xab, 0xa2, 0xd3, 0x03, 0x8f, 0x24, 0x17, 0xc1, 0x82, - 0x60, 0x21, 0x3a, 0xac, 0x23, 0xed, 0x10, 0xea, 0xd4, 0x76, 0x99, 0x7f, 0x4e, 0xab, 0xf3, 0xbc, - 0xa9, 0xea, 0xb5, 0xec, 0xb0, 0x06, 0x79, 0x3b, 0x18, 0x93, 0x7a, 0x75, 0x6e, 0x8a, 0xd5, 0xb9, - 0x57, 0x42, 0xb6, 0x11, 0x5b, 0x5a, 0x5f, 0xc9, 0xf7, 0xd9, 0x27, 0xab, 0x71, 0x85, 0x64, 0xde, - 0x6f, 0xf9, 0x00, 0xe4, 0xb0, 0x85, 0x29, 0xe6, 0x95, 0xcb, 0x11, 0xb6, 0x3c, 0xcf, 0xc3, 0x76, - 0xc8, 0xf5, 0x7a, 0x7a, 0x8c, 0x2c, 0x00, 0xee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0xce, 0x8d, 0x2f, 0xcd, 0x3e, - 0x7b, 0xbe, 0x12, 0x26, 0x6d, 0x1c, 0x7f, 0xfc, 0xa2, 0x20, 0x7d, 0xfa, 0xa2, 0x20, 0xfd, 0xf5, - 0x45, 0x41, 0xfa, 0xc1, 0xcb, 0xc2, 0xd8, 0xa7, 0x2f, 0x0b, 0x63, 0x7f, 0x7e, 0x59, 0x18, 0x7b, - 0xb8, 0x77, 0x84, 0xe9, 0x71, 0xa3, 0x56, 0xd4, 0x6d, 0xb3, 0xb4, 0xeb, 0x2b, 0xf2, 0x2e, 0xac, - 0x91, 0x52, 0xa0, 0xd6, 0x9b, 0xba, 0xed, 0xa2, 0xf0, 0xe7, 0x31, 0xc4, 0x56, 0xc9, 0xb4, 0xbd, - 0xb9, 0x91, 0x66, 0x35, 0xec, 0xd5, 0x64, 0xa4, 0x36, 0xc5, 0xfe, 0x32, 0xe1, 0x8b, 0xff, 0x09, - 0x00, 0x00, 0xff, 0xff, 0x16, 0x7b, 0x31, 0x71, 0xe1, 0x31, 0x00, 0x00, + // 2486 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcb, 0x6f, 0x1c, 0x49, + 0x19, 0x77, 0xdb, 0x8e, 0xed, 0xa9, 0x99, 0xf1, 0xa3, 0xed, 0x35, 0xb3, 0x4e, 0xe2, 0xc7, 0x38, + 0x0f, 0x6f, 0xd8, 0xcc, 0x90, 0xb0, 0x28, 0x62, 0x24, 0x04, 0x7e, 0xee, 0x5a, 0x24, 0xce, 0xa4, + 0xc7, 0xde, 0x5d, 0x45, 0xa0, 0x56, 0x4d, 0x77, 0xd9, 0x2e, 0x32, 0xfd, 0x48, 0x57, 0x8d, 0x13, + 0xaf, 0x38, 0x70, 0x60, 0x05, 0xca, 0x09, 0x10, 0x2c, 0xe2, 0x10, 0xb1, 0x27, 0xce, 0x48, 0xf0, + 0x0f, 0xc0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x52, 0x0c, 0xdc, 0x7a, 0xd3, + 0x70, 0x3c, 0x14, 0xfe, 0x3c, 0x86, 0xd8, 0x2e, 0x5a, 0x0e, 0xeb, 0x1b, 0x69, 0xb0, 0x61, 0xc6, + 0xc9, 0x48, 0x75, 0x8c, 0xff, 0xc5, 0xc4, 0x97, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x86, 0x3e, + 0x35, 0xf5, 0x79, 0x32, 0x00, 0x00, } func (m *SpotMarketParamUpdateProposal) Marshal() (dAtA []byte, err error) { @@ -1397,6 +1408,16 @@ func (m *SpotMarketParamUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x70 + } + if m.BaseDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x68 + } if m.AdminInfo != nil { { size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) @@ -1764,6 +1785,16 @@ func (m *SpotMarketLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x78 + } + if m.BaseDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x70 + } if m.AdminInfo != nil { { size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) @@ -3406,6 +3437,12 @@ func (m *SpotMarketParamUpdateProposal) Size() (n int) { l = m.AdminInfo.Size() n += 1 + l + sovProposal(uint64(l)) } + if m.BaseDecimals != 0 { + n += 1 + sovProposal(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovProposal(uint64(m.QuoteDecimals)) + } return n } @@ -3550,6 +3587,12 @@ func (m *SpotMarketLaunchProposal) Size() (n int) { l = m.AdminInfo.Size() n += 1 + l + sovProposal(uint64(l)) } + if m.BaseDecimals != 0 { + n += 1 + sovProposal(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovProposal(uint64(m.QuoteDecimals)) + } return n } @@ -4590,6 +4633,44 @@ func (m *SpotMarketParamUpdateProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProposal(dAtA[iNdEx:]) @@ -5637,6 +5718,44 @@ func (m *SpotMarketLaunchProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProposal(dAtA[iNdEx:]) diff --git a/chain/exchange/types/query.pb.go b/chain/exchange/types/query.pb.go index 865c480d..00a13881 100644 --- a/chain/exchange/types/query.pb.go +++ b/chain/exchange/types/query.pb.go @@ -6275,6 +6275,255 @@ func (m *QueryTraderDerivativeConditionalOrdersResponse) GetOrders() []*TrimmedD return nil } +type QueryFullSpotOrderbookRequest struct { + // market id + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryFullSpotOrderbookRequest) Reset() { *m = QueryFullSpotOrderbookRequest{} } +func (m *QueryFullSpotOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotOrderbookRequest) ProtoMessage() {} +func (*QueryFullSpotOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_523db28b8af54781, []int{122} +} +func (m *QueryFullSpotOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotOrderbookRequest.Merge(m, src) +} +func (m *QueryFullSpotOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotOrderbookRequest proto.InternalMessageInfo + +func (m *QueryFullSpotOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryFullSpotOrderbookResponse struct { + Bids []*TrimmedLimitOrder `protobuf:"bytes,1,rep,name=Bids,proto3" json:"Bids,omitempty"` + Asks []*TrimmedLimitOrder `protobuf:"bytes,2,rep,name=Asks,proto3" json:"Asks,omitempty"` +} + +func (m *QueryFullSpotOrderbookResponse) Reset() { *m = QueryFullSpotOrderbookResponse{} } +func (m *QueryFullSpotOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotOrderbookResponse) ProtoMessage() {} +func (*QueryFullSpotOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_523db28b8af54781, []int{123} +} +func (m *QueryFullSpotOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotOrderbookResponse.Merge(m, src) +} +func (m *QueryFullSpotOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotOrderbookResponse proto.InternalMessageInfo + +func (m *QueryFullSpotOrderbookResponse) GetBids() []*TrimmedLimitOrder { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryFullSpotOrderbookResponse) GetAsks() []*TrimmedLimitOrder { + if m != nil { + return m.Asks + } + return nil +} + +type QueryFullDerivativeOrderbookRequest struct { + // market id + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryFullDerivativeOrderbookRequest) Reset() { *m = QueryFullDerivativeOrderbookRequest{} } +func (m *QueryFullDerivativeOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullDerivativeOrderbookRequest) ProtoMessage() {} +func (*QueryFullDerivativeOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_523db28b8af54781, []int{124} +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullDerivativeOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullDerivativeOrderbookRequest.Merge(m, src) +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullDerivativeOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullDerivativeOrderbookRequest proto.InternalMessageInfo + +func (m *QueryFullDerivativeOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryFullDerivativeOrderbookResponse struct { + Bids []*TrimmedLimitOrder `protobuf:"bytes,1,rep,name=Bids,proto3" json:"Bids,omitempty"` + Asks []*TrimmedLimitOrder `protobuf:"bytes,2,rep,name=Asks,proto3" json:"Asks,omitempty"` +} + +func (m *QueryFullDerivativeOrderbookResponse) Reset() { *m = QueryFullDerivativeOrderbookResponse{} } +func (m *QueryFullDerivativeOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullDerivativeOrderbookResponse) ProtoMessage() {} +func (*QueryFullDerivativeOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_523db28b8af54781, []int{125} +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullDerivativeOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullDerivativeOrderbookResponse.Merge(m, src) +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullDerivativeOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullDerivativeOrderbookResponse proto.InternalMessageInfo + +func (m *QueryFullDerivativeOrderbookResponse) GetBids() []*TrimmedLimitOrder { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryFullDerivativeOrderbookResponse) GetAsks() []*TrimmedLimitOrder { + if m != nil { + return m.Asks + } + return nil +} + +type TrimmedLimitOrder struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *TrimmedLimitOrder) Reset() { *m = TrimmedLimitOrder{} } +func (m *TrimmedLimitOrder) String() string { return proto.CompactTextString(m) } +func (*TrimmedLimitOrder) ProtoMessage() {} +func (*TrimmedLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_523db28b8af54781, []int{126} +} +func (m *TrimmedLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrimmedLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrimmedLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TrimmedLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrimmedLimitOrder.Merge(m, src) +} +func (m *TrimmedLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *TrimmedLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_TrimmedLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_TrimmedLimitOrder proto.InternalMessageInfo + +func (m *TrimmedLimitOrder) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *TrimmedLimitOrder) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + type QueryMarketAtomicExecutionFeeMultiplierRequest struct { MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` } @@ -6287,7 +6536,7 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) String() string { } func (*QueryMarketAtomicExecutionFeeMultiplierRequest) ProtoMessage() {} func (*QueryMarketAtomicExecutionFeeMultiplierRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{122} + return fileDescriptor_523db28b8af54781, []int{127} } func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6335,7 +6584,7 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) String() string { } func (*QueryMarketAtomicExecutionFeeMultiplierResponse) ProtoMessage() {} func (*QueryMarketAtomicExecutionFeeMultiplierResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{123} + return fileDescriptor_523db28b8af54781, []int{128} } func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6372,7 +6621,7 @@ func (m *QueryActiveStakeGrantRequest) Reset() { *m = QueryActiveStakeGr func (m *QueryActiveStakeGrantRequest) String() string { return proto.CompactTextString(m) } func (*QueryActiveStakeGrantRequest) ProtoMessage() {} func (*QueryActiveStakeGrantRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{124} + return fileDescriptor_523db28b8af54781, []int{129} } func (m *QueryActiveStakeGrantRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6417,7 +6666,7 @@ func (m *QueryActiveStakeGrantResponse) Reset() { *m = QueryActiveStakeG func (m *QueryActiveStakeGrantResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveStakeGrantResponse) ProtoMessage() {} func (*QueryActiveStakeGrantResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{125} + return fileDescriptor_523db28b8af54781, []int{130} } func (m *QueryActiveStakeGrantResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6469,7 +6718,7 @@ func (m *QueryGrantAuthorizationRequest) Reset() { *m = QueryGrantAuthor func (m *QueryGrantAuthorizationRequest) String() string { return proto.CompactTextString(m) } func (*QueryGrantAuthorizationRequest) ProtoMessage() {} func (*QueryGrantAuthorizationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{126} + return fileDescriptor_523db28b8af54781, []int{131} } func (m *QueryGrantAuthorizationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6520,7 +6769,7 @@ func (m *QueryGrantAuthorizationResponse) Reset() { *m = QueryGrantAutho func (m *QueryGrantAuthorizationResponse) String() string { return proto.CompactTextString(m) } func (*QueryGrantAuthorizationResponse) ProtoMessage() {} func (*QueryGrantAuthorizationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{127} + return fileDescriptor_523db28b8af54781, []int{132} } func (m *QueryGrantAuthorizationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6557,7 +6806,7 @@ func (m *QueryGrantAuthorizationsRequest) Reset() { *m = QueryGrantAutho func (m *QueryGrantAuthorizationsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGrantAuthorizationsRequest) ProtoMessage() {} func (*QueryGrantAuthorizationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{128} + return fileDescriptor_523db28b8af54781, []int{133} } func (m *QueryGrantAuthorizationsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6602,7 +6851,7 @@ func (m *QueryGrantAuthorizationsResponse) Reset() { *m = QueryGrantAuth func (m *QueryGrantAuthorizationsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGrantAuthorizationsResponse) ProtoMessage() {} func (*QueryGrantAuthorizationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_523db28b8af54781, []int{129} + return fileDescriptor_523db28b8af54781, []int{134} } func (m *QueryGrantAuthorizationsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6764,6 +7013,11 @@ func init() { proto.RegisterType((*QueryTraderDerivativeConditionalOrdersRequest)(nil), "injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersRequest") proto.RegisterType((*TrimmedDerivativeConditionalOrder)(nil), "injective.exchange.v1beta1.TrimmedDerivativeConditionalOrder") proto.RegisterType((*QueryTraderDerivativeConditionalOrdersResponse)(nil), "injective.exchange.v1beta1.QueryTraderDerivativeConditionalOrdersResponse") + proto.RegisterType((*QueryFullSpotOrderbookRequest)(nil), "injective.exchange.v1beta1.QueryFullSpotOrderbookRequest") + proto.RegisterType((*QueryFullSpotOrderbookResponse)(nil), "injective.exchange.v1beta1.QueryFullSpotOrderbookResponse") + proto.RegisterType((*QueryFullDerivativeOrderbookRequest)(nil), "injective.exchange.v1beta1.QueryFullDerivativeOrderbookRequest") + proto.RegisterType((*QueryFullDerivativeOrderbookResponse)(nil), "injective.exchange.v1beta1.QueryFullDerivativeOrderbookResponse") + proto.RegisterType((*TrimmedLimitOrder)(nil), "injective.exchange.v1beta1.TrimmedLimitOrder") proto.RegisterType((*QueryMarketAtomicExecutionFeeMultiplierRequest)(nil), "injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierRequest") proto.RegisterType((*QueryMarketAtomicExecutionFeeMultiplierResponse)(nil), "injective.exchange.v1beta1.QueryMarketAtomicExecutionFeeMultiplierResponse") proto.RegisterType((*QueryActiveStakeGrantRequest)(nil), "injective.exchange.v1beta1.QueryActiveStakeGrantRequest") @@ -6779,372 +7033,382 @@ func init() { } var fileDescriptor_523db28b8af54781 = []byte{ - // 5833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5d, 0x7d, 0x8c, 0x1c, 0xc9, - 0x55, 0x77, 0xcf, 0x7e, 0x78, 0xf7, 0xed, 0xa7, 0x6b, 0xd7, 0xeb, 0xf5, 0xdc, 0x9d, 0x3f, 0xda, - 0x71, 0xce, 0xe7, 0x9c, 0x77, 0xed, 0xf5, 0xf7, 0xb7, 0xf7, 0xc3, 0x6b, 0xef, 0xd9, 0x6b, 0x3b, - 0xb3, 0xeb, 0xbb, 0xe4, 0x02, 0x4c, 0x7a, 0x67, 0x6a, 0x67, 0x3b, 0xee, 0x99, 0x1e, 0x4f, 0xf7, - 0xec, 0x79, 0x31, 0x46, 0x40, 0x40, 0x89, 0x40, 0x02, 0xa4, 0x08, 0x10, 0x02, 0x21, 0xe0, 0x4f, - 0xa4, 0x08, 0x89, 0x08, 0x81, 0x12, 0x29, 0x51, 0x08, 0x42, 0x21, 0xe1, 0x23, 0x40, 0x08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, 0xcf, 0x43, 0x9e, 0x19, - 0xfd, 0x26, 0xb6, 0xf8, 0xc0, 0x68, 0x18, 0x55, 0xd1, 0xab, 0x7a, 0x11, 0x9e, 0x8b, 0x7d, 0x8b, - 0x1d, 0x72, 0x03, 0x7a, 0xeb, 0xac, 0x04, 0x55, 0xd0, 0xd3, 0x54, 0xe0, 0xb4, 0x73, 0xdd, 0x5f, - 0x7e, 0xf3, 0xe0, 0xae, 0x02, 0xd2, 0xe9, 0x9f, 0xd2, 0xe0, 0x40, 0xa8, 0xd3, 0x17, 0x68, 0xdd, - 0x76, 0x4c, 0x37, 0x9b, 0x67, 0xdd, 0x05, 0x68, 0x3d, 0x33, 0xd5, 0x07, 0x66, 0xde, 0xaf, 0x66, - 0x50, 0x26, 0x91, 0x56, 0xf0, 0xd1, 0xeb, 0xef, 0x68, 0x70, 0x30, 0x51, 0x2a, 0xd4, 0x9d, 0x42, - 0x5f, 0x19, 0xcb, 0xd0, 0x15, 0x97, 0xd2, 0xda, 0x6b, 0xc3, 0x6e, 0x4a, 0x14, 0xdc, 0xac, 0xb9, - 0x8d, 0xad, 0x82, 0x64, 0x9d, 0xff, 0x28, 0x0c, 0x05, 0x5e, 0x91, 0x51, 0xe8, 0x7a, 0x44, 0xb7, - 0xd0, 0x08, 0xde, 0x4f, 0x72, 0x11, 0x7a, 0x36, 0x0d, 0xab, 0x49, 0x51, 0xed, 0x23, 0x69, 0x62, - 0x20, 0xaf, 0x02, 0xa7, 0xb8, 0x94, 0xbb, 0xa0, 0xe9, 0x07, 0x70, 0x64, 0x8b, 0x3e, 0x9e, 0x33, - 0x2c, 0xa3, 0x56, 0xa2, 0xd2, 0x07, 0xd6, 0x71, 0x58, 0x46, 0xdf, 0xa3, 0x25, 0x6e, 0x42, 0xdf, - 0x1a, 0x96, 0xa1, 0x25, 0x52, 0x45, 0x40, 0x7a, 0x74, 0x04, 0x49, 0xaa, 0x9f, 0x47, 0x5f, 0x9b, - 0xad, 0x54, 0x1a, 0xb4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34, 0x18, 0x09, 0x7d, 0xae, 0x80, 0xb4, 0xf7, 0xf3, 0xf8, - 0x8f, 0x3d, 0xe4, 0x2f, 0x64, 0x27, 0x44, 0x2d, 0x16, 0x99, 0x16, 0x37, 0xc8, 0x35, 0x25, 0x2d, - 0x42, 0x1f, 0x75, 0x98, 0x7e, 0x8a, 0xbd, 0xf3, 0x8c, 0xf5, 0x4b, 0xf8, 0xeb, 0x0b, 0x24, 0xb3, - 0x58, 0x19, 0xfa, 0x25, 0xe9, 0x53, 0x0f, 0x19, 0xfb, 0x25, 0xfc, 0x99, 0x0a, 0xf2, 0x2f, 0x1a, - 0xec, 0x8d, 0x85, 0xd0, 0x93, 0xab, 0xea, 0x32, 0xc5, 0x7c, 0x83, 0x21, 0x7f, 0xad, 0x53, 0x72, - 0xd4, 0xeb, 0x1e, 0xd3, 0xeb, 0x36, 0x59, 0xcc, 0xa6, 0x97, 0x9f, 0xd7, 0xf4, 0x53, 0x99, 0x5a, - 0x3d, 0x23, 0x6f, 0x6a, 0x30, 0x11, 0xff, 0xad, 0x00, 0xd2, 0xa1, 0xa8, 0xb2, 0xf7, 0xae, 0x77, - 0x4c, 0x8f, 0xba, 0xce, 0x33, 0x5d, 0xaf, 0x92, 0xcb, 0x9d, 0xeb, 0xea, 0x90, 0x2f, 0x68, 0x30, - 0xe8, 0xff, 0xf8, 0x02, 0x39, 0xd3, 0x56, 0xac, 0x98, 0x8f, 0x52, 0xe4, 0xcf, 0x66, 0xa4, 0x42, - 0x15, 0xe6, 0x98, 0x0a, 0x57, 0xc8, 0x25, 0x25, 0x15, 0x02, 0x9f, 0x95, 0x98, 0x7e, 0xca, 0x1e, - 0x9f, 0x91, 0xcf, 0x69, 0x30, 0x14, 0xf8, 0x7c, 0x04, 0xc9, 0x26, 0x8c, 0xec, 0x90, 0x73, 0x59, - 0xc9, 0x50, 0x89, 0xcb, 0x4c, 0x89, 0xb3, 0xe4, 0x74, 0x76, 0x25, 0x1c, 0xf2, 0x3b, 0x1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8c, 0xc5, 0xa0, 0xcd, - 0xc9, 0xe5, 0x0c, 0x82, 0x46, 0xe6, 0xbe, 0x2b, 0x9d, 0x11, 0xa3, 0x82, 0x0b, 0x4c, 0xc1, 0x6b, - 0xe4, 0x8a, 0xa2, 0x82, 0xf1, 0xf3, 0xe0, 0xbf, 0x6a, 0x30, 0x11, 0x0f, 0xa0, 0x54, 0x58, 0x10, - 0xa5, 0x22, 0x78, 0x15, 0x16, 0x44, 0xe9, 0xc8, 0x4d, 0xfd, 0x83, 0x4c, 0xc3, 0x3b, 0x64, 0x29, - 0x8b, 0x86, 0xe9, 0xe3, 0xf1, 0xe7, 0x73, 0x70, 0x20, 0x1d, 0xb7, 0x49, 0x16, 0x33, 0xce, 0x71, - 0x49, 0xea, 0xdf, 0xda, 0x36, 0x1f, 0x34, 0xc3, 0x47, 0x98, 0x19, 0x1e, 0x92, 0x95, 0xce, 0xcd, - 0x90, 0x3c, 0x6f, 0xfe, 0x77, 0x60, 0x20, 0x87, 0x66, 0xcf, 0x1b, 0x59, 0x1d, 0x34, 0x32, 0x87, - 0xce, 0x6e, 0x83, 0xc3, 0xb6, 0xd4, 0x57, 0x9c, 0x4f, 0xff, 0x47, 0x83, 0x83, 0x61, 0x2f, 0x0c, - 0xcf, 0x47, 0xef, 0xf9, 0x38, 0xc8, 0x6a, 0x81, 0x4c, 0x33, 0xd4, 0x1f, 0x69, 0xb0, 0x27, 0x02, - 0xd5, 0x53, 0xd8, 0x28, 0x4d, 0x02, 0xdd, 0x2a, 0x6c, 0x94, 0x26, 0x22, 0x03, 0xf5, 0x73, 0x4c, - 0xd3, 0x93, 0x64, 0x4a, 0x35, 0x68, 0xa3, 0xb8, 0x5f, 0xd5, 0x60, 0x34, 0x02, 0x16, 0xbd, 0x90, - 0x59, 0x10, 0xf5, 0x3c, 0x22, 0x09, 0x31, 0xa8, 0xb6, 0x03, 0x12, 0xd5, 0x20, 0x10, 0x93, 0xbf, - 0xa3, 0xc1, 0xbe, 0x04, 0x8c, 0x1f, 0xb9, 0x9e, 0x59, 0xb4, 0x20, 0xc2, 0x30, 0x7f, 0xa3, 0x73, - 0x06, 0xa8, 0xe2, 0x12, 0x53, 0x71, 0x9e, 0xcc, 0x66, 0x52, 0x51, 0x84, 0x9c, 0x80, 0xa6, 0x7f, - 0xa5, 0xc1, 0x78, 0x1c, 0x28, 0x83, 0x5c, 0xc9, 0x90, 0x98, 0x46, 0xd0, 0x89, 0xf9, 0xab, 0x1d, - 0x52, 0x67, 0xd9, 0x9e, 0x90, 0x05, 0xe1, 0x01, 0xf5, 0x7b, 0x1a, 0x8c, 0x89, 0xfd, 0x73, 0x1f, - 0x34, 0x44, 0x61, 0x27, 0x28, 0x8a, 0x31, 0x51, 0xd8, 0x09, 0x8a, 0x41, 0x9f, 0xa8, 0xed, 0x04, - 0x55, 0x19, 0x61, 0x91, 0x01, 0x3e, 0xc8, 0x6f, 0x69, 0xd0, 0x2f, 0x21, 0x25, 0xe4, 0x54, 0xdb, - 0x56, 0xc3, 0xb8, 0x94, 0xfc, 0x4c, 0x16, 0x12, 0x14, 0xf3, 0x04, 0x13, 0xf3, 0x45, 0x72, 0x34, - 0x4d, 0xcc, 0xba, 0x94, 0xea, 0x2f, 0x35, 0x18, 0x8b, 0x41, 0x35, 0x92, 0x2c, 0x07, 0x4d, 0x11, - 0xb9, 0xaf, 0x74, 0x46, 0x9c, 0x65, 0xdb, 0x5d, 0x6a, 0x10, 0x71, 0x95, 0x7f, 0xd7, 0x20, 0x9f, - 0x8c, 0x9b, 0x24, 0x73, 0x1d, 0xc8, 0x16, 0x02, 0xa7, 0xe6, 0xe7, 0xb7, 0xc5, 0x23, 0xcb, 0x88, - 0x4f, 0x54, 0x33, 0x30, 0xe2, 0x7f, 0x29, 0x07, 0x47, 0x14, 0x70, 0x8b, 0xe4, 0x4e, 0x06, 0xb9, - 0xdb, 0x21, 0x74, 0xf3, 0x77, 0x77, 0x86, 0x19, 0x5a, 0x63, 0x85, 0x59, 0x63, 0x99, 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 0xdf, 0x7a, 0xeb, 0x80, 0xf6, 0x8b, 0x6f, - 0x1f, 0xd8, 0xf5, 0xb5, 0xb7, 0x0f, 0xec, 0xfa, 0xfb, 0xb7, 0x0f, 0xec, 0x7a, 0xfd, 0x5e, 0xc5, - 0x74, 0x37, 0x9a, 0x6b, 0x53, 0x25, 0xbb, 0x3a, 0xbd, 0x24, 0xf8, 0xdf, 0x35, 0xd6, 0x9c, 0x56, - 0x6b, 0x27, 0x4a, 0x76, 0x83, 0xfa, 0x1f, 0x37, 0x0c, 0xb3, 0x86, 0x07, 0x0d, 0x4e, 0x4b, 0x14, - 0x77, 0xab, 0x4e, 0x9d, 0xb5, 0x5e, 0xf6, 0x4f, 0x68, 0x4f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x1e, 0xed, 0xe6, 0xe6, 0x7a, 0x77, 0x00, 0x00, + // 5988 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x3d, 0x6d, 0x8c, 0x1c, 0xc9, + 0x55, 0xee, 0xd9, 0x0f, 0xef, 0xbe, 0xfd, 0x74, 0xed, 0x7a, 0xbd, 0x9e, 0xbb, 0xf3, 0x47, 0x3b, + 0xbe, 0xf3, 0x39, 0xe7, 0x1d, 0x7b, 0xfd, 0xfd, 0xed, 0x9d, 0x5d, 0xaf, 0xbd, 0xe7, 0x5d, 0xdb, + 0x37, 0xbb, 0xbe, 0xcb, 0x5d, 0x80, 0x49, 0xef, 0x4c, 0xef, 0x6c, 0x9f, 0x7b, 0xa6, 0xc7, 0xd3, + 0x3d, 0x7b, 0x5e, 0x8c, 0x11, 0x10, 0x50, 0x22, 0x90, 0x00, 0x29, 0x02, 0x84, 0x40, 0x08, 0xf8, + 0xc1, 0x0f, 0x44, 0x84, 0x44, 0x84, 0x40, 0x89, 0x94, 0x28, 0x04, 0xa1, 0x70, 0x41, 0x70, 0x90, + 0x23, 0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0xdc, 0x27, 0xf2, 0x53, 0x0a, 0x1c, 0x0e, 0x0c, + 0x4c, 0x85, 0x20, 0x46, 0xb7, 0x4b, 0xeb, 0xba, 0xab, 0xaf, 0x78, 0x7c, 0x3d, 0x95, 0x7c, 0x2c, + 0xc8, 0xb9, 0x62, 0x33, 0x64, 0x99, 0x85, 0x83, 0xbe, 0xa1, 0xdd, 0x26, 0xde, 0x69, 0x19, 0x11, + 0x93, 0x1f, 0x83, 0xbd, 0x8e, 0xe5, 0x68, 0x66, 0xa4, 0x90, 0x52, 0xb8, 0xd0, 0x09, 0x8a, 0x25, + 0x24, 0x22, 0xf2, 0x4b, 0x0a, 0x1c, 0xe3, 0x0a, 0x26, 0xc7, 0x6a, 0x77, 0x47, 0xac, 0x1e, 0xc1, + 0x41, 0x56, 0xda, 0x72, 0x5c, 0x85, 0x83, 0x82, 0xa0, 0x58, 0xce, 0x7b, 0xe4, 0xd5, 0xf3, 0x19, + 0x3e, 0x72, 0xe4, 0x04, 0xa8, 0x17, 0x51, 0x47, 0x17, 0xec, 0x3b, 0x75, 0x47, 0x2f, 0xdf, 0x69, + 0x3a, 0x77, 0xd6, 0x58, 0x07, 0xbb, 0x7d, 0x22, 0xec, 0x1c, 0x2a, 0x6f, 0x24, 0x30, 0x2a, 0xef, + 0x01, 0x18, 0x34, 0xec, 0xa2, 0xe5, 0x7e, 0x2f, 0x5a, 0x4d, 0x07, 0xa3, 0x2a, 0x30, 0x04, 0x88, + 0xfa, 0x1c, 0x9e, 0xfa, 0x84, 0x70, 0xe0, 0xa1, 0x98, 0xb0, 0x57, 0x73, 0x18, 0xbb, 0x27, 0x74, + 0xc4, 0x41, 0x13, 0x4c, 0x8a, 0x7a, 0x05, 0x1d, 0xe1, 0xbc, 0xae, 0xcf, 0x19, 0x36, 0x3b, 0x76, + 0xc3, 0x88, 0xd7, 0xe3, 0xc2, 0xe3, 0x99, 0xfe, 0xae, 0x82, 0x6e, 0x30, 0x0e, 0x01, 0xd2, 0xf0, +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0xc8, 0xe7, 0x14, 0x00, 0xcf, 0xdb, 0x18, + 0xd3, 0x29, 0x86, 0xe5, 0xa4, 0x9e, 0x4c, 0x05, 0x83, 0x94, 0x5e, 0xa2, 0x94, 0x9e, 0x21, 0xa7, + 0x64, 0x29, 0xf5, 0xad, 0xe1, 0x2f, 0x28, 0x30, 0x12, 0x78, 0x96, 0x42, 0xc2, 0x89, 0x44, 0x3f, + 0xa9, 0x21, 0xe1, 0x44, 0x62, 0x5e, 0xc0, 0x50, 0x4f, 0x53, 0x26, 0x72, 0xe4, 0x58, 0x5b, 0x26, + 0xd6, 0x9a, 0xa6, 0x59, 0xe4, 0x73, 0xfe, 0x95, 0xf0, 0x9b, 0x24, 0x67, 0x52, 0xd2, 0x20, 0x1f, + 0x21, 0x46, 0x3f, 0x74, 0x91, 0x22, 0xd8, 0xf5, 0x90, 0xee, 0x93, 0xc1, 0x17, 0x15, 0x18, 0xf2, + 0x05, 0xd2, 0x12, 0x8b, 0x34, 0x32, 0x66, 0x3f, 0x93, 0x16, 0x2c, 0x4d, 0x48, 0x45, 0x59, 0xb0, + 0x38, 0xac, 0x8f, 0x81, 0xb7, 0x15, 0x18, 0x0d, 0xd6, 0xf7, 0x4a, 0xb8, 0xee, 0x98, 0x07, 0x2e, + 0x24, 0x5c, 0x77, 0xdc, 0x63, 0x09, 0xea, 0x2d, 0xca, 0xc9, 0x75, 0x32, 0x2b, 0xc7, 0x89, 0x6f, + 0x2d, 0xe4, 0x1e, 0xf9, 0xce, 0x8f, 0x1e, 0x93, 0xff, 0x52, 0x60, 0x32, 0xee, 0xa9, 0x04, 0xd2, + 0x7e, 0xe3, 0xd7, 0xe6, 0x75, 0x8d, 0xec, 0xcc, 0x16, 0x30, 0x20, 0xbb, 0xf7, 0x28, 0xbb, 0x77, + 0xc8, 0x52, 0x27, 0xec, 0x22, 0xab, 0x22, 0x04, 0xe3, 0xf7, 0x8f, 0x8f, 0xc9, 0xb7, 0xdd, 0x0d, + 0x4c, 0xe8,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xfd, 0x73, + 0xf6, 0x72, 0x87, 0xd0, 0x69, 0x8e, 0x27, 0x44, 0x43, 0x70, 0x41, 0xfd, 0x91, 0x02, 0x63, 0xfc, + 0xfc, 0xdc, 0x53, 0x7c, 0x26, 0x71, 0x12, 0x14, 0xae, 0x62, 0x93, 0x38, 0x09, 0x8a, 0xa8, 0x6f, + 0x93, 0x3b, 0x09, 0xaa, 0x52, 0xc0, 0x22, 0x2d, 0x29, 0x23, 0xbf, 0xa3, 0x40, 0xbf, 0x28, 0x5a, + 0x23, 0x27, 0xda, 0x8e, 0x1a, 0xac, 0x7c, 0xcb, 0x4e, 0xa7, 0x01, 0x41, 0x32, 0x8f, 0x51, 0x32, + 0x9f, 0x23, 0x87, 0x93, 0xc8, 0xac, 0x0b, 0xaa, 0xfe, 0x46, 0x81, 0xb1, 0x88, 0xba, 0x69, 0x92, + 0xe6, 0xa2, 0x29, 0x44, 0xf7, 0xa5, 0xce, 0x80, 0xd3, 0x1c, 0xbb, 0x0b, 0x0e, 0x42, 0xaa, 0xf2, + 0x9f, 0x0a, 0x64, 0xe3, 0x2b, 0xb3, 0x49, 0xbe, 0x03, 0xda, 0x02, 0xe5, 0xef, 0xd9, 0xd9, 0x2d, + 0xe1, 0x48, 0xb3, 0xe2, 0x63, 0xd9, 0xf4, 0xad, 0xf8, 0x5f, 0xc9, 0xc0, 0x21, 0x89, 0xca, 0x68, + 0x72, 0x2b, 0x05, 0xdd, 0xed, 0xde, 0x00, 0xc8, 0x2e, 0x6e, 0x0f, 0x32, 0x9c, 0x8d, 0x65, 0x3a, + 0x1b, 0x4b, 0xe4, 0x56, 0xa2, 0x79, 0x10, 0x09, 0x25, 0x72, 0xf3, 0xf2, 0x0f, 0x0a, 0x8c, 0x45, + 0xd4, 0x4a, 0x4b, 0x28, 0x77, 0x7c, 0xa1, 0xb7, 0x84, 0x72, 0x27, 0x54, 0x79, 0xab, 0xd7, 0x29, + 0x9f, 0x57, 0xc9, 0xe5, 0x44, 0xa9, 0x8b, 0xa7, 0x5a, 0x3c, 0x8f, 0xd7, 0xf8, 0x38, 0xfb, 0x96, + 0x02, 0x7b, 0x62, 0xca, 0xa9, 0x25, 0xbc, 0x59, 0x72, 0x5d, 0xb8, 0x84, 0x37, 0x6b, 0x53, 0x14, + 0x2e, 0x7b, 0x65, 0xe1, 0x22, 0x89, 0x65, 0xf1, 0x3d, 0x05, 0x26, 0xa2, 0xeb, 0xae, 0x25, 0x82, + 0xc7, 0xc4, 0xf2, 0x71, 0x89, 0xe0, 0x31, 0xb9, 0x76, 0x5c, 0xbd, 0x49, 0xf9, 0xcb, 0x93, 0x6b, + 0xa9, 0xa4, 0x88, 0xef, 0xfd, 0x84, 0x04, 0x19, 0x53, 0x30, 0x2e, 0x21, 0xc8, 0xe4, 0xd7, 0x33, + 0x24, 0x04, 0xd9, 0xa6, 0x56, 0x5d, 0x4e, 0x90, 0x2c, 0x1b, 0x8f, 0xa7, 0x75, 0x47, 0x1d, 0xaf, + 0xed, 0x0a, 0x97, 0xb4, 0x4a, 0x1e, 0x2b, 0x45, 0x54, 0x62, 0x4b, 0x04, 0xc3, 0xb1, 0x05, 0xd5, + 0xea, 0x59, 0xca, 0xd0, 0x09, 0x92, 0x4b, 0x62, 0x28, 0xa2, 0x96, 0x95, 0xfc, 0x9d, 0x02, 0x93, + 0x77, 0x5b, 0xd5, 0xb1, 0x1f, 0x0a, 0x66, 0xa4, 0x12, 0x3a, 0xbc, 0x75, 0xc3, 0x41, 0xa6, 0xbe, + 0xc6, 0xab, 0x2a, 0xfc, 0x65, 0xd5, 0x12, 0x06, 0x32, 0xbe, 0x58, 0x5c, 0xc2, 0x40, 0x26, 0x54, + 0x91, 0xab, 0xe7, 0x29, 0x4f, 0x27, 0xc9, 0x09, 0x69, 0x01, 0xf1, 0xe2, 0x67, 0xf2, 0xae, 0x02, + 0x13, 0xd1, 0xd5, 0xae, 0x12, 0x16, 0x23, 0xb1, 0xce, 0x56, 0xc2, 0x62, 0x24, 0x97, 0xd9, 0xaa, + 0x37, 0x28, 0x5b, 0x33, 0xe4, 0x6a, 0x12, 0x5b, 0xbe, 0xe2, 0x53, 0x6f, 0xd9, 0xad, 0x27, 0x3d, + 0xc2, 0x15, 0x59, 0x44, 0xad, 0xa9, 0x84, 0xc8, 0xe2, 0xab, 0x63, 0x25, 0x44, 0x96, 0x50, 0x36, + 0x2b, 0x27, 0xb2, 0xc8, 0xc2, 0x5a, 0xf2, 0x96, 0x02, 0xbb, 0x42, 0x15, 0x92, 0x12, 0xcb, 0x29, + 0xae, 0x78, 0x56, 0x62, 0x39, 0xc5, 0x16, 0x64, 0xca, 0x1d, 0xfe, 0x85, 0x4b, 0x36, 0x73, 0x8f, + 0x3c, 0xe5, 0xba, 0x8f, 0xc9, 0x3f, 0x2b, 0xb0, 0x27, 0xa6, 0x68, 0x50, 0xc2, 0xa2, 0x27, 0x17, + 0x6c, 0x4a, 0x58, 0xf4, 0x36, 0xf5, 0x8a, 0x72, 0x36, 0x83, 0xff, 0xe7, 0x53, 0x11, 0x25, 0x8d, + 0xe4, 0x5f, 0x14, 0xd8, 0x1b, 0x5b, 0x18, 0x48, 0x66, 0xd2, 0x68, 0x52, 0x64, 0xe1, 0x62, 0x36, + 0xbf, 0x15, 0x14, 0x69, 0xd2, 0x0d, 0x7c, 0x2a, 0x49, 0x8b, 0xe0, 0xdd, 0x7d, 0x9b, 0x4d, 0x3e, + 0xab, 0xc0, 0xb0, 0xbf, 0xe0, 0x30, 0x79, 0xf3, 0x16, 0x59, 0xb6, 0x98, 0xbc, 0x79, 0x8b, 0xae, + 0x67, 0x54, 0x4f, 0x51, 0xb2, 0xa7, 0xc8, 0x0b, 0x89, 0x7b, 0x4c, 0xc3, 0xb1, 0x8a, 0xac, 0x52, + 0xd0, 0xa0, 0xc4, 0xbd, 0xad, 0xe0, 0x0b, 0x29, 0xa1, 0xa2, 0x40, 0x89, 0x95, 0x14, 0x57, 0x8e, + 0x28, 0xb1, 0x92, 0x62, 0x6b, 0x10, 0xe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, 0xe6, 0x16, 0x38, 0xfe, 0x45, 0x6d, 0xd5, 0x6e, 0x8d, 0x76, 0xac, 0x64, 0x35, 0x74, + 0xef, 0xcf, 0x75, 0xcd, 0xa8, 0xe1, 0x45, 0x83, 0xdd, 0x22, 0xc5, 0xd9, 0xac, 0xeb, 0xf6, 0x6a, + 0x2f, 0xfd, 0x6f, 0xae, 0x4f, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0xe4, 0x86, 0x01, + 0xdc, 0x7b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -7159,6 +7423,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { + L3DerivativeOrderBook(ctx context.Context, in *QueryFullDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryFullDerivativeOrderbookResponse, error) + L3SpotOrderBook(ctx context.Context, in *QueryFullSpotOrderbookRequest, opts ...grpc.CallOption) (*QueryFullSpotOrderbookResponse, error) // Retrieves exchange params QueryExchangeParams(ctx context.Context, in *QueryExchangeParamsRequest, opts ...grpc.CallOption) (*QueryExchangeParamsResponse, error) // Retrieves a Subaccount's Deposits @@ -7293,6 +7559,24 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) L3DerivativeOrderBook(ctx context.Context, in *QueryFullDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryFullDerivativeOrderbookResponse, error) { + out := new(QueryFullDerivativeOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v1beta1.Query/L3DerivativeOrderBook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) L3SpotOrderBook(ctx context.Context, in *QueryFullSpotOrderbookRequest, opts ...grpc.CallOption) (*QueryFullSpotOrderbookResponse, error) { + out := new(QueryFullSpotOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v1beta1.Query/L3SpotOrderBook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) QueryExchangeParams(ctx context.Context, in *QueryExchangeParamsRequest, opts ...grpc.CallOption) (*QueryExchangeParamsResponse, error) { out := new(QueryExchangeParamsResponse) err := c.cc.Invoke(ctx, "/injective.exchange.v1beta1.Query/QueryExchangeParams", in, out, opts...) @@ -7835,6 +8119,8 @@ func (c *queryClient) GrantAuthorizations(ctx context.Context, in *QueryGrantAut // QueryServer is the server API for Query service. type QueryServer interface { + L3DerivativeOrderBook(context.Context, *QueryFullDerivativeOrderbookRequest) (*QueryFullDerivativeOrderbookResponse, error) + L3SpotOrderBook(context.Context, *QueryFullSpotOrderbookRequest) (*QueryFullSpotOrderbookResponse, error) // Retrieves exchange params QueryExchangeParams(context.Context, *QueryExchangeParamsRequest) (*QueryExchangeParamsResponse, error) // Retrieves a Subaccount's Deposits @@ -7965,6 +8251,12 @@ type QueryServer interface { type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) L3DerivativeOrderBook(ctx context.Context, req *QueryFullDerivativeOrderbookRequest) (*QueryFullDerivativeOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method L3DerivativeOrderBook not implemented") +} +func (*UnimplementedQueryServer) L3SpotOrderBook(ctx context.Context, req *QueryFullSpotOrderbookRequest) (*QueryFullSpotOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method L3SpotOrderBook not implemented") +} func (*UnimplementedQueryServer) QueryExchangeParams(ctx context.Context, req *QueryExchangeParamsRequest) (*QueryExchangeParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryExchangeParams not implemented") } @@ -8150,6 +8442,42 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_L3DerivativeOrderBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullDerivativeOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).L3DerivativeOrderBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v1beta1.Query/L3DerivativeOrderBook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).L3DerivativeOrderBook(ctx, req.(*QueryFullDerivativeOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_L3SpotOrderBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullSpotOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).L3SpotOrderBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v1beta1.Query/L3SpotOrderBook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).L3SpotOrderBook(ctx, req.(*QueryFullSpotOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_QueryExchangeParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryExchangeParamsRequest) if err := dec(in); err != nil { @@ -9234,6 +9562,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "injective.exchange.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "L3DerivativeOrderBook", + Handler: _Query_L3DerivativeOrderBook_Handler, + }, + { + MethodName: "L3SpotOrderBook", + Handler: _Query_L3SpotOrderBook_Handler, + }, { MethodName: "QueryExchangeParams", Handler: _Query_QueryExchangeParams_Handler, @@ -14394,7 +14730,7 @@ func (m *QueryTraderDerivativeConditionalOrdersResponse) MarshalToSizedBuffer(dA return len(dAtA) - i, nil } -func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryFullSpotOrderbookRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -14404,12 +14740,12 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Marshal() (dAtA []byte, return dAtA[:n], nil } -func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryFullSpotOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryFullSpotOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -14424,7 +14760,7 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalToSizedBuffer(dA return len(dAtA) - i, nil } -func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryFullSpotOrderbookResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -14434,30 +14770,48 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Marshal() (dAtA []byte return dAtA[:n], nil } -func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryFullSpotOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryFullSpotOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.Multiplier.Size() - i -= size - if _, err := m.Multiplier.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.Asks) > 0 { + for iNdEx := len(m.Asks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Asks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryActiveStakeGrantRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryFullDerivativeOrderbookRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -14467,22 +14821,223 @@ func (m *QueryActiveStakeGrantRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryActiveStakeGrantRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryFullDerivativeOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryActiveStakeGrantRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryFullDerivativeOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0xa + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullDerivativeOrderbookResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullDerivativeOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullDerivativeOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Asks) > 0 { + for iNdEx := len(m.Asks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Asks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TrimmedLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrimmedLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrimmedLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Multiplier.Size() + i -= size + if _, err := m.Multiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryActiveStakeGrantRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryActiveStakeGrantRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryActiveStakeGrantRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -16683,7 +17238,7 @@ func (m *QueryTraderDerivativeConditionalOrdersResponse) Size() (n int) { return n } -func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Size() (n int) { +func (m *QueryFullSpotOrderbookRequest) Size() (n int) { if m == nil { return 0 } @@ -16696,95 +17251,184 @@ func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Size() (n int) { return n } -func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Size() (n int) { +func (m *QueryFullSpotOrderbookResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Multiplier.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Bids) > 0 { + for _, e := range m.Bids { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Asks) > 0 { + for _, e := range m.Asks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } -func (m *QueryActiveStakeGrantRequest) Size() (n int) { +func (m *QueryFullDerivativeOrderbookRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Grantee) + l = len(m.MarketId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryActiveStakeGrantResponse) Size() (n int) { +func (m *QueryFullDerivativeOrderbookResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Grant != nil { - l = m.Grant.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Bids) > 0 { + for _, e := range m.Bids { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } - if m.EffectiveGrant != nil { - l = m.EffectiveGrant.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Asks) > 0 { + for _, e := range m.Asks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } -func (m *QueryGrantAuthorizationRequest) Size() (n int) { +func (m *TrimmedLimitOrder) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Granter) + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.OrderHash) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.Grantee) + l = len(m.SubaccountId) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryGrantAuthorizationResponse) Size() (n int) { +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Amount.Size() + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Multiplier.Size() n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryGrantAuthorizationsRequest) Size() (n int) { +func (m *QueryActiveStakeGrantRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Granter) + l = len(m.Grantee) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryGrantAuthorizationsResponse) Size() (n int) { +func (m *QueryActiveStakeGrantResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.TotalGrantAmount.Size() + if m.Grant != nil { + l = m.Grant.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.EffectiveGrant != nil { + l = m.EffectiveGrant.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGrantAuthorizationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalGrantAmount.Size() n += 1 + l + sovQuery(uint64(l)) if len(m.Grants) > 0 { for _, e := range m.Grants { @@ -29814,6 +30458,588 @@ func (m *QueryTraderDerivativeConditionalOrdersResponse) Unmarshal(dAtA []byte) } return nil } +func (m *QueryFullSpotOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bids = append(m.Bids, &TrimmedLimitOrder{}) + if err := m.Bids[len(m.Bids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asks = append(m.Asks, &TrimmedLimitOrder{}) + if err := m.Asks[len(m.Asks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullDerivativeOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullDerivativeOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bids = append(m.Bids, &TrimmedLimitOrder{}) + if err := m.Bids[len(m.Bids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asks = append(m.Asks, &TrimmedLimitOrder{}) + if err := m.Asks[len(m.Asks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrimmedLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrimmedLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrimmedLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/chain/exchange/types/spot_orders.go b/chain/exchange/types/spot_orders.go index ac5b243e..4e414e17 100644 --- a/chain/exchange/types/spot_orders.go +++ b/chain/exchange/types/spot_orders.go @@ -3,232 +3,24 @@ package types import ( "strconv" - "cosmossdk.io/errors" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethmath "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/signer/core/apitypes" "golang.org/x/crypto/sha3" ) -func (o *SpotOrder) ToSpotMarketOrder(sender sdk.AccAddress, balanceHold math.LegacyDec, orderHash common.Hash) *SpotMarketOrder { - if o.OrderInfo.FeeRecipient == "" { - o.OrderInfo.FeeRecipient = sender.String() - } - return &SpotMarketOrder{ - OrderInfo: o.OrderInfo, - BalanceHold: balanceHold, - OrderHash: orderHash.Bytes(), - OrderType: o.OrderType, - TriggerPrice: o.TriggerPrice, - } -} - -func (o *SpotOrder) GetNewSpotLimitOrder(sender sdk.AccAddress, orderHash common.Hash) *SpotLimitOrder { - if o.OrderInfo.FeeRecipient == "" { - o.OrderInfo.FeeRecipient = sender.String() - } - return &SpotLimitOrder{ - OrderInfo: o.OrderInfo, - OrderType: o.OrderType, - Fillable: o.OrderInfo.Quantity, - TriggerPrice: o.TriggerPrice, - OrderHash: orderHash.Bytes(), - } -} - -func (o *SpotOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *SpotOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() +type IOrderInfo interface { + GetSubaccountId() string + GetFeeRecipient() string + GetPrice() math.LegacyDec + GetQuantity() math.LegacyDec + GetCid() string } -func (o *SpotLimitOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() -} - -func (o *SpotLimitOrder) Cid() string { - return o.OrderInfo.GetCid() -} - -func (o *SpotMarketOrder) Cid() string { - return o.OrderInfo.GetCid() -} +var _ IOrderInfo = &OrderInfo{} -func (o *SpotLimitOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *SpotMarketOrder) SubaccountID() common.Hash { - return o.OrderInfo.SubaccountID() -} - -func (o *SpotMarketOrder) IsFromDefaultSubaccount() bool { - return o.OrderInfo.IsFromDefaultSubaccount() -} - -func (o *SpotMarketOrder) SdkAccAddress() sdk.AccAddress { - return sdk.AccAddress(o.SubaccountID().Bytes()[:common.AddressLength]) -} - -func (o *SpotLimitOrder) SdkAccAddress() sdk.AccAddress { - return sdk.AccAddress(o.SubaccountID().Bytes()[:common.AddressLength]) -} - -func (o *SpotLimitOrder) FeeRecipient() common.Address { - return o.OrderInfo.FeeRecipientAddress() -} - -func (o *SpotMarketOrder) FeeRecipient() common.Address { - return o.OrderInfo.FeeRecipientAddress() -} - -func (o *SpotOrder) CheckTickSize(minPriceTickSize, minQuantityTickSize math.LegacyDec) error { - if BreachesMinimumTickSize(o.OrderInfo.Price, minPriceTickSize) { - return errors.Wrapf(ErrInvalidPrice, "price %s must be a multiple of the minimum price tick size %s", o.OrderInfo.Price.String(), minPriceTickSize.String()) - } - if BreachesMinimumTickSize(o.OrderInfo.Quantity, minQuantityTickSize) { - return errors.Wrapf(ErrInvalidQuantity, "quantity %s must be a multiple of the minimum quantity tick size %s", o.OrderInfo.Quantity.String(), minQuantityTickSize.String()) - } - return nil -} - -func (o *SpotOrder) CheckNotional(minNotional math.LegacyDec) error { - orderNotional := o.GetQuantity().Mul(o.GetPrice()) - if !minNotional.IsNil() && orderNotional.LT(minNotional) { - return errors.Wrapf(ErrInvalidNotional, "order notional (%s) is less than the minimum notional for the market (%s)", orderNotional.String(), minNotional.String()) - } - return nil -} - -func (o *SpotOrder) IsBuy() bool { - return o.OrderType.IsBuy() -} - -func (o *SpotOrder) Cid() string { - return o.OrderInfo.Cid -} - -func (m *SpotLimitOrder) IsBuy() bool { - return m.OrderType.IsBuy() -} - -func (m *SpotLimitOrder) Hash() common.Hash { - return common.BytesToHash(m.OrderHash) -} - -func (m *SpotMarketOrder) Hash() common.Hash { - return common.BytesToHash(m.OrderHash) -} - -func (o *SpotOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (o *SpotLimitOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (o *SpotMarketOrder) IsConditional() bool { - return o.OrderType.IsConditional() -} - -func (m *SpotLimitOrder) GetUnfilledNotional() math.LegacyDec { - return m.Fillable.Mul(m.OrderInfo.Price) -} -func (m *SpotLimitOrder) GetUnfilledFeeAmount(fee math.LegacyDec) math.LegacyDec { - return m.GetUnfilledNotional().Mul(fee) -} - -func (m *SpotOrder) GetBalanceHoldAndMarginDenom(market *SpotMarket) (balanceHold math.LegacyDec, denom string) { - if m.IsBuy() { - denom = market.QuoteDenom - if m.OrderType.IsPostOnly() { - // for a PO limit buy in the ETH/USDT market, denom is USDT and balanceHold is (1 + makerFee)*(price * quantity) - balanceHold = m.OrderInfo.GetNotional() - if market.MakerFeeRate.IsPositive() { - balanceHold = balanceHold.Add(m.OrderInfo.GetFeeAmount(market.MakerFeeRate)) - } - } else { - // for a normal limit buy in the ETH/USDT market, denom is USDT and balanceHold is (1 + takerFee)*(price * quantity) - balanceHold = m.OrderInfo.GetNotional().Add(m.OrderInfo.GetFeeAmount(market.TakerFeeRate)) - } - } else { - // for a limit sell in the ETH/USDT market, denom is ETH and balanceHold is just quantity - denom = market.BaseDenom - balanceHold = m.OrderInfo.Quantity - } - - return balanceHold, denom -} - -func (m *SpotLimitOrder) GetUnfilledMarginHoldAndMarginDenom(market *SpotMarket, isTransient bool) (balanceHold math.LegacyDec, denom string) { - if m.IsBuy() { - var tradeFeeRate math.LegacyDec - - if isTransient { - tradeFeeRate = market.TakerFeeRate - } else { - tradeFeeRate = math.LegacyMaxDec(math.LegacyZeroDec(), market.MakerFeeRate) - } - - // for a resting limit buy in the ETH/USDT market, denom is USDT and fillable amount is BalanceHold is (1 + makerFee)*(price * quantity) since (takerFee - makerFee) is already refunded - denom = market.QuoteDenom - balanceHold = m.GetUnfilledNotional().Add(m.GetUnfilledFeeAmount(tradeFeeRate)) - } else { - // for a limit sell in the ETH/USDT market, denom is ETH and balanceHold is just quantity - denom = market.BaseDenom - balanceHold = m.Fillable - } - - return balanceHold, denom -} - -func (m *SpotOrder) GetMarginDenom(market *SpotMarket) string { - var denom string - if m.IsBuy() { - // for a market buy in the ETH/USDT market, margin denom is USDT - denom = market.QuoteDenom - } else { - // for a market buy in the ETH/USDT market, margin denom is ETH - denom = market.BaseDenom - } - return denom -} - -// GetMarketOrderBalanceHold calculates the balance hold for the market order. -func (m *SpotOrder) GetMarketOrderBalanceHold(feeRate, bestPrice math.LegacyDec) math.LegacyDec { - var balanceHold math.LegacyDec - - if m.IsBuy() { - // required margin for best sell price = bestPrice * quantity * (1 + feeRate) - requiredMarginForBestPrice := bestPrice.Mul(m.OrderInfo.Quantity).Mul(math.LegacyOneDec().Add(feeRate)) - requiredMarginForWorstPrice := m.OrderInfo.Price.Mul(m.OrderInfo.Quantity).Mul(math.LegacyOneDec().Add(feeRate)) - requiredMargin := math.LegacyMaxDec(requiredMarginForBestPrice, requiredMarginForWorstPrice) - balanceHold = requiredMargin - } else { - // required margin for market sells just equals the quantity being sold - balanceHold = m.OrderInfo.Quantity - } - return balanceHold -} - -func (m *SpotLimitOrder) ToTrimmed() *TrimmedSpotLimitOrder { - return &TrimmedSpotLimitOrder{ - Price: m.OrderInfo.Price, - Quantity: m.OrderInfo.Quantity, - Fillable: m.Fillable, - IsBuy: m.IsBuy(), - OrderHash: common.BytesToHash(m.OrderHash).Hex(), - Cid: m.Cid(), - } -} - -// ComputeOrderHash computes the order hash for given spot limit order -func (o *SpotOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { +func ComputeSpotOrderHash(marketId, orderType, triggerPrice string, orderInfo IOrderInfo, nonce uint32) (common.Hash, error) { chainID := ethmath.NewHexOrDecimal256(888) var domain = apitypes.TypedDataDomain{ Name: "Injective Protocol", @@ -238,21 +30,16 @@ func (o *SpotOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { Salt: "0x0000000000000000000000000000000000000000000000000000000000000000", } - triggerPrice := "" - if o.TriggerPrice != nil { - triggerPrice = o.TriggerPrice.String() - } - var message = map[string]interface{}{ - "MarketId": o.MarketId, + "MarketId": marketId, "OrderInfo": map[string]interface{}{ - "SubaccountId": o.OrderInfo.SubaccountId, - "FeeRecipient": o.OrderInfo.FeeRecipient, - "Price": o.OrderInfo.Price.String(), - "Quantity": o.OrderInfo.Quantity.String(), + "SubaccountId": orderInfo.GetSubaccountId(), + "FeeRecipient": orderInfo.GetFeeRecipient(), + "Price": orderInfo.GetPrice().String(), + "Quantity": orderInfo.GetQuantity().String(), }, "Salt": strconv.Itoa(int(nonce)), - "OrderType": string(o.OrderType), + "OrderType": orderType, "TriggerPrice": triggerPrice, } @@ -274,8 +61,8 @@ func (o *SpotOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { w := sha3.NewLegacyKeccak256() w.Write([]byte("\x19\x01")) - w.Write([]byte(domainSeparator)) - w.Write([]byte(typedDataHash)) + w.Write(domainSeparator) + w.Write(typedDataHash) hash := common.BytesToHash(w.Sum(nil)) return hash, nil diff --git a/chain/exchange/types/tx.pb.go b/chain/exchange/types/tx.pb.go index 4a78fb8f..c35accab 100644 --- a/chain/exchange/types/tx.pb.go +++ b/chain/exchange/types/tx.pb.go @@ -84,6 +84,27 @@ func (m *MsgUpdateSpotMarket) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateSpotMarket proto.InternalMessageInfo +func (m *MsgUpdateSpotMarket) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateSpotMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MsgUpdateSpotMarket) GetNewTicker() string { + if m != nil { + return m.NewTicker + } + return "" +} + type MsgUpdateSpotMarketResponse struct { } @@ -638,6 +659,10 @@ type MsgInstantSpotMarketLaunch struct { // min_notional defines the minimum notional (in quote asset) required for // orders in the market MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,8,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,9,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` } func (m *MsgInstantSpotMarketLaunch) Reset() { *m = MsgInstantSpotMarketLaunch{} } @@ -3674,254 +3699,256 @@ func init() { } var fileDescriptor_bd45b74cb6d81462 = []byte{ - // 3942 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0x4b, 0x6c, 0x1c, 0xc7, - 0x95, 0x6a, 0x0e, 0x39, 0x24, 0x1f, 0x29, 0x89, 0x6a, 0x52, 0xe2, 0x70, 0xf8, 0x93, 0x9a, 0x92, - 0xf5, 0x27, 0xf5, 0xff, 0x8c, 0x56, 0x96, 0xf8, 0x91, 0x6c, 0xae, 0x45, 0x4b, 0x1e, 0xca, 0xbb, - 0xde, 0x85, 0xbd, 0x83, 0x66, 0x4f, 0x71, 0xd8, 0xe6, 0x4c, 0xf7, 0xa8, 0xbb, 0x47, 0x12, 0x8d, - 0x05, 0xd6, 0xeb, 0xc3, 0x42, 0xfb, 0xc1, 0x62, 0x17, 0x58, 0x60, 0x81, 0x05, 0x0c, 0x18, 0x58, - 0x20, 0x06, 0x9c, 0x20, 0x91, 0x83, 0x20, 0xf0, 0x21, 0x3f, 0x04, 0x39, 0x18, 0x3e, 0x29, 0x01, - 0x02, 0x04, 0x39, 0x28, 0x81, 0x7d, 0xb0, 0xe1, 0x53, 0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0xed, 0xb1, - 0x07, 0x64, 0x91, 0x62, 0x78, 0x86, 0x53, 0x0c, 0x0f, 0xda, 0x4c, 0xa7, 0xc0, 0x66, 0xba, 0x9a, - 0x36, 0x33, 0xc3, 0x99, 0x9e, 0xd1, 0x80, 0x3d, 0x07, 0x79, 0x57, 0xc6, 0x70, 0xb1, 0x31, 0xd4, - 0xca, 0xd2, 0xe0, 0x7b, 0x24, 0x0d, 0x92, 0xb9, 0x0a, 0xc2, 0x88, 0xad, 0xed, 0x0a, 0x74, 0x96, - 0x55, 0x47, 0x4d, 0x53, 0xf8, 0xc5, 0x94, 0x16, 0x54, 0x47, 0xa5, 0x56, 0x86, 0x11, 0x0b, 0x67, - 0x1f, 0x24, 0x24, 0x40, 0x2e, 0x3f, 0xca, 0x75, 0x1c, 0x50, 0xb8, 0x7d, 0xcc, 0x98, 0x72, 0xd0, - 0x6d, 0x37, 0x34, 0x0d, 0xd9, 0xc4, 0x8e, 0x7a, 0x8a, 0xde, 0x67, 0x30, 0x78, 0xef, 0x0b, 0x12, - 0x0a, 0xb8, 0xf6, 0x56, 0x4b, 0xff, 0x2c, 0x47, 0xfa, 0x23, 0x02, 0xe9, 0x39, 0x8c, 0x29, 0x37, - 0xe1, 0x70, 0x22, 0x50, 0x4b, 0xfa, 0xf8, 0x7d, 0x37, 0x0c, 0x79, 0x14, 0xc9, 0x39, 0x56, 0x82, - 0x0a, 0x52, 0x9d, 0xf3, 0x5c, 0x81, 0x71, 0xbb, 0x6e, 0x3a, 0x25, 0xe6, 0x21, 0x76, 0xc9, 0x31, - 0x4b, 0x1a, 0xe6, 0xb8, 0xa4, 0x56, 0xab, 0xd4, 0x1d, 0x73, 0x36, 0x5b, 0x1e, 0x2c, 0x96, 0xed, - 0xdb, 0x26, 0x11, 0x69, 0xb6, 0x5a, 0x95, 0x5f, 0x80, 0xa9, 0x32, 0x0b, 0x1c, 0x62, 0x32, 0x9d, - 0x98, 0xcc, 0x44, 0x39, 0x74, 0xb4, 0x18, 0x22, 0xf6, 0x0f, 0xb0, 0x1b, 0x73, 0x43, 0xe3, 0x01, - 0x23, 0x91, 0xeb, 0x6a, 0x75, 0x1a, 0xa5, 0xa2, 0x6c, 0x33, 0xbb, 0xf3, 0x86, 0x90, 0x5f, 0x87, - 0x51, 0x1f, 0xb3, 0x91, 0x51, 0xb2, 0xad, 0x8f, 0x92, 0x2b, 0x07, 0xe3, 0x74, 0x73, 0x2c, 0x8e, - 0x2c, 0x38, 0x02, 0xe6, 0xba, 0x5b, 0x3d, 0x89, 0x09, 0xcb, 0x82, 0xc9, 0xc8, 0x75, 0x91, 0x2c, - 0x64, 0x94, 0x9e, 0xf6, 0x52, 0x0c, 0x5f, 0x22, 0x32, 0xe2, 0x1d, 0x98, 0x5c, 0xc1, 0x46, 0x5c, - 0x32, 0x89, 0x15, 0x47, 0x35, 0xd8, 0xdb, 0xba, 0x06, 0x47, 0x57, 0xa2, 0x8e, 0xc1, 0x94, 0x58, - 0x84, 0x83, 0xa1, 0x21, 0x85, 0x16, 0x06, 0xd8, 0xc2, 0xf6, 0xad, 0x44, 0xeb, 0x0a, 0x21, 0x23, - 0xbb, 0x17, 0x27, 0x06, 0x51, 0x5e, 0x5f, 0xbb, 0xca, 0x13, 0x08, 0x83, 0xa9, 0x16, 0x4e, 0x72, - 0x42, 0xca, 0x78, 0x24, 0xa4, 0xf8, 0x7d, 0x5b, 0x79, 0x90, 0x85, 0x31, 0x5e, 0x07, 0x8b, 0x1c, - 0xd3, 0x30, 0x88, 0xad, 0x8c, 0x2a, 0x22, 0x18, 0x45, 0x76, 0xb9, 0x5d, 0x34, 0x08, 0x93, 0x0e, - 0xb9, 0x00, 0x23, 0x3e, 0xab, 0x09, 0x61, 0x75, 0x60, 0xac, 0xe1, 0x26, 0x40, 0x10, 0xf7, 0x08, - 0xec, 0x6a, 0x5a, 0xb4, 0xb7, 0x0e, 0x20, 0xf1, 0x61, 0x27, 0x33, 0x50, 0xba, 0x16, 0x38, 0x07, - 0xc3, 0x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a8, 0x24, 0x9c, 0x52, 0x00, 0x00, + // 3977 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0x4b, 0x6c, 0x1c, 0x47, + 0x76, 0x6a, 0x0e, 0x39, 0x24, 0x1f, 0x3f, 0xa2, 0x9a, 0x94, 0x38, 0x1c, 0xfe, 0xa4, 0xa6, 0x64, + 0xfd, 0x49, 0x49, 0xd6, 0x77, 0x14, 0x59, 0xe2, 0x47, 0xb2, 0x19, 0x8b, 0x96, 0x3c, 0x94, 0x13, + 0x27, 0xb0, 0x33, 0x68, 0xf6, 0x14, 0x87, 0x6d, 0xce, 0x74, 0x8f, 0xba, 0x7b, 0x24, 0xd1, 0x08, + 0x10, 0xc7, 0x87, 0x40, 0x89, 0x83, 0x20, 0x01, 0x02, 0x04, 0x08, 0x60, 0xc0, 0x80, 0x81, 0x04, + 0x70, 0x82, 0x44, 0x0e, 0x82, 0xc0, 0x87, 0x24, 0x08, 0x82, 0x3d, 0x18, 0x3e, 0x69, 0x17, 0x58, + 0x60, 0xb1, 0x07, 0xed, 0xc2, 0x3e, 0xd8, 0xf0, 0x69, 0xb1, 0x97, 0x05, 0x76, 0x2f, 0x8b, 0xae, + 0xaa, 0xae, 0xe9, 0x4f, 0x55, 0x77, 0xcf, 0x88, 0xb4, 0xe5, 0x85, 0x2f, 0x12, 0xbb, 0xea, 0xbd, + 0x57, 0xef, 0xbd, 0x7a, 0x9f, 0xaa, 0x57, 0x55, 0x03, 0x33, 0xba, 0xf1, 0x16, 0xd2, 0x1c, 0xfd, + 0x1e, 0x9a, 0x43, 0x0f, 0xb4, 0x0d, 0xd5, 0xa8, 0xa0, 0xb9, 0x7b, 0xa7, 0xd7, 0x90, 0xa3, 0x9e, + 0x9e, 0x73, 0x1e, 0xcc, 0xd6, 0x2d, 0xd3, 0x31, 0xe5, 0x3c, 0x03, 0x9a, 0xf5, 0x80, 0x66, 0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, 0x57, 0x41, 0x18, 0xb1, 0xb5, 0x5d, + 0x85, 0xce, 0xb2, 0xea, 0xa8, 0x69, 0x8a, 0xc8, 0x98, 0xd2, 0x92, 0xea, 0xa8, 0xd4, 0xca, 0x30, + 0x62, 0xe1, 0xdc, 0xc3, 0x84, 0x04, 0xc8, 0xe5, 0x47, 0xb9, 0x81, 0x03, 0x0a, 0xb7, 0x8f, 0x19, + 0x53, 0x0e, 0xba, 0xed, 0x86, 0xa6, 0x21, 0x9b, 0xd8, 0x51, 0x4f, 0xd1, 0xfb, 0x0c, 0x06, 0xef, + 0x03, 0x41, 0x42, 0x01, 0xd7, 0xde, 0x69, 0xe9, 0x5f, 0xe0, 0x48, 0x7f, 0x4c, 0x20, 0x3d, 0x87, + 0x31, 0xe5, 0x16, 0x1c, 0x4d, 0x04, 0x6a, 0x49, 0x1f, 0xbf, 0xec, 0x86, 0x11, 0x8f, 0x22, 0x39, + 0x13, 0x4b, 0x50, 0x41, 0xaa, 0x33, 0xa3, 0xab, 0x30, 0x69, 0xd7, 0x4d, 0xa7, 0xc4, 0x3c, 0xc4, + 0x2e, 0x39, 0x66, 0x49, 0xc3, 0x1c, 0x97, 0xd4, 0x6a, 0x95, 0xba, 0x63, 0xce, 0x66, 0xcb, 0x83, + 0xe5, 0xb2, 0x7d, 0xc7, 0x24, 0x22, 0xcd, 0x57, 0xab, 0xf2, 0xcb, 0x30, 0x53, 0x66, 0x81, 0x43, + 0x4c, 0xa6, 0x13, 0x93, 0x99, 0x2a, 0x87, 0x8e, 0x29, 0x43, 0xc4, 0xfe, 0x04, 0xf6, 0x62, 0x6e, + 0x68, 0x3c, 0x60, 0x24, 0x72, 0x5d, 0xad, 0x4e, 0xa3, 0x54, 0x94, 0x6d, 0x66, 0x77, 0xde, 0x10, + 0xf2, 0x5b, 0x30, 0xee, 0x63, 0x36, 0x32, 0x4a, 0xb6, 0xf5, 0x51, 0x72, 0xe5, 0x60, 0x9c, 0x6e, + 0x8e, 0xc5, 0x91, 0x05, 0x47, 0xc0, 0x5c, 0x77, 0xab, 0xa7, 0x3a, 0x61, 0x59, 0x30, 0x19, 0xb9, + 0x2e, 0x92, 0x85, 0x8c, 0xd2, 0xd3, 0x5e, 0x8a, 0xe1, 0x4b, 0x44, 0x46, 0xbc, 0x0b, 0xd3, 0x6b, + 0xd8, 0x88, 0x4b, 0x26, 0xb1, 0xe2, 0xa8, 0x06, 0x7b, 0x5b, 0xd7, 0xe0, 0xf8, 0x5a, 0xd4, 0x31, + 0x98, 0x12, 0x8b, 0x70, 0x38, 0x34, 0xa4, 0xd0, 0xc2, 0x00, 0x5b, 0xd8, 0x81, 0xb5, 0x68, 0x5d, + 0x21, 0x64, 0x64, 0xf7, 0xe3, 0xc4, 0x20, 0xca, 0xeb, 0x6b, 0x57, 0x79, 0x02, 0x61, 0x30, 0xd5, + 0xc2, 0x69, 0x4e, 0x48, 0x99, 0x8c, 0x84, 0x14, 0xbf, 0x6f, 0x2b, 0x0f, 0xb3, 0x30, 0xc1, 0xeb, + 0x60, 0x91, 0x63, 0x16, 0x86, 0xb1, 0x95, 0x51, 0x45, 0x04, 0xa3, 0xc8, 0x1e, 0xb7, 0x8b, 0x06, + 0x61, 0xd2, 0x21, 0x17, 0x60, 0xcc, 0x67, 0x35, 0x21, 0xac, 0x0e, 0x8c, 0x35, 0xda, 0x04, 0x08, + 0xe2, 0x1e, 0x83, 0x3d, 0x4d, 0x8b, 0xf6, 0xd6, 0x01, 0x24, 0x3e, 0xec, 0x66, 0x06, 0x4a, 0xd7, + 0x02, 0xe7, 0x61, 0x34, 0x6c, 0x9d, 0x1e, 0x06, 0x09, 0x05, 0x7b, 0x43, 0x66, 0x46, 0xf1, 0xe6, + 0x61, 0x32, 0x34, 0x39, 0x21, 0x1e, 0xbb, 0x30, 0x8f, 0xf9, 0x80, 0x9e, 0x83, 0x6c, 0x5e, 0x81, + 0x71, 0xde, 0xfc, 0x7a, 0xc3, 0x67, 0x49, 0x40, 0x8b, 0x4e, 0x14, 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d, + 0xf9, 0x61, 0xd7, 0x32, 0xbd, 0xcf, 0xf8, 0x28, 0x11, 0x1d, 0x81, 0x46, 0x89, 0x68, 0x87, 0xc7, + 0xdb, 0x99, 0xc7, 0x87, 0x21, 0xb3, 0x62, 0x57, 0x64, 0x15, 0xba, 0xbd, 0x87, 0x82, 0xcf, 0x25, + 0x78, 0x1c, 0x85, 0xcb, 0xcf, 0xa6, 0x83, 0x63, 0xf9, 0xa5, 0x0c, 0x3d, 0xec, 0x0d, 0x5f, 0x92, + 0x57, 0x7b, 0x80, 0xf9, 0xb9, 0x94, 0x80, 0x6c, 0x94, 0xbf, 0x93, 0x60, 0x54, 0xf4, 0xb8, 0xe9, + 0x7c, 0x02, 0x31, 0x01, 0x5e, 0xfe, 0x85, 0xf6, 0xf0, 0x18, 0x4f, 0x1f, 0x48, 0x30, 0x11, 0xfb, + 0x78, 0xe6, 0x72, 0xba, 0x01, 0xb8, 0xc8, 0xf9, 0xc5, 0xa7, 0x40, 0x66, 0x2c, 0xfe, 0xab, 0x04, + 0xfb, 0x13, 0x6f, 0x11, 0x5f, 0x4d, 0x37, 0x92, 0x90, 0x40, 0xfe, 0xc5, 0xa7, 0x24, 0xc0, 0xd8, + 0x7d, 0x28, 0xc1, 0x08, 0xf7, 0x15, 0xe5, 0xf3, 0x09, 0x23, 0xf0, 0x90, 0xf2, 0x97, 0xdb, 0x40, + 0x62, 0xac, 0xfc, 0xa3, 0x04, 0xf9, 0x98, 0x17, 0x8c, 0x97, 0x12, 0x68, 0x8b, 0x51, 0xf3, 0xf3, + 0x6d, 0xa3, 0x32, 0xe6, 0xde, 0x93, 0x60, 0x2f, 0xff, 0x66, 0xe8, 0xd9, 0xd4, 0x32, 0xfb, 0xb0, + 0xf2, 0xbf, 0xd7, 0x0e, 0x16, 0xe3, 0x66, 0x0b, 0x76, 0x87, 0x2f, 0x24, 0x25, 0x05, 0x91, 0x10, + 0x7c, 0xfe, 0x7c, 0x6b, 0xf0, 0x01, 0x45, 0xf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a8, 0x89, 0x90, 0x18, 0x3e, 0x44, 0x3f, 0xe2, 0x86, 0xcd, 0x53, 0xf0, + 0x0b, 0x6e, 0xe7, 0x52, 0xd1, 0x0c, 0xa3, 0x25, 0x9a, 0x67, 0xfc, 0xcf, 0x76, 0xe1, 0x22, 0x00, + 0xb7, 0x4a, 0x98, 0xa4, 0x5c, 0x1e, 0x52, 0x62, 0x11, 0x20, 0xae, 0xc4, 0x87, 0xb3, 0x0b, 0xa7, + 0xc0, 0x97, 0x94, 0x5d, 0xa2, 0x28, 0x89, 0xd9, 0x45, 0x5c, 0xcb, 0xcb, 0x77, 0xbd, 0xf3, 0xe5, + 0xa3, 0x63, 0xd2, 0xc2, 0xc6, 0xa7, 0x9f, 0x4f, 0x49, 0x8f, 0x3f, 0x9f, 0x92, 0x7e, 0xfe, 0xf9, + 0x94, 0xf4, 0xb7, 0x5f, 0x4c, 0xed, 0x7a, 0xfc, 0xc5, 0xd4, 0xae, 0x9f, 0x7c, 0x31, 0xb5, 0xeb, + 0x8f, 0x5f, 0xf1, 0x15, 0xf9, 0x97, 0xbd, 0x51, 0x6e, 0xaa, 0x6b, 0xf6, 0x1c, 0x1b, 0xf3, 0xa4, + 0x66, 0x5a, 0xc8, 0xff, 0xb9, 0xa1, 0xea, 0xc6, 0x5c, 0xcd, 0x2c, 0x37, 0xaa, 0xc8, 0x6e, 0xfe, + 0xcc, 0x23, 0x3e, 0x10, 0x58, 0xcb, 0xe2, 0x9f, 0x68, 0x7c, 0xfe, 0xb7, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x2e, 0x66, 0x70, 0x0f, 0xe4, 0x52, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5942,6 +5969,16 @@ func (m *MsgInstantSpotMarketLaunch) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x48 + } + if m.BaseDecimals != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x40 + } { size := m.MinNotional.Size() i -= size @@ -9232,6 +9269,12 @@ func (m *MsgInstantSpotMarketLaunch) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.MinNotional.Size() n += 1 + l + sovTx(uint64(l)) + if m.BaseDecimals != 0 { + n += 1 + sovTx(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovTx(uint64(m.QuoteDecimals)) + } return n } @@ -12459,6 +12502,44 @@ func (m *MsgInstantSpotMarketLaunch) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/chain/exchange/types/v2/authz.go b/chain/exchange/types/v2/authz.go new file mode 100644 index 00000000..51e99276 --- /dev/null +++ b/chain/exchange/types/v2/authz.go @@ -0,0 +1,547 @@ +package v2 + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/authz" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +var ( + AuthorizedMarketsLimit = 200 + + _ authz.Authorization = &CreateSpotLimitOrderAuthz{} + _ authz.Authorization = &CreateSpotMarketOrderAuthz{} + _ authz.Authorization = &BatchCreateSpotLimitOrdersAuthz{} + _ authz.Authorization = &CancelSpotOrderAuthz{} + _ authz.Authorization = &BatchCancelSpotOrdersAuthz{} + + _ authz.Authorization = &CreateDerivativeLimitOrderAuthz{} + _ authz.Authorization = &CreateDerivativeMarketOrderAuthz{} + _ authz.Authorization = &BatchCreateDerivativeLimitOrdersAuthz{} + _ authz.Authorization = &CancelDerivativeOrderAuthz{} + _ authz.Authorization = &BatchCancelDerivativeOrdersAuthz{} + + _ authz.Authorization = &BatchUpdateOrdersAuthz{} +) + +func find(slice []string, val string) bool { + for _, item := range slice { + if item == val { + return true + } + } + return false +} + +func reduceToSet(slice []string) []string { + set := map[string]bool{} + for _, s := range slice { + set[s] = true + } + output := make([]string, len(set)) + i := 0 + for k := range set { + output[i] = k + i += 1 + } + return output +} + +func (a *BatchUpdateOrdersAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgBatchUpdateOrders{}) +} + +func (a *BatchUpdateOrdersAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + ordersToUpdate, ok := msg.(*MsgBatchUpdateOrders) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + + // check authorized spot markets + for _, o := range ordersToUpdate.SpotOrdersToCreate { + if !find(a.SpotMarkets, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested spot market to create orders is unauthorized") + } + if o.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + for _, o := range ordersToUpdate.SpotOrdersToCancel { + if !find(a.SpotMarkets, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested spot market to cancel orders is unauthorized") + } + if o.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + for _, id := range ordersToUpdate.SpotMarketIdsToCancelAll { + if !find(a.SpotMarkets, id) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested spot market to cancel all orders is unauthorized") + } + + if ordersToUpdate.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + + // check authorized derivative markets + for _, o := range ordersToUpdate.DerivativeOrdersToCreate { + if !find(a.DerivativeMarkets, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested derivative market to create orders is unauthorized") + } + if o.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + for _, o := range ordersToUpdate.DerivativeOrdersToCancel { + if !find(a.DerivativeMarkets, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested derivative market to cancel orders is unauthorized") + } + if o.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + for _, id := range ordersToUpdate.DerivativeMarketIdsToCancelAll { + if !find(a.DerivativeMarkets, id) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested derivative market to cancel all orders is unauthorized") + } + + if ordersToUpdate.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + } + + // TODO add check for BO markets? + + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *BatchUpdateOrdersAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.SpotMarkets) == 0 && len(a.DerivativeMarkets) == 0 { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + if len(a.SpotMarkets) > AuthorizedMarketsLimit || len(a.DerivativeMarkets) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + spotMarketsSet := reduceToSet(a.SpotMarkets) + derivativeMarketsSet := reduceToSet(a.DerivativeMarkets) + if len(a.SpotMarkets) != len(spotMarketsSet) || len(a.DerivativeMarkets) != len(derivativeMarketsSet) { + return sdkerrors.ErrLogic.Wrapf("cannot have duplicate markets") + } + for _, m := range a.SpotMarkets { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid spot market id to authorize") + } + } + for _, m := range a.DerivativeMarkets { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid derivative market id to authorize") + } + } + return nil +} + +func (a *CreateDerivativeLimitOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCreateDerivativeLimitOrder{}) +} + +func (a *CreateDerivativeLimitOrderAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + derivativeOrder, ok := msg.(*MsgCreateDerivativeLimitOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if derivativeOrder.Order.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, derivativeOrder.Order.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CreateDerivativeLimitOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *CreateDerivativeMarketOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCreateDerivativeMarketOrder{}) +} + +func (a *CreateDerivativeMarketOrderAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + derivativeOrder, ok := msg.(*MsgCreateDerivativeMarketOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if derivativeOrder.Order.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, derivativeOrder.Order.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CreateDerivativeMarketOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *BatchCreateDerivativeLimitOrdersAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgBatchCreateDerivativeLimitOrders{}) +} + +func (a *BatchCreateDerivativeLimitOrdersAuthz) Accept(ctx context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + derivativeOrders, ok := msg.(*MsgBatchCreateDerivativeLimitOrders) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + for _, o := range derivativeOrders.Orders { + // check authorized subaccount + if o.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized markets + if !find(a.MarketIds, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *BatchCreateDerivativeLimitOrdersAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *CancelDerivativeOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCancelDerivativeOrder{}) +} + +func (a *CancelDerivativeOrderAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + orderToCancel, ok := msg.(*MsgCancelDerivativeOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if orderToCancel.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, orderToCancel.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CancelDerivativeOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *BatchCancelDerivativeOrdersAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgBatchCancelDerivativeOrders{}) +} + +func (a *BatchCancelDerivativeOrdersAuthz) Accept(ctx context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + ordersToCancel, ok := msg.(*MsgBatchCancelDerivativeOrders) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + for _, o := range ordersToCancel.Data { + // check authorized subaccount + if o.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized markets + if !find(a.MarketIds, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *BatchCancelDerivativeOrdersAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *CreateSpotLimitOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCreateSpotLimitOrder{}) +} + +func (a *CreateSpotLimitOrderAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + spotOrder, ok := msg.(*MsgCreateSpotLimitOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if spotOrder.Order.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, spotOrder.Order.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CreateSpotLimitOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *CreateSpotMarketOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCreateSpotMarketOrder{}) +} + +func (a *CreateSpotMarketOrderAuthz) Accept(ctx context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + spotOrder, ok := msg.(*MsgCreateSpotMarketOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if spotOrder.Order.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, spotOrder.Order.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CreateSpotMarketOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *BatchCreateSpotLimitOrdersAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgBatchCreateSpotLimitOrders{}) +} + +func (a *BatchCreateSpotLimitOrdersAuthz) Accept(ctx context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + spotOrders, ok := msg.(*MsgBatchCreateSpotLimitOrders) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + for _, o := range spotOrders.Orders { + // check authorized subaccount + if o.OrderInfo.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized markets + if !find(a.MarketIds, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *BatchCreateSpotLimitOrdersAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *CancelSpotOrderAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgCancelSpotOrder{}) +} + +func (a *CancelSpotOrderAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + orderToCancel, ok := msg.(*MsgCancelSpotOrder) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + // check authorized subaccount + if orderToCancel.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized market + if !find(a.MarketIds, orderToCancel.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *CancelSpotOrderAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} + +func (a *BatchCancelSpotOrdersAuthz) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgBatchCancelSpotOrders{}) +} + +func (a *BatchCancelSpotOrdersAuthz) Accept(_ context.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + ordersToCancel, ok := msg.(*MsgBatchCancelSpotOrders) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + for _, o := range ordersToCancel.Data { + // check authorized subaccount + if o.SubaccountId != a.SubaccountId { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested subaccount is unauthorized") + } + // check authorized markets + if !find(a.MarketIds, o.MarketId) { + return authz.AcceptResponse{}, sdkerrors.ErrUnauthorized.Wrapf("requested market is unauthorized") + } + } + return authz.AcceptResponse{Accept: true, Delete: false, Updated: nil}, nil +} + +func (a *BatchCancelSpotOrdersAuthz) ValidateBasic() error { + if !types.IsHexHash(a.SubaccountId) { + return sdkerrors.ErrLogic.Wrap("invalid subaccount id to authorize") + } + if len(a.MarketIds) == 0 || len(a.MarketIds) > AuthorizedMarketsLimit { + return sdkerrors.ErrLogic.Wrapf("invalid markets array length") + } + marketsSet := reduceToSet(a.MarketIds) + if len(a.MarketIds) != len(marketsSet) { + return sdkerrors.ErrLogic.Wrapf("Cannot have duplicate markets") + } + for _, m := range a.MarketIds { + if !types.IsHexHash(m) { + return sdkerrors.ErrLogic.Wrap("invalid market id to authorize") + } + } + return nil +} diff --git a/chain/exchange/types/v2/authz.pb.go b/chain/exchange/types/v2/authz.pb.go new file mode 100644 index 00000000..5bbd8c97 --- /dev/null +++ b/chain/exchange/types/v2/authz.pb.go @@ -0,0 +1,2702 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/authz.proto + +package v2 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// spot authz messages +type CreateSpotLimitOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CreateSpotLimitOrderAuthz) Reset() { *m = CreateSpotLimitOrderAuthz{} } +func (m *CreateSpotLimitOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CreateSpotLimitOrderAuthz) ProtoMessage() {} +func (*CreateSpotLimitOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{0} +} +func (m *CreateSpotLimitOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateSpotLimitOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateSpotLimitOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateSpotLimitOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateSpotLimitOrderAuthz.Merge(m, src) +} +func (m *CreateSpotLimitOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CreateSpotLimitOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CreateSpotLimitOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateSpotLimitOrderAuthz proto.InternalMessageInfo + +func (m *CreateSpotLimitOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CreateSpotLimitOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type CreateSpotMarketOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CreateSpotMarketOrderAuthz) Reset() { *m = CreateSpotMarketOrderAuthz{} } +func (m *CreateSpotMarketOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CreateSpotMarketOrderAuthz) ProtoMessage() {} +func (*CreateSpotMarketOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{1} +} +func (m *CreateSpotMarketOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateSpotMarketOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateSpotMarketOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateSpotMarketOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateSpotMarketOrderAuthz.Merge(m, src) +} +func (m *CreateSpotMarketOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CreateSpotMarketOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CreateSpotMarketOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateSpotMarketOrderAuthz proto.InternalMessageInfo + +func (m *CreateSpotMarketOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CreateSpotMarketOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type BatchCreateSpotLimitOrdersAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *BatchCreateSpotLimitOrdersAuthz) Reset() { *m = BatchCreateSpotLimitOrdersAuthz{} } +func (m *BatchCreateSpotLimitOrdersAuthz) String() string { return proto.CompactTextString(m) } +func (*BatchCreateSpotLimitOrdersAuthz) ProtoMessage() {} +func (*BatchCreateSpotLimitOrdersAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{2} +} +func (m *BatchCreateSpotLimitOrdersAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchCreateSpotLimitOrdersAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchCreateSpotLimitOrdersAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchCreateSpotLimitOrdersAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchCreateSpotLimitOrdersAuthz.Merge(m, src) +} +func (m *BatchCreateSpotLimitOrdersAuthz) XXX_Size() int { + return m.Size() +} +func (m *BatchCreateSpotLimitOrdersAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_BatchCreateSpotLimitOrdersAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchCreateSpotLimitOrdersAuthz proto.InternalMessageInfo + +func (m *BatchCreateSpotLimitOrdersAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BatchCreateSpotLimitOrdersAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type CancelSpotOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CancelSpotOrderAuthz) Reset() { *m = CancelSpotOrderAuthz{} } +func (m *CancelSpotOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CancelSpotOrderAuthz) ProtoMessage() {} +func (*CancelSpotOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{3} +} +func (m *CancelSpotOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CancelSpotOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CancelSpotOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CancelSpotOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelSpotOrderAuthz.Merge(m, src) +} +func (m *CancelSpotOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CancelSpotOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CancelSpotOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelSpotOrderAuthz proto.InternalMessageInfo + +func (m *CancelSpotOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CancelSpotOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type BatchCancelSpotOrdersAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *BatchCancelSpotOrdersAuthz) Reset() { *m = BatchCancelSpotOrdersAuthz{} } +func (m *BatchCancelSpotOrdersAuthz) String() string { return proto.CompactTextString(m) } +func (*BatchCancelSpotOrdersAuthz) ProtoMessage() {} +func (*BatchCancelSpotOrdersAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{4} +} +func (m *BatchCancelSpotOrdersAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchCancelSpotOrdersAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchCancelSpotOrdersAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchCancelSpotOrdersAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchCancelSpotOrdersAuthz.Merge(m, src) +} +func (m *BatchCancelSpotOrdersAuthz) XXX_Size() int { + return m.Size() +} +func (m *BatchCancelSpotOrdersAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_BatchCancelSpotOrdersAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchCancelSpotOrdersAuthz proto.InternalMessageInfo + +func (m *BatchCancelSpotOrdersAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BatchCancelSpotOrdersAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +// derivative authz messages +type CreateDerivativeLimitOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CreateDerivativeLimitOrderAuthz) Reset() { *m = CreateDerivativeLimitOrderAuthz{} } +func (m *CreateDerivativeLimitOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CreateDerivativeLimitOrderAuthz) ProtoMessage() {} +func (*CreateDerivativeLimitOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{5} +} +func (m *CreateDerivativeLimitOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateDerivativeLimitOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateDerivativeLimitOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateDerivativeLimitOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateDerivativeLimitOrderAuthz.Merge(m, src) +} +func (m *CreateDerivativeLimitOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CreateDerivativeLimitOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CreateDerivativeLimitOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateDerivativeLimitOrderAuthz proto.InternalMessageInfo + +func (m *CreateDerivativeLimitOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CreateDerivativeLimitOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type CreateDerivativeMarketOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CreateDerivativeMarketOrderAuthz) Reset() { *m = CreateDerivativeMarketOrderAuthz{} } +func (m *CreateDerivativeMarketOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CreateDerivativeMarketOrderAuthz) ProtoMessage() {} +func (*CreateDerivativeMarketOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{6} +} +func (m *CreateDerivativeMarketOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateDerivativeMarketOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateDerivativeMarketOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateDerivativeMarketOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateDerivativeMarketOrderAuthz.Merge(m, src) +} +func (m *CreateDerivativeMarketOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CreateDerivativeMarketOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CreateDerivativeMarketOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateDerivativeMarketOrderAuthz proto.InternalMessageInfo + +func (m *CreateDerivativeMarketOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CreateDerivativeMarketOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type BatchCreateDerivativeLimitOrdersAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) Reset() { *m = BatchCreateDerivativeLimitOrdersAuthz{} } +func (m *BatchCreateDerivativeLimitOrdersAuthz) String() string { return proto.CompactTextString(m) } +func (*BatchCreateDerivativeLimitOrdersAuthz) ProtoMessage() {} +func (*BatchCreateDerivativeLimitOrdersAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{7} +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchCreateDerivativeLimitOrdersAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchCreateDerivativeLimitOrdersAuthz.Merge(m, src) +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) XXX_Size() int { + return m.Size() +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_BatchCreateDerivativeLimitOrdersAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchCreateDerivativeLimitOrdersAuthz proto.InternalMessageInfo + +func (m *BatchCreateDerivativeLimitOrdersAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type CancelDerivativeOrderAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *CancelDerivativeOrderAuthz) Reset() { *m = CancelDerivativeOrderAuthz{} } +func (m *CancelDerivativeOrderAuthz) String() string { return proto.CompactTextString(m) } +func (*CancelDerivativeOrderAuthz) ProtoMessage() {} +func (*CancelDerivativeOrderAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{8} +} +func (m *CancelDerivativeOrderAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CancelDerivativeOrderAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CancelDerivativeOrderAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CancelDerivativeOrderAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelDerivativeOrderAuthz.Merge(m, src) +} +func (m *CancelDerivativeOrderAuthz) XXX_Size() int { + return m.Size() +} +func (m *CancelDerivativeOrderAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_CancelDerivativeOrderAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelDerivativeOrderAuthz proto.InternalMessageInfo + +func (m *CancelDerivativeOrderAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *CancelDerivativeOrderAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type BatchCancelDerivativeOrdersAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *BatchCancelDerivativeOrdersAuthz) Reset() { *m = BatchCancelDerivativeOrdersAuthz{} } +func (m *BatchCancelDerivativeOrdersAuthz) String() string { return proto.CompactTextString(m) } +func (*BatchCancelDerivativeOrdersAuthz) ProtoMessage() {} +func (*BatchCancelDerivativeOrdersAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{9} +} +func (m *BatchCancelDerivativeOrdersAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchCancelDerivativeOrdersAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchCancelDerivativeOrdersAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchCancelDerivativeOrdersAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchCancelDerivativeOrdersAuthz.Merge(m, src) +} +func (m *BatchCancelDerivativeOrdersAuthz) XXX_Size() int { + return m.Size() +} +func (m *BatchCancelDerivativeOrdersAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_BatchCancelDerivativeOrdersAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchCancelDerivativeOrdersAuthz proto.InternalMessageInfo + +func (m *BatchCancelDerivativeOrdersAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BatchCancelDerivativeOrdersAuthz) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +// common authz message used in both spot & derivative markets +type BatchUpdateOrdersAuthz struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + SpotMarkets []string `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + DerivativeMarkets []string `protobuf:"bytes,3,rep,name=derivative_markets,json=derivativeMarkets,proto3" json:"derivative_markets,omitempty"` +} + +func (m *BatchUpdateOrdersAuthz) Reset() { *m = BatchUpdateOrdersAuthz{} } +func (m *BatchUpdateOrdersAuthz) String() string { return proto.CompactTextString(m) } +func (*BatchUpdateOrdersAuthz) ProtoMessage() {} +func (*BatchUpdateOrdersAuthz) Descriptor() ([]byte, []int) { + return fileDescriptor_a9d5454d2926690e, []int{10} +} +func (m *BatchUpdateOrdersAuthz) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchUpdateOrdersAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchUpdateOrdersAuthz.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchUpdateOrdersAuthz) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchUpdateOrdersAuthz.Merge(m, src) +} +func (m *BatchUpdateOrdersAuthz) XXX_Size() int { + return m.Size() +} +func (m *BatchUpdateOrdersAuthz) XXX_DiscardUnknown() { + xxx_messageInfo_BatchUpdateOrdersAuthz.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchUpdateOrdersAuthz proto.InternalMessageInfo + +func (m *BatchUpdateOrdersAuthz) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BatchUpdateOrdersAuthz) GetSpotMarkets() []string { + if m != nil { + return m.SpotMarkets + } + return nil +} + +func (m *BatchUpdateOrdersAuthz) GetDerivativeMarkets() []string { + if m != nil { + return m.DerivativeMarkets + } + return nil +} + +func init() { + proto.RegisterType((*CreateSpotLimitOrderAuthz)(nil), "injective.exchange.v2.CreateSpotLimitOrderAuthz") + proto.RegisterType((*CreateSpotMarketOrderAuthz)(nil), "injective.exchange.v2.CreateSpotMarketOrderAuthz") + proto.RegisterType((*BatchCreateSpotLimitOrdersAuthz)(nil), "injective.exchange.v2.BatchCreateSpotLimitOrdersAuthz") + proto.RegisterType((*CancelSpotOrderAuthz)(nil), "injective.exchange.v2.CancelSpotOrderAuthz") + proto.RegisterType((*BatchCancelSpotOrdersAuthz)(nil), "injective.exchange.v2.BatchCancelSpotOrdersAuthz") + proto.RegisterType((*CreateDerivativeLimitOrderAuthz)(nil), "injective.exchange.v2.CreateDerivativeLimitOrderAuthz") + proto.RegisterType((*CreateDerivativeMarketOrderAuthz)(nil), "injective.exchange.v2.CreateDerivativeMarketOrderAuthz") + proto.RegisterType((*BatchCreateDerivativeLimitOrdersAuthz)(nil), "injective.exchange.v2.BatchCreateDerivativeLimitOrdersAuthz") + proto.RegisterType((*CancelDerivativeOrderAuthz)(nil), "injective.exchange.v2.CancelDerivativeOrderAuthz") + proto.RegisterType((*BatchCancelDerivativeOrdersAuthz)(nil), "injective.exchange.v2.BatchCancelDerivativeOrdersAuthz") + proto.RegisterType((*BatchUpdateOrdersAuthz)(nil), "injective.exchange.v2.BatchUpdateOrdersAuthz") +} + +func init() { proto.RegisterFile("injective/exchange/v2/authz.proto", fileDescriptor_a9d5454d2926690e) } + +var fileDescriptor_a9d5454d2926690e = []byte{ + // 525 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0x33, 0x16, 0x84, 0x8c, 0xed, 0xa1, 0x8b, 0x4a, 0x1b, 0xe8, 0x36, 0xdd, 0x22, 0x44, + 0x21, 0x3b, 0x90, 0x22, 0x68, 0x0f, 0x8a, 0x6d, 0x2f, 0x81, 0x8a, 0x58, 0xf1, 0xe2, 0x25, 0x4c, + 0x66, 0x87, 0xee, 0xd8, 0xee, 0xce, 0x32, 0x33, 0xbb, 0x68, 0x3f, 0x82, 0x17, 0xbd, 0x8a, 0x67, + 0xf1, 0xaa, 0xe0, 0x67, 0x10, 0xf1, 0xd4, 0xa3, 0x47, 0x49, 0x0e, 0x7e, 0x0d, 0xd9, 0x19, 0xb2, + 0x9b, 0xa6, 0xb3, 0x04, 0x61, 0x9b, 0x4b, 0x60, 0x67, 0xfe, 0x99, 0xf7, 0x7b, 0xf3, 0x7f, 0x6f, + 0x1e, 0xdc, 0x62, 0xf1, 0x6b, 0x4a, 0x14, 0xcb, 0x28, 0xa2, 0x6f, 0x48, 0x88, 0xe3, 0x63, 0x8a, + 0xb2, 0x1e, 0xc2, 0xa9, 0x0a, 0xcf, 0xfc, 0x44, 0x70, 0xc5, 0x9d, 0x5b, 0x85, 0xc4, 0x9f, 0x48, + 0xfc, 0xac, 0xd7, 0x5a, 0x27, 0x5c, 0x46, 0x5c, 0x0e, 0xb4, 0x08, 0x99, 0x0f, 0xf3, 0x8f, 0xd6, + 0x2a, 0x8e, 0x58, 0xcc, 0x91, 0xfe, 0x35, 0x4b, 0xde, 0x47, 0x00, 0xd7, 0xf7, 0x05, 0xc5, 0x8a, + 0xbe, 0x48, 0xb8, 0x3a, 0x64, 0x11, 0x53, 0xcf, 0x44, 0x40, 0xc5, 0x93, 0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0x52, 0xaa, 0xd1, 0xfa, 0x03, 0x2b, 0xae, 0x6f, 0xeb, 0x97, 0x6a, 0x12, 0xf3, + 0xf6, 0xe8, 0xfa, 0x28, 0x45, 0x8b, 0x7e, 0x7b, 0x2a, 0xc3, 0x6b, 0xef, 0xa7, 0x4a, 0x78, 0x46, + 0x23, 0x17, 0xe7, 0xfd, 0x3c, 0x08, 0xef, 0x07, 0x80, 0xb7, 0xb5, 0xe8, 0x65, 0x12, 0x60, 0xf5, + 0xff, 0x7c, 0x5b, 0x70, 0x59, 0x26, 0x5c, 0x0d, 0x0c, 0xd2, 0x84, 0xf0, 0x86, 0x2c, 0x5e, 0x64, + 0xe9, 0x74, 0xa1, 0x13, 0x14, 0xb1, 0x0b, 0xe1, 0x92, 0x16, 0xae, 0x06, 0x33, 0x65, 0x29, 0x77, + 0xef, 0x5b, 0x53, 0xda, 0xbc, 0x98, 0xd2, 0x25, 0xda, 0xbd, 0x93, 0x9f, 0x23, 0x17, 0x9c, 0x8f, + 0x5c, 0xf0, 0x67, 0xe4, 0x82, 0x0f, 0x63, 0xb7, 0x71, 0x3e, 0x76, 0x1b, 0xbf, 0xc7, 0x6e, 0xe3, + 0xd5, 0xf3, 0x63, 0xa6, 0xc2, 0x74, 0xe8, 0x13, 0x1e, 0xa1, 0xfe, 0x64, 0x24, 0x1f, 0xe2, 0xa1, + 0x44, 0xc5, 0x80, 0xee, 0x12, 0x2e, 0xe8, 0xf4, 0x67, 0x88, 0x59, 0x8c, 0x22, 0x1e, 0xa4, 0xa7, + 0x54, 0x96, 0x03, 0x5e, 0xbd, 0x4d, 0xa8, 0x44, 0x59, 0x6f, 0x78, 0x5d, 0x0f, 0xe7, 0x9d, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x3e, 0xf4, 0x40, 0x06, 0x08, 0x00, 0x00, +} + +func (m *CreateSpotLimitOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateSpotLimitOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateSpotLimitOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateSpotMarketOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateSpotMarketOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateSpotMarketOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchCreateSpotLimitOrdersAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchCreateSpotLimitOrdersAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchCreateSpotLimitOrdersAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CancelSpotOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelSpotOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelSpotOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchCancelSpotOrdersAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchCancelSpotOrdersAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchCancelSpotOrdersAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateDerivativeLimitOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateDerivativeLimitOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateDerivativeLimitOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateDerivativeMarketOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateDerivativeMarketOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateDerivativeMarketOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CancelDerivativeOrderAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelDerivativeOrderAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelDerivativeOrderAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchCancelDerivativeOrdersAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchCancelDerivativeOrdersAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchCancelDerivativeOrdersAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchUpdateOrdersAuthz) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchUpdateOrdersAuthz) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchUpdateOrdersAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DerivativeMarkets) > 0 { + for iNdEx := len(m.DerivativeMarkets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DerivativeMarkets[iNdEx]) + copy(dAtA[i:], m.DerivativeMarkets[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.DerivativeMarkets[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SpotMarkets) > 0 { + for iNdEx := len(m.SpotMarkets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpotMarkets[iNdEx]) + copy(dAtA[i:], m.SpotMarkets[iNdEx]) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SpotMarkets[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintAuthz(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthz(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CreateSpotLimitOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *CreateSpotMarketOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *BatchCreateSpotLimitOrdersAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *CancelSpotOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *BatchCancelSpotOrdersAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *CreateDerivativeLimitOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *CreateDerivativeMarketOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *BatchCreateDerivativeLimitOrdersAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *CancelDerivativeOrderAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *BatchCancelDerivativeOrdersAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func (m *BatchUpdateOrdersAuthz) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovAuthz(uint64(l)) + } + if len(m.SpotMarkets) > 0 { + for _, s := range m.SpotMarkets { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + if len(m.DerivativeMarkets) > 0 { + for _, s := range m.DerivativeMarkets { + l = len(s) + n += 1 + l + sovAuthz(uint64(l)) + } + } + return n +} + +func sovAuthz(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthz(x uint64) (n int) { + return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CreateSpotLimitOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateSpotLimitOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSpotLimitOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateSpotMarketOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateSpotMarketOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSpotMarketOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchCreateSpotLimitOrdersAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchCreateSpotLimitOrdersAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateSpotLimitOrdersAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelSpotOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelSpotOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelSpotOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchCancelSpotOrdersAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchCancelSpotOrdersAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCancelSpotOrdersAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateDerivativeLimitOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateDerivativeLimitOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateDerivativeLimitOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateDerivativeMarketOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateDerivativeMarketOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateDerivativeMarketOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchCreateDerivativeLimitOrdersAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchCreateDerivativeLimitOrdersAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCreateDerivativeLimitOrdersAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelDerivativeOrderAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelDerivativeOrderAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelDerivativeOrderAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchCancelDerivativeOrdersAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchCancelDerivativeOrdersAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCancelDerivativeOrdersAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchUpdateOrdersAuthz) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchUpdateOrdersAuthz: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchUpdateOrdersAuthz: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarkets", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarkets = append(m.SpotMarkets, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarkets", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarkets = append(m.DerivativeMarkets, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthz(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthz + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthz + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthz + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthAuthz + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthz + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthz + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/codec.go b/chain/exchange/types/v2/codec.go new file mode 100644 index 00000000..add0ec19 --- /dev/null +++ b/chain/exchange/types/v2/codec.go @@ -0,0 +1,191 @@ +package v2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/x/authz" + authzcdc "github.com/cosmos/cosmos-sdk/x/authz/codec" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/gogoproto/proto" +) + +// todo: do we need this module cdc? + +var ( + // ModuleCdc references the global x/exchange module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/exchange and + // defined at the application level. + ModuleCdc = codec.NewLegacyAmino() +) + +func init() { + RegisterLegacyAminoCodec(ModuleCdc) + cryptocodec.RegisterCrypto(ModuleCdc) + RegisterLegacyAminoCodec(authzcdc.Amino) + + ModuleCdc.Seal() +} + +// RegisterLegacyAminoCodec registers the necessary x/exchange interfaces and concrete types +// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgDeposit{}, "exchange/v2/MsgDeposit", nil) + cdc.RegisterConcrete(&MsgWithdraw{}, "exchange/v2/MsgWithdraw", nil) + cdc.RegisterConcrete(&MsgInstantSpotMarketLaunch{}, "exchange/v2/MsgInstantSpotMarketLaunch", nil) + cdc.RegisterConcrete(&MsgInstantPerpetualMarketLaunch{}, "exchange/v2/MsgInstantPerpetualMarketLaunch", nil) + cdc.RegisterConcrete(&MsgInstantExpiryFuturesMarketLaunch{}, "exchange/v2/MsgInstantExpiryFuturesMarketLaunch", nil) + cdc.RegisterConcrete(&MsgCreateSpotLimitOrder{}, "exchange/v2/MsgCreateSpotLimitOrder", nil) + cdc.RegisterConcrete(&MsgBatchCreateSpotLimitOrders{}, "exchange/v2/MsgBatchCreateSpotLimitOrders", nil) + cdc.RegisterConcrete(&MsgCreateSpotMarketOrder{}, "exchange/v2/MsgCreateSpotMarketOrder", nil) + cdc.RegisterConcrete(&MsgCancelSpotOrder{}, "exchange/v2/MsgCancelSpotOrder", nil) + cdc.RegisterConcrete(&MsgBatchCancelSpotOrders{}, "exchange/v2/MsgBatchCancelSpotOrders", nil) + cdc.RegisterConcrete(&MsgCreateDerivativeLimitOrder{}, "exchange/v2/MsgCreateDerivativeLimitOrder", nil) + cdc.RegisterConcrete(&MsgBatchCreateDerivativeLimitOrders{}, "exchange/v2/MsgBatchCreateDerivativeLimitOrders", nil) + cdc.RegisterConcrete(&MsgCreateDerivativeMarketOrder{}, "exchange/v2/MsgCreateDerivativeMarketOrder", nil) + cdc.RegisterConcrete(&MsgCancelDerivativeOrder{}, "exchange/v2/MsgCancelDerivativeOrder", nil) + cdc.RegisterConcrete(&MsgBatchCancelDerivativeOrders{}, "exchange/v2/MsgBatchCancelDerivativeOrders", nil) + cdc.RegisterConcrete(&MsgBatchCancelBinaryOptionsOrders{}, "exchange/v2/MsgBatchCancelBinaryOptionsOrders", nil) + cdc.RegisterConcrete(&MsgSubaccountTransfer{}, "exchange/v2/MsgSubaccountTransfer", nil) + cdc.RegisterConcrete(&MsgExternalTransfer{}, "exchange/v2/MsgExternalTransfer", nil) + cdc.RegisterConcrete(&MsgIncreasePositionMargin{}, "exchange/v2/MsgIncreasePositionMargin", nil) + cdc.RegisterConcrete(&MsgLiquidatePosition{}, "exchange/v2/MsgLiquidatePosition", nil) + cdc.RegisterConcrete(&MsgBatchUpdateOrders{}, "exchange/v2/MsgBatchUpdateOrders", nil) + cdc.RegisterConcrete(&MsgPrivilegedExecuteContract{}, "exchange/v2/MsgPrivilegedExecuteContract", nil) + cdc.RegisterConcrete(&MsgRewardsOptOut{}, "exchange/v2/MsgRewardsOptOut", nil) + cdc.RegisterConcrete(&MsgInstantBinaryOptionsMarketLaunch{}, "exchange/v2/MsgInstantBinaryOptionsMarketLaunch", nil) + cdc.RegisterConcrete(&MsgCreateBinaryOptionsLimitOrder{}, "exchange/v2/MsgCreateBinaryOptionsLimitOrder", nil) + cdc.RegisterConcrete(&MsgCreateBinaryOptionsMarketOrder{}, "exchange/v2/MsgCreateBinaryOptionsMarketOrder", nil) + cdc.RegisterConcrete(&MsgCancelBinaryOptionsOrder{}, "exchange/v2/MsgCancelBinaryOptionsOrder", nil) + cdc.RegisterConcrete(&MsgAdminUpdateBinaryOptionsMarket{}, "exchange/v2/MsgAdminUpdateBinaryOptionsMarket", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "exchange/v2/MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgUpdateSpotMarket{}, "exchange/v2/MsgUpdateSpotMarket", nil) + cdc.RegisterConcrete(&MsgUpdateDerivativeMarket{}, "exchange/v2/MsgUpdateDerivativeMarket", nil) + + cdc.RegisterConcrete(&ExchangeEnableProposal{}, "exchange/v2/ExchangeEnableProposal", nil) + cdc.RegisterConcrete(&BatchExchangeModificationProposal{}, "exchange/v2/BatchExchangeModificationProposal", nil) + cdc.RegisterConcrete(&SpotMarketParamUpdateProposal{}, "exchange/v2/SpotMarketParamUpdateProposal", nil) + cdc.RegisterConcrete(&SpotMarketLaunchProposal{}, "exchange/v2/SpotMarketLaunchProposal", nil) + cdc.RegisterConcrete(&PerpetualMarketLaunchProposal{}, "exchange/v2/PerpetualMarketLaunchProposal", nil) + cdc.RegisterConcrete(&ExpiryFuturesMarketLaunchProposal{}, "exchange/v2/ExpiryFuturesMarketLaunchProposal", nil) + cdc.RegisterConcrete(&DerivativeMarketParamUpdateProposal{}, "exchange/v2/DerivativeMarketParamUpdateProposal", nil) + cdc.RegisterConcrete(&MarketForcedSettlementProposal{}, "exchange/v2/MarketForcedSettlementProposal", nil) + cdc.RegisterConcrete(&UpdateDenomDecimalsProposal{}, "exchange/v2/UpdateDenomDecimalsProposal", nil) + cdc.RegisterConcrete(&TradingRewardCampaignLaunchProposal{}, "exchange/v2/TradingRewardCampaignLaunchProposal", nil) + cdc.RegisterConcrete(&TradingRewardCampaignUpdateProposal{}, "exchange/v2/TradingRewardCampaignUpdateProposal", nil) + cdc.RegisterConcrete(&TradingRewardPendingPointsUpdateProposal{}, "exchange/v2/TradingRewardPendingPointsUpdateProposal", nil) + cdc.RegisterConcrete(&FeeDiscountProposal{}, "exchange/v2/FeeDiscountProposal", nil) + cdc.RegisterConcrete(&BatchCommunityPoolSpendProposal{}, "exchange/v2/BatchCommunityPoolSpendProposal", nil) + cdc.RegisterConcrete(&BinaryOptionsMarketParamUpdateProposal{}, "exchange/v2/BinaryOptionsMarketParamUpdateProposal", nil) + cdc.RegisterConcrete(&BinaryOptionsMarketLaunchProposal{}, "exchange/v2/BinaryOptionsMarketLaunchProposal", nil) + cdc.RegisterConcrete(&AtomicMarketOrderFeeMultiplierScheduleProposal{}, "exchange/v2/AtomicMarketOrderFeeMultiplierScheduleProposal", nil) + + cdc.RegisterConcrete(&CreateSpotLimitOrderAuthz{}, "exchange/v2/CreateSpotLimitOrderAuthz", nil) + cdc.RegisterConcrete(&CreateSpotMarketOrderAuthz{}, "exchange/v2/CreateSpotMarketOrderAuthz", nil) + cdc.RegisterConcrete(&BatchCreateSpotLimitOrdersAuthz{}, "exchange/v2/BatchCreateSpotLimitOrdersAuthz", nil) + cdc.RegisterConcrete(&CancelSpotOrderAuthz{}, "exchange/v2/CancelSpotOrderAuthz", nil) + cdc.RegisterConcrete(&BatchCancelSpotOrdersAuthz{}, "exchange/v2/BatchCancelSpotOrdersAuthz", nil) + cdc.RegisterConcrete(&CreateDerivativeLimitOrderAuthz{}, "exchange/v2/CreateDerivativeLimitOrderAuthz", nil) + cdc.RegisterConcrete(&CreateDerivativeMarketOrderAuthz{}, "exchange/v2/CreateDerivativeMarketOrderAuthz", nil) + cdc.RegisterConcrete(&BatchCreateDerivativeLimitOrdersAuthz{}, "exchange/v2/BatchCreateDerivativeLimitOrdersAuthz", nil) + cdc.RegisterConcrete(&CancelDerivativeOrderAuthz{}, "exchange/v2/CancelDerivativeOrderAuthz", nil) + cdc.RegisterConcrete(&BatchCancelDerivativeOrdersAuthz{}, "exchange/v2/BatchCancelDerivativeOrdersAuthz", nil) + cdc.RegisterConcrete(&BatchUpdateOrdersAuthz{}, "exchange/v2/BatchUpdateOrdersAuthz", nil) + + cdc.RegisterConcrete(&Params{}, "exchange/v2/Params", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgDeposit{}, + &MsgWithdraw{}, + &MsgInstantSpotMarketLaunch{}, + &MsgInstantPerpetualMarketLaunch{}, + &MsgInstantExpiryFuturesMarketLaunch{}, + &MsgCreateSpotLimitOrder{}, + &MsgBatchCreateSpotLimitOrders{}, + &MsgCreateSpotMarketOrder{}, + &MsgCancelSpotOrder{}, + &MsgBatchCancelSpotOrders{}, + &MsgCreateDerivativeLimitOrder{}, + &MsgBatchCreateDerivativeLimitOrders{}, + &MsgCreateDerivativeMarketOrder{}, + &MsgCancelDerivativeOrder{}, + &MsgBatchCancelDerivativeOrders{}, + &MsgBatchCancelBinaryOptionsOrders{}, + &MsgSubaccountTransfer{}, + &MsgExternalTransfer{}, + &MsgIncreasePositionMargin{}, + &MsgLiquidatePosition{}, + &MsgBatchUpdateOrders{}, + &MsgPrivilegedExecuteContract{}, + &MsgRewardsOptOut{}, + &MsgInstantBinaryOptionsMarketLaunch{}, + &MsgCreateBinaryOptionsLimitOrder{}, + &MsgCreateBinaryOptionsMarketOrder{}, + &MsgCancelBinaryOptionsOrder{}, + &MsgAdminUpdateBinaryOptionsMarket{}, + &MsgUpdateParams{}, + &MsgUpdateSpotMarket{}, + &MsgUpdateDerivativeMarket{}, + ) + + registry.RegisterImplementations( + (*proto.Message)(nil), + &MsgCreateSpotLimitOrderResponse{}, + &MsgCreateSpotMarketOrderResponse{}, + &MsgBatchCreateSpotLimitOrdersResponse{}, + &MsgCreateDerivativeLimitOrderResponse{}, + &MsgCreateDerivativeMarketOrderResponse{}, + &MsgBatchCreateDerivativeLimitOrdersResponse{}, + &MsgCreateBinaryOptionsLimitOrderResponse{}, + &MsgCreateBinaryOptionsMarketOrderResponse{}, + &MsgBatchUpdateOrdersResponse{}, + ) + + registry.RegisterImplementations( + (*govtypes.Content)(nil), + &ExchangeEnableProposal{}, + &BatchExchangeModificationProposal{}, + &SpotMarketParamUpdateProposal{}, + &SpotMarketLaunchProposal{}, + &PerpetualMarketLaunchProposal{}, + &ExpiryFuturesMarketLaunchProposal{}, + &DerivativeMarketParamUpdateProposal{}, + &MarketForcedSettlementProposal{}, + &UpdateDenomDecimalsProposal{}, + &TradingRewardCampaignLaunchProposal{}, + &TradingRewardCampaignUpdateProposal{}, + &TradingRewardPendingPointsUpdateProposal{}, + &FeeDiscountProposal{}, + &BatchCommunityPoolSpendProposal{}, + &BinaryOptionsMarketParamUpdateProposal{}, + &BinaryOptionsMarketLaunchProposal{}, + &AtomicMarketOrderFeeMultiplierScheduleProposal{}, + ) + + registry.RegisterImplementations( + (*authz.Authorization)(nil), + // spot authz + &CreateSpotLimitOrderAuthz{}, + &CreateSpotMarketOrderAuthz{}, + &BatchCreateSpotLimitOrdersAuthz{}, + &CancelSpotOrderAuthz{}, + &BatchCancelSpotOrdersAuthz{}, + // derivative authz + &CreateDerivativeLimitOrderAuthz{}, + &CreateDerivativeMarketOrderAuthz{}, + &BatchCreateDerivativeLimitOrdersAuthz{}, + &CancelDerivativeOrderAuthz{}, + &BatchCancelDerivativeOrdersAuthz{}, + // common spot, derivative authz + &BatchUpdateOrdersAuthz{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/chain/exchange/types/v2/common_order.go b/chain/exchange/types/v2/common_order.go new file mode 100644 index 00000000..0ed720da --- /dev/null +++ b/chain/exchange/types/v2/common_order.go @@ -0,0 +1,109 @@ +package v2 + +import ( + "cosmossdk.io/math" + "github.com/cosmos/gogoproto/proto" + "github.com/ethereum/go-ethereum/common" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +func (t OrderType) IsBuy() bool { + switch t { + case OrderType_BUY, OrderType_STOP_BUY, OrderType_TAKE_BUY, OrderType_BUY_PO, OrderType_BUY_ATOMIC: + return true + case OrderType_SELL, OrderType_STOP_SELL, OrderType_TAKE_SELL, OrderType_SELL_PO, OrderType_SELL_ATOMIC: + return false + } + return false +} + +func (t OrderType) IsPostOnly() bool { + switch t { + case OrderType_BUY_PO, OrderType_SELL_PO: + return true + default: + return false + } +} + +func (t OrderType) IsConditional() bool { + switch t { + case OrderType_STOP_BUY, + OrderType_STOP_SELL, + OrderType_TAKE_BUY, + OrderType_TAKE_SELL: + return true + } + return false +} + +func (t OrderType) IsAtomic() bool { + switch t { + case OrderType_BUY_ATOMIC, + OrderType_SELL_ATOMIC: + return true + } + return false +} + +func NewV2OrderInfoFromV1(market MarketInterface, orderInfo v1.OrderInfo) *OrderInfo { + humanPrice := market.PriceFromChainFormat(orderInfo.Price) + humanQuantity := market.QuantityFromChainFormat(orderInfo.Quantity) + + return &OrderInfo{ + SubaccountId: orderInfo.SubaccountId, + FeeRecipient: orderInfo.FeeRecipient, + Price: humanPrice, + Quantity: humanQuantity, + Cid: orderInfo.Cid, + } +} + +func (m *OrderInfo) GetNotional() math.LegacyDec { + return m.Quantity.Mul(m.Price) +} + +func (m *OrderInfo) GetFeeAmount(fee math.LegacyDec) math.LegacyDec { + return m.GetNotional().Mul(fee) +} + +func (m *OrderInfo) IsFromDefaultSubaccount() bool { + return types.IsDefaultSubaccountID(common.HexToHash(m.SubaccountId)) +} + +func (m *OrderInfo) GetPrice() math.LegacyDec { + return m.Price +} + +func (m *OrderInfo) GetQuantity() math.LegacyDec { + return m.Quantity +} + +func (m *MarketStatus) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MarketStatus_value, data, "MarketStatus") + if err != nil { + return err + } + *m = MarketStatus(value) + return nil +} + +func (m *ExecutionType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ExecutionType_value, data, "ExecutionType") + if err != nil { + return err + } + *m = ExecutionType(value) + return nil +} + +func (m *OrderType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(OrderType_value, data, "OrderType") + if err != nil { + return err + } + *m = OrderType(value) + return nil +} diff --git a/chain/exchange/types/v2/common_utils.go b/chain/exchange/types/v2/common_utils.go new file mode 100644 index 00000000..3b888332 --- /dev/null +++ b/chain/exchange/types/v2/common_utils.go @@ -0,0 +1,60 @@ +package v2 + +import ( + "cosmossdk.io/math" + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" +) + +type SpotLimitOrderDelta struct { + Order *SpotLimitOrder + FillQuantity math.LegacyDec +} + +type DerivativeLimitOrderDelta struct { + Order *DerivativeLimitOrder + FillQuantity math.LegacyDec + CancelQuantity math.LegacyDec +} + +type DerivativeMarketOrderDelta struct { + Order *DerivativeMarketOrder + FillQuantity math.LegacyDec +} + +func (d *DerivativeMarketOrderDelta) UnfilledQuantity() math.LegacyDec { + return d.Order.OrderInfo.Quantity.Sub(d.FillQuantity) +} + +func (d *DerivativeLimitOrderDelta) IsBuy() bool { + return d.Order.IsBuy() +} + +func (d *DerivativeLimitOrderDelta) SubaccountID() common.Hash { + return d.Order.SubaccountID() +} + +func (d *DerivativeLimitOrderDelta) Price() math.LegacyDec { + return d.Order.Price() +} + +func (d *DerivativeLimitOrderDelta) FillableQuantity() math.LegacyDec { + return d.Order.Fillable.Sub(d.CancelQuantity) +} + +func (d *DerivativeLimitOrderDelta) OrderHash() common.Hash { + return d.Order.Hash() +} + +func (d *DerivativeLimitOrderDelta) Cid() string { + return d.Order.Cid() +} + +func (s *Subaccount) GetSubaccountID() (*common.Hash, error) { + trader, err := sdk.AccAddressFromBech32(s.Trader) + if err != nil { + return nil, err + } + return types.SdkAddressWithNonceToSubaccountID(trader, s.SubaccountNonce) +} diff --git a/chain/exchange/types/v2/conditional_orders.go b/chain/exchange/types/v2/conditional_orders.go new file mode 100644 index 00000000..ee1a2295 --- /dev/null +++ b/chain/exchange/types/v2/conditional_orders.go @@ -0,0 +1,29 @@ +package v2 + +func (b *ConditionalDerivativeOrderBook) HasLimitBuyOrders() bool { + return len(b.LimitBuyOrders) > 0 +} + +func (b *ConditionalDerivativeOrderBook) HasLimitSellOrders() bool { + return len(b.LimitSellOrders) > 0 +} + +func (b *ConditionalDerivativeOrderBook) HasMarketBuyOrders() bool { + return len(b.MarketBuyOrders) > 0 +} + +func (b *ConditionalDerivativeOrderBook) HasMarketSellOrders() bool { + return len(b.MarketSellOrders) > 0 +} + +func (b *ConditionalDerivativeOrderBook) IsEmpty() bool { + return !b.HasLimitBuyOrders() && !b.HasLimitSellOrders() && !b.HasMarketBuyOrders() && b.HasMarketSellOrders() +} + +func (b *ConditionalDerivativeOrderBook) GetMarketOrders() []*DerivativeMarketOrder { + return append(b.MarketBuyOrders, b.MarketSellOrders...) +} + +func (b *ConditionalDerivativeOrderBook) GetLimitOrders() []*DerivativeLimitOrder { + return append(b.LimitBuyOrders, b.LimitSellOrders...) +} diff --git a/chain/exchange/types/v2/deposit.go b/chain/exchange/types/v2/deposit.go new file mode 100644 index 00000000..aad9a3f6 --- /dev/null +++ b/chain/exchange/types/v2/deposit.go @@ -0,0 +1,26 @@ +package v2 + +import ( + "fmt" + + "cosmossdk.io/math" +) + +func NewDeposit() *Deposit { + return &Deposit{ + AvailableBalance: math.LegacyZeroDec(), + TotalBalance: math.LegacyZeroDec(), + } +} + +func (d *Deposit) IsEmpty() bool { + return d.AvailableBalance.IsZero() && d.TotalBalance.IsZero() +} + +func (d *Deposit) Display() string { + return fmt.Sprintf("Deposit Available: %s, Total: %s", getReadableDec(d.AvailableBalance), getReadableDec(d.TotalBalance)) +} + +func (d *Deposit) HasTransientOrRestingVanillaLimitOrders() bool { + return d.AvailableBalance.LT(d.TotalBalance) +} diff --git a/chain/exchange/types/v2/derivative_orders.go b/chain/exchange/types/v2/derivative_orders.go new file mode 100644 index 00000000..bf3a998c --- /dev/null +++ b/chain/exchange/types/v2/derivative_orders.go @@ -0,0 +1,566 @@ +package v2 + +import ( + "cosmossdk.io/errors" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +func NewMarketOrderForLiquidation( + position *Position, + positionSubaccountID common.Hash, + liquidator sdk.AccAddress, + worstPrice math.LegacyDec, +) *DerivativeMarketOrder { + var ( + orderType OrderType + ) + + // if long position, market sell order + // if short position, market buy order + if position.IsLong { + orderType = OrderType_SELL + } else { + orderType = OrderType_BUY + } + + order := DerivativeMarketOrder{ + OrderInfo: OrderInfo{ + SubaccountId: positionSubaccountID.Hex(), + FeeRecipient: liquidator.String(), + Price: worstPrice, + Quantity: position.Quantity, + }, + OrderType: orderType, + Margin: math.LegacyZeroDec(), + MarginHold: math.LegacyZeroDec(), + TriggerPrice: nil, + } + + return &order +} + +func (m *DerivativeLimitOrder) ToTrimmed() *TrimmedDerivativeLimitOrder { + return &TrimmedDerivativeLimitOrder{ + Price: m.OrderInfo.Price, + Quantity: m.OrderInfo.Quantity, + Margin: m.Margin, + Fillable: m.Fillable, + IsBuy: m.IsBuy(), + OrderHash: common.BytesToHash(m.OrderHash).Hex(), + Cid: m.Cid(), + } +} + +func (m *DerivativeLimitOrder) ToStandardized() *TrimmedLimitOrder { + return &TrimmedLimitOrder{ + Price: m.OrderInfo.Price, + Quantity: m.OrderInfo.Quantity, + OrderHash: common.BytesToHash(m.OrderHash).Hex(), + SubaccountId: m.OrderInfo.SubaccountId, + } +} + +func (o *DerivativeMarketOrderCancel) GetCancelDepositDelta() *v1.DepositDelta { + order := o.MarketOrder + // no market order quantity was executed, so refund the entire margin hold + if order.IsVanilla() && o.CancelQuantity.Equal(order.OrderInfo.Quantity) { + return &v1.DepositDelta{ + AvailableBalanceDelta: order.MarginHold, + TotalBalanceDelta: math.LegacyZeroDec(), + } + } + return nil +} + +func (o *DerivativeMarketOrder) GetCancelRefundAmount() math.LegacyDec { + if o.IsVanilla() { + return o.MarginHold + } + return math.LegacyZeroDec() +} + +func NewDerivativeMarketOrder(o *DerivativeOrder, sender sdk.AccAddress, orderHash common.Hash) *DerivativeMarketOrder { + if o.OrderInfo.FeeRecipient == "" { + o.OrderInfo.FeeRecipient = sender.String() + } + return &DerivativeMarketOrder{ + OrderInfo: o.OrderInfo, + OrderType: o.OrderType, + Margin: o.Margin, + MarginHold: math.LegacyZeroDec(), + TriggerPrice: o.TriggerPrice, + OrderHash: orderHash.Bytes(), + } +} + +func NewDerivativeLimitOrder(o *DerivativeOrder, sender sdk.AccAddress, orderHash common.Hash) *DerivativeLimitOrder { + if o.OrderInfo.FeeRecipient == "" { + o.OrderInfo.FeeRecipient = sender.String() + } + return &DerivativeLimitOrder{ + OrderInfo: o.OrderInfo, + OrderType: o.OrderType, + Margin: o.Margin, + Fillable: o.OrderInfo.Quantity, + TriggerPrice: o.TriggerPrice, + OrderHash: orderHash.Bytes(), + } +} + +func (m *DerivativeLimitOrder) ToDerivativeOrder(marketID string) *DerivativeOrder { + return &DerivativeOrder{ + MarketId: marketID, + OrderInfo: m.OrderInfo, + OrderType: m.OrderType, + Margin: m.Margin, + TriggerPrice: m.TriggerPrice, + } +} +func (o *DerivativeMarketOrder) ToDerivativeOrder(marketID string) *DerivativeOrder { + return &DerivativeOrder{ + MarketId: marketID, + OrderInfo: o.OrderInfo, + OrderType: o.OrderType, + Margin: o.Margin, + TriggerPrice: o.TriggerPrice, + } +} + +func (m *DerivativeLimitOrder) HasEqualOrWorsePrice(price math.LegacyDec) bool { + // the buy order has a worse price than the input price if it's less than + if m.IsBuy() { + return m.Price().LTE(price) + } + return m.Price().GTE(price) +} + +func (o *DerivativeMarketOrder) HasEqualOrWorsePrice(price math.LegacyDec) bool { + // the buy order has a worse price than the input price if it's less than + if o.IsBuy() { + return o.Price().LTE(price) + } + return o.Price().GTE(price) +} + +func (o *DerivativeMarketOrder) ResizeReduceOnlyOrder( + newQuantity math.LegacyDec, + oracleScaleFactor uint32, + isBinaryOptionsOrder bool, +) { + quantityDecrement := o.OrderInfo.Quantity.Sub(newQuantity) + + // No-op if increasing quantity or order is a vanilla order + if !quantityDecrement.IsPositive() || o.IsVanilla() { + return + } + + if isBinaryOptionsOrder { + o.OrderInfo.Quantity = newQuantity + if o.IsVanilla() { + o.Margin = o.GetRequiredBinaryOptionsMargin(oracleScaleFactor) + } + } else { + o.Margin = o.Margin.Mul(newQuantity).Quo(o.OrderInfo.Quantity) + o.OrderInfo.Quantity = newQuantity + } +} + +func (m *DerivativeLimitOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { + // Margin = Price * Quantity for buys + if m.IsBuy() { + notional := m.Price().Mul(m.OrderInfo.Quantity) + return notional + } + // Margin = (scaled(1) - Price) * Quantity for sells + return m.OrderInfo.Quantity.Mul(types.GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(m.Price())) +} + +func (o *DerivativeMarketOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { + // Margin = Price * Quantity for buys + if o.IsBuy() { + notional := o.Price().Mul(o.OrderInfo.Quantity) + return notional + } + // Margin = (scaled(1) - Price) * Quantity for sells + return o.OrderInfo.Quantity.Mul(types.GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(o.Price())) +} + +func (m *DerivativeLimitOrder) GetCancelDepositDelta(feeRate math.LegacyDec) *v1.DepositDelta { + return &v1.DepositDelta{ + AvailableBalanceDelta: m.GetCancelRefundAmount(feeRate), + TotalBalanceDelta: math.LegacyZeroDec(), + } +} + +func (m *DerivativeLimitOrder) GetCancelRefundAmount(feeRate math.LegacyDec) math.LegacyDec { + marginHoldRefund := math.LegacyZeroDec() + if m.IsVanilla() { + // negative fees are only accounted for upon matching + positiveFeePart := math.LegacyMaxDec(math.LegacyZeroDec(), feeRate) + //nolint:all + // Refund = (FillableQuantity / Quantity) * (Margin + Price * Quantity * feeRate) + notional := m.OrderInfo.Price.Mul(m.OrderInfo.Quantity) + marginHoldRefund = m.Fillable.Mul(m.Margin.Add(notional.Mul(positiveFeePart))).Quo(m.OrderInfo.Quantity) + } + return marginHoldRefund +} + +func (o *DerivativeOrder) CheckTickSize(minPriceTickSize, minQuantityTickSize math.LegacyDec) error { + if types.BreachesMinimumTickSize(o.OrderInfo.Price, minPriceTickSize) { + return errors.Wrapf(types.ErrInvalidPrice, "price %s must be a multiple of the minimum price tick size %s", o.OrderInfo.Price.String(), minPriceTickSize.String()) + } + if types.BreachesMinimumTickSize(o.OrderInfo.Quantity, minQuantityTickSize) { + return errors.Wrapf(types.ErrInvalidQuantity, "quantity %s must be a multiple of the minimum quantity tick size %s", o.OrderInfo.Quantity.String(), minQuantityTickSize.String()) + } + return nil +} + +func (o *DerivativeOrder) CheckNotional(minNotional math.LegacyDec) error { + orderNotional := o.GetQuantity().Mul(o.GetPrice()) + if !minNotional.IsNil() && orderNotional.LT(minNotional) { + return errors.Wrapf(types.ErrInvalidNotional, "order notional (%s) is less than the minimum notional for the market (%s)", orderNotional.String(), minNotional.String()) + } + return nil +} + +func (o *DerivativeOrder) GetRequiredBinaryOptionsMargin(oracleScaleFactor uint32) math.LegacyDec { + // Margin = Price * Quantity for buys + if o.IsBuy() { + notional := o.Price().Mul(o.OrderInfo.Quantity) + return notional + } + // Margin = (scaled(1) - Price) * Quantity for sells + return o.OrderInfo.Quantity.Mul(types.GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor).Sub(o.Price())) +} + +func (o *DerivativeOrder) CheckMarginAndGetMarginHold(initialMarginRatio, executionMarkPrice, feeRate math.LegacyDec, marketType v1.MarketType, oracleScaleFactor uint32) (marginHold math.LegacyDec, err error) { + notional := o.OrderInfo.Price.Mul(o.OrderInfo.Quantity) + positiveFeeRatePart := math.LegacyMaxDec(feeRate, math.LegacyZeroDec()) + feeAmount := notional.Mul(positiveFeeRatePart) + + marginHold = o.Margin.Add(feeAmount) + if marketType == v1.MarketType_BinaryOption { + requiredMargin := o.GetRequiredBinaryOptionsMargin(oracleScaleFactor) + if !o.Margin.Equal(requiredMargin) { + return math.LegacyDec{}, errors.Wrapf(types.ErrInsufficientMargin, "margin check: need %s but got %s", requiredMargin.String(), o.Margin.String()) + } + return marginHold, nil + } + + // For perpetual and expiry futures margins + // Enforce that Margin ≥ InitialMarginRatio * Price * Quantity + if o.Margin.LT(initialMarginRatio.Mul(notional)) { + return math.LegacyDec{}, errors.Wrapf(types.ErrInsufficientMargin, "InitialMarginRatio Check: need at least %s but got %s", initialMarginRatio.Mul(notional).String(), o.Margin.String()) + } + + if err := o.CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, executionMarkPrice); err != nil { + return math.LegacyDec{}, err + } + + return marginHold, nil +} + +func (o *DerivativeOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { + // For Buys: MarkPrice ≥ (Margin - Price * Quantity) / ((InitialMarginRatio - 1) * Quantity) + // For Sells: MarkPrice ≤ (Margin + Price * Quantity) / ((1 + InitialMarginRatio) * Quantity) + markPriceThreshold := o.ComputeInitialMarginRequirementMarkPriceThreshold(initialMarginRatio) + return CheckInitialMarginMarkPriceRequirement(o.IsBuy(), markPriceThreshold, markPrice) +} + +func CheckInitialMarginMarkPriceRequirement(isBuyOrLong bool, markPriceThreshold, markPrice math.LegacyDec) error { + if isBuyOrLong && markPrice.LT(markPriceThreshold) { + return errors.Wrapf(types.ErrInsufficientMargin, "Buy MarkPriceThreshold Check: mark/trigger price %s must be GTE %s", markPrice.String(), markPriceThreshold.String()) + } else if !isBuyOrLong && markPrice.GT(markPriceThreshold) { + return errors.Wrapf(types.ErrInsufficientMargin, "Sell MarkPriceThreshold Check: mark/trigger price %s must be LTE %s", markPrice.String(), markPriceThreshold.String()) + } + return nil +} + +// CheckValidConditionalPrice checks that conditional order type (STOP or TAKE) actually valid for current relation between triggerPrice and markPrice +func (o *DerivativeOrder) CheckValidConditionalPrice(markPrice math.LegacyDec) (err error) { + if !o.IsConditional() { + return nil + } + + ok := true + switch o.OrderType { + case OrderType_STOP_BUY, OrderType_TAKE_SELL: // higher + ok = o.TriggerPrice.GT(markPrice) + case OrderType_STOP_SELL, OrderType_TAKE_BUY: // lower + ok = o.TriggerPrice.LT(markPrice) + } + if !ok { + return errors.Wrapf(types.ErrInvalidTriggerPrice, "order type %s incompatible with trigger price %s and markPrice %s", o.OrderType.String(), o.TriggerPrice.String(), markPrice.String()) + } + return nil +} + +// CheckBinaryOptionsPricesWithinBounds checks that binary options order prices don't exceed 1 (scaled) +func (o *DerivativeOrder) CheckBinaryOptionsPricesWithinBounds(oracleScaleFactor uint32) (err error) { + maxScaledPrice := types.GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor) + if o.Price().GTE(maxScaledPrice) { + return errors.Wrapf(types.ErrInvalidPrice, "price must be less than %s", maxScaledPrice.String()) + } + + if o.IsConditional() && o.TriggerPrice.GTE(maxScaledPrice) { + return errors.Wrapf(types.ErrInvalidTriggerPrice, "trigger price must be less than %s", maxScaledPrice.String()) + } + return nil +} + +func (o *DerivativeOrder) ComputeInitialMarginRequirementMarkPriceThreshold(initialMarginRatio math.LegacyDec) math.LegacyDec { + return ComputeMarkPriceThreshold(o.IsBuy(), o.Price(), o.GetQuantity(), o.Margin, initialMarginRatio) +} + +func ComputeMarkPriceThreshold(isBuyOrLong bool, price, quantity, margin, initialMarginRatio math.LegacyDec) math.LegacyDec { + notional := price.Mul(quantity) + var numerator, denominator math.LegacyDec + if isBuyOrLong { + numerator = margin.Sub(notional) + denominator = initialMarginRatio.Sub(math.LegacyOneDec()).Mul(quantity) + } else { + numerator = margin.Add(notional) + denominator = initialMarginRatio.Add(math.LegacyOneDec()).Mul(quantity) + } + return numerator.Quo(denominator) +} + +func (m *DerivativeLimitOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { + return m.ToDerivativeOrder("").CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice) +} + +func (o *DerivativeMarketOrder) CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice math.LegacyDec) (err error) { + return o.ToDerivativeOrder("").CheckInitialMarginRequirementMarkPriceThreshold(initialMarginRatio, markPrice) +} + +func (o *DerivativeMarketOrder) ComputeOrderHash(nonce uint32, marketId string) (common.Hash, error) { + triggerPrice := "" + if o.TriggerPrice != nil { + triggerPrice = o.TriggerPrice.String() + } + + return types.ComputeOrderHash(marketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) +} + +// ComputeOrderHash computes the order hash for given derivative limit order +func (o *DerivativeOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { + triggerPrice := "" + if o.TriggerPrice != nil { + triggerPrice = o.TriggerPrice.String() + } + return types.ComputeOrderHash(o.MarketId, o.OrderInfo.SubaccountId, o.OrderInfo.FeeRecipient, o.OrderInfo.Price.String(), o.OrderInfo.Quantity.String(), o.Margin.String(), triggerPrice, string(o.OrderType), nonce) +} + +func (o *DerivativeOrder) IsReduceOnly() bool { + return o.Margin.IsZero() +} + +func (o *DerivativeMarketOrder) IsReduceOnly() bool { + return o.Margin.IsZero() +} + +func (m *DerivativeLimitOrder) IsReduceOnly() bool { + return m.Margin.IsZero() +} + +func (m *DerivativeLimitOrder) Hash() common.Hash { + return common.BytesToHash(m.OrderHash) +} + +func (o *DerivativeMarketOrder) Hash() common.Hash { + return common.BytesToHash(o.OrderHash) +} + +func (m *DerivativeLimitOrder) FeeRecipient() common.Address { + return m.OrderInfo.FeeRecipientAddress() +} + +func (o *DerivativeMarketOrder) FeeRecipient() common.Address { + return o.OrderInfo.FeeRecipientAddress() +} + +func (o *DerivativeOrder) IsVanilla() bool { + return !o.IsReduceOnly() +} + +func NewV1DerivativeMarketOrderFromV2(market DerivativeMarket, order DerivativeMarketOrder) v1.DerivativeMarketOrder { + v1OrderInfo := NewV1OrderInfoFromV2(&market, order.OrderInfo) + v1Order := v1.DerivativeMarketOrder{ + OrderInfo: v1OrderInfo, + OrderType: v1.OrderType(order.OrderType), + Margin: market.NotionalToChainFormat(order.Margin), + MarginHold: market.NotionalToChainFormat(order.MarginHold), + OrderHash: order.OrderHash, + } + + if order.TriggerPrice != nil { + chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) + v1Order.TriggerPrice = &chainFormatTriggerPrice + } + + return v1Order +} + +func NewV1DerivativeLimitOrderFromV2(market MarketInterface, order DerivativeLimitOrder) v1.DerivativeLimitOrder { + v1OrderInfo := NewV1OrderInfoFromV2(market, order.OrderInfo) + v1Order := v1.DerivativeLimitOrder{ + OrderInfo: v1OrderInfo, + OrderType: v1.OrderType(order.OrderType), + Margin: market.NotionalToChainFormat(order.Margin), + Fillable: order.Fillable, + OrderHash: order.OrderHash, + } + + if order.TriggerPrice != nil { + chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) + v1Order.TriggerPrice = &chainFormatTriggerPrice + } + + return v1Order +} + +func (o *DerivativeMarketOrder) IsVanilla() bool { + return !o.IsReduceOnly() +} + +func (m *DerivativeLimitOrder) IsVanilla() bool { + return !m.IsReduceOnly() +} + +func (m *DerivativeMarketOrder) IsBuy() bool { + return m.OrderType.IsBuy() +} + +func (m *DerivativeLimitOrder) IsBuy() bool { + return m.OrderType.IsBuy() +} + +func (m *DerivativeOrder) IsBuy() bool { + return m.OrderType.IsBuy() +} + +func (m *DerivativeMarketOrder) Quantity() math.LegacyDec { + return m.OrderInfo.Quantity +} + +func (m *DerivativeMarketOrder) FillableQuantity() math.LegacyDec { + return m.OrderInfo.Quantity +} + +func (m *DerivativeMarketOrder) Price() math.LegacyDec { + return m.OrderInfo.Price +} + +func (m *DerivativeLimitOrder) Price() math.LegacyDec { + return m.OrderInfo.Price +} + +func (m *DerivativeOrder) Price() math.LegacyDec { + return m.OrderInfo.Price +} + +func (o *DerivativeOrder) IsConditional() bool { + return o.OrderType.IsConditional() +} + +func (o *DerivativeMarketOrder) IsConditional() bool { + return o.OrderType.IsConditional() +} + +func (m *DerivativeLimitOrder) IsConditional() bool { + return m.OrderType.IsConditional() +} + +func (m *DerivativeLimitOrder) Cid() string { + return m.OrderInfo.GetCid() +} + +func (o *DerivativeMarketOrder) Cid() string { + return o.OrderInfo.GetCid() +} + +func NewV2DerivativeOrderFromV1(market MarketInterface, order v1.DerivativeOrder) *DerivativeOrder { + humanMargin := market.NotionalFromChainFormat(order.Margin) + v2OrderInfo := NewV2OrderInfoFromV1(market, order.OrderInfo) + v2Order := DerivativeOrder{ + MarketId: order.MarketId, + OrderInfo: *v2OrderInfo, + OrderType: OrderType(order.OrderType), + Margin: humanMargin, + } + + if order.TriggerPrice != nil && !order.TriggerPrice.IsNil() { + humanPrice := market.PriceFromChainFormat(*order.TriggerPrice) + v2Order.TriggerPrice = &humanPrice + } + + return &v2Order +} + +func (o *DerivativeOrder) SubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} + +func (o *DerivativeOrder) Cid() string { + return o.OrderInfo.GetCid() +} + +func (o *DerivativeOrder) IsFromDefaultSubaccount() bool { + return o.OrderInfo.IsFromDefaultSubaccount() +} + +func (o *DerivativeOrder) MarketID() common.Hash { + return common.HexToHash(o.MarketId) +} + +func (o *DerivativeMarketOrder) SubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} + +func (m *DerivativeLimitOrder) SubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} + +func (m *OrderInfo) SubaccountID() common.Hash { + return common.HexToHash(m.SubaccountId) +} + +func (m *OrderInfo) FeeRecipientAddress() common.Address { + address, _ := sdk.AccAddressFromBech32(m.FeeRecipient) + return common.BytesToAddress(address.Bytes()) +} + +func (m *DerivativeLimitOrder) SdkAccAddress() sdk.AccAddress { + return sdk.AccAddress(m.SubaccountID().Bytes()[:common.AddressLength]) +} + +func (m *DerivativeLimitOrder) IsFromDefaultSubaccount() bool { + return m.OrderInfo.IsFromDefaultSubaccount() +} + +func (o *DerivativeMarketOrder) SdkAccAddress() sdk.AccAddress { + return sdk.AccAddress(o.SubaccountID().Bytes()[:common.AddressLength]) +} + +func (o *DerivativeMarketOrder) IsFromDefaultSubaccount() bool { + return o.OrderInfo.IsFromDefaultSubaccount() +} + +func (o *TrimmedDerivativeLimitOrder) IsReduceOnly() bool { + return o.Margin.IsZero() +} + +func EmptyDerivativeMarketOrderResults() *DerivativeMarketOrderResults { + return &DerivativeMarketOrderResults{ + Quantity: math.LegacyZeroDec(), + Price: math.LegacyZeroDec(), + Fee: math.LegacyZeroDec(), + PositionDelta: PositionDelta{}, + Payout: math.LegacyZeroDec(), + } +} diff --git a/chain/exchange/types/v2/events.go b/chain/exchange/types/v2/events.go new file mode 100644 index 00000000..ca3d747d --- /dev/null +++ b/chain/exchange/types/v2/events.go @@ -0,0 +1,37 @@ +package v2 + +import "github.com/ethereum/go-ethereum/common" + +func NewEventOrderCancelFail( + marketID, + subaccountID common.Hash, + orderHash, + cid string, + err error, +) *EventOrderCancelFail { + ev := &EventOrderCancelFail{ + MarketId: marketID.Hex(), + SubaccountId: subaccountID.Hex(), + OrderHash: orderHash, + Cid: cid, + } + + if err != nil { + ev.Description = err.Error() + } + + return ev +} + +func (e *EventOrderFail) AddOrderFail(orderHash common.Hash, cid string, flag uint32) { + e.Hashes = append(e.Hashes, orderHash.Bytes()) + e.Flags = append(e.Flags, flag) + + if cid != "" { + e.Cids = append(e.Cids, cid) + } +} + +func (e *EventOrderFail) IsEmpty() bool { + return len(e.Flags) == 0 && len(e.Hashes) == 0 && len(e.Cids) == 0 +} diff --git a/chain/exchange/types/v2/events.pb.go b/chain/exchange/types/v2/events.pb.go new file mode 100644 index 00000000..84b1e4e2 --- /dev/null +++ b/chain/exchange/types/v2/events.pb.go @@ -0,0 +1,11733 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/events.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventBatchSpotExecution struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + ExecutionType ExecutionType `protobuf:"varint,3,opt,name=executionType,proto3,enum=injective.exchange.v2.ExecutionType" json:"executionType,omitempty"` + Trades []*TradeLog `protobuf:"bytes,4,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (m *EventBatchSpotExecution) Reset() { *m = EventBatchSpotExecution{} } +func (m *EventBatchSpotExecution) String() string { return proto.CompactTextString(m) } +func (*EventBatchSpotExecution) ProtoMessage() {} +func (*EventBatchSpotExecution) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{0} +} +func (m *EventBatchSpotExecution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBatchSpotExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBatchSpotExecution.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBatchSpotExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBatchSpotExecution.Merge(m, src) +} +func (m *EventBatchSpotExecution) XXX_Size() int { + return m.Size() +} +func (m *EventBatchSpotExecution) XXX_DiscardUnknown() { + xxx_messageInfo_EventBatchSpotExecution.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBatchSpotExecution proto.InternalMessageInfo + +func (m *EventBatchSpotExecution) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventBatchSpotExecution) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *EventBatchSpotExecution) GetExecutionType() ExecutionType { + if m != nil { + return m.ExecutionType + } + return ExecutionType_UnspecifiedExecutionType +} + +func (m *EventBatchSpotExecution) GetTrades() []*TradeLog { + if m != nil { + return m.Trades + } + return nil +} + +type EventBatchDerivativeExecution struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + IsLiquidation bool `protobuf:"varint,3,opt,name=is_liquidation,json=isLiquidation,proto3" json:"is_liquidation,omitempty"` + // nil for time expiry futures + CumulativeFunding *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=cumulative_funding,json=cumulativeFunding,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding,omitempty"` + ExecutionType ExecutionType `protobuf:"varint,5,opt,name=executionType,proto3,enum=injective.exchange.v2.ExecutionType" json:"executionType,omitempty"` + Trades []*DerivativeTradeLog `protobuf:"bytes,6,rep,name=trades,proto3" json:"trades,omitempty"` +} + +func (m *EventBatchDerivativeExecution) Reset() { *m = EventBatchDerivativeExecution{} } +func (m *EventBatchDerivativeExecution) String() string { return proto.CompactTextString(m) } +func (*EventBatchDerivativeExecution) ProtoMessage() {} +func (*EventBatchDerivativeExecution) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{1} +} +func (m *EventBatchDerivativeExecution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBatchDerivativeExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBatchDerivativeExecution.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBatchDerivativeExecution) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBatchDerivativeExecution.Merge(m, src) +} +func (m *EventBatchDerivativeExecution) XXX_Size() int { + return m.Size() +} +func (m *EventBatchDerivativeExecution) XXX_DiscardUnknown() { + xxx_messageInfo_EventBatchDerivativeExecution.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBatchDerivativeExecution proto.InternalMessageInfo + +func (m *EventBatchDerivativeExecution) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventBatchDerivativeExecution) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *EventBatchDerivativeExecution) GetIsLiquidation() bool { + if m != nil { + return m.IsLiquidation + } + return false +} + +func (m *EventBatchDerivativeExecution) GetExecutionType() ExecutionType { + if m != nil { + return m.ExecutionType + } + return ExecutionType_UnspecifiedExecutionType +} + +func (m *EventBatchDerivativeExecution) GetTrades() []*DerivativeTradeLog { + if m != nil { + return m.Trades + } + return nil +} + +type EventLostFundsFromLiquidation struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId []byte `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + LostFundsFromAvailableDuringPayout cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=lost_funds_from_available_during_payout,json=lostFundsFromAvailableDuringPayout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"lost_funds_from_available_during_payout"` + LostFundsFromOrderCancels cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=lost_funds_from_order_cancels,json=lostFundsFromOrderCancels,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"lost_funds_from_order_cancels"` +} + +func (m *EventLostFundsFromLiquidation) Reset() { *m = EventLostFundsFromLiquidation{} } +func (m *EventLostFundsFromLiquidation) String() string { return proto.CompactTextString(m) } +func (*EventLostFundsFromLiquidation) ProtoMessage() {} +func (*EventLostFundsFromLiquidation) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{2} +} +func (m *EventLostFundsFromLiquidation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventLostFundsFromLiquidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventLostFundsFromLiquidation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventLostFundsFromLiquidation) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventLostFundsFromLiquidation.Merge(m, src) +} +func (m *EventLostFundsFromLiquidation) XXX_Size() int { + return m.Size() +} +func (m *EventLostFundsFromLiquidation) XXX_DiscardUnknown() { + xxx_messageInfo_EventLostFundsFromLiquidation.DiscardUnknown(m) +} + +var xxx_messageInfo_EventLostFundsFromLiquidation proto.InternalMessageInfo + +func (m *EventLostFundsFromLiquidation) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventLostFundsFromLiquidation) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +type EventBatchDerivativePosition struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Positions []*SubaccountPosition `protobuf:"bytes,2,rep,name=positions,proto3" json:"positions,omitempty"` +} + +func (m *EventBatchDerivativePosition) Reset() { *m = EventBatchDerivativePosition{} } +func (m *EventBatchDerivativePosition) String() string { return proto.CompactTextString(m) } +func (*EventBatchDerivativePosition) ProtoMessage() {} +func (*EventBatchDerivativePosition) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{3} +} +func (m *EventBatchDerivativePosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBatchDerivativePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBatchDerivativePosition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBatchDerivativePosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBatchDerivativePosition.Merge(m, src) +} +func (m *EventBatchDerivativePosition) XXX_Size() int { + return m.Size() +} +func (m *EventBatchDerivativePosition) XXX_DiscardUnknown() { + xxx_messageInfo_EventBatchDerivativePosition.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBatchDerivativePosition proto.InternalMessageInfo + +func (m *EventBatchDerivativePosition) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventBatchDerivativePosition) GetPositions() []*SubaccountPosition { + if m != nil { + return m.Positions + } + return nil +} + +type EventDerivativeMarketPaused struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SettlePrice string `protobuf:"bytes,2,opt,name=settle_price,json=settlePrice,proto3" json:"settle_price,omitempty"` + TotalMissingFunds string `protobuf:"bytes,3,opt,name=total_missing_funds,json=totalMissingFunds,proto3" json:"total_missing_funds,omitempty"` + MissingFundsRate string `protobuf:"bytes,4,opt,name=missing_funds_rate,json=missingFundsRate,proto3" json:"missing_funds_rate,omitempty"` +} + +func (m *EventDerivativeMarketPaused) Reset() { *m = EventDerivativeMarketPaused{} } +func (m *EventDerivativeMarketPaused) String() string { return proto.CompactTextString(m) } +func (*EventDerivativeMarketPaused) ProtoMessage() {} +func (*EventDerivativeMarketPaused) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{4} +} +func (m *EventDerivativeMarketPaused) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDerivativeMarketPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDerivativeMarketPaused.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDerivativeMarketPaused) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDerivativeMarketPaused.Merge(m, src) +} +func (m *EventDerivativeMarketPaused) XXX_Size() int { + return m.Size() +} +func (m *EventDerivativeMarketPaused) XXX_DiscardUnknown() { + xxx_messageInfo_EventDerivativeMarketPaused.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDerivativeMarketPaused proto.InternalMessageInfo + +func (m *EventDerivativeMarketPaused) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventDerivativeMarketPaused) GetSettlePrice() string { + if m != nil { + return m.SettlePrice + } + return "" +} + +func (m *EventDerivativeMarketPaused) GetTotalMissingFunds() string { + if m != nil { + return m.TotalMissingFunds + } + return "" +} + +func (m *EventDerivativeMarketPaused) GetMissingFundsRate() string { + if m != nil { + return m.MissingFundsRate + } + return "" +} + +type EventMarketBeyondBankruptcy struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SettlePrice string `protobuf:"bytes,2,opt,name=settle_price,json=settlePrice,proto3" json:"settle_price,omitempty"` + MissingMarketFunds string `protobuf:"bytes,3,opt,name=missing_market_funds,json=missingMarketFunds,proto3" json:"missing_market_funds,omitempty"` +} + +func (m *EventMarketBeyondBankruptcy) Reset() { *m = EventMarketBeyondBankruptcy{} } +func (m *EventMarketBeyondBankruptcy) String() string { return proto.CompactTextString(m) } +func (*EventMarketBeyondBankruptcy) ProtoMessage() {} +func (*EventMarketBeyondBankruptcy) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{5} +} +func (m *EventMarketBeyondBankruptcy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventMarketBeyondBankruptcy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventMarketBeyondBankruptcy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventMarketBeyondBankruptcy) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventMarketBeyondBankruptcy.Merge(m, src) +} +func (m *EventMarketBeyondBankruptcy) XXX_Size() int { + return m.Size() +} +func (m *EventMarketBeyondBankruptcy) XXX_DiscardUnknown() { + xxx_messageInfo_EventMarketBeyondBankruptcy.DiscardUnknown(m) +} + +var xxx_messageInfo_EventMarketBeyondBankruptcy proto.InternalMessageInfo + +func (m *EventMarketBeyondBankruptcy) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventMarketBeyondBankruptcy) GetSettlePrice() string { + if m != nil { + return m.SettlePrice + } + return "" +} + +func (m *EventMarketBeyondBankruptcy) GetMissingMarketFunds() string { + if m != nil { + return m.MissingMarketFunds + } + return "" +} + +type EventAllPositionsHaircut struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SettlePrice string `protobuf:"bytes,2,opt,name=settle_price,json=settlePrice,proto3" json:"settle_price,omitempty"` + MissingFundsRate string `protobuf:"bytes,3,opt,name=missing_funds_rate,json=missingFundsRate,proto3" json:"missing_funds_rate,omitempty"` +} + +func (m *EventAllPositionsHaircut) Reset() { *m = EventAllPositionsHaircut{} } +func (m *EventAllPositionsHaircut) String() string { return proto.CompactTextString(m) } +func (*EventAllPositionsHaircut) ProtoMessage() {} +func (*EventAllPositionsHaircut) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{6} +} +func (m *EventAllPositionsHaircut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAllPositionsHaircut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAllPositionsHaircut.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAllPositionsHaircut) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAllPositionsHaircut.Merge(m, src) +} +func (m *EventAllPositionsHaircut) XXX_Size() int { + return m.Size() +} +func (m *EventAllPositionsHaircut) XXX_DiscardUnknown() { + xxx_messageInfo_EventAllPositionsHaircut.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAllPositionsHaircut proto.InternalMessageInfo + +func (m *EventAllPositionsHaircut) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventAllPositionsHaircut) GetSettlePrice() string { + if m != nil { + return m.SettlePrice + } + return "" +} + +func (m *EventAllPositionsHaircut) GetMissingFundsRate() string { + if m != nil { + return m.MissingFundsRate + } + return "" +} + +type EventBinaryOptionsMarketUpdate struct { + Market BinaryOptionsMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` +} + +func (m *EventBinaryOptionsMarketUpdate) Reset() { *m = EventBinaryOptionsMarketUpdate{} } +func (m *EventBinaryOptionsMarketUpdate) String() string { return proto.CompactTextString(m) } +func (*EventBinaryOptionsMarketUpdate) ProtoMessage() {} +func (*EventBinaryOptionsMarketUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{7} +} +func (m *EventBinaryOptionsMarketUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBinaryOptionsMarketUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBinaryOptionsMarketUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBinaryOptionsMarketUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBinaryOptionsMarketUpdate.Merge(m, src) +} +func (m *EventBinaryOptionsMarketUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventBinaryOptionsMarketUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventBinaryOptionsMarketUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBinaryOptionsMarketUpdate proto.InternalMessageInfo + +func (m *EventBinaryOptionsMarketUpdate) GetMarket() BinaryOptionsMarket { + if m != nil { + return m.Market + } + return BinaryOptionsMarket{} +} + +type EventNewSpotOrders struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyOrders []*SpotLimitOrder `protobuf:"bytes,2,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` + SellOrders []*SpotLimitOrder `protobuf:"bytes,3,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` +} + +func (m *EventNewSpotOrders) Reset() { *m = EventNewSpotOrders{} } +func (m *EventNewSpotOrders) String() string { return proto.CompactTextString(m) } +func (*EventNewSpotOrders) ProtoMessage() {} +func (*EventNewSpotOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{8} +} +func (m *EventNewSpotOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventNewSpotOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventNewSpotOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventNewSpotOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventNewSpotOrders.Merge(m, src) +} +func (m *EventNewSpotOrders) XXX_Size() int { + return m.Size() +} +func (m *EventNewSpotOrders) XXX_DiscardUnknown() { + xxx_messageInfo_EventNewSpotOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_EventNewSpotOrders proto.InternalMessageInfo + +func (m *EventNewSpotOrders) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventNewSpotOrders) GetBuyOrders() []*SpotLimitOrder { + if m != nil { + return m.BuyOrders + } + return nil +} + +func (m *EventNewSpotOrders) GetSellOrders() []*SpotLimitOrder { + if m != nil { + return m.SellOrders + } + return nil +} + +type EventNewDerivativeOrders struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyOrders []*DerivativeLimitOrder `protobuf:"bytes,2,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` + SellOrders []*DerivativeLimitOrder `protobuf:"bytes,3,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` +} + +func (m *EventNewDerivativeOrders) Reset() { *m = EventNewDerivativeOrders{} } +func (m *EventNewDerivativeOrders) String() string { return proto.CompactTextString(m) } +func (*EventNewDerivativeOrders) ProtoMessage() {} +func (*EventNewDerivativeOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{9} +} +func (m *EventNewDerivativeOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventNewDerivativeOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventNewDerivativeOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventNewDerivativeOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventNewDerivativeOrders.Merge(m, src) +} +func (m *EventNewDerivativeOrders) XXX_Size() int { + return m.Size() +} +func (m *EventNewDerivativeOrders) XXX_DiscardUnknown() { + xxx_messageInfo_EventNewDerivativeOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_EventNewDerivativeOrders proto.InternalMessageInfo + +func (m *EventNewDerivativeOrders) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventNewDerivativeOrders) GetBuyOrders() []*DerivativeLimitOrder { + if m != nil { + return m.BuyOrders + } + return nil +} + +func (m *EventNewDerivativeOrders) GetSellOrders() []*DerivativeLimitOrder { + if m != nil { + return m.SellOrders + } + return nil +} + +type EventCancelSpotOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *EventCancelSpotOrder) Reset() { *m = EventCancelSpotOrder{} } +func (m *EventCancelSpotOrder) String() string { return proto.CompactTextString(m) } +func (*EventCancelSpotOrder) ProtoMessage() {} +func (*EventCancelSpotOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{10} +} +func (m *EventCancelSpotOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCancelSpotOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCancelSpotOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCancelSpotOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCancelSpotOrder.Merge(m, src) +} +func (m *EventCancelSpotOrder) XXX_Size() int { + return m.Size() +} +func (m *EventCancelSpotOrder) XXX_DiscardUnknown() { + xxx_messageInfo_EventCancelSpotOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCancelSpotOrder proto.InternalMessageInfo + +func (m *EventCancelSpotOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventCancelSpotOrder) GetOrder() SpotLimitOrder { + if m != nil { + return m.Order + } + return SpotLimitOrder{} +} + +type EventSpotMarketUpdate struct { + Market SpotMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` +} + +func (m *EventSpotMarketUpdate) Reset() { *m = EventSpotMarketUpdate{} } +func (m *EventSpotMarketUpdate) String() string { return proto.CompactTextString(m) } +func (*EventSpotMarketUpdate) ProtoMessage() {} +func (*EventSpotMarketUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{11} +} +func (m *EventSpotMarketUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSpotMarketUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSpotMarketUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSpotMarketUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSpotMarketUpdate.Merge(m, src) +} +func (m *EventSpotMarketUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventSpotMarketUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventSpotMarketUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSpotMarketUpdate proto.InternalMessageInfo + +func (m *EventSpotMarketUpdate) GetMarket() SpotMarket { + if m != nil { + return m.Market + } + return SpotMarket{} +} + +type EventPerpetualMarketUpdate struct { + Market DerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` + PerpetualMarketInfo *PerpetualMarketInfo `protobuf:"bytes,2,opt,name=perpetual_market_info,json=perpetualMarketInfo,proto3" json:"perpetual_market_info,omitempty"` + Funding *PerpetualMarketFunding `protobuf:"bytes,3,opt,name=funding,proto3" json:"funding,omitempty"` +} + +func (m *EventPerpetualMarketUpdate) Reset() { *m = EventPerpetualMarketUpdate{} } +func (m *EventPerpetualMarketUpdate) String() string { return proto.CompactTextString(m) } +func (*EventPerpetualMarketUpdate) ProtoMessage() {} +func (*EventPerpetualMarketUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{12} +} +func (m *EventPerpetualMarketUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventPerpetualMarketUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventPerpetualMarketUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventPerpetualMarketUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventPerpetualMarketUpdate.Merge(m, src) +} +func (m *EventPerpetualMarketUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventPerpetualMarketUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventPerpetualMarketUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventPerpetualMarketUpdate proto.InternalMessageInfo + +func (m *EventPerpetualMarketUpdate) GetMarket() DerivativeMarket { + if m != nil { + return m.Market + } + return DerivativeMarket{} +} + +func (m *EventPerpetualMarketUpdate) GetPerpetualMarketInfo() *PerpetualMarketInfo { + if m != nil { + return m.PerpetualMarketInfo + } + return nil +} + +func (m *EventPerpetualMarketUpdate) GetFunding() *PerpetualMarketFunding { + if m != nil { + return m.Funding + } + return nil +} + +type EventExpiryFuturesMarketUpdate struct { + Market DerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` + ExpiryFuturesMarketInfo *ExpiryFuturesMarketInfo `protobuf:"bytes,3,opt,name=expiry_futures_market_info,json=expiryFuturesMarketInfo,proto3" json:"expiry_futures_market_info,omitempty"` +} + +func (m *EventExpiryFuturesMarketUpdate) Reset() { *m = EventExpiryFuturesMarketUpdate{} } +func (m *EventExpiryFuturesMarketUpdate) String() string { return proto.CompactTextString(m) } +func (*EventExpiryFuturesMarketUpdate) ProtoMessage() {} +func (*EventExpiryFuturesMarketUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{13} +} +func (m *EventExpiryFuturesMarketUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventExpiryFuturesMarketUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventExpiryFuturesMarketUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventExpiryFuturesMarketUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventExpiryFuturesMarketUpdate.Merge(m, src) +} +func (m *EventExpiryFuturesMarketUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventExpiryFuturesMarketUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventExpiryFuturesMarketUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventExpiryFuturesMarketUpdate proto.InternalMessageInfo + +func (m *EventExpiryFuturesMarketUpdate) GetMarket() DerivativeMarket { + if m != nil { + return m.Market + } + return DerivativeMarket{} +} + +func (m *EventExpiryFuturesMarketUpdate) GetExpiryFuturesMarketInfo() *ExpiryFuturesMarketInfo { + if m != nil { + return m.ExpiryFuturesMarketInfo + } + return nil +} + +type EventPerpetualMarketFundingUpdate struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Funding PerpetualMarketFunding `protobuf:"bytes,2,opt,name=funding,proto3" json:"funding"` + IsHourlyFunding bool `protobuf:"varint,3,opt,name=is_hourly_funding,json=isHourlyFunding,proto3" json:"is_hourly_funding,omitempty"` + FundingRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate,omitempty"` + MarkPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=mark_price,json=markPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mark_price,omitempty"` +} + +func (m *EventPerpetualMarketFundingUpdate) Reset() { *m = EventPerpetualMarketFundingUpdate{} } +func (m *EventPerpetualMarketFundingUpdate) String() string { return proto.CompactTextString(m) } +func (*EventPerpetualMarketFundingUpdate) ProtoMessage() {} +func (*EventPerpetualMarketFundingUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{14} +} +func (m *EventPerpetualMarketFundingUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventPerpetualMarketFundingUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventPerpetualMarketFundingUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventPerpetualMarketFundingUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventPerpetualMarketFundingUpdate.Merge(m, src) +} +func (m *EventPerpetualMarketFundingUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventPerpetualMarketFundingUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventPerpetualMarketFundingUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventPerpetualMarketFundingUpdate proto.InternalMessageInfo + +func (m *EventPerpetualMarketFundingUpdate) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventPerpetualMarketFundingUpdate) GetFunding() PerpetualMarketFunding { + if m != nil { + return m.Funding + } + return PerpetualMarketFunding{} +} + +func (m *EventPerpetualMarketFundingUpdate) GetIsHourlyFunding() bool { + if m != nil { + return m.IsHourlyFunding + } + return false +} + +type EventSubaccountDeposit struct { + SrcAddress string `protobuf:"bytes,1,opt,name=src_address,json=srcAddress,proto3" json:"src_address,omitempty"` + SubaccountId []byte `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *EventSubaccountDeposit) Reset() { *m = EventSubaccountDeposit{} } +func (m *EventSubaccountDeposit) String() string { return proto.CompactTextString(m) } +func (*EventSubaccountDeposit) ProtoMessage() {} +func (*EventSubaccountDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{15} +} +func (m *EventSubaccountDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSubaccountDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSubaccountDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSubaccountDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSubaccountDeposit.Merge(m, src) +} +func (m *EventSubaccountDeposit) XXX_Size() int { + return m.Size() +} +func (m *EventSubaccountDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_EventSubaccountDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSubaccountDeposit proto.InternalMessageInfo + +func (m *EventSubaccountDeposit) GetSrcAddress() string { + if m != nil { + return m.SrcAddress + } + return "" +} + +func (m *EventSubaccountDeposit) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +func (m *EventSubaccountDeposit) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type EventSubaccountWithdraw struct { + SubaccountId []byte `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + DstAddress string `protobuf:"bytes,2,opt,name=dst_address,json=dstAddress,proto3" json:"dst_address,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *EventSubaccountWithdraw) Reset() { *m = EventSubaccountWithdraw{} } +func (m *EventSubaccountWithdraw) String() string { return proto.CompactTextString(m) } +func (*EventSubaccountWithdraw) ProtoMessage() {} +func (*EventSubaccountWithdraw) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{16} +} +func (m *EventSubaccountWithdraw) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSubaccountWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSubaccountWithdraw.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSubaccountWithdraw) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSubaccountWithdraw.Merge(m, src) +} +func (m *EventSubaccountWithdraw) XXX_Size() int { + return m.Size() +} +func (m *EventSubaccountWithdraw) XXX_DiscardUnknown() { + xxx_messageInfo_EventSubaccountWithdraw.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSubaccountWithdraw proto.InternalMessageInfo + +func (m *EventSubaccountWithdraw) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +func (m *EventSubaccountWithdraw) GetDstAddress() string { + if m != nil { + return m.DstAddress + } + return "" +} + +func (m *EventSubaccountWithdraw) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type EventSubaccountBalanceTransfer struct { + SrcSubaccountId string `protobuf:"bytes,1,opt,name=src_subaccount_id,json=srcSubaccountId,proto3" json:"src_subaccount_id,omitempty"` + DstSubaccountId string `protobuf:"bytes,2,opt,name=dst_subaccount_id,json=dstSubaccountId,proto3" json:"dst_subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *EventSubaccountBalanceTransfer) Reset() { *m = EventSubaccountBalanceTransfer{} } +func (m *EventSubaccountBalanceTransfer) String() string { return proto.CompactTextString(m) } +func (*EventSubaccountBalanceTransfer) ProtoMessage() {} +func (*EventSubaccountBalanceTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{17} +} +func (m *EventSubaccountBalanceTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSubaccountBalanceTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSubaccountBalanceTransfer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSubaccountBalanceTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSubaccountBalanceTransfer.Merge(m, src) +} +func (m *EventSubaccountBalanceTransfer) XXX_Size() int { + return m.Size() +} +func (m *EventSubaccountBalanceTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_EventSubaccountBalanceTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSubaccountBalanceTransfer proto.InternalMessageInfo + +func (m *EventSubaccountBalanceTransfer) GetSrcSubaccountId() string { + if m != nil { + return m.SrcSubaccountId + } + return "" +} + +func (m *EventSubaccountBalanceTransfer) GetDstSubaccountId() string { + if m != nil { + return m.DstSubaccountId + } + return "" +} + +func (m *EventSubaccountBalanceTransfer) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type EventBatchDepositUpdate struct { + DepositUpdates []*DepositUpdate `protobuf:"bytes,1,rep,name=deposit_updates,json=depositUpdates,proto3" json:"deposit_updates,omitempty"` +} + +func (m *EventBatchDepositUpdate) Reset() { *m = EventBatchDepositUpdate{} } +func (m *EventBatchDepositUpdate) String() string { return proto.CompactTextString(m) } +func (*EventBatchDepositUpdate) ProtoMessage() {} +func (*EventBatchDepositUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{18} +} +func (m *EventBatchDepositUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBatchDepositUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBatchDepositUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBatchDepositUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBatchDepositUpdate.Merge(m, src) +} +func (m *EventBatchDepositUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventBatchDepositUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventBatchDepositUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBatchDepositUpdate proto.InternalMessageInfo + +func (m *EventBatchDepositUpdate) GetDepositUpdates() []*DepositUpdate { + if m != nil { + return m.DepositUpdates + } + return nil +} + +type DerivativeMarketOrderCancel struct { + MarketOrder *DerivativeMarketOrder `protobuf:"bytes,1,opt,name=market_order,json=marketOrder,proto3" json:"market_order,omitempty"` + CancelQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=cancel_quantity,json=cancelQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cancel_quantity"` +} + +func (m *DerivativeMarketOrderCancel) Reset() { *m = DerivativeMarketOrderCancel{} } +func (m *DerivativeMarketOrderCancel) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarketOrderCancel) ProtoMessage() {} +func (*DerivativeMarketOrderCancel) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{19} +} +func (m *DerivativeMarketOrderCancel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarketOrderCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarketOrderCancel.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarketOrderCancel) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarketOrderCancel.Merge(m, src) +} +func (m *DerivativeMarketOrderCancel) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarketOrderCancel) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarketOrderCancel.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarketOrderCancel proto.InternalMessageInfo + +func (m *DerivativeMarketOrderCancel) GetMarketOrder() *DerivativeMarketOrder { + if m != nil { + return m.MarketOrder + } + return nil +} + +type EventCancelDerivativeOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsLimitCancel bool `protobuf:"varint,2,opt,name=isLimitCancel,proto3" json:"isLimitCancel,omitempty"` + LimitOrder *DerivativeLimitOrder `protobuf:"bytes,3,opt,name=limit_order,json=limitOrder,proto3" json:"limit_order,omitempty"` + MarketOrderCancel *DerivativeMarketOrderCancel `protobuf:"bytes,4,opt,name=market_order_cancel,json=marketOrderCancel,proto3" json:"market_order_cancel,omitempty"` +} + +func (m *EventCancelDerivativeOrder) Reset() { *m = EventCancelDerivativeOrder{} } +func (m *EventCancelDerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*EventCancelDerivativeOrder) ProtoMessage() {} +func (*EventCancelDerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{20} +} +func (m *EventCancelDerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCancelDerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCancelDerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCancelDerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCancelDerivativeOrder.Merge(m, src) +} +func (m *EventCancelDerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *EventCancelDerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_EventCancelDerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCancelDerivativeOrder proto.InternalMessageInfo + +func (m *EventCancelDerivativeOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventCancelDerivativeOrder) GetIsLimitCancel() bool { + if m != nil { + return m.IsLimitCancel + } + return false +} + +func (m *EventCancelDerivativeOrder) GetLimitOrder() *DerivativeLimitOrder { + if m != nil { + return m.LimitOrder + } + return nil +} + +func (m *EventCancelDerivativeOrder) GetMarketOrderCancel() *DerivativeMarketOrderCancel { + if m != nil { + return m.MarketOrderCancel + } + return nil +} + +type EventFeeDiscountSchedule struct { + Schedule *FeeDiscountSchedule `protobuf:"bytes,1,opt,name=schedule,proto3" json:"schedule,omitempty"` +} + +func (m *EventFeeDiscountSchedule) Reset() { *m = EventFeeDiscountSchedule{} } +func (m *EventFeeDiscountSchedule) String() string { return proto.CompactTextString(m) } +func (*EventFeeDiscountSchedule) ProtoMessage() {} +func (*EventFeeDiscountSchedule) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{21} +} +func (m *EventFeeDiscountSchedule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventFeeDiscountSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventFeeDiscountSchedule.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventFeeDiscountSchedule) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventFeeDiscountSchedule.Merge(m, src) +} +func (m *EventFeeDiscountSchedule) XXX_Size() int { + return m.Size() +} +func (m *EventFeeDiscountSchedule) XXX_DiscardUnknown() { + xxx_messageInfo_EventFeeDiscountSchedule.DiscardUnknown(m) +} + +var xxx_messageInfo_EventFeeDiscountSchedule proto.InternalMessageInfo + +func (m *EventFeeDiscountSchedule) GetSchedule() *FeeDiscountSchedule { + if m != nil { + return m.Schedule + } + return nil +} + +type EventTradingRewardCampaignUpdate struct { + CampaignInfo *TradingRewardCampaignInfo `protobuf:"bytes,1,opt,name=campaign_info,json=campaignInfo,proto3" json:"campaign_info,omitempty"` + CampaignRewardPools []*CampaignRewardPool `protobuf:"bytes,2,rep,name=campaign_reward_pools,json=campaignRewardPools,proto3" json:"campaign_reward_pools,omitempty"` +} + +func (m *EventTradingRewardCampaignUpdate) Reset() { *m = EventTradingRewardCampaignUpdate{} } +func (m *EventTradingRewardCampaignUpdate) String() string { return proto.CompactTextString(m) } +func (*EventTradingRewardCampaignUpdate) ProtoMessage() {} +func (*EventTradingRewardCampaignUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{22} +} +func (m *EventTradingRewardCampaignUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTradingRewardCampaignUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTradingRewardCampaignUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTradingRewardCampaignUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTradingRewardCampaignUpdate.Merge(m, src) +} +func (m *EventTradingRewardCampaignUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventTradingRewardCampaignUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventTradingRewardCampaignUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTradingRewardCampaignUpdate proto.InternalMessageInfo + +func (m *EventTradingRewardCampaignUpdate) GetCampaignInfo() *TradingRewardCampaignInfo { + if m != nil { + return m.CampaignInfo + } + return nil +} + +func (m *EventTradingRewardCampaignUpdate) GetCampaignRewardPools() []*CampaignRewardPool { + if m != nil { + return m.CampaignRewardPools + } + return nil +} + +type EventTradingRewardDistribution struct { + AccountRewards []*AccountRewards `protobuf:"bytes,1,rep,name=account_rewards,json=accountRewards,proto3" json:"account_rewards,omitempty"` +} + +func (m *EventTradingRewardDistribution) Reset() { *m = EventTradingRewardDistribution{} } +func (m *EventTradingRewardDistribution) String() string { return proto.CompactTextString(m) } +func (*EventTradingRewardDistribution) ProtoMessage() {} +func (*EventTradingRewardDistribution) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{23} +} +func (m *EventTradingRewardDistribution) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTradingRewardDistribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTradingRewardDistribution.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTradingRewardDistribution) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTradingRewardDistribution.Merge(m, src) +} +func (m *EventTradingRewardDistribution) XXX_Size() int { + return m.Size() +} +func (m *EventTradingRewardDistribution) XXX_DiscardUnknown() { + xxx_messageInfo_EventTradingRewardDistribution.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTradingRewardDistribution proto.InternalMessageInfo + +func (m *EventTradingRewardDistribution) GetAccountRewards() []*AccountRewards { + if m != nil { + return m.AccountRewards + } + return nil +} + +type EventNewConditionalDerivativeOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order *DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"` + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` + IsMarket bool `protobuf:"varint,4,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` +} + +func (m *EventNewConditionalDerivativeOrder) Reset() { *m = EventNewConditionalDerivativeOrder{} } +func (m *EventNewConditionalDerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*EventNewConditionalDerivativeOrder) ProtoMessage() {} +func (*EventNewConditionalDerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{24} +} +func (m *EventNewConditionalDerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventNewConditionalDerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventNewConditionalDerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventNewConditionalDerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventNewConditionalDerivativeOrder.Merge(m, src) +} +func (m *EventNewConditionalDerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *EventNewConditionalDerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_EventNewConditionalDerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_EventNewConditionalDerivativeOrder proto.InternalMessageInfo + +func (m *EventNewConditionalDerivativeOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventNewConditionalDerivativeOrder) GetOrder() *DerivativeOrder { + if m != nil { + return m.Order + } + return nil +} + +func (m *EventNewConditionalDerivativeOrder) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *EventNewConditionalDerivativeOrder) GetIsMarket() bool { + if m != nil { + return m.IsMarket + } + return false +} + +type EventCancelConditionalDerivativeOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsLimitCancel bool `protobuf:"varint,2,opt,name=isLimitCancel,proto3" json:"isLimitCancel,omitempty"` + LimitOrder *DerivativeLimitOrder `protobuf:"bytes,3,opt,name=limit_order,json=limitOrder,proto3" json:"limit_order,omitempty"` + MarketOrder *DerivativeMarketOrder `protobuf:"bytes,4,opt,name=market_order,json=marketOrder,proto3" json:"market_order,omitempty"` +} + +func (m *EventCancelConditionalDerivativeOrder) Reset() { *m = EventCancelConditionalDerivativeOrder{} } +func (m *EventCancelConditionalDerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*EventCancelConditionalDerivativeOrder) ProtoMessage() {} +func (*EventCancelConditionalDerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{25} +} +func (m *EventCancelConditionalDerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCancelConditionalDerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCancelConditionalDerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCancelConditionalDerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCancelConditionalDerivativeOrder.Merge(m, src) +} +func (m *EventCancelConditionalDerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *EventCancelConditionalDerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_EventCancelConditionalDerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCancelConditionalDerivativeOrder proto.InternalMessageInfo + +func (m *EventCancelConditionalDerivativeOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventCancelConditionalDerivativeOrder) GetIsLimitCancel() bool { + if m != nil { + return m.IsLimitCancel + } + return false +} + +func (m *EventCancelConditionalDerivativeOrder) GetLimitOrder() *DerivativeLimitOrder { + if m != nil { + return m.LimitOrder + } + return nil +} + +func (m *EventCancelConditionalDerivativeOrder) GetMarketOrder() *DerivativeMarketOrder { + if m != nil { + return m.MarketOrder + } + return nil +} + +type EventConditionalDerivativeOrderTrigger struct { + MarketId []byte `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsLimitTrigger bool `protobuf:"varint,2,opt,name=isLimitTrigger,proto3" json:"isLimitTrigger,omitempty"` + TriggeredOrderHash []byte `protobuf:"bytes,3,opt,name=triggered_order_hash,json=triggeredOrderHash,proto3" json:"triggered_order_hash,omitempty"` + PlacedOrderHash []byte `protobuf:"bytes,4,opt,name=placed_order_hash,json=placedOrderHash,proto3" json:"placed_order_hash,omitempty"` + TriggeredOrderCid string `protobuf:"bytes,5,opt,name=triggered_order_cid,json=triggeredOrderCid,proto3" json:"triggered_order_cid,omitempty"` +} + +func (m *EventConditionalDerivativeOrderTrigger) Reset() { + *m = EventConditionalDerivativeOrderTrigger{} +} +func (m *EventConditionalDerivativeOrderTrigger) String() string { return proto.CompactTextString(m) } +func (*EventConditionalDerivativeOrderTrigger) ProtoMessage() {} +func (*EventConditionalDerivativeOrderTrigger) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{26} +} +func (m *EventConditionalDerivativeOrderTrigger) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventConditionalDerivativeOrderTrigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventConditionalDerivativeOrderTrigger.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventConditionalDerivativeOrderTrigger) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConditionalDerivativeOrderTrigger.Merge(m, src) +} +func (m *EventConditionalDerivativeOrderTrigger) XXX_Size() int { + return m.Size() +} +func (m *EventConditionalDerivativeOrderTrigger) XXX_DiscardUnknown() { + xxx_messageInfo_EventConditionalDerivativeOrderTrigger.DiscardUnknown(m) +} + +var xxx_messageInfo_EventConditionalDerivativeOrderTrigger proto.InternalMessageInfo + +func (m *EventConditionalDerivativeOrderTrigger) GetMarketId() []byte { + if m != nil { + return m.MarketId + } + return nil +} + +func (m *EventConditionalDerivativeOrderTrigger) GetIsLimitTrigger() bool { + if m != nil { + return m.IsLimitTrigger + } + return false +} + +func (m *EventConditionalDerivativeOrderTrigger) GetTriggeredOrderHash() []byte { + if m != nil { + return m.TriggeredOrderHash + } + return nil +} + +func (m *EventConditionalDerivativeOrderTrigger) GetPlacedOrderHash() []byte { + if m != nil { + return m.PlacedOrderHash + } + return nil +} + +func (m *EventConditionalDerivativeOrderTrigger) GetTriggeredOrderCid() string { + if m != nil { + return m.TriggeredOrderCid + } + return "" +} + +type EventOrderFail struct { + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Hashes [][]byte `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"` + Flags []uint32 `protobuf:"varint,3,rep,packed,name=flags,proto3" json:"flags,omitempty"` + Cids []string `protobuf:"bytes,4,rep,name=cids,proto3" json:"cids,omitempty"` +} + +func (m *EventOrderFail) Reset() { *m = EventOrderFail{} } +func (m *EventOrderFail) String() string { return proto.CompactTextString(m) } +func (*EventOrderFail) ProtoMessage() {} +func (*EventOrderFail) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{27} +} +func (m *EventOrderFail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOrderFail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOrderFail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventOrderFail) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOrderFail.Merge(m, src) +} +func (m *EventOrderFail) XXX_Size() int { + return m.Size() +} +func (m *EventOrderFail) XXX_DiscardUnknown() { + xxx_messageInfo_EventOrderFail.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOrderFail proto.InternalMessageInfo + +func (m *EventOrderFail) GetAccount() []byte { + if m != nil { + return m.Account + } + return nil +} + +func (m *EventOrderFail) GetHashes() [][]byte { + if m != nil { + return m.Hashes + } + return nil +} + +func (m *EventOrderFail) GetFlags() []uint32 { + if m != nil { + return m.Flags + } + return nil +} + +func (m *EventOrderFail) GetCids() []string { + if m != nil { + return m.Cids + } + return nil +} + +type EventAtomicMarketOrderFeeMultipliersUpdated struct { + MarketFeeMultipliers []*MarketFeeMultiplier `protobuf:"bytes,1,rep,name=market_fee_multipliers,json=marketFeeMultipliers,proto3" json:"market_fee_multipliers,omitempty"` +} + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) Reset() { + *m = EventAtomicMarketOrderFeeMultipliersUpdated{} +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) String() string { + return proto.CompactTextString(m) +} +func (*EventAtomicMarketOrderFeeMultipliersUpdated) ProtoMessage() {} +func (*EventAtomicMarketOrderFeeMultipliersUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{28} +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAtomicMarketOrderFeeMultipliersUpdated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAtomicMarketOrderFeeMultipliersUpdated.Merge(m, src) +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventAtomicMarketOrderFeeMultipliersUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAtomicMarketOrderFeeMultipliersUpdated proto.InternalMessageInfo + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) GetMarketFeeMultipliers() []*MarketFeeMultiplier { + if m != nil { + return m.MarketFeeMultipliers + } + return nil +} + +type EventOrderbookUpdate struct { + SpotUpdates []*OrderbookUpdate `protobuf:"bytes,1,rep,name=spot_updates,json=spotUpdates,proto3" json:"spot_updates,omitempty"` + DerivativeUpdates []*OrderbookUpdate `protobuf:"bytes,2,rep,name=derivative_updates,json=derivativeUpdates,proto3" json:"derivative_updates,omitempty"` +} + +func (m *EventOrderbookUpdate) Reset() { *m = EventOrderbookUpdate{} } +func (m *EventOrderbookUpdate) String() string { return proto.CompactTextString(m) } +func (*EventOrderbookUpdate) ProtoMessage() {} +func (*EventOrderbookUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{29} +} +func (m *EventOrderbookUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOrderbookUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOrderbookUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventOrderbookUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOrderbookUpdate.Merge(m, src) +} +func (m *EventOrderbookUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventOrderbookUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventOrderbookUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOrderbookUpdate proto.InternalMessageInfo + +func (m *EventOrderbookUpdate) GetSpotUpdates() []*OrderbookUpdate { + if m != nil { + return m.SpotUpdates + } + return nil +} + +func (m *EventOrderbookUpdate) GetDerivativeUpdates() []*OrderbookUpdate { + if m != nil { + return m.DerivativeUpdates + } + return nil +} + +type OrderbookUpdate struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + Orderbook *Orderbook `protobuf:"bytes,2,opt,name=orderbook,proto3" json:"orderbook,omitempty"` +} + +func (m *OrderbookUpdate) Reset() { *m = OrderbookUpdate{} } +func (m *OrderbookUpdate) String() string { return proto.CompactTextString(m) } +func (*OrderbookUpdate) ProtoMessage() {} +func (*OrderbookUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{30} +} +func (m *OrderbookUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderbookUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderbookUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderbookUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderbookUpdate.Merge(m, src) +} +func (m *OrderbookUpdate) XXX_Size() int { + return m.Size() +} +func (m *OrderbookUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_OrderbookUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderbookUpdate proto.InternalMessageInfo + +func (m *OrderbookUpdate) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *OrderbookUpdate) GetOrderbook() *Orderbook { + if m != nil { + return m.Orderbook + } + return nil +} + +type Orderbook struct { + MarketId []byte `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyLevels []*Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + SellLevels []*Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` +} + +func (m *Orderbook) Reset() { *m = Orderbook{} } +func (m *Orderbook) String() string { return proto.CompactTextString(m) } +func (*Orderbook) ProtoMessage() {} +func (*Orderbook) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{31} +} +func (m *Orderbook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Orderbook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Orderbook.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Orderbook) XXX_Merge(src proto.Message) { + xxx_messageInfo_Orderbook.Merge(m, src) +} +func (m *Orderbook) XXX_Size() int { + return m.Size() +} +func (m *Orderbook) XXX_DiscardUnknown() { + xxx_messageInfo_Orderbook.DiscardUnknown(m) +} + +var xxx_messageInfo_Orderbook proto.InternalMessageInfo + +func (m *Orderbook) GetMarketId() []byte { + if m != nil { + return m.MarketId + } + return nil +} + +func (m *Orderbook) GetBuyLevels() []*Level { + if m != nil { + return m.BuyLevels + } + return nil +} + +func (m *Orderbook) GetSellLevels() []*Level { + if m != nil { + return m.SellLevels + } + return nil +} + +type EventGrantAuthorizations struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grants []*GrantAuthorization `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"` +} + +func (m *EventGrantAuthorizations) Reset() { *m = EventGrantAuthorizations{} } +func (m *EventGrantAuthorizations) String() string { return proto.CompactTextString(m) } +func (*EventGrantAuthorizations) ProtoMessage() {} +func (*EventGrantAuthorizations) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{32} +} +func (m *EventGrantAuthorizations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGrantAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGrantAuthorizations.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventGrantAuthorizations) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGrantAuthorizations.Merge(m, src) +} +func (m *EventGrantAuthorizations) XXX_Size() int { + return m.Size() +} +func (m *EventGrantAuthorizations) XXX_DiscardUnknown() { + xxx_messageInfo_EventGrantAuthorizations.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGrantAuthorizations proto.InternalMessageInfo + +func (m *EventGrantAuthorizations) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *EventGrantAuthorizations) GetGrants() []*GrantAuthorization { + if m != nil { + return m.Grants + } + return nil +} + +type EventGrantActivation struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Granter string `protobuf:"bytes,2,opt,name=granter,proto3" json:"granter,omitempty"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` +} + +func (m *EventGrantActivation) Reset() { *m = EventGrantActivation{} } +func (m *EventGrantActivation) String() string { return proto.CompactTextString(m) } +func (*EventGrantActivation) ProtoMessage() {} +func (*EventGrantActivation) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{33} +} +func (m *EventGrantActivation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGrantActivation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGrantActivation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventGrantActivation) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGrantActivation.Merge(m, src) +} +func (m *EventGrantActivation) XXX_Size() int { + return m.Size() +} +func (m *EventGrantActivation) XXX_DiscardUnknown() { + xxx_messageInfo_EventGrantActivation.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGrantActivation proto.InternalMessageInfo + +func (m *EventGrantActivation) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *EventGrantActivation) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +type EventInvalidGrant struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Granter string `protobuf:"bytes,2,opt,name=granter,proto3" json:"granter,omitempty"` +} + +func (m *EventInvalidGrant) Reset() { *m = EventInvalidGrant{} } +func (m *EventInvalidGrant) String() string { return proto.CompactTextString(m) } +func (*EventInvalidGrant) ProtoMessage() {} +func (*EventInvalidGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{34} +} +func (m *EventInvalidGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventInvalidGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventInvalidGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventInvalidGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventInvalidGrant.Merge(m, src) +} +func (m *EventInvalidGrant) XXX_Size() int { + return m.Size() +} +func (m *EventInvalidGrant) XXX_DiscardUnknown() { + xxx_messageInfo_EventInvalidGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_EventInvalidGrant proto.InternalMessageInfo + +func (m *EventInvalidGrant) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *EventInvalidGrant) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +type EventOrderCancelFail struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,4,opt,name=cid,proto3" json:"cid,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *EventOrderCancelFail) Reset() { *m = EventOrderCancelFail{} } +func (m *EventOrderCancelFail) String() string { return proto.CompactTextString(m) } +func (*EventOrderCancelFail) ProtoMessage() {} +func (*EventOrderCancelFail) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{35} +} +func (m *EventOrderCancelFail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOrderCancelFail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOrderCancelFail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventOrderCancelFail) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOrderCancelFail.Merge(m, src) +} +func (m *EventOrderCancelFail) XXX_Size() int { + return m.Size() +} +func (m *EventOrderCancelFail) XXX_DiscardUnknown() { + xxx_messageInfo_EventOrderCancelFail.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOrderCancelFail proto.InternalMessageInfo + +func (m *EventOrderCancelFail) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventOrderCancelFail) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *EventOrderCancelFail) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *EventOrderCancelFail) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *EventOrderCancelFail) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type EventDerivativeOrdersV2Migration struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyOrderChanges []*DerivativeOrderV2Changes `protobuf:"bytes,2,rep,name=buy_order_changes,json=buyOrderChanges,proto3" json:"buy_order_changes,omitempty"` + SellOrderChanges []*DerivativeOrderV2Changes `protobuf:"bytes,3,rep,name=sell_order_changes,json=sellOrderChanges,proto3" json:"sell_order_changes,omitempty"` +} + +func (m *EventDerivativeOrdersV2Migration) Reset() { *m = EventDerivativeOrdersV2Migration{} } +func (m *EventDerivativeOrdersV2Migration) String() string { return proto.CompactTextString(m) } +func (*EventDerivativeOrdersV2Migration) ProtoMessage() {} +func (*EventDerivativeOrdersV2Migration) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{36} +} +func (m *EventDerivativeOrdersV2Migration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDerivativeOrdersV2Migration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDerivativeOrdersV2Migration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDerivativeOrdersV2Migration) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDerivativeOrdersV2Migration.Merge(m, src) +} +func (m *EventDerivativeOrdersV2Migration) XXX_Size() int { + return m.Size() +} +func (m *EventDerivativeOrdersV2Migration) XXX_DiscardUnknown() { + xxx_messageInfo_EventDerivativeOrdersV2Migration.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDerivativeOrdersV2Migration proto.InternalMessageInfo + +func (m *EventDerivativeOrdersV2Migration) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventDerivativeOrdersV2Migration) GetBuyOrderChanges() []*DerivativeOrderV2Changes { + if m != nil { + return m.BuyOrderChanges + } + return nil +} + +func (m *EventDerivativeOrdersV2Migration) GetSellOrderChanges() []*DerivativeOrderV2Changes { + if m != nil { + return m.SellOrderChanges + } + return nil +} + +type DerivativeOrderV2Changes struct { + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // price of the order + P cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=p,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p"` + // quantity of the order + Q cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=q,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"q"` + // margin of the order + M cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=m,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"m"` + // the amount of the quantity remaining fillable + F cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=f,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"f"` + // trigger price of the order + Tp *cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=tp,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"tp,omitempty"` +} + +func (m *DerivativeOrderV2Changes) Reset() { *m = DerivativeOrderV2Changes{} } +func (m *DerivativeOrderV2Changes) String() string { return proto.CompactTextString(m) } +func (*DerivativeOrderV2Changes) ProtoMessage() {} +func (*DerivativeOrderV2Changes) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{37} +} +func (m *DerivativeOrderV2Changes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeOrderV2Changes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeOrderV2Changes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeOrderV2Changes) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeOrderV2Changes.Merge(m, src) +} +func (m *DerivativeOrderV2Changes) XXX_Size() int { + return m.Size() +} +func (m *DerivativeOrderV2Changes) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeOrderV2Changes.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeOrderV2Changes proto.InternalMessageInfo + +func (m *DerivativeOrderV2Changes) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *DerivativeOrderV2Changes) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +type EventSpotOrdersV2Migration struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyOrderChanges []*SpotOrderV2Changes `protobuf:"bytes,2,rep,name=buy_order_changes,json=buyOrderChanges,proto3" json:"buy_order_changes,omitempty"` + SellOrderChanges []*SpotOrderV2Changes `protobuf:"bytes,3,rep,name=sell_order_changes,json=sellOrderChanges,proto3" json:"sell_order_changes,omitempty"` +} + +func (m *EventSpotOrdersV2Migration) Reset() { *m = EventSpotOrdersV2Migration{} } +func (m *EventSpotOrdersV2Migration) String() string { return proto.CompactTextString(m) } +func (*EventSpotOrdersV2Migration) ProtoMessage() {} +func (*EventSpotOrdersV2Migration) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{38} +} +func (m *EventSpotOrdersV2Migration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSpotOrdersV2Migration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSpotOrdersV2Migration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSpotOrdersV2Migration) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSpotOrdersV2Migration.Merge(m, src) +} +func (m *EventSpotOrdersV2Migration) XXX_Size() int { + return m.Size() +} +func (m *EventSpotOrdersV2Migration) XXX_DiscardUnknown() { + xxx_messageInfo_EventSpotOrdersV2Migration.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSpotOrdersV2Migration proto.InternalMessageInfo + +func (m *EventSpotOrdersV2Migration) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventSpotOrdersV2Migration) GetBuyOrderChanges() []*SpotOrderV2Changes { + if m != nil { + return m.BuyOrderChanges + } + return nil +} + +func (m *EventSpotOrdersV2Migration) GetSellOrderChanges() []*SpotOrderV2Changes { + if m != nil { + return m.SellOrderChanges + } + return nil +} + +type SpotOrderV2Changes struct { + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // price of the order + P cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=p,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p"` + // quantity of the order + Q cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=q,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"q"` + // the amount of the quantity remaining fillable + F cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=f,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"f"` + // trigger_price is the trigger price used by stop/take orders + Tp *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=tp,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"tp,omitempty"` +} + +func (m *SpotOrderV2Changes) Reset() { *m = SpotOrderV2Changes{} } +func (m *SpotOrderV2Changes) String() string { return proto.CompactTextString(m) } +func (*SpotOrderV2Changes) ProtoMessage() {} +func (*SpotOrderV2Changes) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{39} +} +func (m *SpotOrderV2Changes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotOrderV2Changes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotOrderV2Changes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotOrderV2Changes) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotOrderV2Changes.Merge(m, src) +} +func (m *SpotOrderV2Changes) XXX_Size() int { + return m.Size() +} +func (m *SpotOrderV2Changes) XXX_DiscardUnknown() { + xxx_messageInfo_SpotOrderV2Changes.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotOrderV2Changes proto.InternalMessageInfo + +func (m *SpotOrderV2Changes) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *SpotOrderV2Changes) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +type EventDerivativePositionV2Migration struct { + Position *DerivativePosition `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` +} + +func (m *EventDerivativePositionV2Migration) Reset() { *m = EventDerivativePositionV2Migration{} } +func (m *EventDerivativePositionV2Migration) String() string { return proto.CompactTextString(m) } +func (*EventDerivativePositionV2Migration) ProtoMessage() {} +func (*EventDerivativePositionV2Migration) Descriptor() ([]byte, []int) { + return fileDescriptor_8ac8f3da550fa1c4, []int{40} +} +func (m *EventDerivativePositionV2Migration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDerivativePositionV2Migration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDerivativePositionV2Migration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDerivativePositionV2Migration) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDerivativePositionV2Migration.Merge(m, src) +} +func (m *EventDerivativePositionV2Migration) XXX_Size() int { + return m.Size() +} +func (m *EventDerivativePositionV2Migration) XXX_DiscardUnknown() { + xxx_messageInfo_EventDerivativePositionV2Migration.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDerivativePositionV2Migration proto.InternalMessageInfo + +func (m *EventDerivativePositionV2Migration) GetPosition() *DerivativePosition { + if m != nil { + return m.Position + } + return nil +} + +func init() { + proto.RegisterType((*EventBatchSpotExecution)(nil), "injective.exchange.v2.EventBatchSpotExecution") + proto.RegisterType((*EventBatchDerivativeExecution)(nil), "injective.exchange.v2.EventBatchDerivativeExecution") + proto.RegisterType((*EventLostFundsFromLiquidation)(nil), "injective.exchange.v2.EventLostFundsFromLiquidation") + proto.RegisterType((*EventBatchDerivativePosition)(nil), "injective.exchange.v2.EventBatchDerivativePosition") + proto.RegisterType((*EventDerivativeMarketPaused)(nil), "injective.exchange.v2.EventDerivativeMarketPaused") + proto.RegisterType((*EventMarketBeyondBankruptcy)(nil), "injective.exchange.v2.EventMarketBeyondBankruptcy") + proto.RegisterType((*EventAllPositionsHaircut)(nil), "injective.exchange.v2.EventAllPositionsHaircut") + proto.RegisterType((*EventBinaryOptionsMarketUpdate)(nil), "injective.exchange.v2.EventBinaryOptionsMarketUpdate") + proto.RegisterType((*EventNewSpotOrders)(nil), "injective.exchange.v2.EventNewSpotOrders") + proto.RegisterType((*EventNewDerivativeOrders)(nil), "injective.exchange.v2.EventNewDerivativeOrders") + proto.RegisterType((*EventCancelSpotOrder)(nil), "injective.exchange.v2.EventCancelSpotOrder") + proto.RegisterType((*EventSpotMarketUpdate)(nil), "injective.exchange.v2.EventSpotMarketUpdate") + proto.RegisterType((*EventPerpetualMarketUpdate)(nil), "injective.exchange.v2.EventPerpetualMarketUpdate") + proto.RegisterType((*EventExpiryFuturesMarketUpdate)(nil), "injective.exchange.v2.EventExpiryFuturesMarketUpdate") + proto.RegisterType((*EventPerpetualMarketFundingUpdate)(nil), "injective.exchange.v2.EventPerpetualMarketFundingUpdate") + proto.RegisterType((*EventSubaccountDeposit)(nil), "injective.exchange.v2.EventSubaccountDeposit") + proto.RegisterType((*EventSubaccountWithdraw)(nil), "injective.exchange.v2.EventSubaccountWithdraw") + proto.RegisterType((*EventSubaccountBalanceTransfer)(nil), "injective.exchange.v2.EventSubaccountBalanceTransfer") + proto.RegisterType((*EventBatchDepositUpdate)(nil), "injective.exchange.v2.EventBatchDepositUpdate") + proto.RegisterType((*DerivativeMarketOrderCancel)(nil), "injective.exchange.v2.DerivativeMarketOrderCancel") + proto.RegisterType((*EventCancelDerivativeOrder)(nil), "injective.exchange.v2.EventCancelDerivativeOrder") + proto.RegisterType((*EventFeeDiscountSchedule)(nil), "injective.exchange.v2.EventFeeDiscountSchedule") + proto.RegisterType((*EventTradingRewardCampaignUpdate)(nil), "injective.exchange.v2.EventTradingRewardCampaignUpdate") + proto.RegisterType((*EventTradingRewardDistribution)(nil), "injective.exchange.v2.EventTradingRewardDistribution") + proto.RegisterType((*EventNewConditionalDerivativeOrder)(nil), "injective.exchange.v2.EventNewConditionalDerivativeOrder") + proto.RegisterType((*EventCancelConditionalDerivativeOrder)(nil), "injective.exchange.v2.EventCancelConditionalDerivativeOrder") + proto.RegisterType((*EventConditionalDerivativeOrderTrigger)(nil), "injective.exchange.v2.EventConditionalDerivativeOrderTrigger") + proto.RegisterType((*EventOrderFail)(nil), "injective.exchange.v2.EventOrderFail") + proto.RegisterType((*EventAtomicMarketOrderFeeMultipliersUpdated)(nil), "injective.exchange.v2.EventAtomicMarketOrderFeeMultipliersUpdated") + proto.RegisterType((*EventOrderbookUpdate)(nil), "injective.exchange.v2.EventOrderbookUpdate") + proto.RegisterType((*OrderbookUpdate)(nil), "injective.exchange.v2.OrderbookUpdate") + proto.RegisterType((*Orderbook)(nil), "injective.exchange.v2.Orderbook") + proto.RegisterType((*EventGrantAuthorizations)(nil), "injective.exchange.v2.EventGrantAuthorizations") + proto.RegisterType((*EventGrantActivation)(nil), "injective.exchange.v2.EventGrantActivation") + proto.RegisterType((*EventInvalidGrant)(nil), "injective.exchange.v2.EventInvalidGrant") + proto.RegisterType((*EventOrderCancelFail)(nil), "injective.exchange.v2.EventOrderCancelFail") + proto.RegisterType((*EventDerivativeOrdersV2Migration)(nil), "injective.exchange.v2.EventDerivativeOrdersV2Migration") + proto.RegisterType((*DerivativeOrderV2Changes)(nil), "injective.exchange.v2.DerivativeOrderV2Changes") + proto.RegisterType((*EventSpotOrdersV2Migration)(nil), "injective.exchange.v2.EventSpotOrdersV2Migration") + proto.RegisterType((*SpotOrderV2Changes)(nil), "injective.exchange.v2.SpotOrderV2Changes") + proto.RegisterType((*EventDerivativePositionV2Migration)(nil), "injective.exchange.v2.EventDerivativePositionV2Migration") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/events.proto", fileDescriptor_8ac8f3da550fa1c4) +} + +var fileDescriptor_8ac8f3da550fa1c4 = []byte{ + // 2298 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 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, 0x9a, 0x1e, 0x2c, 0xca, 0xc9, 0xcb, 0x81, 0x5d, 0x4c, 0x3d, 0x54, 0x85, 0xe7, 0x74, 0xb0, + 0xeb, 0x29, 0xa6, 0xaf, 0xe8, 0x79, 0x98, 0x13, 0xa6, 0x89, 0xda, 0xb6, 0x0b, 0x96, 0x7e, 0x43, + 0x17, 0xe1, 0xec, 0x91, 0x87, 0x9b, 0xaa, 0xa3, 0x3a, 0x67, 0xa9, 0x17, 0x11, 0xa0, 0x0e, 0x75, + 0xd5, 0xfd, 0x62, 0xd9, 0x92, 0xcf, 0xe6, 0xa7, 0x06, 0xbc, 0xae, 0x1a, 0x78, 0x1e, 0xfa, 0xd4, + 0x29, 0xac, 0xcc, 0x2e, 0x21, 0x07, 0x89, 0xc7, 0x69, 0xe4, 0x51, 0x12, 0x33, 0x95, 0x8d, 0x5c, + 0xf4, 0x53, 0x78, 0x3e, 0xbd, 0x1a, 0x20, 0xc4, 0xf6, 0x73, 0x01, 0xbd, 0x7b, 0x87, 0x65, 0x42, + 0x5d, 0x5c, 0x16, 0x31, 0xad, 0x8b, 0x7e, 0xff, 0x20, 0x33, 0xff, 0x68, 0xe8, 0x36, 0x4e, 0x7a, + 0xd1, 0x08, 0xc3, 0x63, 0x9d, 0x09, 0xf7, 0x60, 0x81, 0x45, 0x61, 0xef, 0x19, 0x3e, 0x6c, 0x93, + 0xf6, 0x68, 0x5b, 0x15, 0xa1, 0xab, 0x8f, 0x70, 0xf4, 0x10, 0x90, 0x9b, 0x05, 0x54, 0x06, 0x58, + 0x9a, 0x0a, 0x70, 0x39, 0x47, 0x48, 0x2b, 0x03, 0x07, 0x96, 0x7a, 0x9d, 0x3e, 0x0f, 0x33, 0x8c, + 0x9c, 0xc8, 0x75, 0x9b, 0xb5, 0xc4, 0x23, 0xfa, 0x01, 0x94, 0xc3, 0x54, 0x48, 0x27, 0x9a, 0xb5, + 0x71, 0x26, 0xad, 0x5c, 0xc5, 0xfc, 0xad, 0x01, 0xe5, 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, 0x7f, 0x72, 0x74, 0x17, 0x34, 0xfe, 0x6f, 0x5e, 0xf6, 0x13, 0x28, 0x53, 0xdd, 0x3c, + 0xfe, 0xe2, 0xc9, 0xaa, 0xf1, 0xe5, 0x93, 0x55, 0xe3, 0x9f, 0x4f, 0x56, 0x8d, 0x5f, 0x3e, 0x5d, + 0x3d, 0xf3, 0xe5, 0xd3, 0xd5, 0x33, 0x5f, 0x3d, 0x5d, 0x3d, 0xf3, 0xe3, 0xf7, 0x9b, 0x94, 0xb7, + 0x92, 0x46, 0xcd, 0x09, 0xfd, 0xfa, 0x5e, 0x0a, 0xbc, 0x8f, 0x1b, 0xac, 0x9e, 0x99, 0x79, 0xd3, + 0x09, 0x63, 0x52, 0x7c, 0x6d, 0x61, 0x1a, 0xd4, 0xfd, 0x50, 0x34, 0x74, 0x2c, 0xff, 0xef, 0xcc, + 0x3b, 0x11, 0x61, 0xf5, 0xf6, 0x7a, 0x63, 0x4e, 0xfe, 0x78, 0x7e, 0xfb, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x0a, 0x61, 0xf5, 0xf5, 0x7f, 0x1f, 0x00, 0x00, +} + +func (m *EventBatchSpotExecution) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBatchSpotExecution) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBatchSpotExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Trades) > 0 { + for iNdEx := len(m.Trades) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Trades[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.ExecutionType != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.ExecutionType)) + i-- + dAtA[i] = 0x18 + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBatchDerivativeExecution) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBatchDerivativeExecution) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBatchDerivativeExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Trades) > 0 { + for iNdEx := len(m.Trades) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Trades[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.ExecutionType != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.ExecutionType)) + i-- + dAtA[i] = 0x28 + } + if m.CumulativeFunding != nil { + { + size := m.CumulativeFunding.Size() + i -= size + if _, err := m.CumulativeFunding.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.IsLiquidation { + i-- + if m.IsLiquidation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventLostFundsFromLiquidation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventLostFundsFromLiquidation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventLostFundsFromLiquidation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.LostFundsFromOrderCancels.Size() + i -= size + if _, err := m.LostFundsFromOrderCancels.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.LostFundsFromAvailableDuringPayout.Size() + i -= size + if _, err := m.LostFundsFromAvailableDuringPayout.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBatchDerivativePosition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBatchDerivativePosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBatchDerivativePosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Positions) > 0 { + for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDerivativeMarketPaused) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDerivativeMarketPaused) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDerivativeMarketPaused) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MissingFundsRate) > 0 { + i -= len(m.MissingFundsRate) + copy(dAtA[i:], m.MissingFundsRate) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MissingFundsRate))) + i-- + dAtA[i] = 0x22 + } + if len(m.TotalMissingFunds) > 0 { + i -= len(m.TotalMissingFunds) + copy(dAtA[i:], m.TotalMissingFunds) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TotalMissingFunds))) + i-- + dAtA[i] = 0x1a + } + if len(m.SettlePrice) > 0 { + i -= len(m.SettlePrice) + copy(dAtA[i:], m.SettlePrice) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SettlePrice))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventMarketBeyondBankruptcy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventMarketBeyondBankruptcy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventMarketBeyondBankruptcy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MissingMarketFunds) > 0 { + i -= len(m.MissingMarketFunds) + copy(dAtA[i:], m.MissingMarketFunds) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MissingMarketFunds))) + i-- + dAtA[i] = 0x1a + } + if len(m.SettlePrice) > 0 { + i -= len(m.SettlePrice) + copy(dAtA[i:], m.SettlePrice) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SettlePrice))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAllPositionsHaircut) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAllPositionsHaircut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAllPositionsHaircut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MissingFundsRate) > 0 { + i -= len(m.MissingFundsRate) + copy(dAtA[i:], m.MissingFundsRate) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MissingFundsRate))) + i-- + dAtA[i] = 0x1a + } + if len(m.SettlePrice) > 0 { + i -= len(m.SettlePrice) + copy(dAtA[i:], m.SettlePrice) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SettlePrice))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBinaryOptionsMarketUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBinaryOptionsMarketUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBinaryOptionsMarketUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventNewSpotOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventNewSpotOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventNewSpotOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellOrders) > 0 { + for iNdEx := len(m.SellOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyOrders) > 0 { + for iNdEx := len(m.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventNewDerivativeOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventNewDerivativeOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventNewDerivativeOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellOrders) > 0 { + for iNdEx := len(m.SellOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyOrders) > 0 { + for iNdEx := len(m.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventCancelSpotOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventCancelSpotOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCancelSpotOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSpotMarketUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSpotMarketUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSpotMarketUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventPerpetualMarketUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventPerpetualMarketUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventPerpetualMarketUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Funding != nil { + { + size, err := m.Funding.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.PerpetualMarketInfo != nil { + { + size, err := m.PerpetualMarketInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventExpiryFuturesMarketUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventExpiryFuturesMarketUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventExpiryFuturesMarketUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpiryFuturesMarketInfo != nil { + { + size, err := m.ExpiryFuturesMarketInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventPerpetualMarketFundingUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventPerpetualMarketFundingUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventPerpetualMarketFundingUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MarkPrice != nil { + { + size := m.MarkPrice.Size() + i -= size + if _, err := m.MarkPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.FundingRate != nil { + { + size := m.FundingRate.Size() + i -= size + if _, err := m.FundingRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.IsHourlyFunding { + i-- + if m.IsHourlyFunding { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Funding.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSubaccountDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSubaccountDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSubaccountDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SrcAddress) > 0 { + i -= len(m.SrcAddress) + copy(dAtA[i:], m.SrcAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSubaccountWithdraw) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSubaccountWithdraw) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSubaccountWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.DstAddress) > 0 { + i -= len(m.DstAddress) + copy(dAtA[i:], m.DstAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSubaccountBalanceTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSubaccountBalanceTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSubaccountBalanceTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.DstSubaccountId) > 0 { + i -= len(m.DstSubaccountId) + copy(dAtA[i:], m.DstSubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DstSubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SrcSubaccountId) > 0 { + i -= len(m.SrcSubaccountId) + copy(dAtA[i:], m.SrcSubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SrcSubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBatchDepositUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBatchDepositUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBatchDepositUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DepositUpdates) > 0 { + for iNdEx := len(m.DepositUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DepositUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarketOrderCancel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarketOrderCancel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarketOrderCancel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CancelQuantity.Size() + i -= size + if _, err := m.CancelQuantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.MarketOrder != nil { + { + size, err := m.MarketOrder.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventCancelDerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventCancelDerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCancelDerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MarketOrderCancel != nil { + { + size, err := m.MarketOrderCancel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.LimitOrder != nil { + { + size, err := m.LimitOrder.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.IsLimitCancel { + i-- + if m.IsLimitCancel { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventFeeDiscountSchedule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventFeeDiscountSchedule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventFeeDiscountSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Schedule != nil { + { + size, err := m.Schedule.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTradingRewardCampaignUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTradingRewardCampaignUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTradingRewardCampaignUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CampaignRewardPools) > 0 { + for iNdEx := len(m.CampaignRewardPools) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CampaignRewardPools[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.CampaignInfo != nil { + { + size, err := m.CampaignInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTradingRewardDistribution) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTradingRewardDistribution) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTradingRewardDistribution) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountRewards) > 0 { + for iNdEx := len(m.AccountRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventNewConditionalDerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventNewConditionalDerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventNewConditionalDerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsMarket { + i-- + if m.IsMarket { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x1a + } + if m.Order != nil { + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventCancelConditionalDerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventCancelConditionalDerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCancelConditionalDerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MarketOrder != nil { + { + size, err := m.MarketOrder.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.LimitOrder != nil { + { + size, err := m.LimitOrder.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.IsLimitCancel { + i-- + if m.IsLimitCancel { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventConditionalDerivativeOrderTrigger) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventConditionalDerivativeOrderTrigger) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventConditionalDerivativeOrderTrigger) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TriggeredOrderCid) > 0 { + i -= len(m.TriggeredOrderCid) + copy(dAtA[i:], m.TriggeredOrderCid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TriggeredOrderCid))) + i-- + dAtA[i] = 0x2a + } + if len(m.PlacedOrderHash) > 0 { + i -= len(m.PlacedOrderHash) + copy(dAtA[i:], m.PlacedOrderHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PlacedOrderHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.TriggeredOrderHash) > 0 { + i -= len(m.TriggeredOrderHash) + copy(dAtA[i:], m.TriggeredOrderHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.TriggeredOrderHash))) + i-- + dAtA[i] = 0x1a + } + if m.IsLimitTrigger { + i-- + if m.IsLimitTrigger { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventOrderFail) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventOrderFail) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOrderFail) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cids) > 0 { + for iNdEx := len(m.Cids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cids[iNdEx]) + copy(dAtA[i:], m.Cids[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Cids[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Flags) > 0 { + dAtA22 := make([]byte, len(m.Flags)*10) + var j21 int + for _, num := range m.Flags { + for num >= 1<<7 { + dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + dAtA22[j21] = uint8(num) + j21++ + } + i -= j21 + copy(dAtA[i:], dAtA22[:j21]) + i = encodeVarintEvents(dAtA, i, uint64(j21)) + i-- + dAtA[i] = 0x1a + } + if len(m.Hashes) > 0 { + for iNdEx := len(m.Hashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Hashes[iNdEx]) + copy(dAtA[i:], m.Hashes[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hashes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketFeeMultipliers) > 0 { + for iNdEx := len(m.MarketFeeMultipliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketFeeMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EventOrderbookUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventOrderbookUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOrderbookUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DerivativeUpdates) > 0 { + for iNdEx := len(m.DerivativeUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SpotUpdates) > 0 { + for iNdEx := len(m.SpotUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *OrderbookUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderbookUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderbookUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Orderbook != nil { + { + size, err := m.Orderbook.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Orderbook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Orderbook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Orderbook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellLevels) > 0 { + for iNdEx := len(m.SellLevels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellLevels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyLevels) > 0 { + for iNdEx := len(m.BuyLevels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyLevels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventGrantAuthorizations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGrantAuthorizations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGrantAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grants) > 0 { + for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventGrantActivation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGrantActivation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGrantActivation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventInvalidGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventInvalidGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventInvalidGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventOrderCancelFail) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventOrderCancelFail) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOrderCancelFail) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x22 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDerivativeOrdersV2Migration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDerivativeOrdersV2Migration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDerivativeOrdersV2Migration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellOrderChanges) > 0 { + for iNdEx := len(m.SellOrderChanges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellOrderChanges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyOrderChanges) > 0 { + for iNdEx := len(m.BuyOrderChanges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyOrderChanges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeOrderV2Changes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeOrderV2Changes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeOrderV2Changes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Tp != nil { + { + size := m.Tp.Size() + i -= size + if _, err := m.Tp.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + { + size := m.F.Size() + i -= size + if _, err := m.F.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.M.Size() + i -= size + if _, err := m.M.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Q.Size() + i -= size + if _, err := m.Q.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.P.Size() + i -= size + if _, err := m.P.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSpotOrdersV2Migration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSpotOrdersV2Migration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSpotOrdersV2Migration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellOrderChanges) > 0 { + for iNdEx := len(m.SellOrderChanges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellOrderChanges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyOrderChanges) > 0 { + for iNdEx := len(m.BuyOrderChanges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyOrderChanges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotOrderV2Changes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotOrderV2Changes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotOrderV2Changes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Tp != nil { + { + size := m.Tp.Size() + i -= size + if _, err := m.Tp.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + { + size := m.F.Size() + i -= size + if _, err := m.F.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Q.Size() + i -= size + if _, err := m.Q.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.P.Size() + i -= size + if _, err := m.P.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventDerivativePositionV2Migration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDerivativePositionV2Migration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDerivativePositionV2Migration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Position != nil { + { + size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventBatchSpotExecution) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsBuy { + n += 2 + } + if m.ExecutionType != 0 { + n += 1 + sovEvents(uint64(m.ExecutionType)) + } + if len(m.Trades) > 0 { + for _, e := range m.Trades { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventBatchDerivativeExecution) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsBuy { + n += 2 + } + if m.IsLiquidation { + n += 2 + } + if m.CumulativeFunding != nil { + l = m.CumulativeFunding.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if m.ExecutionType != 0 { + n += 1 + sovEvents(uint64(m.ExecutionType)) + } + if len(m.Trades) > 0 { + for _, e := range m.Trades { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventLostFundsFromLiquidation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.LostFundsFromAvailableDuringPayout.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.LostFundsFromOrderCancels.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventBatchDerivativePosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Positions) > 0 { + for _, e := range m.Positions { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventDerivativeMarketPaused) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SettlePrice) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.TotalMissingFunds) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.MissingFundsRate) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventMarketBeyondBankruptcy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SettlePrice) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.MissingMarketFunds) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventAllPositionsHaircut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SettlePrice) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.MissingFundsRate) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventBinaryOptionsMarketUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Market.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventNewSpotOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BuyOrders) > 0 { + for _, e := range m.BuyOrders { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.SellOrders) > 0 { + for _, e := range m.SellOrders { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventNewDerivativeOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BuyOrders) > 0 { + for _, e := range m.BuyOrders { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.SellOrders) > 0 { + for _, e := range m.SellOrders { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventCancelSpotOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventSpotMarketUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Market.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventPerpetualMarketUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Market.Size() + n += 1 + l + sovEvents(uint64(l)) + if m.PerpetualMarketInfo != nil { + l = m.PerpetualMarketInfo.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if m.Funding != nil { + l = m.Funding.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventExpiryFuturesMarketUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Market.Size() + n += 1 + l + sovEvents(uint64(l)) + if m.ExpiryFuturesMarketInfo != nil { + l = m.ExpiryFuturesMarketInfo.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventPerpetualMarketFundingUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Funding.Size() + n += 1 + l + sovEvents(uint64(l)) + if m.IsHourlyFunding { + n += 2 + } + if m.FundingRate != nil { + l = m.FundingRate.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if m.MarkPrice != nil { + l = m.MarkPrice.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventSubaccountDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SrcAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventSubaccountWithdraw) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DstAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventSubaccountBalanceTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SrcSubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DstSubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventBatchDepositUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DepositUpdates) > 0 { + for _, e := range m.DepositUpdates { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *DerivativeMarketOrderCancel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MarketOrder != nil { + l = m.MarketOrder.Size() + n += 1 + l + sovEvents(uint64(l)) + } + l = m.CancelQuantity.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventCancelDerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsLimitCancel { + n += 2 + } + if m.LimitOrder != nil { + l = m.LimitOrder.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if m.MarketOrderCancel != nil { + l = m.MarketOrderCancel.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventFeeDiscountSchedule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Schedule != nil { + l = m.Schedule.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventTradingRewardCampaignUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CampaignInfo != nil { + l = m.CampaignInfo.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.CampaignRewardPools) > 0 { + for _, e := range m.CampaignRewardPools { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventTradingRewardDistribution) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AccountRewards) > 0 { + for _, e := range m.AccountRewards { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventNewConditionalDerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Order != nil { + l = m.Order.Size() + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsMarket { + n += 2 + } + return n +} + +func (m *EventCancelConditionalDerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsLimitCancel { + n += 2 + } + if m.LimitOrder != nil { + l = m.LimitOrder.Size() + n += 1 + l + sovEvents(uint64(l)) + } + if m.MarketOrder != nil { + l = m.MarketOrder.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventConditionalDerivativeOrderTrigger) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.IsLimitTrigger { + n += 2 + } + l = len(m.TriggeredOrderHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.PlacedOrderHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.TriggeredOrderCid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventOrderFail) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Hashes) > 0 { + for _, b := range m.Hashes { + l = len(b) + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.Flags) > 0 { + l = 0 + for _, e := range m.Flags { + l += sovEvents(uint64(e)) + } + n += 1 + sovEvents(uint64(l)) + l + } + if len(m.Cids) > 0 { + for _, s := range m.Cids { + l = len(s) + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MarketFeeMultipliers) > 0 { + for _, e := range m.MarketFeeMultipliers { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventOrderbookUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpotUpdates) > 0 { + for _, e := range m.SpotUpdates { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.DerivativeUpdates) > 0 { + for _, e := range m.DerivativeUpdates { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *OrderbookUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovEvents(uint64(m.Seq)) + } + if m.Orderbook != nil { + l = m.Orderbook.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *Orderbook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BuyLevels) > 0 { + for _, e := range m.BuyLevels { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.SellLevels) > 0 { + for _, e := range m.SellLevels { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventGrantAuthorizations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.Grants) > 0 { + for _, e := range m.Grants { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *EventGrantActivation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventInvalidGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventOrderCancelFail) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventDerivativeOrdersV2Migration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BuyOrderChanges) > 0 { + for _, e := range m.BuyOrderChanges { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.SellOrderChanges) > 0 { + for _, e := range m.SellOrderChanges { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *DerivativeOrderV2Changes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.P.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.Q.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.M.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.F.Size() + n += 1 + l + sovEvents(uint64(l)) + if m.Tp != nil { + l = m.Tp.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventSpotOrdersV2Migration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if len(m.BuyOrderChanges) > 0 { + for _, e := range m.BuyOrderChanges { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.SellOrderChanges) > 0 { + for _, e := range m.SellOrderChanges { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + return n +} + +func (m *SpotOrderV2Changes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.P.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.Q.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.F.Size() + n += 1 + l + sovEvents(uint64(l)) + if m.Tp != nil { + l = m.Tp.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventDerivativePositionV2Migration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Position != nil { + l = m.Position.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventBatchSpotExecution) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBatchSpotExecution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBatchSpotExecution: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionType", wireType) + } + m.ExecutionType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionType |= ExecutionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trades", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Trades = append(m.Trades, &TradeLog{}) + if err := m.Trades[len(m.Trades)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBatchDerivativeExecution) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBatchDerivativeExecution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBatchDerivativeExecution: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLiquidation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLiquidation = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeFunding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.CumulativeFunding = &v + if err := m.CumulativeFunding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionType", wireType) + } + m.ExecutionType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExecutionType |= ExecutionType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trades", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Trades = append(m.Trades, &DerivativeTradeLog{}) + if err := m.Trades[len(m.Trades)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventLostFundsFromLiquidation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventLostFundsFromLiquidation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventLostFundsFromLiquidation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LostFundsFromAvailableDuringPayout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LostFundsFromAvailableDuringPayout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LostFundsFromOrderCancels", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LostFundsFromOrderCancels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBatchDerivativePosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBatchDerivativePosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBatchDerivativePosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Positions = append(m.Positions, &SubaccountPosition{}) + if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDerivativeMarketPaused) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDerivativeMarketPaused: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDerivativeMarketPaused: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SettlePrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalMissingFunds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalMissingFunds = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MissingFundsRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MissingFundsRate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventMarketBeyondBankruptcy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventMarketBeyondBankruptcy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventMarketBeyondBankruptcy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SettlePrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MissingMarketFunds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MissingMarketFunds = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAllPositionsHaircut) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAllPositionsHaircut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAllPositionsHaircut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SettlePrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MissingFundsRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MissingFundsRate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBinaryOptionsMarketUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBinaryOptionsMarketUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBinaryOptionsMarketUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventNewSpotOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventNewSpotOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventNewSpotOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyOrders = append(m.BuyOrders, &SpotLimitOrder{}) + if err := m.BuyOrders[len(m.BuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellOrders = append(m.SellOrders, &SpotLimitOrder{}) + if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventNewDerivativeOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventNewDerivativeOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventNewDerivativeOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyOrders = append(m.BuyOrders, &DerivativeLimitOrder{}) + if err := m.BuyOrders[len(m.BuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellOrders = append(m.SellOrders, &DerivativeLimitOrder{}) + if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventCancelSpotOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCancelSpotOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCancelSpotOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSpotMarketUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSpotMarketUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSpotMarketUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventPerpetualMarketUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventPerpetualMarketUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventPerpetualMarketUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerpetualMarketInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PerpetualMarketInfo == nil { + m.PerpetualMarketInfo = &PerpetualMarketInfo{} + } + if err := m.PerpetualMarketInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Funding == nil { + m.Funding = &PerpetualMarketFunding{} + } + if err := m.Funding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventExpiryFuturesMarketUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventExpiryFuturesMarketUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventExpiryFuturesMarketUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryFuturesMarketInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiryFuturesMarketInfo == nil { + m.ExpiryFuturesMarketInfo = &ExpiryFuturesMarketInfo{} + } + if err := m.ExpiryFuturesMarketInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventPerpetualMarketFundingUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventPerpetualMarketFundingUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventPerpetualMarketFundingUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Funding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsHourlyFunding", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsHourlyFunding = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.FundingRate = &v + if err := m.FundingRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarkPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MarkPrice = &v + if err := m.MarkPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSubaccountDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSubaccountDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSubaccountDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSubaccountWithdraw) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSubaccountWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSubaccountWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DstAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSubaccountBalanceTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSubaccountBalanceTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSubaccountBalanceTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SrcSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DstSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBatchDepositUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBatchDepositUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBatchDepositUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DepositUpdates = append(m.DepositUpdates, &DepositUpdate{}) + if err := m.DepositUpdates[len(m.DepositUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarketOrderCancel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarketOrderCancel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarketOrderCancel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketOrder", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarketOrder == nil { + m.MarketOrder = &DerivativeMarketOrder{} + } + if err := m.MarketOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CancelQuantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CancelQuantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventCancelDerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCancelDerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCancelDerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLimitCancel", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLimitCancel = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrder", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LimitOrder == nil { + m.LimitOrder = &DerivativeLimitOrder{} + } + if err := m.LimitOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketOrderCancel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarketOrderCancel == nil { + m.MarketOrderCancel = &DerivativeMarketOrderCancel{} + } + if err := m.MarketOrderCancel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventFeeDiscountSchedule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventFeeDiscountSchedule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventFeeDiscountSchedule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Schedule == nil { + m.Schedule = &FeeDiscountSchedule{} + } + if err := m.Schedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTradingRewardCampaignUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTradingRewardCampaignUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTradingRewardCampaignUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CampaignInfo == nil { + m.CampaignInfo = &TradingRewardCampaignInfo{} + } + if err := m.CampaignInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignRewardPools", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CampaignRewardPools = append(m.CampaignRewardPools, &CampaignRewardPool{}) + if err := m.CampaignRewardPools[len(m.CampaignRewardPools)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTradingRewardDistribution) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTradingRewardDistribution: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTradingRewardDistribution: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountRewards = append(m.AccountRewards, &AccountRewards{}) + if err := m.AccountRewards[len(m.AccountRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventNewConditionalDerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventNewConditionalDerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventNewConditionalDerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Order == nil { + m.Order = &DerivativeOrder{} + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMarket", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMarket = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventCancelConditionalDerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCancelConditionalDerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCancelConditionalDerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLimitCancel", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLimitCancel = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitOrder", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LimitOrder == nil { + m.LimitOrder = &DerivativeLimitOrder{} + } + if err := m.LimitOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketOrder", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarketOrder == nil { + m.MarketOrder = &DerivativeMarketOrder{} + } + if err := m.MarketOrder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventConditionalDerivativeOrderTrigger) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventConditionalDerivativeOrderTrigger: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventConditionalDerivativeOrderTrigger: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = append(m.MarketId[:0], dAtA[iNdEx:postIndex]...) + if m.MarketId == nil { + m.MarketId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLimitTrigger", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLimitTrigger = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggeredOrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TriggeredOrderHash = append(m.TriggeredOrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.TriggeredOrderHash == nil { + m.TriggeredOrderHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PlacedOrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PlacedOrderHash = append(m.PlacedOrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.PlacedOrderHash == nil { + m.PlacedOrderHash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggeredOrderCid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TriggeredOrderCid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOrderFail) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventOrderFail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOrderFail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = append(m.Account[:0], dAtA[iNdEx:postIndex]...) + if m.Account == nil { + m.Account = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hashes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hashes = append(m.Hashes, make([]byte, postIndex-iNdEx)) + copy(m.Hashes[len(m.Hashes)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Flags = append(m.Flags, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Flags) == 0 { + m.Flags = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Flags = append(m.Flags, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cids = append(m.Cids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAtomicMarketOrderFeeMultipliersUpdated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAtomicMarketOrderFeeMultipliersUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAtomicMarketOrderFeeMultipliersUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketFeeMultipliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketFeeMultipliers = append(m.MarketFeeMultipliers, &MarketFeeMultiplier{}) + if err := m.MarketFeeMultipliers[len(m.MarketFeeMultipliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOrderbookUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventOrderbookUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOrderbookUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotUpdates = append(m.SpotUpdates, &OrderbookUpdate{}) + if err := m.SpotUpdates[len(m.SpotUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeUpdates = append(m.DerivativeUpdates, &OrderbookUpdate{}) + if err := m.DerivativeUpdates[len(m.DerivativeUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderbookUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderbookUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderbookUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orderbook", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Orderbook == nil { + m.Orderbook = &Orderbook{} + } + if err := m.Orderbook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Orderbook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Orderbook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Orderbook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = append(m.MarketId[:0], dAtA[iNdEx:postIndex]...) + if m.MarketId == nil { + m.MarketId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyLevels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyLevels = append(m.BuyLevels, &Level{}) + if err := m.BuyLevels[len(m.BuyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellLevels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellLevels = append(m.SellLevels, &Level{}) + if err := m.SellLevels[len(m.SellLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGrantAuthorizations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGrantAuthorizations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGrantAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grants = append(m.Grants, &GrantAuthorization{}) + if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGrantActivation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGrantActivation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGrantActivation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventInvalidGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventInvalidGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventInvalidGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOrderCancelFail) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventOrderCancelFail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOrderCancelFail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDerivativeOrdersV2Migration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDerivativeOrdersV2Migration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDerivativeOrdersV2Migration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderChanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyOrderChanges = append(m.BuyOrderChanges, &DerivativeOrderV2Changes{}) + if err := m.BuyOrderChanges[len(m.BuyOrderChanges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrderChanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellOrderChanges = append(m.SellOrderChanges, &DerivativeOrderV2Changes{}) + if err := m.SellOrderChanges[len(m.SellOrderChanges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeOrderV2Changes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeOrderV2Changes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeOrderV2Changes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field P", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.P.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Q", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Q.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.M.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.Tp = &v + if err := m.Tp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSpotOrdersV2Migration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSpotOrdersV2Migration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSpotOrdersV2Migration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrderChanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyOrderChanges = append(m.BuyOrderChanges, &SpotOrderV2Changes{}) + if err := m.BuyOrderChanges[len(m.BuyOrderChanges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrderChanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellOrderChanges = append(m.SellOrderChanges, &SpotOrderV2Changes{}) + if err := m.SellOrderChanges[len(m.SellOrderChanges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotOrderV2Changes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotOrderV2Changes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotOrderV2Changes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field P", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.P.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Q", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Q.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.Tp = &v + if err := m.Tp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDerivativePositionV2Migration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDerivativePositionV2Migration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDerivativePositionV2Migration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Position == nil { + m.Position = &DerivativePosition{} + } + if err := m.Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/exchange.go b/chain/exchange/types/v2/exchange.go new file mode 100644 index 00000000..6511dfac --- /dev/null +++ b/chain/exchange/types/v2/exchange.go @@ -0,0 +1,228 @@ +package v2 + +import ( + "fmt" + + "cosmossdk.io/math" + v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + "github.com/ethereum/go-ethereum/common" +) + +type TriggeredOrdersInMarket struct { + Market *DerivativeMarket + MarkPrice math.LegacyDec + MarketOrders []*DerivativeMarketOrder + LimitOrders []*DerivativeLimitOrder + HasLimitBuyOrders bool + HasLimitSellOrders bool +} + +func (e ExecutionType) IsMarket() bool { + return e == ExecutionType_Market +} + +func (e ExecutionType) IsMaker() bool { + return !e.IsTaker() +} + +func (e ExecutionType) IsTaker() bool { + return e == ExecutionType_Market || e == ExecutionType_LimitMatchNewOrder +} + +func (s MarketStatus) SupportsOrderCancellations() bool { + switch s { + case MarketStatus_Active, MarketStatus_Demolished, MarketStatus_Expired, MarketStatus_Paused: + return true + default: + return false + } +} + +func (p *PointsMultiplier) GetMultiplier(e ExecutionType) math.LegacyDec { + if e.IsMaker() { + return p.MakerPointsMultiplier + } + + return p.TakerPointsMultiplier +} + +// DerivativeOrder - IMutableDerivativeOrder implementation + +func (o *DerivativeOrder) GetPrice() math.LegacyDec { + return o.OrderInfo.Price +} + +func (o *DerivativeOrder) GetQuantity() math.LegacyDec { + return o.OrderInfo.Quantity +} +func (o *DerivativeOrder) GetFillable() math.LegacyDec { + return o.GetQuantity() +} + +func (o *DerivativeOrder) GetMargin() math.LegacyDec { + return o.Margin +} +func (o *DerivativeOrder) GetSubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} + +func (o *DerivativeOrder) SetPrice(price math.LegacyDec) { + o.OrderInfo.Price = price +} + +func (o *DerivativeOrder) SetQuantity(quantity math.LegacyDec) { + o.OrderInfo.Quantity = quantity +} + +func (o *DerivativeOrder) SetMargin(margin math.LegacyDec) { + o.Margin = margin +} + +// DerivativeLimitOrder - IMutableDerivativeOrder implementation + +func (m *DerivativeLimitOrder) GetPrice() math.LegacyDec { + return m.OrderInfo.Price +} + +func (m *DerivativeLimitOrder) GetQuantity() math.LegacyDec { + return m.OrderInfo.Quantity +} +func (m *DerivativeLimitOrder) GetFillable() math.LegacyDec { + return m.Fillable +} +func (m *DerivativeLimitOrder) GetMargin() math.LegacyDec { + return m.Margin +} + +func (m *DerivativeLimitOrder) GetSubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} + +func (m *DerivativeLimitOrder) SetPrice(price math.LegacyDec) { + m.OrderInfo.Price = price +} + +func (m *DerivativeLimitOrder) SetQuantity(quantity math.LegacyDec) { + m.OrderInfo.Quantity = quantity + m.Fillable = quantity +} + +func (m *DerivativeLimitOrder) SetMargin(margin math.LegacyDec) { + m.Margin = margin +} + +// DerivativeMarketOrder - IMutableDerivativeOrder implementation + +func (o *DerivativeMarketOrder) GetPrice() math.LegacyDec { + return o.OrderInfo.Price +} + +func (o *DerivativeMarketOrder) GetQuantity() math.LegacyDec { + return o.OrderInfo.Quantity +} +func (o *DerivativeMarketOrder) GetFillable() math.LegacyDec { + return o.OrderInfo.Quantity +} +func (o *DerivativeMarketOrder) GetMargin() math.LegacyDec { + return o.Margin +} +func (o *DerivativeMarketOrder) GetSubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} +func (o *DerivativeMarketOrder) SetPrice(price math.LegacyDec) { + o.OrderInfo.Price = price +} + +func (o *DerivativeMarketOrder) SetQuantity(quantity math.LegacyDec) { + o.OrderInfo.Quantity = quantity +} + +func (o *DerivativeMarketOrder) SetMargin(margin math.LegacyDec) { + o.Margin = margin +} + +func (o *DerivativeMarketOrder) DebugString() string { + return fmt.Sprintf("(q:%v, p:%v, m:%v, isLong: %v)", o.Quantity(), o.Price(), o.Margin, o.IsBuy()) +} + +// spot orders + +func (m *SpotOrder) GetPrice() math.LegacyDec { + return m.OrderInfo.Price +} +func (m *SpotLimitOrder) GetPrice() math.LegacyDec { + return m.OrderInfo.Price +} +func (o *SpotMarketOrder) GetPrice() math.LegacyDec { + return o.OrderInfo.Price +} + +func (m *SpotOrder) GetQuantity() math.LegacyDec { + return m.OrderInfo.Quantity +} +func (m *SpotLimitOrder) GetQuantity() math.LegacyDec { + return m.OrderInfo.Quantity +} + +func (o *SpotMarketOrder) GetQuantity() math.LegacyDec { + return o.OrderInfo.Quantity +} +func (o *SpotMarketOrder) IsBuy() bool { + return o.OrderType.IsBuy() +} +func (m *SpotOrder) GetFillable() math.LegacyDec { + return m.OrderInfo.Quantity +} +func (o *SpotMarketOrder) GetFillable() math.LegacyDec { + // no fillable for market order, but quantity works same in this case + return o.OrderInfo.Quantity +} +func (m *SpotLimitOrder) GetFillable() math.LegacyDec { + return m.Fillable +} + +func (m *SpotOrder) GetSubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} +func (o *SpotMarketOrder) GetSubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} +func (m *SpotLimitOrder) GetSubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} + +func (al AtomicMarketOrderAccessLevel) IsValid() bool { + switch al { + case AtomicMarketOrderAccessLevel_Nobody, + AtomicMarketOrderAccessLevel_SmartContractsOnly, + AtomicMarketOrderAccessLevel_BeginBlockerSmartContractsOnly, + AtomicMarketOrderAccessLevel_Everyone: + return true + default: + return false + } +} + +func NewV1TradeRecordsFromV2(market MarketInterface, tradeRecords TradeRecords) v1.TradeRecords { + v1TradeRecords := v1.TradeRecords{ + MarketId: tradeRecords.MarketId, + LatestTradeRecords: make([]*v1.TradeRecord, 0, len(tradeRecords.LatestTradeRecords)), + } + + for _, tradeRecord := range tradeRecords.LatestTradeRecords { + v1TradeRecord := NewV1TradeRecordFromV2(market, *tradeRecord) + v1TradeRecords.LatestTradeRecords = append(v1TradeRecords.LatestTradeRecords, &v1TradeRecord) + } + + return v1TradeRecords +} + +func NewV1TradeRecordFromV2(market MarketInterface, record TradeRecord) v1.TradeRecord { + v1TradeRecord := v1.TradeRecord{ + Timestamp: record.Timestamp, + Price: market.PriceToChainFormat(record.Price), + Quantity: market.QuantityToChainFormat(record.Quantity), + } + + return v1TradeRecord +} diff --git a/chain/exchange/types/v2/exchange.pb.go b/chain/exchange/types/v2/exchange.pb.go new file mode 100644 index 00000000..907af68d --- /dev/null +++ b/chain/exchange/types/v2/exchange.pb.go @@ -0,0 +1,10777 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/exchange.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExecutionType int32 + +const ( + ExecutionType_UnspecifiedExecutionType ExecutionType = 0 + ExecutionType_Market ExecutionType = 1 + ExecutionType_LimitFill ExecutionType = 2 + ExecutionType_LimitMatchRestingOrder ExecutionType = 3 + ExecutionType_LimitMatchNewOrder ExecutionType = 4 + ExecutionType_MarketLiquidation ExecutionType = 5 + ExecutionType_ExpiryMarketSettlement ExecutionType = 6 +) + +var ExecutionType_name = map[int32]string{ + 0: "UnspecifiedExecutionType", + 1: "Market", + 2: "LimitFill", + 3: "LimitMatchRestingOrder", + 4: "LimitMatchNewOrder", + 5: "MarketLiquidation", + 6: "ExpiryMarketSettlement", +} + +var ExecutionType_value = map[string]int32{ + "UnspecifiedExecutionType": 0, + "Market": 1, + "LimitFill": 2, + "LimitMatchRestingOrder": 3, + "LimitMatchNewOrder": 4, + "MarketLiquidation": 5, + "ExpiryMarketSettlement": 6, +} + +func (x ExecutionType) String() string { + return proto.EnumName(ExecutionType_name, int32(x)) +} + +func (ExecutionType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{0} +} + +type Params struct { + // spot_market_instant_listing_fee defines the expedited fee in INJ required + // to create a spot market by bypassing governance + SpotMarketInstantListingFee types.Coin `protobuf:"bytes,1,opt,name=spot_market_instant_listing_fee,json=spotMarketInstantListingFee,proto3" json:"spot_market_instant_listing_fee"` + // derivative_market_instant_listing_fee defines the expedited fee in INJ + // required to create a derivative market by bypassing governance + DerivativeMarketInstantListingFee types.Coin `protobuf:"bytes,2,opt,name=derivative_market_instant_listing_fee,json=derivativeMarketInstantListingFee,proto3" json:"derivative_market_instant_listing_fee"` + // default_spot_maker_fee defines the default exchange trade fee for makers on + // a spot market + DefaultSpotMakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=default_spot_maker_fee_rate,json=defaultSpotMakerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_spot_maker_fee_rate"` + // default_spot_taker_fee_rate defines the default exchange trade fee rate for + // takers on a new spot market + DefaultSpotTakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=default_spot_taker_fee_rate,json=defaultSpotTakerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_spot_taker_fee_rate"` + // default_derivative_maker_fee defines the default exchange trade fee for + // makers on a new derivative market + DefaultDerivativeMakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=default_derivative_maker_fee_rate,json=defaultDerivativeMakerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_derivative_maker_fee_rate"` + // default_derivative_taker_fee defines the default exchange trade fee for + // takers on a new derivative market + DefaultDerivativeTakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=default_derivative_taker_fee_rate,json=defaultDerivativeTakerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_derivative_taker_fee_rate"` + // default_initial_margin_ratio defines the default initial margin ratio on a + // new derivative market + DefaultInitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=default_initial_margin_ratio,json=defaultInitialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_initial_margin_ratio"` + // default_maintenance_margin_ratio defines the default maintenance margin + // ratio on a new derivative market + DefaultMaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=default_maintenance_margin_ratio,json=defaultMaintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_maintenance_margin_ratio"` + // default_funding_interval defines the default funding interval on a + // derivative market + DefaultFundingInterval int64 `protobuf:"varint,9,opt,name=default_funding_interval,json=defaultFundingInterval,proto3" json:"default_funding_interval,omitempty"` + // funding_multiple defines the timestamp multiple that the funding timestamp + // should be a multiple of + FundingMultiple int64 `protobuf:"varint,10,opt,name=funding_multiple,json=fundingMultiple,proto3" json:"funding_multiple,omitempty"` + // relayer_fee_share_rate defines the trade fee share percentage that goes to + // relayers + RelayerFeeShareRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate"` + // default_hourly_funding_rate_cap defines the default maximum absolute value + // of the hourly funding rate + DefaultHourlyFundingRateCap cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=default_hourly_funding_rate_cap,json=defaultHourlyFundingRateCap,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_hourly_funding_rate_cap"` + // hourly_interest_rate defines the hourly interest rate + DefaultHourlyInterestRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=default_hourly_interest_rate,json=defaultHourlyInterestRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"default_hourly_interest_rate"` + // max_derivative_order_side_count defines the maximum number of derivative + // active orders a subaccount can have for a given orderbook side + MaxDerivativeOrderSideCount uint32 `protobuf:"varint,14,opt,name=max_derivative_order_side_count,json=maxDerivativeOrderSideCount,proto3" json:"max_derivative_order_side_count,omitempty"` + // inj_reward_staked_requirement_threshold defines the threshold on INJ + // rewards after which one also needs staked INJ to receive more + InjRewardStakedRequirementThreshold cosmossdk_io_math.Int `protobuf:"bytes,15,opt,name=inj_reward_staked_requirement_threshold,json=injRewardStakedRequirementThreshold,proto3,customtype=cosmossdk.io/math.Int" json:"inj_reward_staked_requirement_threshold"` + // the trading_rewards_vesting_duration defines the vesting times for trading + // rewards + TradingRewardsVestingDuration int64 `protobuf:"varint,16,opt,name=trading_rewards_vesting_duration,json=tradingRewardsVestingDuration,proto3" json:"trading_rewards_vesting_duration,omitempty"` + // liquidator_reward_share_rate defines the ratio of the split of the surplus + // collateral that goes to the liquidator + LiquidatorRewardShareRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=liquidator_reward_share_rate,json=liquidatorRewardShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"liquidator_reward_share_rate"` + // binary_options_market_instant_listing_fee defines the expedited fee in INJ + // required to create a derivative market by bypassing governance + BinaryOptionsMarketInstantListingFee types.Coin `protobuf:"bytes,18,opt,name=binary_options_market_instant_listing_fee,json=binaryOptionsMarketInstantListingFee,proto3" json:"binary_options_market_instant_listing_fee"` + // atomic_market_order_access_level defines the required access permissions + // for executing atomic market orders + AtomicMarketOrderAccessLevel AtomicMarketOrderAccessLevel `protobuf:"varint,19,opt,name=atomic_market_order_access_level,json=atomicMarketOrderAccessLevel,proto3,enum=injective.exchange.v2.AtomicMarketOrderAccessLevel" json:"atomic_market_order_access_level,omitempty"` + // spot_atomic_market_order_fee_multiplier defines the default multiplier for + // executing atomic market orders in spot markets + SpotAtomicMarketOrderFeeMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,20,opt,name=spot_atomic_market_order_fee_multiplier,json=spotAtomicMarketOrderFeeMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"spot_atomic_market_order_fee_multiplier"` + // derivative_atomic_market_order_fee_multiplier defines the default + // multiplier for executing atomic market orders in derivative markets + DerivativeAtomicMarketOrderFeeMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,21,opt,name=derivative_atomic_market_order_fee_multiplier,json=derivativeAtomicMarketOrderFeeMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"derivative_atomic_market_order_fee_multiplier"` + // binary_options_atomic_market_order_fee_multiplier defines the default + // multiplier for executing atomic market orders in binary markets + BinaryOptionsAtomicMarketOrderFeeMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,22,opt,name=binary_options_atomic_market_order_fee_multiplier,json=binaryOptionsAtomicMarketOrderFeeMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"binary_options_atomic_market_order_fee_multiplier"` + // minimal_protocol_fee_rate defines the minimal protocol fee rate + MinimalProtocolFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,23,opt,name=minimal_protocol_fee_rate,json=minimalProtocolFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minimal_protocol_fee_rate"` + // is_instant_derivative_market_launch_enabled defines whether instant + // derivative market launch is enabled + IsInstantDerivativeMarketLaunchEnabled bool `protobuf:"varint,24,opt,name=is_instant_derivative_market_launch_enabled,json=isInstantDerivativeMarketLaunchEnabled,proto3" json:"is_instant_derivative_market_launch_enabled,omitempty"` + PostOnlyModeHeightThreshold int64 `protobuf:"varint,25,opt,name=post_only_mode_height_threshold,json=postOnlyModeHeightThreshold,proto3" json:"post_only_mode_height_threshold,omitempty"` + // Maximum time in seconds since the last mark price update to allow a + // decrease in margin + MarginDecreasePriceTimestampThresholdSeconds int64 `protobuf:"varint,26,opt,name=margin_decrease_price_timestamp_threshold_seconds,json=marginDecreasePriceTimestampThresholdSeconds,proto3" json:"margin_decrease_price_timestamp_threshold_seconds,omitempty"` + // List of addresses that are allowed to perform exchange admin operations + ExchangeAdmins []string `protobuf:"bytes,27,rep,name=exchange_admins,json=exchangeAdmins,proto3" json:"exchange_admins,omitempty"` + // inj_auction_max_cap defines the maximum cap for INJ sent to auction + InjAuctionMaxCap cosmossdk_io_math.Int `protobuf:"bytes,28,opt,name=inj_auction_max_cap,json=injAuctionMaxCap,proto3,customtype=cosmossdk.io/math.Int" json:"inj_auction_max_cap"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetSpotMarketInstantListingFee() types.Coin { + if m != nil { + return m.SpotMarketInstantListingFee + } + return types.Coin{} +} + +func (m *Params) GetDerivativeMarketInstantListingFee() types.Coin { + if m != nil { + return m.DerivativeMarketInstantListingFee + } + return types.Coin{} +} + +func (m *Params) GetDefaultFundingInterval() int64 { + if m != nil { + return m.DefaultFundingInterval + } + return 0 +} + +func (m *Params) GetFundingMultiple() int64 { + if m != nil { + return m.FundingMultiple + } + return 0 +} + +func (m *Params) GetMaxDerivativeOrderSideCount() uint32 { + if m != nil { + return m.MaxDerivativeOrderSideCount + } + return 0 +} + +func (m *Params) GetTradingRewardsVestingDuration() int64 { + if m != nil { + return m.TradingRewardsVestingDuration + } + return 0 +} + +func (m *Params) GetBinaryOptionsMarketInstantListingFee() types.Coin { + if m != nil { + return m.BinaryOptionsMarketInstantListingFee + } + return types.Coin{} +} + +func (m *Params) GetAtomicMarketOrderAccessLevel() AtomicMarketOrderAccessLevel { + if m != nil { + return m.AtomicMarketOrderAccessLevel + } + return AtomicMarketOrderAccessLevel_Nobody +} + +func (m *Params) GetIsInstantDerivativeMarketLaunchEnabled() bool { + if m != nil { + return m.IsInstantDerivativeMarketLaunchEnabled + } + return false +} + +func (m *Params) GetPostOnlyModeHeightThreshold() int64 { + if m != nil { + return m.PostOnlyModeHeightThreshold + } + return 0 +} + +func (m *Params) GetMarginDecreasePriceTimestampThresholdSeconds() int64 { + if m != nil { + return m.MarginDecreasePriceTimestampThresholdSeconds + } + return 0 +} + +func (m *Params) GetExchangeAdmins() []string { + if m != nil { + return m.ExchangeAdmins + } + return nil +} + +type NextFundingTimestamp struct { + NextTimestamp int64 `protobuf:"varint,1,opt,name=next_timestamp,json=nextTimestamp,proto3" json:"next_timestamp,omitempty"` +} + +func (m *NextFundingTimestamp) Reset() { *m = NextFundingTimestamp{} } +func (m *NextFundingTimestamp) String() string { return proto.CompactTextString(m) } +func (*NextFundingTimestamp) ProtoMessage() {} +func (*NextFundingTimestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{1} +} +func (m *NextFundingTimestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NextFundingTimestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NextFundingTimestamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NextFundingTimestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_NextFundingTimestamp.Merge(m, src) +} +func (m *NextFundingTimestamp) XXX_Size() int { + return m.Size() +} +func (m *NextFundingTimestamp) XXX_DiscardUnknown() { + xxx_messageInfo_NextFundingTimestamp.DiscardUnknown(m) +} + +var xxx_messageInfo_NextFundingTimestamp proto.InternalMessageInfo + +func (m *NextFundingTimestamp) GetNextTimestamp() int64 { + if m != nil { + return m.NextTimestamp + } + return 0 +} + +type MidPriceAndTOB struct { + // mid price of the market + MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` + // best buy price of the market + BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` + // best sell price of the market + BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` +} + +func (m *MidPriceAndTOB) Reset() { *m = MidPriceAndTOB{} } +func (m *MidPriceAndTOB) String() string { return proto.CompactTextString(m) } +func (*MidPriceAndTOB) ProtoMessage() {} +func (*MidPriceAndTOB) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{2} +} +func (m *MidPriceAndTOB) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MidPriceAndTOB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MidPriceAndTOB.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MidPriceAndTOB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MidPriceAndTOB.Merge(m, src) +} +func (m *MidPriceAndTOB) XXX_Size() int { + return m.Size() +} +func (m *MidPriceAndTOB) XXX_DiscardUnknown() { + xxx_messageInfo_MidPriceAndTOB.DiscardUnknown(m) +} + +var xxx_messageInfo_MidPriceAndTOB proto.InternalMessageInfo + +// A subaccount's deposit for a given base currency +type Deposit struct { + AvailableBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=available_balance,json=availableBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available_balance"` + TotalBalance cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=total_balance,json=totalBalance,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total_balance"` +} + +func (m *Deposit) Reset() { *m = Deposit{} } +func (m *Deposit) String() string { return proto.CompactTextString(m) } +func (*Deposit) ProtoMessage() {} +func (*Deposit) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{3} +} +func (m *Deposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Deposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deposit.Merge(m, src) +} +func (m *Deposit) XXX_Size() int { + return m.Size() +} +func (m *Deposit) XXX_DiscardUnknown() { + xxx_messageInfo_Deposit.DiscardUnknown(m) +} + +var xxx_messageInfo_Deposit proto.InternalMessageInfo + +type SubaccountTradeNonce struct { + Nonce uint32 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *SubaccountTradeNonce) Reset() { *m = SubaccountTradeNonce{} } +func (m *SubaccountTradeNonce) String() string { return proto.CompactTextString(m) } +func (*SubaccountTradeNonce) ProtoMessage() {} +func (*SubaccountTradeNonce) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{4} +} +func (m *SubaccountTradeNonce) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountTradeNonce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountTradeNonce.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountTradeNonce) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountTradeNonce.Merge(m, src) +} +func (m *SubaccountTradeNonce) XXX_Size() int { + return m.Size() +} +func (m *SubaccountTradeNonce) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountTradeNonce.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountTradeNonce proto.InternalMessageInfo + +func (m *SubaccountTradeNonce) GetNonce() uint32 { + if m != nil { + return m.Nonce + } + return 0 +} + +type SubaccountOrder struct { + // price of the order + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // the amount of the quantity remaining fillable + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + IsReduceOnly bool `protobuf:"varint,3,opt,name=isReduceOnly,proto3" json:"isReduceOnly,omitempty"` + Cid string `protobuf:"bytes,4,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *SubaccountOrder) Reset() { *m = SubaccountOrder{} } +func (m *SubaccountOrder) String() string { return proto.CompactTextString(m) } +func (*SubaccountOrder) ProtoMessage() {} +func (*SubaccountOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{5} +} +func (m *SubaccountOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountOrder.Merge(m, src) +} +func (m *SubaccountOrder) XXX_Size() int { + return m.Size() +} +func (m *SubaccountOrder) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountOrder proto.InternalMessageInfo + +func (m *SubaccountOrder) GetIsReduceOnly() bool { + if m != nil { + return m.IsReduceOnly + } + return false +} + +func (m *SubaccountOrder) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type SubaccountOrderData struct { + Order *SubaccountOrder `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` + OrderHash []byte `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` +} + +func (m *SubaccountOrderData) Reset() { *m = SubaccountOrderData{} } +func (m *SubaccountOrderData) String() string { return proto.CompactTextString(m) } +func (*SubaccountOrderData) ProtoMessage() {} +func (*SubaccountOrderData) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{6} +} +func (m *SubaccountOrderData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountOrderData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountOrderData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountOrderData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountOrderData.Merge(m, src) +} +func (m *SubaccountOrderData) XXX_Size() int { + return m.Size() +} +func (m *SubaccountOrderData) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountOrderData.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountOrderData proto.InternalMessageInfo + +func (m *SubaccountOrderData) GetOrder() *SubaccountOrder { + if m != nil { + return m.Order + } + return nil +} + +func (m *SubaccountOrderData) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +type Position struct { + IsLong bool `protobuf:"varint,1,opt,name=isLong,proto3" json:"isLong,omitempty"` + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` +} + +func (m *Position) Reset() { *m = Position{} } +func (m *Position) String() string { return proto.CompactTextString(m) } +func (*Position) ProtoMessage() {} +func (*Position) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{7} +} +func (m *Position) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Position.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Position) XXX_Merge(src proto.Message) { + xxx_messageInfo_Position.Merge(m, src) +} +func (m *Position) XXX_Size() int { + return m.Size() +} +func (m *Position) XXX_DiscardUnknown() { + xxx_messageInfo_Position.DiscardUnknown(m) +} + +var xxx_messageInfo_Position proto.InternalMessageInfo + +func (m *Position) GetIsLong() bool { + if m != nil { + return m.IsLong + } + return false +} + +type Balance struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Deposits *Deposit `protobuf:"bytes,3,opt,name=deposits,proto3" json:"deposits,omitempty"` +} + +func (m *Balance) Reset() { *m = Balance{} } +func (m *Balance) String() string { return proto.CompactTextString(m) } +func (*Balance) ProtoMessage() {} +func (*Balance) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{8} +} +func (m *Balance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Balance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Balance) XXX_Merge(src proto.Message) { + xxx_messageInfo_Balance.Merge(m, src) +} +func (m *Balance) XXX_Size() int { + return m.Size() +} +func (m *Balance) XXX_DiscardUnknown() { + xxx_messageInfo_Balance.DiscardUnknown(m) +} + +var xxx_messageInfo_Balance proto.InternalMessageInfo + +type DerivativePosition struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` +} + +func (m *DerivativePosition) Reset() { *m = DerivativePosition{} } +func (m *DerivativePosition) String() string { return proto.CompactTextString(m) } +func (*DerivativePosition) ProtoMessage() {} +func (*DerivativePosition) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{9} +} +func (m *DerivativePosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativePosition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativePosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativePosition.Merge(m, src) +} +func (m *DerivativePosition) XXX_Size() int { + return m.Size() +} +func (m *DerivativePosition) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativePosition.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativePosition proto.InternalMessageInfo + +type MarketOrderIndicator struct { + // market_id represents the unique ID of the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,2,opt,name=isBuy,proto3" json:"isBuy,omitempty"` +} + +func (m *MarketOrderIndicator) Reset() { *m = MarketOrderIndicator{} } +func (m *MarketOrderIndicator) String() string { return proto.CompactTextString(m) } +func (*MarketOrderIndicator) ProtoMessage() {} +func (*MarketOrderIndicator) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{10} +} +func (m *MarketOrderIndicator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MarketOrderIndicator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MarketOrderIndicator.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MarketOrderIndicator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MarketOrderIndicator.Merge(m, src) +} +func (m *MarketOrderIndicator) XXX_Size() int { + return m.Size() +} +func (m *MarketOrderIndicator) XXX_DiscardUnknown() { + xxx_messageInfo_MarketOrderIndicator.DiscardUnknown(m) +} + +var xxx_messageInfo_MarketOrderIndicator proto.InternalMessageInfo + +func (m *MarketOrderIndicator) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MarketOrderIndicator) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +type TradeLog struct { + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // bytes32 subaccount ID that executed the trade + SubaccountId []byte `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + OrderHash []byte `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + FeeRecipientAddress []byte `protobuf:"bytes,6,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *TradeLog) Reset() { *m = TradeLog{} } +func (m *TradeLog) String() string { return proto.CompactTextString(m) } +func (*TradeLog) ProtoMessage() {} +func (*TradeLog) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{11} +} +func (m *TradeLog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradeLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradeLog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradeLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradeLog.Merge(m, src) +} +func (m *TradeLog) XXX_Size() int { + return m.Size() +} +func (m *TradeLog) XXX_DiscardUnknown() { + xxx_messageInfo_TradeLog.DiscardUnknown(m) +} + +var xxx_messageInfo_TradeLog proto.InternalMessageInfo + +func (m *TradeLog) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +func (m *TradeLog) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +func (m *TradeLog) GetFeeRecipientAddress() []byte { + if m != nil { + return m.FeeRecipientAddress + } + return nil +} + +func (m *TradeLog) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type PositionDelta struct { + IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` + ExecutionQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=execution_quantity,json=executionQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"execution_quantity"` + ExecutionMargin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=execution_margin,json=executionMargin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"execution_margin"` + ExecutionPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=execution_price,json=executionPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"execution_price"` +} + +func (m *PositionDelta) Reset() { *m = PositionDelta{} } +func (m *PositionDelta) String() string { return proto.CompactTextString(m) } +func (*PositionDelta) ProtoMessage() {} +func (*PositionDelta) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{12} +} +func (m *PositionDelta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PositionDelta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PositionDelta.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PositionDelta) XXX_Merge(src proto.Message) { + xxx_messageInfo_PositionDelta.Merge(m, src) +} +func (m *PositionDelta) XXX_Size() int { + return m.Size() +} +func (m *PositionDelta) XXX_DiscardUnknown() { + xxx_messageInfo_PositionDelta.DiscardUnknown(m) +} + +var xxx_messageInfo_PositionDelta proto.InternalMessageInfo + +func (m *PositionDelta) GetIsLong() bool { + if m != nil { + return m.IsLong + } + return false +} + +type DerivativeTradeLog struct { + SubaccountId []byte `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + PositionDelta *PositionDelta `protobuf:"bytes,2,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + OrderHash []byte `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + FeeRecipientAddress []byte `protobuf:"bytes,6,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` + Pnl cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=pnl,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"pnl"` +} + +func (m *DerivativeTradeLog) Reset() { *m = DerivativeTradeLog{} } +func (m *DerivativeTradeLog) String() string { return proto.CompactTextString(m) } +func (*DerivativeTradeLog) ProtoMessage() {} +func (*DerivativeTradeLog) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{13} +} +func (m *DerivativeTradeLog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeTradeLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeTradeLog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeTradeLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeTradeLog.Merge(m, src) +} +func (m *DerivativeTradeLog) XXX_Size() int { + return m.Size() +} +func (m *DerivativeTradeLog) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeTradeLog.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeTradeLog proto.InternalMessageInfo + +func (m *DerivativeTradeLog) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +func (m *DerivativeTradeLog) GetPositionDelta() *PositionDelta { + if m != nil { + return m.PositionDelta + } + return nil +} + +func (m *DerivativeTradeLog) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +func (m *DerivativeTradeLog) GetFeeRecipientAddress() []byte { + if m != nil { + return m.FeeRecipientAddress + } + return nil +} + +func (m *DerivativeTradeLog) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type SubaccountPosition struct { + Position *Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` + SubaccountId []byte `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *SubaccountPosition) Reset() { *m = SubaccountPosition{} } +func (m *SubaccountPosition) String() string { return proto.CompactTextString(m) } +func (*SubaccountPosition) ProtoMessage() {} +func (*SubaccountPosition) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{14} +} +func (m *SubaccountPosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountPosition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountPosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountPosition.Merge(m, src) +} +func (m *SubaccountPosition) XXX_Size() int { + return m.Size() +} +func (m *SubaccountPosition) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountPosition.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountPosition proto.InternalMessageInfo + +func (m *SubaccountPosition) GetPosition() *Position { + if m != nil { + return m.Position + } + return nil +} + +func (m *SubaccountPosition) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +type SubaccountDeposit struct { + SubaccountId []byte `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Deposit *Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (m *SubaccountDeposit) Reset() { *m = SubaccountDeposit{} } +func (m *SubaccountDeposit) String() string { return proto.CompactTextString(m) } +func (*SubaccountDeposit) ProtoMessage() {} +func (*SubaccountDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{15} +} +func (m *SubaccountDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountDeposit.Merge(m, src) +} +func (m *SubaccountDeposit) XXX_Size() int { + return m.Size() +} +func (m *SubaccountDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountDeposit proto.InternalMessageInfo + +func (m *SubaccountDeposit) GetSubaccountId() []byte { + if m != nil { + return m.SubaccountId + } + return nil +} + +func (m *SubaccountDeposit) GetDeposit() *Deposit { + if m != nil { + return m.Deposit + } + return nil +} + +type DepositUpdate struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Deposits []*SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits,omitempty"` +} + +func (m *DepositUpdate) Reset() { *m = DepositUpdate{} } +func (m *DepositUpdate) String() string { return proto.CompactTextString(m) } +func (*DepositUpdate) ProtoMessage() {} +func (*DepositUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{16} +} +func (m *DepositUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DepositUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DepositUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DepositUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositUpdate.Merge(m, src) +} +func (m *DepositUpdate) XXX_Size() int { + return m.Size() +} +func (m *DepositUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_DepositUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_DepositUpdate proto.InternalMessageInfo + +func (m *DepositUpdate) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *DepositUpdate) GetDeposits() []*SubaccountDeposit { + if m != nil { + return m.Deposits + } + return nil +} + +type PointsMultiplier struct { + MakerPointsMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_points_multiplier,json=makerPointsMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_points_multiplier"` + TakerPointsMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_points_multiplier,json=takerPointsMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_points_multiplier"` +} + +func (m *PointsMultiplier) Reset() { *m = PointsMultiplier{} } +func (m *PointsMultiplier) String() string { return proto.CompactTextString(m) } +func (*PointsMultiplier) ProtoMessage() {} +func (*PointsMultiplier) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{17} +} +func (m *PointsMultiplier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PointsMultiplier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PointsMultiplier.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PointsMultiplier) XXX_Merge(src proto.Message) { + xxx_messageInfo_PointsMultiplier.Merge(m, src) +} +func (m *PointsMultiplier) XXX_Size() int { + return m.Size() +} +func (m *PointsMultiplier) XXX_DiscardUnknown() { + xxx_messageInfo_PointsMultiplier.DiscardUnknown(m) +} + +var xxx_messageInfo_PointsMultiplier proto.InternalMessageInfo + +type TradingRewardCampaignBoostInfo struct { + BoostedSpotMarketIds []string `protobuf:"bytes,1,rep,name=boosted_spot_market_ids,json=boostedSpotMarketIds,proto3" json:"boosted_spot_market_ids,omitempty"` + SpotMarketMultipliers []PointsMultiplier `protobuf:"bytes,2,rep,name=spot_market_multipliers,json=spotMarketMultipliers,proto3" json:"spot_market_multipliers"` + BoostedDerivativeMarketIds []string `protobuf:"bytes,3,rep,name=boosted_derivative_market_ids,json=boostedDerivativeMarketIds,proto3" json:"boosted_derivative_market_ids,omitempty"` + DerivativeMarketMultipliers []PointsMultiplier `protobuf:"bytes,4,rep,name=derivative_market_multipliers,json=derivativeMarketMultipliers,proto3" json:"derivative_market_multipliers"` +} + +func (m *TradingRewardCampaignBoostInfo) Reset() { *m = TradingRewardCampaignBoostInfo{} } +func (m *TradingRewardCampaignBoostInfo) String() string { return proto.CompactTextString(m) } +func (*TradingRewardCampaignBoostInfo) ProtoMessage() {} +func (*TradingRewardCampaignBoostInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{18} +} +func (m *TradingRewardCampaignBoostInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignBoostInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignBoostInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignBoostInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignBoostInfo.Merge(m, src) +} +func (m *TradingRewardCampaignBoostInfo) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignBoostInfo) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignBoostInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignBoostInfo proto.InternalMessageInfo + +func (m *TradingRewardCampaignBoostInfo) GetBoostedSpotMarketIds() []string { + if m != nil { + return m.BoostedSpotMarketIds + } + return nil +} + +func (m *TradingRewardCampaignBoostInfo) GetSpotMarketMultipliers() []PointsMultiplier { + if m != nil { + return m.SpotMarketMultipliers + } + return nil +} + +func (m *TradingRewardCampaignBoostInfo) GetBoostedDerivativeMarketIds() []string { + if m != nil { + return m.BoostedDerivativeMarketIds + } + return nil +} + +func (m *TradingRewardCampaignBoostInfo) GetDerivativeMarketMultipliers() []PointsMultiplier { + if m != nil { + return m.DerivativeMarketMultipliers + } + return nil +} + +type CampaignRewardPool struct { + StartTimestamp int64 `protobuf:"varint,1,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` + // max_campaign_rewards are the maximum reward amounts to be disbursed at the + // end of the campaign + MaxCampaignRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=max_campaign_rewards,json=maxCampaignRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_campaign_rewards"` +} + +func (m *CampaignRewardPool) Reset() { *m = CampaignRewardPool{} } +func (m *CampaignRewardPool) String() string { return proto.CompactTextString(m) } +func (*CampaignRewardPool) ProtoMessage() {} +func (*CampaignRewardPool) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{19} +} +func (m *CampaignRewardPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CampaignRewardPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CampaignRewardPool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CampaignRewardPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_CampaignRewardPool.Merge(m, src) +} +func (m *CampaignRewardPool) XXX_Size() int { + return m.Size() +} +func (m *CampaignRewardPool) XXX_DiscardUnknown() { + xxx_messageInfo_CampaignRewardPool.DiscardUnknown(m) +} + +var xxx_messageInfo_CampaignRewardPool proto.InternalMessageInfo + +func (m *CampaignRewardPool) GetStartTimestamp() int64 { + if m != nil { + return m.StartTimestamp + } + return 0 +} + +func (m *CampaignRewardPool) GetMaxCampaignRewards() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.MaxCampaignRewards + } + return nil +} + +type TradingRewardCampaignInfo struct { + // number of seconds of the duration of each campaign + CampaignDurationSeconds int64 `protobuf:"varint,1,opt,name=campaign_duration_seconds,json=campaignDurationSeconds,proto3" json:"campaign_duration_seconds,omitempty"` + // the trading fee quote denoms which will be counted for the rewards + QuoteDenoms []string `protobuf:"bytes,2,rep,name=quote_denoms,json=quoteDenoms,proto3" json:"quote_denoms,omitempty"` + // the optional boost info for markets + TradingRewardBoostInfo *TradingRewardCampaignBoostInfo `protobuf:"bytes,3,opt,name=trading_reward_boost_info,json=tradingRewardBoostInfo,proto3" json:"trading_reward_boost_info,omitempty"` + // the marketIDs which are disqualified from being rewarded + DisqualifiedMarketIds []string `protobuf:"bytes,4,rep,name=disqualified_market_ids,json=disqualifiedMarketIds,proto3" json:"disqualified_market_ids,omitempty"` +} + +func (m *TradingRewardCampaignInfo) Reset() { *m = TradingRewardCampaignInfo{} } +func (m *TradingRewardCampaignInfo) String() string { return proto.CompactTextString(m) } +func (*TradingRewardCampaignInfo) ProtoMessage() {} +func (*TradingRewardCampaignInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{20} +} +func (m *TradingRewardCampaignInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignInfo.Merge(m, src) +} +func (m *TradingRewardCampaignInfo) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignInfo) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignInfo proto.InternalMessageInfo + +func (m *TradingRewardCampaignInfo) GetCampaignDurationSeconds() int64 { + if m != nil { + return m.CampaignDurationSeconds + } + return 0 +} + +func (m *TradingRewardCampaignInfo) GetQuoteDenoms() []string { + if m != nil { + return m.QuoteDenoms + } + return nil +} + +func (m *TradingRewardCampaignInfo) GetTradingRewardBoostInfo() *TradingRewardCampaignBoostInfo { + if m != nil { + return m.TradingRewardBoostInfo + } + return nil +} + +func (m *TradingRewardCampaignInfo) GetDisqualifiedMarketIds() []string { + if m != nil { + return m.DisqualifiedMarketIds + } + return nil +} + +type FeeDiscountTierInfo struct { + MakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_discount_rate,json=makerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_discount_rate"` + TakerDiscountRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_discount_rate,json=takerDiscountRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_discount_rate"` + StakedAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"staked_amount"` + Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` +} + +func (m *FeeDiscountTierInfo) Reset() { *m = FeeDiscountTierInfo{} } +func (m *FeeDiscountTierInfo) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountTierInfo) ProtoMessage() {} +func (*FeeDiscountTierInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{21} +} +func (m *FeeDiscountTierInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountTierInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountTierInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountTierInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountTierInfo.Merge(m, src) +} +func (m *FeeDiscountTierInfo) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountTierInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountTierInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountTierInfo proto.InternalMessageInfo + +type FeeDiscountSchedule struct { + BucketCount uint64 `protobuf:"varint,1,opt,name=bucket_count,json=bucketCount,proto3" json:"bucket_count,omitempty"` + BucketDuration int64 `protobuf:"varint,2,opt,name=bucket_duration,json=bucketDuration,proto3" json:"bucket_duration,omitempty"` + // the trading fee quote denoms which will be counted for the fee paid + // contribution + QuoteDenoms []string `protobuf:"bytes,3,rep,name=quote_denoms,json=quoteDenoms,proto3" json:"quote_denoms,omitempty"` + // the fee discount tiers + TierInfos []*FeeDiscountTierInfo `protobuf:"bytes,4,rep,name=tier_infos,json=tierInfos,proto3" json:"tier_infos,omitempty"` + // the marketIDs which are disqualified from contributing to the fee paid + // amount + DisqualifiedMarketIds []string `protobuf:"bytes,5,rep,name=disqualified_market_ids,json=disqualifiedMarketIds,proto3" json:"disqualified_market_ids,omitempty"` +} + +func (m *FeeDiscountSchedule) Reset() { *m = FeeDiscountSchedule{} } +func (m *FeeDiscountSchedule) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountSchedule) ProtoMessage() {} +func (*FeeDiscountSchedule) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{22} +} +func (m *FeeDiscountSchedule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountSchedule.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountSchedule) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountSchedule.Merge(m, src) +} +func (m *FeeDiscountSchedule) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountSchedule) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountSchedule.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountSchedule proto.InternalMessageInfo + +func (m *FeeDiscountSchedule) GetBucketCount() uint64 { + if m != nil { + return m.BucketCount + } + return 0 +} + +func (m *FeeDiscountSchedule) GetBucketDuration() int64 { + if m != nil { + return m.BucketDuration + } + return 0 +} + +func (m *FeeDiscountSchedule) GetQuoteDenoms() []string { + if m != nil { + return m.QuoteDenoms + } + return nil +} + +func (m *FeeDiscountSchedule) GetTierInfos() []*FeeDiscountTierInfo { + if m != nil { + return m.TierInfos + } + return nil +} + +func (m *FeeDiscountSchedule) GetDisqualifiedMarketIds() []string { + if m != nil { + return m.DisqualifiedMarketIds + } + return nil +} + +type FeeDiscountTierTTL struct { + Tier uint64 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + TtlTimestamp int64 `protobuf:"varint,2,opt,name=ttl_timestamp,json=ttlTimestamp,proto3" json:"ttl_timestamp,omitempty"` +} + +func (m *FeeDiscountTierTTL) Reset() { *m = FeeDiscountTierTTL{} } +func (m *FeeDiscountTierTTL) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountTierTTL) ProtoMessage() {} +func (*FeeDiscountTierTTL) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{23} +} +func (m *FeeDiscountTierTTL) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountTierTTL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountTierTTL.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountTierTTL) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountTierTTL.Merge(m, src) +} +func (m *FeeDiscountTierTTL) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountTierTTL) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountTierTTL.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountTierTTL proto.InternalMessageInfo + +func (m *FeeDiscountTierTTL) GetTier() uint64 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *FeeDiscountTierTTL) GetTtlTimestamp() int64 { + if m != nil { + return m.TtlTimestamp + } + return 0 +} + +type AccountRewards struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Rewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"rewards"` +} + +func (m *AccountRewards) Reset() { *m = AccountRewards{} } +func (m *AccountRewards) String() string { return proto.CompactTextString(m) } +func (*AccountRewards) ProtoMessage() {} +func (*AccountRewards) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{24} +} +func (m *AccountRewards) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountRewards.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccountRewards) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountRewards.Merge(m, src) +} +func (m *AccountRewards) XXX_Size() int { + return m.Size() +} +func (m *AccountRewards) XXX_DiscardUnknown() { + xxx_messageInfo_AccountRewards.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountRewards proto.InternalMessageInfo + +func (m *AccountRewards) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *AccountRewards) GetRewards() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Rewards + } + return nil +} + +type TradeRecords struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + LatestTradeRecords []*TradeRecord `protobuf:"bytes,2,rep,name=latest_trade_records,json=latestTradeRecords,proto3" json:"latest_trade_records,omitempty"` +} + +func (m *TradeRecords) Reset() { *m = TradeRecords{} } +func (m *TradeRecords) String() string { return proto.CompactTextString(m) } +func (*TradeRecords) ProtoMessage() {} +func (*TradeRecords) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{25} +} +func (m *TradeRecords) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradeRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradeRecords.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradeRecords) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradeRecords.Merge(m, src) +} +func (m *TradeRecords) XXX_Size() int { + return m.Size() +} +func (m *TradeRecords) XXX_DiscardUnknown() { + xxx_messageInfo_TradeRecords.DiscardUnknown(m) +} + +var xxx_messageInfo_TradeRecords proto.InternalMessageInfo + +func (m *TradeRecords) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *TradeRecords) GetLatestTradeRecords() []*TradeRecord { + if m != nil { + return m.LatestTradeRecords + } + return nil +} + +type SubaccountIDs struct { + SubaccountIds [][]byte `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` +} + +func (m *SubaccountIDs) Reset() { *m = SubaccountIDs{} } +func (m *SubaccountIDs) String() string { return proto.CompactTextString(m) } +func (*SubaccountIDs) ProtoMessage() {} +func (*SubaccountIDs) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{26} +} +func (m *SubaccountIDs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountIDs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountIDs) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountIDs.Merge(m, src) +} +func (m *SubaccountIDs) XXX_Size() int { + return m.Size() +} +func (m *SubaccountIDs) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountIDs.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountIDs proto.InternalMessageInfo + +func (m *SubaccountIDs) GetSubaccountIds() [][]byte { + if m != nil { + return m.SubaccountIds + } + return nil +} + +type TradeRecord struct { + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` +} + +func (m *TradeRecord) Reset() { *m = TradeRecord{} } +func (m *TradeRecord) String() string { return proto.CompactTextString(m) } +func (*TradeRecord) ProtoMessage() {} +func (*TradeRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{27} +} +func (m *TradeRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradeRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradeRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradeRecord.Merge(m, src) +} +func (m *TradeRecord) XXX_Size() int { + return m.Size() +} +func (m *TradeRecord) XXX_DiscardUnknown() { + xxx_messageInfo_TradeRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_TradeRecord proto.InternalMessageInfo + +func (m *TradeRecord) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +type Level struct { + // price + P cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=p,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p"` + // quantity + Q cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=q,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"q"` +} + +func (m *Level) Reset() { *m = Level{} } +func (m *Level) String() string { return proto.CompactTextString(m) } +func (*Level) ProtoMessage() {} +func (*Level) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{28} +} +func (m *Level) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Level) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Level.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Level) XXX_Merge(src proto.Message) { + xxx_messageInfo_Level.Merge(m, src) +} +func (m *Level) XXX_Size() int { + return m.Size() +} +func (m *Level) XXX_DiscardUnknown() { + xxx_messageInfo_Level.DiscardUnknown(m) +} + +var xxx_messageInfo_Level proto.InternalMessageInfo + +type AggregateSubaccountVolumeRecord struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` +} + +func (m *AggregateSubaccountVolumeRecord) Reset() { *m = AggregateSubaccountVolumeRecord{} } +func (m *AggregateSubaccountVolumeRecord) String() string { return proto.CompactTextString(m) } +func (*AggregateSubaccountVolumeRecord) ProtoMessage() {} +func (*AggregateSubaccountVolumeRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{29} +} +func (m *AggregateSubaccountVolumeRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregateSubaccountVolumeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregateSubaccountVolumeRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AggregateSubaccountVolumeRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregateSubaccountVolumeRecord.Merge(m, src) +} +func (m *AggregateSubaccountVolumeRecord) XXX_Size() int { + return m.Size() +} +func (m *AggregateSubaccountVolumeRecord) XXX_DiscardUnknown() { + xxx_messageInfo_AggregateSubaccountVolumeRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregateSubaccountVolumeRecord proto.InternalMessageInfo + +func (m *AggregateSubaccountVolumeRecord) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *AggregateSubaccountVolumeRecord) GetMarketVolumes() []*MarketVolume { + if m != nil { + return m.MarketVolumes + } + return nil +} + +type AggregateAccountVolumeRecord struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + MarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` +} + +func (m *AggregateAccountVolumeRecord) Reset() { *m = AggregateAccountVolumeRecord{} } +func (m *AggregateAccountVolumeRecord) String() string { return proto.CompactTextString(m) } +func (*AggregateAccountVolumeRecord) ProtoMessage() {} +func (*AggregateAccountVolumeRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{30} +} +func (m *AggregateAccountVolumeRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AggregateAccountVolumeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AggregateAccountVolumeRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AggregateAccountVolumeRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_AggregateAccountVolumeRecord.Merge(m, src) +} +func (m *AggregateAccountVolumeRecord) XXX_Size() int { + return m.Size() +} +func (m *AggregateAccountVolumeRecord) XXX_DiscardUnknown() { + xxx_messageInfo_AggregateAccountVolumeRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_AggregateAccountVolumeRecord proto.InternalMessageInfo + +func (m *AggregateAccountVolumeRecord) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *AggregateAccountVolumeRecord) GetMarketVolumes() []*MarketVolume { + if m != nil { + return m.MarketVolumes + } + return nil +} + +type DenomDecimals struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Decimals uint64 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` +} + +func (m *DenomDecimals) Reset() { *m = DenomDecimals{} } +func (m *DenomDecimals) String() string { return proto.CompactTextString(m) } +func (*DenomDecimals) ProtoMessage() {} +func (*DenomDecimals) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{31} +} +func (m *DenomDecimals) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DenomDecimals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DenomDecimals.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DenomDecimals) XXX_Merge(src proto.Message) { + xxx_messageInfo_DenomDecimals.Merge(m, src) +} +func (m *DenomDecimals) XXX_Size() int { + return m.Size() +} +func (m *DenomDecimals) XXX_DiscardUnknown() { + xxx_messageInfo_DenomDecimals.DiscardUnknown(m) +} + +var xxx_messageInfo_DenomDecimals proto.InternalMessageInfo + +func (m *DenomDecimals) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *DenomDecimals) GetDecimals() uint64 { + if m != nil { + return m.Decimals + } + return 0 +} + +type GrantAuthorization struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` +} + +func (m *GrantAuthorization) Reset() { *m = GrantAuthorization{} } +func (m *GrantAuthorization) String() string { return proto.CompactTextString(m) } +func (*GrantAuthorization) ProtoMessage() {} +func (*GrantAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{32} +} +func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GrantAuthorization.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GrantAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_GrantAuthorization.Merge(m, src) +} +func (m *GrantAuthorization) XXX_Size() int { + return m.Size() +} +func (m *GrantAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_GrantAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_GrantAuthorization proto.InternalMessageInfo + +func (m *GrantAuthorization) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +type ActiveGrant struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` +} + +func (m *ActiveGrant) Reset() { *m = ActiveGrant{} } +func (m *ActiveGrant) String() string { return proto.CompactTextString(m) } +func (*ActiveGrant) ProtoMessage() {} +func (*ActiveGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{33} +} +func (m *ActiveGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ActiveGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ActiveGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ActiveGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_ActiveGrant.Merge(m, src) +} +func (m *ActiveGrant) XXX_Size() int { + return m.Size() +} +func (m *ActiveGrant) XXX_DiscardUnknown() { + xxx_messageInfo_ActiveGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_ActiveGrant proto.InternalMessageInfo + +func (m *ActiveGrant) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +type EffectiveGrant struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + NetGrantedStake cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=net_granted_stake,json=netGrantedStake,proto3,customtype=cosmossdk.io/math.Int" json:"net_granted_stake"` + IsValid bool `protobuf:"varint,3,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` +} + +func (m *EffectiveGrant) Reset() { *m = EffectiveGrant{} } +func (m *EffectiveGrant) String() string { return proto.CompactTextString(m) } +func (*EffectiveGrant) ProtoMessage() {} +func (*EffectiveGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_0b5851fb01a33564, []int{34} +} +func (m *EffectiveGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EffectiveGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EffectiveGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EffectiveGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_EffectiveGrant.Merge(m, src) +} +func (m *EffectiveGrant) XXX_Size() int { + return m.Size() +} +func (m *EffectiveGrant) XXX_DiscardUnknown() { + xxx_messageInfo_EffectiveGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_EffectiveGrant proto.InternalMessageInfo + +func (m *EffectiveGrant) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *EffectiveGrant) GetIsValid() bool { + if m != nil { + return m.IsValid + } + return false +} + +func init() { + proto.RegisterEnum("injective.exchange.v2.ExecutionType", ExecutionType_name, ExecutionType_value) + proto.RegisterType((*Params)(nil), "injective.exchange.v2.Params") + proto.RegisterType((*NextFundingTimestamp)(nil), "injective.exchange.v2.NextFundingTimestamp") + proto.RegisterType((*MidPriceAndTOB)(nil), "injective.exchange.v2.MidPriceAndTOB") + proto.RegisterType((*Deposit)(nil), "injective.exchange.v2.Deposit") + proto.RegisterType((*SubaccountTradeNonce)(nil), "injective.exchange.v2.SubaccountTradeNonce") + proto.RegisterType((*SubaccountOrder)(nil), "injective.exchange.v2.SubaccountOrder") + proto.RegisterType((*SubaccountOrderData)(nil), "injective.exchange.v2.SubaccountOrderData") + proto.RegisterType((*Position)(nil), "injective.exchange.v2.Position") + proto.RegisterType((*Balance)(nil), "injective.exchange.v2.Balance") + proto.RegisterType((*DerivativePosition)(nil), "injective.exchange.v2.DerivativePosition") + proto.RegisterType((*MarketOrderIndicator)(nil), "injective.exchange.v2.MarketOrderIndicator") + proto.RegisterType((*TradeLog)(nil), "injective.exchange.v2.TradeLog") + proto.RegisterType((*PositionDelta)(nil), "injective.exchange.v2.PositionDelta") + proto.RegisterType((*DerivativeTradeLog)(nil), "injective.exchange.v2.DerivativeTradeLog") + proto.RegisterType((*SubaccountPosition)(nil), "injective.exchange.v2.SubaccountPosition") + proto.RegisterType((*SubaccountDeposit)(nil), "injective.exchange.v2.SubaccountDeposit") + proto.RegisterType((*DepositUpdate)(nil), "injective.exchange.v2.DepositUpdate") + proto.RegisterType((*PointsMultiplier)(nil), "injective.exchange.v2.PointsMultiplier") + proto.RegisterType((*TradingRewardCampaignBoostInfo)(nil), "injective.exchange.v2.TradingRewardCampaignBoostInfo") + proto.RegisterType((*CampaignRewardPool)(nil), "injective.exchange.v2.CampaignRewardPool") + proto.RegisterType((*TradingRewardCampaignInfo)(nil), "injective.exchange.v2.TradingRewardCampaignInfo") + proto.RegisterType((*FeeDiscountTierInfo)(nil), "injective.exchange.v2.FeeDiscountTierInfo") + proto.RegisterType((*FeeDiscountSchedule)(nil), "injective.exchange.v2.FeeDiscountSchedule") + proto.RegisterType((*FeeDiscountTierTTL)(nil), "injective.exchange.v2.FeeDiscountTierTTL") + proto.RegisterType((*AccountRewards)(nil), "injective.exchange.v2.AccountRewards") + proto.RegisterType((*TradeRecords)(nil), "injective.exchange.v2.TradeRecords") + proto.RegisterType((*SubaccountIDs)(nil), "injective.exchange.v2.SubaccountIDs") + proto.RegisterType((*TradeRecord)(nil), "injective.exchange.v2.TradeRecord") + proto.RegisterType((*Level)(nil), "injective.exchange.v2.Level") + proto.RegisterType((*AggregateSubaccountVolumeRecord)(nil), "injective.exchange.v2.AggregateSubaccountVolumeRecord") + proto.RegisterType((*AggregateAccountVolumeRecord)(nil), "injective.exchange.v2.AggregateAccountVolumeRecord") + proto.RegisterType((*DenomDecimals)(nil), "injective.exchange.v2.DenomDecimals") + proto.RegisterType((*GrantAuthorization)(nil), "injective.exchange.v2.GrantAuthorization") + proto.RegisterType((*ActiveGrant)(nil), "injective.exchange.v2.ActiveGrant") + proto.RegisterType((*EffectiveGrant)(nil), "injective.exchange.v2.EffectiveGrant") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/exchange.proto", fileDescriptor_0b5851fb01a33564) +} + +var fileDescriptor_0b5851fb01a33564 = []byte{ + // 2886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcb, 0x6f, 0x64, 0x47, + 0xd5, 0x9f, 0xdb, 0xed, 0x47, 0xfb, 0xd8, 0xed, 0x47, 0xf9, 0xd5, 0x1e, 0xcf, 0xd8, 0x9e, 0x3b, + 0x99, 0x8c, 0xf3, 0x72, 0x7f, 0x33, 0xd1, 0x44, 0xf9, 0x26, 0xdf, 0x27, 0x68, 0x4f, 0xcf, 0x64, + 0x9a, 0xd8, 0x33, 0xce, 0xb5, 0x13, 0x21, 0x22, 0x72, 0x55, 0xbe, 0xb7, 0xdc, 0x5d, 0xe3, 0xfb, + 0x68, 0xdf, 0xaa, 0x76, 0xdc, 0x20, 0x16, 0x48, 0x91, 0x40, 0x61, 0x13, 0x58, 0x22, 0x90, 0xb2, + 0x00, 0x21, 0xb1, 0x81, 0x3f, 0x80, 0x05, 0x12, 0x42, 0xca, 0x02, 0xa4, 0xec, 0x40, 0x2c, 0x02, + 0x4a, 0x16, 0x44, 0xac, 0xf9, 0x03, 0x50, 0x3d, 0xee, 0xa3, 0xbb, 0xfd, 0xe8, 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67, 0xe5, 0xc4, 0x69, 0x5f, 0x72, 0xc2, 0x88, 0x64, + 0x87, 0x0d, 0x4c, 0x83, 0xb2, 0x1f, 0x8a, 0x72, 0xcb, 0xd2, 0xbf, 0xa4, 0x91, 0x89, 0xbb, 0x7c, + 0x7c, 0x7b, 0x7f, 0x44, 0x7e, 0x5c, 0x7a, 0xf9, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x96, 0xd8, + 0x72, 0x80, 0x40, 0x24, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SpotMarketInstantListingFee.Equal(&that1.SpotMarketInstantListingFee) { + return false + } + if !this.DerivativeMarketInstantListingFee.Equal(&that1.DerivativeMarketInstantListingFee) { + return false + } + if !this.DefaultSpotMakerFeeRate.Equal(that1.DefaultSpotMakerFeeRate) { + return false + } + if !this.DefaultSpotTakerFeeRate.Equal(that1.DefaultSpotTakerFeeRate) { + return false + } + if !this.DefaultDerivativeMakerFeeRate.Equal(that1.DefaultDerivativeMakerFeeRate) { + return false + } + if !this.DefaultDerivativeTakerFeeRate.Equal(that1.DefaultDerivativeTakerFeeRate) { + return false + } + if !this.DefaultInitialMarginRatio.Equal(that1.DefaultInitialMarginRatio) { + return false + } + if !this.DefaultMaintenanceMarginRatio.Equal(that1.DefaultMaintenanceMarginRatio) { + return false + } + if this.DefaultFundingInterval != that1.DefaultFundingInterval { + return false + } + if this.FundingMultiple != that1.FundingMultiple { + return false + } + if !this.RelayerFeeShareRate.Equal(that1.RelayerFeeShareRate) { + return false + } + if !this.DefaultHourlyFundingRateCap.Equal(that1.DefaultHourlyFundingRateCap) { + return false + } + if !this.DefaultHourlyInterestRate.Equal(that1.DefaultHourlyInterestRate) { + return false + } + if this.MaxDerivativeOrderSideCount != that1.MaxDerivativeOrderSideCount { + return false + } + if !this.InjRewardStakedRequirementThreshold.Equal(that1.InjRewardStakedRequirementThreshold) { + return false + } + if this.TradingRewardsVestingDuration != that1.TradingRewardsVestingDuration { + return false + } + if !this.LiquidatorRewardShareRate.Equal(that1.LiquidatorRewardShareRate) { + return false + } + if !this.BinaryOptionsMarketInstantListingFee.Equal(&that1.BinaryOptionsMarketInstantListingFee) { + return false + } + if this.AtomicMarketOrderAccessLevel != that1.AtomicMarketOrderAccessLevel { + return false + } + if !this.SpotAtomicMarketOrderFeeMultiplier.Equal(that1.SpotAtomicMarketOrderFeeMultiplier) { + return false + } + if !this.DerivativeAtomicMarketOrderFeeMultiplier.Equal(that1.DerivativeAtomicMarketOrderFeeMultiplier) { + return false + } + if !this.BinaryOptionsAtomicMarketOrderFeeMultiplier.Equal(that1.BinaryOptionsAtomicMarketOrderFeeMultiplier) { + return false + } + if !this.MinimalProtocolFeeRate.Equal(that1.MinimalProtocolFeeRate) { + return false + } + if this.IsInstantDerivativeMarketLaunchEnabled != that1.IsInstantDerivativeMarketLaunchEnabled { + return false + } + if this.PostOnlyModeHeightThreshold != that1.PostOnlyModeHeightThreshold { + return false + } + if this.MarginDecreasePriceTimestampThresholdSeconds != that1.MarginDecreasePriceTimestampThresholdSeconds { + return false + } + if len(this.ExchangeAdmins) != len(that1.ExchangeAdmins) { + return false + } + for i := range this.ExchangeAdmins { + if this.ExchangeAdmins[i] != that1.ExchangeAdmins[i] { + return false + } + } + if !this.InjAuctionMaxCap.Equal(that1.InjAuctionMaxCap) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.InjAuctionMaxCap.Size() + i -= size + if _, err := m.InjAuctionMaxCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + if len(m.ExchangeAdmins) > 0 { + for iNdEx := len(m.ExchangeAdmins) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExchangeAdmins[iNdEx]) + copy(dAtA[i:], m.ExchangeAdmins[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.ExchangeAdmins[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } + } + if m.MarginDecreasePriceTimestampThresholdSeconds != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.MarginDecreasePriceTimestampThresholdSeconds)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if m.PostOnlyModeHeightThreshold != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.PostOnlyModeHeightThreshold)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } + if m.IsInstantDerivativeMarketLaunchEnabled { + i-- + if m.IsInstantDerivativeMarketLaunchEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc0 + } + { + size := m.MinimalProtocolFeeRate.Size() + i -= size + if _, err := m.MinimalProtocolFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + { + size := m.BinaryOptionsAtomicMarketOrderFeeMultiplier.Size() + i -= size + if _, err := m.BinaryOptionsAtomicMarketOrderFeeMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + { + size := m.DerivativeAtomicMarketOrderFeeMultiplier.Size() + i -= size + if _, err := m.DerivativeAtomicMarketOrderFeeMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + { + size := m.SpotAtomicMarketOrderFeeMultiplier.Size() + i -= size + if _, err := m.SpotAtomicMarketOrderFeeMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + if m.AtomicMarketOrderAccessLevel != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.AtomicMarketOrderAccessLevel)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + { + size, err := m.BinaryOptionsMarketInstantListingFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + { + size := m.LiquidatorRewardShareRate.Size() + i -= size + if _, err := m.LiquidatorRewardShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + if m.TradingRewardsVestingDuration != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.TradingRewardsVestingDuration)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + { + size := m.InjRewardStakedRequirementThreshold.Size() + i -= size + if _, err := m.InjRewardStakedRequirementThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.MaxDerivativeOrderSideCount != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.MaxDerivativeOrderSideCount)) + i-- + dAtA[i] = 0x70 + } + { + size := m.DefaultHourlyInterestRate.Size() + i -= size + if _, err := m.DefaultHourlyInterestRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.DefaultHourlyFundingRateCap.Size() + i -= size + if _, err := m.DefaultHourlyFundingRateCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.FundingMultiple != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.FundingMultiple)) + i-- + dAtA[i] = 0x50 + } + if m.DefaultFundingInterval != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.DefaultFundingInterval)) + i-- + dAtA[i] = 0x48 + } + { + size := m.DefaultMaintenanceMarginRatio.Size() + i -= size + if _, err := m.DefaultMaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.DefaultInitialMarginRatio.Size() + i -= size + if _, err := m.DefaultInitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.DefaultDerivativeTakerFeeRate.Size() + i -= size + if _, err := m.DefaultDerivativeTakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.DefaultDerivativeMakerFeeRate.Size() + i -= size + if _, err := m.DefaultDerivativeMakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.DefaultSpotTakerFeeRate.Size() + i -= size + if _, err := m.DefaultSpotTakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.DefaultSpotMakerFeeRate.Size() + i -= size + if _, err := m.DefaultSpotMakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.DerivativeMarketInstantListingFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.SpotMarketInstantListingFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *NextFundingTimestamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NextFundingTimestamp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NextFundingTimestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NextTimestamp != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.NextTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MidPriceAndTOB) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MidPriceAndTOB) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MidPriceAndTOB) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BestSellPrice != nil { + { + size := m.BestSellPrice.Size() + i -= size + if _, err := m.BestSellPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.BestBuyPrice != nil { + { + size := m.BestBuyPrice.Size() + i -= size + if _, err := m.BestBuyPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MidPrice != nil { + { + size := m.MidPrice.Size() + i -= size + if _, err := m.MidPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Deposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Deposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TotalBalance.Size() + i -= size + if _, err := m.TotalBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.AvailableBalance.Size() + i -= size + if _, err := m.AvailableBalance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SubaccountTradeNonce) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountTradeNonce) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountTradeNonce) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SubaccountOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x22 + } + if m.IsReduceOnly { + i-- + if m.IsReduceOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SubaccountOrderData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountOrderData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountOrderData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintExchange(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x12 + } + if m.Order != nil { + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Position) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Position) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CumulativeFundingEntry.Size() + i -= size + if _, err := m.CumulativeFundingEntry.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.EntryPrice.Size() + i -= size + if _, err := m.EntryPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.IsLong { + i-- + if m.IsLong { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Balance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Balance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Deposits != nil { + { + size, err := m.Deposits.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativePosition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativePosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativePosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Position != nil { + { + size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MarketOrderIndicator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MarketOrderIndicator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MarketOrderIndicator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradeLog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradeLog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradeLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x3a + } + if len(m.FeeRecipientAddress) > 0 { + i -= len(m.FeeRecipientAddress) + copy(dAtA[i:], m.FeeRecipientAddress) + i = encodeVarintExchange(dAtA, i, uint64(len(m.FeeRecipientAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintExchange(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x2a + } + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PositionDelta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PositionDelta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PositionDelta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ExecutionPrice.Size() + i -= size + if _, err := m.ExecutionPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.ExecutionMargin.Size() + i -= size + if _, err := m.ExecutionMargin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.ExecutionQuantity.Size() + i -= size + if _, err := m.ExecutionQuantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.IsLong { + i-- + if m.IsLong { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *DerivativeTradeLog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeTradeLog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeTradeLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Pnl.Size() + i -= size + if _, err := m.Pnl.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x3a + } + if len(m.FeeRecipientAddress) > 0 { + i -= len(m.FeeRecipientAddress) + copy(dAtA[i:], m.FeeRecipientAddress) + i = encodeVarintExchange(dAtA, i, uint64(len(m.FeeRecipientAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintExchange(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x2a + } + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Payout.Size() + i -= size + if _, err := m.Payout.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.PositionDelta != nil { + { + size, err := m.PositionDelta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountPosition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountPosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if m.Position != nil { + { + size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Deposit != nil { + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DepositUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DepositUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DepositUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PointsMultiplier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PointsMultiplier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PointsMultiplier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TakerPointsMultiplier.Size() + i -= size + if _, err := m.TakerPointsMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.MakerPointsMultiplier.Size() + i -= size + if _, err := m.MakerPointsMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignBoostInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignBoostInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignBoostInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DerivativeMarketMultipliers) > 0 { + for iNdEx := len(m.DerivativeMarketMultipliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeMarketMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.BoostedDerivativeMarketIds) > 0 { + for iNdEx := len(m.BoostedDerivativeMarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BoostedDerivativeMarketIds[iNdEx]) + copy(dAtA[i:], m.BoostedDerivativeMarketIds[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.BoostedDerivativeMarketIds[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SpotMarketMultipliers) > 0 { + for iNdEx := len(m.SpotMarketMultipliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotMarketMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.BoostedSpotMarketIds) > 0 { + for iNdEx := len(m.BoostedSpotMarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BoostedSpotMarketIds[iNdEx]) + copy(dAtA[i:], m.BoostedSpotMarketIds[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.BoostedSpotMarketIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CampaignRewardPool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CampaignRewardPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CampaignRewardPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MaxCampaignRewards) > 0 { + for iNdEx := len(m.MaxCampaignRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MaxCampaignRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.StartTimestamp != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.StartTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DisqualifiedMarketIds) > 0 { + for iNdEx := len(m.DisqualifiedMarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DisqualifiedMarketIds[iNdEx]) + copy(dAtA[i:], m.DisqualifiedMarketIds[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.DisqualifiedMarketIds[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.TradingRewardBoostInfo != nil { + { + size, err := m.TradingRewardBoostInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.QuoteDenoms) > 0 { + for iNdEx := len(m.QuoteDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.QuoteDenoms[iNdEx]) + copy(dAtA[i:], m.QuoteDenoms[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.QuoteDenoms[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.CampaignDurationSeconds != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.CampaignDurationSeconds)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *FeeDiscountTierInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountTierInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountTierInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Volume.Size() + i -= size + if _, err := m.Volume.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.StakedAmount.Size() + i -= size + if _, err := m.StakedAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.TakerDiscountRate.Size() + i -= size + if _, err := m.TakerDiscountRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.MakerDiscountRate.Size() + i -= size + if _, err := m.MakerDiscountRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *FeeDiscountSchedule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountSchedule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DisqualifiedMarketIds) > 0 { + for iNdEx := len(m.DisqualifiedMarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DisqualifiedMarketIds[iNdEx]) + copy(dAtA[i:], m.DisqualifiedMarketIds[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.DisqualifiedMarketIds[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.TierInfos) > 0 { + for iNdEx := len(m.TierInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TierInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.QuoteDenoms) > 0 { + for iNdEx := len(m.QuoteDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.QuoteDenoms[iNdEx]) + copy(dAtA[i:], m.QuoteDenoms[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.QuoteDenoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.BucketDuration != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.BucketDuration)) + i-- + dAtA[i] = 0x10 + } + if m.BucketCount != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.BucketCount)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *FeeDiscountTierTTL) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountTierTTL) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountTierTTL) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TtlTimestamp != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.TtlTimestamp)) + i-- + dAtA[i] = 0x10 + } + if m.Tier != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountRewards) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountRewards) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradeRecords) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradeRecords) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradeRecords) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LatestTradeRecords) > 0 { + for iNdEx := len(m.LatestTradeRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LatestTradeRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountIDs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountIDs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubaccountIds[iNdEx]) + copy(dAtA[i:], m.SubaccountIds[iNdEx]) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TradeRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradeRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradeRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Timestamp != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Level) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Level) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Level) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Q.Size() + i -= size + if _, err := m.Q.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.P.Size() + i -= size + if _, err := m.P.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *AggregateSubaccountVolumeRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggregateSubaccountVolumeRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregateSubaccountVolumeRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketVolumes) > 0 { + for iNdEx := len(m.MarketVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintExchange(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AggregateAccountVolumeRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggregateAccountVolumeRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AggregateAccountVolumeRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketVolumes) > 0 { + for iNdEx := len(m.MarketVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DenomDecimals) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DenomDecimals) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DenomDecimals) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Decimals != 0 { + i = encodeVarintExchange(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GrantAuthorization) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GrantAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ActiveGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActiveGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ActiveGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EffectiveGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EffectiveGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EffectiveGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsValid { + i-- + if m.IsValid { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size := m.NetGrantedStake.Size() + i -= size + if _, err := m.NetGrantedStake.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintExchange(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintExchange(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintExchange(dAtA []byte, offset int, v uint64) int { + offset -= sovExchange(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SpotMarketInstantListingFee.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DerivativeMarketInstantListingFee.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultSpotMakerFeeRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultSpotTakerFeeRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultDerivativeMakerFeeRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultDerivativeTakerFeeRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultInitialMarginRatio.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultMaintenanceMarginRatio.Size() + n += 1 + l + sovExchange(uint64(l)) + if m.DefaultFundingInterval != 0 { + n += 1 + sovExchange(uint64(m.DefaultFundingInterval)) + } + if m.FundingMultiple != 0 { + n += 1 + sovExchange(uint64(m.FundingMultiple)) + } + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultHourlyFundingRateCap.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.DefaultHourlyInterestRate.Size() + n += 1 + l + sovExchange(uint64(l)) + if m.MaxDerivativeOrderSideCount != 0 { + n += 1 + sovExchange(uint64(m.MaxDerivativeOrderSideCount)) + } + l = m.InjRewardStakedRequirementThreshold.Size() + n += 1 + l + sovExchange(uint64(l)) + if m.TradingRewardsVestingDuration != 0 { + n += 2 + sovExchange(uint64(m.TradingRewardsVestingDuration)) + } + l = m.LiquidatorRewardShareRate.Size() + n += 2 + l + sovExchange(uint64(l)) + l = m.BinaryOptionsMarketInstantListingFee.Size() + n += 2 + l + sovExchange(uint64(l)) + if m.AtomicMarketOrderAccessLevel != 0 { + n += 2 + sovExchange(uint64(m.AtomicMarketOrderAccessLevel)) + } + l = m.SpotAtomicMarketOrderFeeMultiplier.Size() + n += 2 + l + sovExchange(uint64(l)) + l = m.DerivativeAtomicMarketOrderFeeMultiplier.Size() + n += 2 + l + sovExchange(uint64(l)) + l = m.BinaryOptionsAtomicMarketOrderFeeMultiplier.Size() + n += 2 + l + sovExchange(uint64(l)) + l = m.MinimalProtocolFeeRate.Size() + n += 2 + l + sovExchange(uint64(l)) + if m.IsInstantDerivativeMarketLaunchEnabled { + n += 3 + } + if m.PostOnlyModeHeightThreshold != 0 { + n += 2 + sovExchange(uint64(m.PostOnlyModeHeightThreshold)) + } + if m.MarginDecreasePriceTimestampThresholdSeconds != 0 { + n += 2 + sovExchange(uint64(m.MarginDecreasePriceTimestampThresholdSeconds)) + } + if len(m.ExchangeAdmins) > 0 { + for _, s := range m.ExchangeAdmins { + l = len(s) + n += 2 + l + sovExchange(uint64(l)) + } + } + l = m.InjAuctionMaxCap.Size() + n += 2 + l + sovExchange(uint64(l)) + return n +} + +func (m *NextFundingTimestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NextTimestamp != 0 { + n += 1 + sovExchange(uint64(m.NextTimestamp)) + } + return n +} + +func (m *MidPriceAndTOB) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MidPrice != nil { + l = m.MidPrice.Size() + n += 1 + l + sovExchange(uint64(l)) + } + if m.BestBuyPrice != nil { + l = m.BestBuyPrice.Size() + n += 1 + l + sovExchange(uint64(l)) + } + if m.BestSellPrice != nil { + l = m.BestSellPrice.Size() + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *Deposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AvailableBalance.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.TotalBalance.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *SubaccountTradeNonce) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovExchange(uint64(m.Nonce)) + } + return n +} + +func (m *SubaccountOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovExchange(uint64(l)) + if m.IsReduceOnly { + n += 2 + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *SubaccountOrderData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Order != nil { + l = m.Order.Size() + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *Position) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsLong { + n += 2 + } + l = m.Quantity.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.EntryPrice.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Margin.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.CumulativeFundingEntry.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *Balance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.Deposits != nil { + l = m.Deposits.Size() + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *DerivativePosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.Position != nil { + l = m.Position.Size() + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *MarketOrderIndicator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.IsBuy { + n += 2 + } + return n +} + +func (m *TradeLog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovExchange(uint64(l)) + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = m.Fee.Size() + n += 1 + l + sovExchange(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.FeeRecipientAddress) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *PositionDelta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsLong { + n += 2 + } + l = m.ExecutionQuantity.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.ExecutionMargin.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.ExecutionPrice.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *DerivativeTradeLog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.PositionDelta != nil { + l = m.PositionDelta.Size() + n += 1 + l + sovExchange(uint64(l)) + } + l = m.Payout.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Fee.Size() + n += 1 + l + sovExchange(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.FeeRecipientAddress) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = m.Pnl.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *SubaccountPosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Position != nil { + l = m.Position.Size() + n += 1 + l + sovExchange(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *SubaccountDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.Deposit != nil { + l = m.Deposit.Size() + n += 1 + l + sovExchange(uint64(l)) + } + return n +} + +func (m *DepositUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *PointsMultiplier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MakerPointsMultiplier.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.TakerPointsMultiplier.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *TradingRewardCampaignBoostInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BoostedSpotMarketIds) > 0 { + for _, s := range m.BoostedSpotMarketIds { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + if len(m.SpotMarketMultipliers) > 0 { + for _, e := range m.SpotMarketMultipliers { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + if len(m.BoostedDerivativeMarketIds) > 0 { + for _, s := range m.BoostedDerivativeMarketIds { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + if len(m.DerivativeMarketMultipliers) > 0 { + for _, e := range m.DerivativeMarketMultipliers { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *CampaignRewardPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StartTimestamp != 0 { + n += 1 + sovExchange(uint64(m.StartTimestamp)) + } + if len(m.MaxCampaignRewards) > 0 { + for _, e := range m.MaxCampaignRewards { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *TradingRewardCampaignInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CampaignDurationSeconds != 0 { + n += 1 + sovExchange(uint64(m.CampaignDurationSeconds)) + } + if len(m.QuoteDenoms) > 0 { + for _, s := range m.QuoteDenoms { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + if m.TradingRewardBoostInfo != nil { + l = m.TradingRewardBoostInfo.Size() + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.DisqualifiedMarketIds) > 0 { + for _, s := range m.DisqualifiedMarketIds { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *FeeDiscountTierInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MakerDiscountRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.TakerDiscountRate.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.StakedAmount.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Volume.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *FeeDiscountSchedule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BucketCount != 0 { + n += 1 + sovExchange(uint64(m.BucketCount)) + } + if m.BucketDuration != 0 { + n += 1 + sovExchange(uint64(m.BucketDuration)) + } + if len(m.QuoteDenoms) > 0 { + for _, s := range m.QuoteDenoms { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + if len(m.TierInfos) > 0 { + for _, e := range m.TierInfos { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + if len(m.DisqualifiedMarketIds) > 0 { + for _, s := range m.DisqualifiedMarketIds { + l = len(s) + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *FeeDiscountTierTTL) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + sovExchange(uint64(m.Tier)) + } + if m.TtlTimestamp != 0 { + n += 1 + sovExchange(uint64(m.TtlTimestamp)) + } + return n +} + +func (m *AccountRewards) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *TradeRecords) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.LatestTradeRecords) > 0 { + for _, e := range m.LatestTradeRecords { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *SubaccountIDs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for _, b := range m.SubaccountIds { + l = len(b) + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *TradeRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != 0 { + n += 1 + sovExchange(uint64(m.Timestamp)) + } + l = m.Price.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *Level) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.P.Size() + n += 1 + l + sovExchange(uint64(l)) + l = m.Q.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *AggregateSubaccountVolumeRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.MarketVolumes) > 0 { + for _, e := range m.MarketVolumes { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *AggregateAccountVolumeRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if len(m.MarketVolumes) > 0 { + for _, e := range m.MarketVolumes { + l = e.Size() + n += 1 + l + sovExchange(uint64(l)) + } + } + return n +} + +func (m *DenomDecimals) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovExchange(uint64(m.Decimals)) + } + return n +} + +func (m *GrantAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *ActiveGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovExchange(uint64(l)) + return n +} + +func (m *EffectiveGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovExchange(uint64(l)) + } + l = m.NetGrantedStake.Size() + n += 1 + l + sovExchange(uint64(l)) + if m.IsValid { + n += 2 + } + return n +} + +func sovExchange(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozExchange(x uint64) (n int) { + return sovExchange(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketInstantListingFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpotMarketInstantListingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarketInstantListingFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DerivativeMarketInstantListingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSpotMakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultSpotMakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSpotTakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultSpotTakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultDerivativeMakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultDerivativeMakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultDerivativeTakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultDerivativeTakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultInitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultInitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultMaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultMaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultFundingInterval", wireType) + } + m.DefaultFundingInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DefaultFundingInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingMultiple", wireType) + } + m.FundingMultiple = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FundingMultiple |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultHourlyFundingRateCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultHourlyFundingRateCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultHourlyInterestRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DefaultHourlyInterestRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDerivativeOrderSideCount", wireType) + } + m.MaxDerivativeOrderSideCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDerivativeOrderSideCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InjRewardStakedRequirementThreshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InjRewardStakedRequirementThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardsVestingDuration", wireType) + } + m.TradingRewardsVestingDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TradingRewardsVestingDuration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidatorRewardShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LiquidatorRewardShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsMarketInstantListingFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BinaryOptionsMarketInstantListingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AtomicMarketOrderAccessLevel", wireType) + } + m.AtomicMarketOrderAccessLevel = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AtomicMarketOrderAccessLevel |= AtomicMarketOrderAccessLevel(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotAtomicMarketOrderFeeMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpotAtomicMarketOrderFeeMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeAtomicMarketOrderFeeMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DerivativeAtomicMarketOrderFeeMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsAtomicMarketOrderFeeMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BinaryOptionsAtomicMarketOrderFeeMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimalProtocolFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinimalProtocolFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsInstantDerivativeMarketLaunchEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsInstantDerivativeMarketLaunchEnabled = bool(v != 0) + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PostOnlyModeHeightThreshold", wireType) + } + m.PostOnlyModeHeightThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PostOnlyModeHeightThreshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarginDecreasePriceTimestampThresholdSeconds", wireType) + } + m.MarginDecreasePriceTimestampThresholdSeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MarginDecreasePriceTimestampThresholdSeconds |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeAdmins", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExchangeAdmins = append(m.ExchangeAdmins, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InjAuctionMaxCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InjAuctionMaxCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NextFundingTimestamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NextFundingTimestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NextFundingTimestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextTimestamp", wireType) + } + m.NextTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MidPriceAndTOB) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MidPriceAndTOB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MidPriceAndTOB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MidPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MidPrice = &v + if err := m.MidPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestBuyPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestBuyPrice = &v + if err := m.BestBuyPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestSellPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestSellPrice = &v + if err := m.BestSellPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Deposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Deposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AvailableBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBalance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountTradeNonce) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountTradeNonce: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountTradeNonce: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsReduceOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsReduceOnly = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountOrderData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountOrderData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountOrderData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Order == nil { + m.Order = &SubaccountOrder{} + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Position) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Position: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Position: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLong", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLong = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EntryPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeFundingEntry", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CumulativeFundingEntry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Balance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Balance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deposits == nil { + m.Deposits = &Deposit{} + } + if err := m.Deposits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativePosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativePosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativePosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Position == nil { + m.Position = &Position{} + } + if err := m.Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MarketOrderIndicator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MarketOrderIndicator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MarketOrderIndicator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradeLog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradeLog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradeLog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRecipientAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRecipientAddress = append(m.FeeRecipientAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FeeRecipientAddress == nil { + m.FeeRecipientAddress = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PositionDelta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PositionDelta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PositionDelta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLong", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLong = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionQuantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutionQuantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionMargin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutionMargin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutionPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeTradeLog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeTradeLog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeTradeLog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionDelta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PositionDelta == nil { + m.PositionDelta = &PositionDelta{} + } + if err := m.PositionDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Payout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRecipientAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRecipientAddress = append(m.FeeRecipientAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FeeRecipientAddress == nil { + m.FeeRecipientAddress = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pnl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Pnl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountPosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountPosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountPosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Position == nil { + m.Position = &Position{} + } + if err := m.Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = append(m.SubaccountId[:0], dAtA[iNdEx:postIndex]...) + if m.SubaccountId == nil { + m.SubaccountId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deposit == nil { + m.Deposit = &Deposit{} + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DepositUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DepositUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, &SubaccountDeposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PointsMultiplier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PointsMultiplier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PointsMultiplier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerPointsMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerPointsMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerPointsMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerPointsMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignBoostInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignBoostInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignBoostInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoostedSpotMarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BoostedSpotMarketIds = append(m.BoostedSpotMarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketMultipliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarketMultipliers = append(m.SpotMarketMultipliers, PointsMultiplier{}) + if err := m.SpotMarketMultipliers[len(m.SpotMarketMultipliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoostedDerivativeMarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BoostedDerivativeMarketIds = append(m.BoostedDerivativeMarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarketMultipliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarketMultipliers = append(m.DerivativeMarketMultipliers, PointsMultiplier{}) + if err := m.DerivativeMarketMultipliers[len(m.DerivativeMarketMultipliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CampaignRewardPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CampaignRewardPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CampaignRewardPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType) + } + m.StartTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxCampaignRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxCampaignRewards = append(m.MaxCampaignRewards, types.Coin{}) + if err := m.MaxCampaignRewards[len(m.MaxCampaignRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignDurationSeconds", wireType) + } + m.CampaignDurationSeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CampaignDurationSeconds |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenoms = append(m.QuoteDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardBoostInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TradingRewardBoostInfo == nil { + m.TradingRewardBoostInfo = &TradingRewardCampaignBoostInfo{} + } + if err := m.TradingRewardBoostInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisqualifiedMarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DisqualifiedMarketIds = append(m.DisqualifiedMarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountTierInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountTierInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountTierInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerDiscountRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerDiscountRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerDiscountRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerDiscountRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakedAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountSchedule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountSchedule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountSchedule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketCount", wireType) + } + m.BucketCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BucketCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketDuration", wireType) + } + m.BucketDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BucketDuration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenoms = append(m.QuoteDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TierInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TierInfos = append(m.TierInfos, &FeeDiscountTierInfo{}) + if err := m.TierInfos[len(m.TierInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisqualifiedMarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DisqualifiedMarketIds = append(m.DisqualifiedMarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountTierTTL) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountTierTTL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountTierTTL: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TtlTimestamp", wireType) + } + m.TtlTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TtlTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountRewards) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountRewards: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.Coin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradeRecords) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradeRecords: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradeRecords: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestTradeRecords", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestTradeRecords = append(m.LatestTradeRecords, &TradeRecord{}) + if err := m.LatestTradeRecords[len(m.LatestTradeRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountIDs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountIDs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountIDs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountIds", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountIds = append(m.SubaccountIds, make([]byte, postIndex-iNdEx)) + copy(m.SubaccountIds[len(m.SubaccountIds)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradeRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradeRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradeRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Level) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Level: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Level: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field P", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.P.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Q", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Q.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggregateSubaccountVolumeRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggregateSubaccountVolumeRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggregateSubaccountVolumeRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketVolumes = append(m.MarketVolumes, &MarketVolume{}) + if err := m.MarketVolumes[len(m.MarketVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggregateAccountVolumeRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggregateAccountVolumeRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggregateAccountVolumeRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketVolumes = append(m.MarketVolumes, &MarketVolume{}) + if err := m.MarketVolumes[len(m.MarketVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DenomDecimals) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DenomDecimals: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DenomDecimals: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GrantAuthorization) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GrantAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GrantAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActiveGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActiveGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActiveGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EffectiveGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EffectiveGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EffectiveGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetGrantedStake", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExchange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthExchange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NetGrantedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsValid", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExchange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsValid = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipExchange(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthExchange + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipExchange(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExchange + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExchange + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExchange + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthExchange + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupExchange + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthExchange + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthExchange = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExchange = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupExchange = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/fee_discounts.go b/chain/exchange/types/v2/fee_discounts.go new file mode 100644 index 00000000..1b5e37b8 --- /dev/null +++ b/chain/exchange/types/v2/fee_discounts.go @@ -0,0 +1,76 @@ +package v2 + +import ( + "cosmossdk.io/math" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +func (s *FeeDiscountSchedule) CalculateFeeDiscountTier( + stakedAmount math.Int, + tradingVolume math.LegacyDec, +) ( + feeDiscountRates *types.FeeDiscountRates, + tierLevel uint64, +) { + highestTierLevel := 0 + // O(N) but probably the most efficient way nonetheless since we just have 10 tiers and most will be on low tiers + for idx, tier := range s.TierInfos { + // both tier conditions must be satisfied to reach a tier level + if stakedAmount.LT(tier.StakedAmount) || tradingVolume.LT(tier.Volume) { + break + } + highestTierLevel = idx + 1 + } + + tierLevel = uint64(highestTierLevel) + + if tierLevel == 0 { + feeDiscountRates = &types.FeeDiscountRates{ + MakerDiscountRate: math.LegacyZeroDec(), + TakerDiscountRate: math.LegacyZeroDec(), + } + } else { + feeDiscountRates = &types.FeeDiscountRates{ + MakerDiscountRate: s.TierInfos[highestTierLevel-1].MakerDiscountRate, + TakerDiscountRate: s.TierInfos[highestTierLevel-1].TakerDiscountRate, + } + } + + return feeDiscountRates, tierLevel +} + +func (s *FeeDiscountSchedule) TierOneRequirements() ( + minStakedAmount math.Int, + minTradingFeePaid math.LegacyDec, +) { + // s.TierInfos[0] is tier one, since tier 0 is implicit + return s.TierInfos[0].StakedAmount, s.TierInfos[0].Volume +} + +func (s *FeeDiscountSchedule) GetFeeDiscountRatesMap() types.FeeDiscountRatesMap { + if s == nil { + return make(types.FeeDiscountRatesMap) + } + + feeDiscountRatesMap := make(types.FeeDiscountRatesMap, len(s.TierInfos)) + feeDiscountRatesMap[0] = &types.FeeDiscountRates{ + MakerDiscountRate: math.LegacyZeroDec(), + TakerDiscountRate: math.LegacyZeroDec(), + } + + for idx, tierInfo := range s.TierInfos { + feeDiscountRatesMap[uint64(idx+1)] = &types.FeeDiscountRates{ + MakerDiscountRate: tierInfo.MakerDiscountRate, + TakerDiscountRate: tierInfo.TakerDiscountRate, + } + } + return feeDiscountRatesMap +} + +func NewFeeDiscountTierTTL(tier uint64, ttlTimestamp int64) *FeeDiscountTierTTL { + return &FeeDiscountTierTTL{ + Tier: tier, + TtlTimestamp: ttlTimestamp, + } +} diff --git a/chain/exchange/types/v2/fee_validation.go b/chain/exchange/types/v2/fee_validation.go new file mode 100644 index 00000000..91b9ac10 --- /dev/null +++ b/chain/exchange/types/v2/fee_validation.go @@ -0,0 +1,23 @@ +package v2 + +import ( + "cosmossdk.io/math" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +func ValidateMakerWithTakerFeeAndDiscounts( + makerFeeRate, + takerFeeRate, + relayerFeeShareRate, + minimalProtocolFeeRate math.LegacyDec, + discountSchedule *FeeDiscountSchedule, +) error { + smallestTakerFeeRate := takerFeeRate + if makerFeeRate.IsNegative() && discountSchedule != nil && len(discountSchedule.TierInfos) > 0 { + maxTakerDiscount := discountSchedule.TierInfos[len(discountSchedule.TierInfos)-1].TakerDiscountRate + smallestTakerFeeRate = smallestTakerFeeRate.Mul(math.LegacyOneDec().Sub(maxTakerDiscount)) + } + + return types.ValidateMakerWithTakerFee(makerFeeRate, smallestTakerFeeRate, relayerFeeShareRate, minimalProtocolFeeRate) +} diff --git a/chain/exchange/types/v2/genesis.go b/chain/exchange/types/v2/genesis.go new file mode 100644 index 00000000..69068f1d --- /dev/null +++ b/chain/exchange/types/v2/genesis.go @@ -0,0 +1,13 @@ +package v2 + +func NewGenesisState() GenesisState { + return GenesisState{} +} + +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + IsSpotExchangeEnabled: true, + IsDerivativesExchangeEnabled: true, + } +} diff --git a/chain/exchange/types/v2/genesis.pb.go b/chain/exchange/types/v2/genesis.pb.go new file mode 100644 index 00000000..37445d64 --- /dev/null +++ b/chain/exchange/types/v2/genesis.pb.go @@ -0,0 +1,4645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/genesis.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the exchange module's genesis state. +type GenesisState struct { + // params defines all the parameters of related to exchange. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // spot_markets is an array containing the genesis trade pairs + SpotMarkets []*SpotMarket `protobuf:"bytes,2,rep,name=spot_markets,json=spotMarkets,proto3" json:"spot_markets,omitempty"` + // derivative_markets is an array containing the genesis derivative markets + DerivativeMarkets []*DerivativeMarket `protobuf:"bytes,3,rep,name=derivative_markets,json=derivativeMarkets,proto3" json:"derivative_markets,omitempty"` + // spot_orderbook defines the spot exchange limit orderbook active at genesis. + SpotOrderbook []SpotOrderBook `protobuf:"bytes,4,rep,name=spot_orderbook,json=spotOrderbook,proto3" json:"spot_orderbook"` + // derivative_orderbook defines the derivative exchange limit orderbook active + // at genesis. + DerivativeOrderbook []DerivativeOrderBook `protobuf:"bytes,5,rep,name=derivative_orderbook,json=derivativeOrderbook,proto3" json:"derivative_orderbook"` + // balances defines the exchange users balances active at genesis. + Balances []Balance `protobuf:"bytes,6,rep,name=balances,proto3" json:"balances"` + // positions defines the exchange derivative positions at genesis + Positions []DerivativePosition `protobuf:"bytes,7,rep,name=positions,proto3" json:"positions"` + // subaccount_trade_nonces defines the subaccount trade nonces for the + // subaccounts at genesis + SubaccountTradeNonces []SubaccountNonce `protobuf:"bytes,8,rep,name=subaccount_trade_nonces,json=subaccountTradeNonces,proto3" json:"subaccount_trade_nonces"` + // expiry_futures_market_info defines the market info for the expiry futures + // markets at genesis + ExpiryFuturesMarketInfoState []ExpiryFuturesMarketInfoState `protobuf:"bytes,9,rep,name=expiry_futures_market_info_state,json=expiryFuturesMarketInfoState,proto3" json:"expiry_futures_market_info_state"` + // perpetual_market_info defines the market info for the perpetual derivative + // markets at genesis + PerpetualMarketInfo []PerpetualMarketInfo `protobuf:"bytes,10,rep,name=perpetual_market_info,json=perpetualMarketInfo,proto3" json:"perpetual_market_info"` + // perpetual_market_funding_state defines the funding state for the perpetual + // derivative markets at genesis + PerpetualMarketFundingState []PerpetualMarketFundingState `protobuf:"bytes,11,rep,name=perpetual_market_funding_state,json=perpetualMarketFundingState,proto3" json:"perpetual_market_funding_state"` + // derivative_market_settlement_scheduled defines the scheduled markets for + // settlement at genesis + DerivativeMarketSettlementScheduled []DerivativeMarketSettlementInfo `protobuf:"bytes,12,rep,name=derivative_market_settlement_scheduled,json=derivativeMarketSettlementScheduled,proto3" json:"derivative_market_settlement_scheduled"` + // sets spot markets as enabled + IsSpotExchangeEnabled bool `protobuf:"varint,13,opt,name=is_spot_exchange_enabled,json=isSpotExchangeEnabled,proto3" json:"is_spot_exchange_enabled,omitempty"` + // sets derivative markets as enabled + IsDerivativesExchangeEnabled bool `protobuf:"varint,14,opt,name=is_derivatives_exchange_enabled,json=isDerivativesExchangeEnabled,proto3" json:"is_derivatives_exchange_enabled,omitempty"` + // the current trading reward campaign info + TradingRewardCampaignInfo *TradingRewardCampaignInfo `protobuf:"bytes,15,opt,name=trading_reward_campaign_info,json=tradingRewardCampaignInfo,proto3" json:"trading_reward_campaign_info,omitempty"` + // the current and upcoming trading reward campaign pools + TradingRewardPoolCampaignSchedule []*CampaignRewardPool `protobuf:"bytes,16,rep,name=trading_reward_pool_campaign_schedule,json=tradingRewardPoolCampaignSchedule,proto3" json:"trading_reward_pool_campaign_schedule,omitempty"` + // the current trading reward account points + TradingRewardCampaignAccountPoints []*TradingRewardCampaignAccountPoints `protobuf:"bytes,17,rep,name=trading_reward_campaign_account_points,json=tradingRewardCampaignAccountPoints,proto3" json:"trading_reward_campaign_account_points,omitempty"` + // the fee discount schedule + FeeDiscountSchedule *FeeDiscountSchedule `protobuf:"bytes,18,opt,name=fee_discount_schedule,json=feeDiscountSchedule,proto3" json:"fee_discount_schedule,omitempty"` + // the cached fee discount account tiers with TTL + FeeDiscountAccountTierTtl []*FeeDiscountAccountTierTTL `protobuf:"bytes,19,rep,name=fee_discount_account_tier_ttl,json=feeDiscountAccountTierTtl,proto3" json:"fee_discount_account_tier_ttl,omitempty"` + // the fee discount paid by accounts in all buckets + FeeDiscountBucketVolumeAccounts []*FeeDiscountBucketVolumeAccounts `protobuf:"bytes,20,rep,name=fee_discount_bucket_volume_accounts,json=feeDiscountBucketVolumeAccounts,proto3" json:"fee_discount_bucket_volume_accounts,omitempty"` + // sets the first fee cycle as finished + IsFirstFeeCycleFinished bool `protobuf:"varint,21,opt,name=is_first_fee_cycle_finished,json=isFirstFeeCycleFinished,proto3" json:"is_first_fee_cycle_finished,omitempty"` + // the current and upcoming trading reward campaign pending pools + PendingTradingRewardPoolCampaignSchedule []*CampaignRewardPool `protobuf:"bytes,22,rep,name=pending_trading_reward_pool_campaign_schedule,json=pendingTradingRewardPoolCampaignSchedule,proto3" json:"pending_trading_reward_pool_campaign_schedule,omitempty"` + // the pending trading reward account points + PendingTradingRewardCampaignAccountPoints []*TradingRewardCampaignAccountPendingPoints `protobuf:"bytes,23,rep,name=pending_trading_reward_campaign_account_points,json=pendingTradingRewardCampaignAccountPoints,proto3" json:"pending_trading_reward_campaign_account_points,omitempty"` + // the addresses opting out of trading rewards + RewardsOptOutAddresses []string `protobuf:"bytes,24,rep,name=rewards_opt_out_addresses,json=rewardsOptOutAddresses,proto3" json:"rewards_opt_out_addresses,omitempty"` + HistoricalTradeRecords []*TradeRecords `protobuf:"bytes,25,rep,name=historical_trade_records,json=historicalTradeRecords,proto3" json:"historical_trade_records,omitempty"` + // binary_options_markets is an array containing the genesis binary options + // markets + BinaryOptionsMarkets []*BinaryOptionsMarket `protobuf:"bytes,26,rep,name=binary_options_markets,json=binaryOptionsMarkets,proto3" json:"binary_options_markets,omitempty"` + // binary_options_markets_scheduled_for_settlement contains the marketIDs of + // binary options markets scheduled for next-block settlement + BinaryOptionsMarketIdsScheduledForSettlement []string `protobuf:"bytes,27,rep,name=binary_options_market_ids_scheduled_for_settlement,json=binaryOptionsMarketIdsScheduledForSettlement,proto3" json:"binary_options_market_ids_scheduled_for_settlement,omitempty"` + // spot_market_ids_scheduled_to_force_close defines the scheduled markets for + // forced closings at genesis + SpotMarketIdsScheduledToForceClose []string `protobuf:"bytes,28,rep,name=spot_market_ids_scheduled_to_force_close,json=spotMarketIdsScheduledToForceClose,proto3" json:"spot_market_ids_scheduled_to_force_close,omitempty"` + // denom_decimals defines the denom decimals for the exchange. + DenomDecimals []DenomDecimals `protobuf:"bytes,29,rep,name=denom_decimals,json=denomDecimals,proto3" json:"denom_decimals"` + // conditional_derivative_orderbook contains conditional orderbooks for all + // markets (both lmit and market conditional orders) + ConditionalDerivativeOrderbooks []*ConditionalDerivativeOrderBook `protobuf:"bytes,30,rep,name=conditional_derivative_orderbooks,json=conditionalDerivativeOrderbooks,proto3" json:"conditional_derivative_orderbooks,omitempty"` + // market_fee_multipliers contains any non-default atomic order fee + // multipliers + MarketFeeMultipliers []*MarketFeeMultiplier `protobuf:"bytes,31,rep,name=market_fee_multipliers,json=marketFeeMultipliers,proto3" json:"market_fee_multipliers,omitempty"` + OrderbookSequences []*OrderbookSequence `protobuf:"bytes,32,rep,name=orderbook_sequences,json=orderbookSequences,proto3" json:"orderbook_sequences,omitempty"` + SubaccountVolumes []*AggregateSubaccountVolumeRecord `protobuf:"bytes,33,rep,name=subaccount_volumes,json=subaccountVolumes,proto3" json:"subaccount_volumes,omitempty"` + MarketVolumes []*MarketVolume `protobuf:"bytes,34,rep,name=market_volumes,json=marketVolumes,proto3" json:"market_volumes,omitempty"` + GrantAuthorizations []*FullGrantAuthorizations `protobuf:"bytes,35,rep,name=grant_authorizations,json=grantAuthorizations,proto3" json:"grant_authorizations,omitempty"` + ActiveGrants []*FullActiveGrant `protobuf:"bytes,36,rep,name=active_grants,json=activeGrants,proto3" json:"active_grants,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetSpotMarkets() []*SpotMarket { + if m != nil { + return m.SpotMarkets + } + return nil +} + +func (m *GenesisState) GetDerivativeMarkets() []*DerivativeMarket { + if m != nil { + return m.DerivativeMarkets + } + return nil +} + +func (m *GenesisState) GetSpotOrderbook() []SpotOrderBook { + if m != nil { + return m.SpotOrderbook + } + return nil +} + +func (m *GenesisState) GetDerivativeOrderbook() []DerivativeOrderBook { + if m != nil { + return m.DerivativeOrderbook + } + return nil +} + +func (m *GenesisState) GetBalances() []Balance { + if m != nil { + return m.Balances + } + return nil +} + +func (m *GenesisState) GetPositions() []DerivativePosition { + if m != nil { + return m.Positions + } + return nil +} + +func (m *GenesisState) GetSubaccountTradeNonces() []SubaccountNonce { + if m != nil { + return m.SubaccountTradeNonces + } + return nil +} + +func (m *GenesisState) GetExpiryFuturesMarketInfoState() []ExpiryFuturesMarketInfoState { + if m != nil { + return m.ExpiryFuturesMarketInfoState + } + return nil +} + +func (m *GenesisState) GetPerpetualMarketInfo() []PerpetualMarketInfo { + if m != nil { + return m.PerpetualMarketInfo + } + return nil +} + +func (m *GenesisState) GetPerpetualMarketFundingState() []PerpetualMarketFundingState { + if m != nil { + return m.PerpetualMarketFundingState + } + return nil +} + +func (m *GenesisState) GetDerivativeMarketSettlementScheduled() []DerivativeMarketSettlementInfo { + if m != nil { + return m.DerivativeMarketSettlementScheduled + } + return nil +} + +func (m *GenesisState) GetIsSpotExchangeEnabled() bool { + if m != nil { + return m.IsSpotExchangeEnabled + } + return false +} + +func (m *GenesisState) GetIsDerivativesExchangeEnabled() bool { + if m != nil { + return m.IsDerivativesExchangeEnabled + } + return false +} + +func (m *GenesisState) GetTradingRewardCampaignInfo() *TradingRewardCampaignInfo { + if m != nil { + return m.TradingRewardCampaignInfo + } + return nil +} + +func (m *GenesisState) GetTradingRewardPoolCampaignSchedule() []*CampaignRewardPool { + if m != nil { + return m.TradingRewardPoolCampaignSchedule + } + return nil +} + +func (m *GenesisState) GetTradingRewardCampaignAccountPoints() []*TradingRewardCampaignAccountPoints { + if m != nil { + return m.TradingRewardCampaignAccountPoints + } + return nil +} + +func (m *GenesisState) GetFeeDiscountSchedule() *FeeDiscountSchedule { + if m != nil { + return m.FeeDiscountSchedule + } + return nil +} + +func (m *GenesisState) GetFeeDiscountAccountTierTtl() []*FeeDiscountAccountTierTTL { + if m != nil { + return m.FeeDiscountAccountTierTtl + } + return nil +} + +func (m *GenesisState) GetFeeDiscountBucketVolumeAccounts() []*FeeDiscountBucketVolumeAccounts { + if m != nil { + return m.FeeDiscountBucketVolumeAccounts + } + return nil +} + +func (m *GenesisState) GetIsFirstFeeCycleFinished() bool { + if m != nil { + return m.IsFirstFeeCycleFinished + } + return false +} + +func (m *GenesisState) GetPendingTradingRewardPoolCampaignSchedule() []*CampaignRewardPool { + if m != nil { + return m.PendingTradingRewardPoolCampaignSchedule + } + return nil +} + +func (m *GenesisState) GetPendingTradingRewardCampaignAccountPoints() []*TradingRewardCampaignAccountPendingPoints { + if m != nil { + return m.PendingTradingRewardCampaignAccountPoints + } + return nil +} + +func (m *GenesisState) GetRewardsOptOutAddresses() []string { + if m != nil { + return m.RewardsOptOutAddresses + } + return nil +} + +func (m *GenesisState) GetHistoricalTradeRecords() []*TradeRecords { + if m != nil { + return m.HistoricalTradeRecords + } + return nil +} + +func (m *GenesisState) GetBinaryOptionsMarkets() []*BinaryOptionsMarket { + if m != nil { + return m.BinaryOptionsMarkets + } + return nil +} + +func (m *GenesisState) GetBinaryOptionsMarketIdsScheduledForSettlement() []string { + if m != nil { + return m.BinaryOptionsMarketIdsScheduledForSettlement + } + return nil +} + +func (m *GenesisState) GetSpotMarketIdsScheduledToForceClose() []string { + if m != nil { + return m.SpotMarketIdsScheduledToForceClose + } + return nil +} + +func (m *GenesisState) GetDenomDecimals() []DenomDecimals { + if m != nil { + return m.DenomDecimals + } + return nil +} + +func (m *GenesisState) GetConditionalDerivativeOrderbooks() []*ConditionalDerivativeOrderBook { + if m != nil { + return m.ConditionalDerivativeOrderbooks + } + return nil +} + +func (m *GenesisState) GetMarketFeeMultipliers() []*MarketFeeMultiplier { + if m != nil { + return m.MarketFeeMultipliers + } + return nil +} + +func (m *GenesisState) GetOrderbookSequences() []*OrderbookSequence { + if m != nil { + return m.OrderbookSequences + } + return nil +} + +func (m *GenesisState) GetSubaccountVolumes() []*AggregateSubaccountVolumeRecord { + if m != nil { + return m.SubaccountVolumes + } + return nil +} + +func (m *GenesisState) GetMarketVolumes() []*MarketVolume { + if m != nil { + return m.MarketVolumes + } + return nil +} + +func (m *GenesisState) GetGrantAuthorizations() []*FullGrantAuthorizations { + if m != nil { + return m.GrantAuthorizations + } + return nil +} + +func (m *GenesisState) GetActiveGrants() []*FullActiveGrant { + if m != nil { + return m.ActiveGrants + } + return nil +} + +type OrderbookSequence struct { + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *OrderbookSequence) Reset() { *m = OrderbookSequence{} } +func (m *OrderbookSequence) String() string { return proto.CompactTextString(m) } +func (*OrderbookSequence) ProtoMessage() {} +func (*OrderbookSequence) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{1} +} +func (m *OrderbookSequence) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderbookSequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderbookSequence.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderbookSequence) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderbookSequence.Merge(m, src) +} +func (m *OrderbookSequence) XXX_Size() int { + return m.Size() +} +func (m *OrderbookSequence) XXX_DiscardUnknown() { + xxx_messageInfo_OrderbookSequence.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderbookSequence proto.InternalMessageInfo + +func (m *OrderbookSequence) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *OrderbookSequence) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type FeeDiscountAccountTierTTL struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + TierTtl *FeeDiscountTierTTL `protobuf:"bytes,2,opt,name=tier_ttl,json=tierTtl,proto3" json:"tier_ttl,omitempty"` +} + +func (m *FeeDiscountAccountTierTTL) Reset() { *m = FeeDiscountAccountTierTTL{} } +func (m *FeeDiscountAccountTierTTL) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountAccountTierTTL) ProtoMessage() {} +func (*FeeDiscountAccountTierTTL) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{2} +} +func (m *FeeDiscountAccountTierTTL) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountAccountTierTTL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountAccountTierTTL.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountAccountTierTTL) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountAccountTierTTL.Merge(m, src) +} +func (m *FeeDiscountAccountTierTTL) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountAccountTierTTL) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountAccountTierTTL.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountAccountTierTTL proto.InternalMessageInfo + +func (m *FeeDiscountAccountTierTTL) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *FeeDiscountAccountTierTTL) GetTierTtl() *FeeDiscountTierTTL { + if m != nil { + return m.TierTtl + } + return nil +} + +type FeeDiscountBucketVolumeAccounts struct { + BucketStartTimestamp int64 `protobuf:"varint,1,opt,name=bucket_start_timestamp,json=bucketStartTimestamp,proto3" json:"bucket_start_timestamp,omitempty"` + AccountVolume []*AccountVolume `protobuf:"bytes,2,rep,name=account_volume,json=accountVolume,proto3" json:"account_volume,omitempty"` +} + +func (m *FeeDiscountBucketVolumeAccounts) Reset() { *m = FeeDiscountBucketVolumeAccounts{} } +func (m *FeeDiscountBucketVolumeAccounts) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountBucketVolumeAccounts) ProtoMessage() {} +func (*FeeDiscountBucketVolumeAccounts) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{3} +} +func (m *FeeDiscountBucketVolumeAccounts) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountBucketVolumeAccounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountBucketVolumeAccounts.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountBucketVolumeAccounts) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountBucketVolumeAccounts.Merge(m, src) +} +func (m *FeeDiscountBucketVolumeAccounts) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountBucketVolumeAccounts) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountBucketVolumeAccounts.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountBucketVolumeAccounts proto.InternalMessageInfo + +func (m *FeeDiscountBucketVolumeAccounts) GetBucketStartTimestamp() int64 { + if m != nil { + return m.BucketStartTimestamp + } + return 0 +} + +func (m *FeeDiscountBucketVolumeAccounts) GetAccountVolume() []*AccountVolume { + if m != nil { + return m.AccountVolume + } + return nil +} + +type AccountVolume struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Volume cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=volume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volume"` +} + +func (m *AccountVolume) Reset() { *m = AccountVolume{} } +func (m *AccountVolume) String() string { return proto.CompactTextString(m) } +func (*AccountVolume) ProtoMessage() {} +func (*AccountVolume) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{4} +} +func (m *AccountVolume) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountVolume.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccountVolume) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountVolume.Merge(m, src) +} +func (m *AccountVolume) XXX_Size() int { + return m.Size() +} +func (m *AccountVolume) XXX_DiscardUnknown() { + xxx_messageInfo_AccountVolume.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountVolume proto.InternalMessageInfo + +func (m *AccountVolume) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +type TradingRewardCampaignAccountPoints struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Points cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=points,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"points"` +} + +func (m *TradingRewardCampaignAccountPoints) Reset() { *m = TradingRewardCampaignAccountPoints{} } +func (m *TradingRewardCampaignAccountPoints) String() string { return proto.CompactTextString(m) } +func (*TradingRewardCampaignAccountPoints) ProtoMessage() {} +func (*TradingRewardCampaignAccountPoints) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{5} +} +func (m *TradingRewardCampaignAccountPoints) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignAccountPoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignAccountPoints.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignAccountPoints) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignAccountPoints.Merge(m, src) +} +func (m *TradingRewardCampaignAccountPoints) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignAccountPoints) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignAccountPoints.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignAccountPoints proto.InternalMessageInfo + +func (m *TradingRewardCampaignAccountPoints) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +type TradingRewardCampaignAccountPendingPoints struct { + RewardPoolStartTimestamp int64 `protobuf:"varint,1,opt,name=reward_pool_start_timestamp,json=rewardPoolStartTimestamp,proto3" json:"reward_pool_start_timestamp,omitempty"` + AccountPoints []*TradingRewardCampaignAccountPoints `protobuf:"bytes,2,rep,name=account_points,json=accountPoints,proto3" json:"account_points,omitempty"` +} + +func (m *TradingRewardCampaignAccountPendingPoints) Reset() { + *m = TradingRewardCampaignAccountPendingPoints{} +} +func (m *TradingRewardCampaignAccountPendingPoints) String() string { + return proto.CompactTextString(m) +} +func (*TradingRewardCampaignAccountPendingPoints) ProtoMessage() {} +func (*TradingRewardCampaignAccountPendingPoints) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{6} +} +func (m *TradingRewardCampaignAccountPendingPoints) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignAccountPendingPoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignAccountPendingPoints.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignAccountPendingPoints) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignAccountPendingPoints.Merge(m, src) +} +func (m *TradingRewardCampaignAccountPendingPoints) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignAccountPendingPoints) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignAccountPendingPoints.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignAccountPendingPoints proto.InternalMessageInfo + +func (m *TradingRewardCampaignAccountPendingPoints) GetRewardPoolStartTimestamp() int64 { + if m != nil { + return m.RewardPoolStartTimestamp + } + return 0 +} + +func (m *TradingRewardCampaignAccountPendingPoints) GetAccountPoints() []*TradingRewardCampaignAccountPoints { + if m != nil { + return m.AccountPoints + } + return nil +} + +type SubaccountNonce struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + SubaccountTradeNonce SubaccountTradeNonce `protobuf:"bytes,2,opt,name=subaccount_trade_nonce,json=subaccountTradeNonce,proto3" json:"subaccount_trade_nonce"` +} + +func (m *SubaccountNonce) Reset() { *m = SubaccountNonce{} } +func (m *SubaccountNonce) String() string { return proto.CompactTextString(m) } +func (*SubaccountNonce) ProtoMessage() {} +func (*SubaccountNonce) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{7} +} +func (m *SubaccountNonce) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountNonce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountNonce.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountNonce) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountNonce.Merge(m, src) +} +func (m *SubaccountNonce) XXX_Size() int { + return m.Size() +} +func (m *SubaccountNonce) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountNonce.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountNonce proto.InternalMessageInfo + +type FullGrantAuthorizations struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + TotalGrantAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_grant_amount,json=totalGrantAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_grant_amount"` + LastDelegationsCheckedTime int64 `protobuf:"varint,3,opt,name=last_delegations_checked_time,json=lastDelegationsCheckedTime,proto3" json:"last_delegations_checked_time,omitempty"` + Grants []*GrantAuthorization `protobuf:"bytes,4,rep,name=grants,proto3" json:"grants,omitempty"` +} + +func (m *FullGrantAuthorizations) Reset() { *m = FullGrantAuthorizations{} } +func (m *FullGrantAuthorizations) String() string { return proto.CompactTextString(m) } +func (*FullGrantAuthorizations) ProtoMessage() {} +func (*FullGrantAuthorizations) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{8} +} +func (m *FullGrantAuthorizations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullGrantAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullGrantAuthorizations.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullGrantAuthorizations) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullGrantAuthorizations.Merge(m, src) +} +func (m *FullGrantAuthorizations) XXX_Size() int { + return m.Size() +} +func (m *FullGrantAuthorizations) XXX_DiscardUnknown() { + xxx_messageInfo_FullGrantAuthorizations.DiscardUnknown(m) +} + +var xxx_messageInfo_FullGrantAuthorizations proto.InternalMessageInfo + +func (m *FullGrantAuthorizations) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *FullGrantAuthorizations) GetLastDelegationsCheckedTime() int64 { + if m != nil { + return m.LastDelegationsCheckedTime + } + return 0 +} + +func (m *FullGrantAuthorizations) GetGrants() []*GrantAuthorization { + if m != nil { + return m.Grants + } + return nil +} + +type FullActiveGrant struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + ActiveGrant *ActiveGrant `protobuf:"bytes,2,opt,name=active_grant,json=activeGrant,proto3" json:"active_grant,omitempty"` +} + +func (m *FullActiveGrant) Reset() { *m = FullActiveGrant{} } +func (m *FullActiveGrant) String() string { return proto.CompactTextString(m) } +func (*FullActiveGrant) ProtoMessage() {} +func (*FullActiveGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_fff40080d86ae941, []int{9} +} +func (m *FullActiveGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullActiveGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullActiveGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullActiveGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullActiveGrant.Merge(m, src) +} +func (m *FullActiveGrant) XXX_Size() int { + return m.Size() +} +func (m *FullActiveGrant) XXX_DiscardUnknown() { + xxx_messageInfo_FullActiveGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_FullActiveGrant proto.InternalMessageInfo + +func (m *FullActiveGrant) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +func (m *FullActiveGrant) GetActiveGrant() *ActiveGrant { + if m != nil { + return m.ActiveGrant + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "injective.exchange.v2.GenesisState") + proto.RegisterType((*OrderbookSequence)(nil), "injective.exchange.v2.OrderbookSequence") + proto.RegisterType((*FeeDiscountAccountTierTTL)(nil), "injective.exchange.v2.FeeDiscountAccountTierTTL") + proto.RegisterType((*FeeDiscountBucketVolumeAccounts)(nil), "injective.exchange.v2.FeeDiscountBucketVolumeAccounts") + proto.RegisterType((*AccountVolume)(nil), "injective.exchange.v2.AccountVolume") + proto.RegisterType((*TradingRewardCampaignAccountPoints)(nil), "injective.exchange.v2.TradingRewardCampaignAccountPoints") + proto.RegisterType((*TradingRewardCampaignAccountPendingPoints)(nil), "injective.exchange.v2.TradingRewardCampaignAccountPendingPoints") + proto.RegisterType((*SubaccountNonce)(nil), "injective.exchange.v2.SubaccountNonce") + proto.RegisterType((*FullGrantAuthorizations)(nil), "injective.exchange.v2.FullGrantAuthorizations") + proto.RegisterType((*FullActiveGrant)(nil), "injective.exchange.v2.FullActiveGrant") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/genesis.proto", fileDescriptor_fff40080d86ae941) +} + +var fileDescriptor_fff40080d86ae941 = []byte{ + // 1770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5b, 0x6f, 0x1c, 0x49, + 0x15, 0x76, 0xc7, 0xc1, 0xb1, 0xcb, 0x76, 0xb2, 0x29, 0x5f, 0xd2, 0xbe, 0xcd, 0x38, 0xe3, 0x6c, + 0x98, 0x00, 0x3b, 0xb3, 0xf2, 0x72, 0xd1, 0xb2, 0x20, 0xad, 0x6f, 0xb3, 0x32, 0x49, 0xb0, 0xb7, + 0x3d, 0x5a, 0x09, 0x24, 0xe8, 0xad, 0xe9, 0x3e, 0x33, 0x53, 0xb8, 0xbb, 0xab, 0xb7, 0xab, 0xc6, + 0xc4, 0x44, 0x3c, 0x20, 0x21, 0x84, 0x90, 0x90, 0x56, 0xe2, 0x0f, 0xac, 0x04, 0x2f, 0xfc, 0x93, + 0x7d, 0xe0, 0x61, 0x1f, 0x11, 0x0f, 0x2b, 0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x19, 0xc5, 0x3b, + 0x1e, 0x4b, 0xa0, 0xff, 0xb3, 0x4b, 0x68, 0x54, 0x0f, 0x99, 0x1c, 0x56, 0x78, 0xfe, 0xa7, 0x9e, + 0xb8, 0x8e, 0x81, 0xd7, 0xaf, 0xf6, 0x5b, 0x73, 0xea, 0x8f, 0xbd, 0xf7, 0xfe, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0xf1, 0x5e, 0x7d, 0xe8, 0xbd, 0x14, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ActiveGrants) > 0 { + for iNdEx := len(m.ActiveGrants) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ActiveGrants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xa2 + } + } + if len(m.GrantAuthorizations) > 0 { + for iNdEx := len(m.GrantAuthorizations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GrantAuthorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x9a + } + } + if len(m.MarketVolumes) > 0 { + for iNdEx := len(m.MarketVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x92 + } + } + if len(m.SubaccountVolumes) > 0 { + for iNdEx := len(m.SubaccountVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SubaccountVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x8a + } + } + if len(m.OrderbookSequences) > 0 { + for iNdEx := len(m.OrderbookSequences) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OrderbookSequences[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x82 + } + } + if len(m.MarketFeeMultipliers) > 0 { + for iNdEx := len(m.MarketFeeMultipliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketFeeMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xfa + } + } + if len(m.ConditionalDerivativeOrderbooks) > 0 { + for iNdEx := len(m.ConditionalDerivativeOrderbooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConditionalDerivativeOrderbooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf2 + } + } + if len(m.DenomDecimals) > 0 { + for iNdEx := len(m.DenomDecimals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomDecimals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } + } + if len(m.SpotMarketIdsScheduledToForceClose) > 0 { + for iNdEx := len(m.SpotMarketIdsScheduledToForceClose) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpotMarketIdsScheduledToForceClose[iNdEx]) + copy(dAtA[i:], m.SpotMarketIdsScheduledToForceClose[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.SpotMarketIdsScheduledToForceClose[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + } + } + if len(m.BinaryOptionsMarketIdsScheduledForSettlement) > 0 { + for iNdEx := len(m.BinaryOptionsMarketIdsScheduledForSettlement) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BinaryOptionsMarketIdsScheduledForSettlement[iNdEx]) + copy(dAtA[i:], m.BinaryOptionsMarketIdsScheduledForSettlement[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.BinaryOptionsMarketIdsScheduledForSettlement[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } + } + if len(m.BinaryOptionsMarkets) > 0 { + for iNdEx := len(m.BinaryOptionsMarkets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BinaryOptionsMarkets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd2 + } + } + if len(m.HistoricalTradeRecords) > 0 { + for iNdEx := len(m.HistoricalTradeRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HistoricalTradeRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + } + if len(m.RewardsOptOutAddresses) > 0 { + for iNdEx := len(m.RewardsOptOutAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RewardsOptOutAddresses[iNdEx]) + copy(dAtA[i:], m.RewardsOptOutAddresses[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.RewardsOptOutAddresses[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + } + if len(m.PendingTradingRewardCampaignAccountPoints) > 0 { + for iNdEx := len(m.PendingTradingRewardCampaignAccountPoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingTradingRewardCampaignAccountPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + } + if len(m.PendingTradingRewardPoolCampaignSchedule) > 0 { + for iNdEx := len(m.PendingTradingRewardPoolCampaignSchedule) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingTradingRewardPoolCampaignSchedule[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + } + if m.IsFirstFeeCycleFinished { + i-- + if m.IsFirstFeeCycleFinished { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if len(m.FeeDiscountBucketVolumeAccounts) > 0 { + for iNdEx := len(m.FeeDiscountBucketVolumeAccounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeeDiscountBucketVolumeAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + } + if len(m.FeeDiscountAccountTierTtl) > 0 { + for iNdEx := len(m.FeeDiscountAccountTierTtl) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FeeDiscountAccountTierTtl[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + } + if m.FeeDiscountSchedule != nil { + { + size, err := m.FeeDiscountSchedule.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if len(m.TradingRewardCampaignAccountPoints) > 0 { + for iNdEx := len(m.TradingRewardCampaignAccountPoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TradingRewardCampaignAccountPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } + if len(m.TradingRewardPoolCampaignSchedule) > 0 { + for iNdEx := len(m.TradingRewardPoolCampaignSchedule) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TradingRewardPoolCampaignSchedule[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + } + if m.TradingRewardCampaignInfo != nil { + { + size, err := m.TradingRewardCampaignInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + if m.IsDerivativesExchangeEnabled { + i-- + if m.IsDerivativesExchangeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.IsSpotExchangeEnabled { + i-- + if m.IsSpotExchangeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + if len(m.DerivativeMarketSettlementScheduled) > 0 { + for iNdEx := len(m.DerivativeMarketSettlementScheduled) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeMarketSettlementScheduled[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + if len(m.PerpetualMarketFundingState) > 0 { + for iNdEx := len(m.PerpetualMarketFundingState) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PerpetualMarketFundingState[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.PerpetualMarketInfo) > 0 { + for iNdEx := len(m.PerpetualMarketInfo) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PerpetualMarketInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.ExpiryFuturesMarketInfoState) > 0 { + for iNdEx := len(m.ExpiryFuturesMarketInfoState) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExpiryFuturesMarketInfoState[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.SubaccountTradeNonces) > 0 { + for iNdEx := len(m.SubaccountTradeNonces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SubaccountTradeNonces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Positions) > 0 { + for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.DerivativeOrderbook) > 0 { + for iNdEx := len(m.DerivativeOrderbook) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeOrderbook[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.SpotOrderbook) > 0 { + for iNdEx := len(m.SpotOrderbook) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotOrderbook[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.DerivativeMarkets) > 0 { + for iNdEx := len(m.DerivativeMarkets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeMarkets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.SpotMarkets) > 0 { + for iNdEx := len(m.SpotMarkets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotMarkets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OrderbookSequence) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderbookSequence) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderbookSequence) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if m.Sequence != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *FeeDiscountAccountTierTTL) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountAccountTierTTL) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountAccountTierTTL) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TierTtl != nil { + { + size, err := m.TierTtl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FeeDiscountBucketVolumeAccounts) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountBucketVolumeAccounts) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountBucketVolumeAccounts) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountVolume) > 0 { + for iNdEx := len(m.AccountVolume) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountVolume[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.BucketStartTimestamp != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.BucketStartTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccountVolume) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountVolume) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Volume.Size() + i -= size + if _, err := m.Volume.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignAccountPoints) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignAccountPoints) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignAccountPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Points.Size() + i -= size + if _, err := m.Points.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignAccountPendingPoints) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignAccountPendingPoints) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignAccountPendingPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountPoints) > 0 { + for iNdEx := len(m.AccountPoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.RewardPoolStartTimestamp != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.RewardPoolStartTimestamp)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SubaccountNonce) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountNonce) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountNonce) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SubaccountTradeNonce.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullGrantAuthorizations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullGrantAuthorizations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullGrantAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grants) > 0 { + for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.LastDelegationsCheckedTime != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastDelegationsCheckedTime)) + i-- + dAtA[i] = 0x18 + } + { + size := m.TotalGrantAmount.Size() + i -= size + if _, err := m.TotalGrantAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullActiveGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullActiveGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullActiveGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ActiveGrant != nil { + { + size, err := m.ActiveGrant.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.SpotMarkets) > 0 { + for _, e := range m.SpotMarkets { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.DerivativeMarkets) > 0 { + for _, e := range m.DerivativeMarkets { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.SpotOrderbook) > 0 { + for _, e := range m.SpotOrderbook { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.DerivativeOrderbook) > 0 { + for _, e := range m.DerivativeOrderbook { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Positions) > 0 { + for _, e := range m.Positions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.SubaccountTradeNonces) > 0 { + for _, e := range m.SubaccountTradeNonces { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ExpiryFuturesMarketInfoState) > 0 { + for _, e := range m.ExpiryFuturesMarketInfoState { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.PerpetualMarketInfo) > 0 { + for _, e := range m.PerpetualMarketInfo { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.PerpetualMarketFundingState) > 0 { + for _, e := range m.PerpetualMarketFundingState { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.DerivativeMarketSettlementScheduled) > 0 { + for _, e := range m.DerivativeMarketSettlementScheduled { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.IsSpotExchangeEnabled { + n += 2 + } + if m.IsDerivativesExchangeEnabled { + n += 2 + } + if m.TradingRewardCampaignInfo != nil { + l = m.TradingRewardCampaignInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.TradingRewardPoolCampaignSchedule) > 0 { + for _, e := range m.TradingRewardPoolCampaignSchedule { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.TradingRewardCampaignAccountPoints) > 0 { + for _, e := range m.TradingRewardCampaignAccountPoints { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if m.FeeDiscountSchedule != nil { + l = m.FeeDiscountSchedule.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + if len(m.FeeDiscountAccountTierTtl) > 0 { + for _, e := range m.FeeDiscountAccountTierTtl { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.FeeDiscountBucketVolumeAccounts) > 0 { + for _, e := range m.FeeDiscountBucketVolumeAccounts { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if m.IsFirstFeeCycleFinished { + n += 3 + } + if len(m.PendingTradingRewardPoolCampaignSchedule) > 0 { + for _, e := range m.PendingTradingRewardPoolCampaignSchedule { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.PendingTradingRewardCampaignAccountPoints) > 0 { + for _, e := range m.PendingTradingRewardCampaignAccountPoints { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.RewardsOptOutAddresses) > 0 { + for _, s := range m.RewardsOptOutAddresses { + l = len(s) + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.HistoricalTradeRecords) > 0 { + for _, e := range m.HistoricalTradeRecords { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.BinaryOptionsMarkets) > 0 { + for _, e := range m.BinaryOptionsMarkets { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.BinaryOptionsMarketIdsScheduledForSettlement) > 0 { + for _, s := range m.BinaryOptionsMarketIdsScheduledForSettlement { + l = len(s) + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.SpotMarketIdsScheduledToForceClose) > 0 { + for _, s := range m.SpotMarketIdsScheduledToForceClose { + l = len(s) + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.DenomDecimals) > 0 { + for _, e := range m.DenomDecimals { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.ConditionalDerivativeOrderbooks) > 0 { + for _, e := range m.ConditionalDerivativeOrderbooks { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.MarketFeeMultipliers) > 0 { + for _, e := range m.MarketFeeMultipliers { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.OrderbookSequences) > 0 { + for _, e := range m.OrderbookSequences { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.SubaccountVolumes) > 0 { + for _, e := range m.SubaccountVolumes { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.MarketVolumes) > 0 { + for _, e := range m.MarketVolumes { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.GrantAuthorizations) > 0 { + for _, e := range m.GrantAuthorizations { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + if len(m.ActiveGrants) > 0 { + for _, e := range m.ActiveGrants { + l = e.Size() + n += 2 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *OrderbookSequence) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovGenesis(uint64(m.Sequence)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *FeeDiscountAccountTierTTL) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.TierTtl != nil { + l = m.TierTtl.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *FeeDiscountBucketVolumeAccounts) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BucketStartTimestamp != 0 { + n += 1 + sovGenesis(uint64(m.BucketStartTimestamp)) + } + if len(m.AccountVolume) > 0 { + for _, e := range m.AccountVolume { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *AccountVolume) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Volume.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *TradingRewardCampaignAccountPoints) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Points.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *TradingRewardCampaignAccountPendingPoints) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RewardPoolStartTimestamp != 0 { + n += 1 + sovGenesis(uint64(m.RewardPoolStartTimestamp)) + } + if len(m.AccountPoints) > 0 { + for _, e := range m.AccountPoints { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *SubaccountNonce) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.SubaccountTradeNonce.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *FullGrantAuthorizations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.TotalGrantAmount.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.LastDelegationsCheckedTime != 0 { + n += 1 + sovGenesis(uint64(m.LastDelegationsCheckedTime)) + } + if len(m.Grants) > 0 { + for _, e := range m.Grants { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *FullActiveGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.ActiveGrant != nil { + l = m.ActiveGrant.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarkets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarkets = append(m.SpotMarkets, &SpotMarket{}) + if err := m.SpotMarkets[len(m.SpotMarkets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarkets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarkets = append(m.DerivativeMarkets, &DerivativeMarket{}) + if err := m.DerivativeMarkets[len(m.DerivativeMarkets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrderbook", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrderbook = append(m.SpotOrderbook, SpotOrderBook{}) + if err := m.SpotOrderbook[len(m.SpotOrderbook)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrderbook", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrderbook = append(m.DerivativeOrderbook, DerivativeOrderBook{}) + if err := m.DerivativeOrderbook[len(m.DerivativeOrderbook)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, Balance{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Positions = append(m.Positions, DerivativePosition{}) + if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountTradeNonces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountTradeNonces = append(m.SubaccountTradeNonces, SubaccountNonce{}) + if err := m.SubaccountTradeNonces[len(m.SubaccountTradeNonces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryFuturesMarketInfoState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExpiryFuturesMarketInfoState = append(m.ExpiryFuturesMarketInfoState, ExpiryFuturesMarketInfoState{}) + if err := m.ExpiryFuturesMarketInfoState[len(m.ExpiryFuturesMarketInfoState)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerpetualMarketInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PerpetualMarketInfo = append(m.PerpetualMarketInfo, PerpetualMarketInfo{}) + if err := m.PerpetualMarketInfo[len(m.PerpetualMarketInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerpetualMarketFundingState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PerpetualMarketFundingState = append(m.PerpetualMarketFundingState, PerpetualMarketFundingState{}) + if err := m.PerpetualMarketFundingState[len(m.PerpetualMarketFundingState)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarketSettlementScheduled", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarketSettlementScheduled = append(m.DerivativeMarketSettlementScheduled, DerivativeMarketSettlementInfo{}) + if err := m.DerivativeMarketSettlementScheduled[len(m.DerivativeMarketSettlementScheduled)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSpotExchangeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSpotExchangeEnabled = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsDerivativesExchangeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsDerivativesExchangeEnabled = bool(v != 0) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardCampaignInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TradingRewardCampaignInfo == nil { + m.TradingRewardCampaignInfo = &TradingRewardCampaignInfo{} + } + if err := m.TradingRewardCampaignInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardPoolCampaignSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradingRewardPoolCampaignSchedule = append(m.TradingRewardPoolCampaignSchedule, &CampaignRewardPool{}) + if err := m.TradingRewardPoolCampaignSchedule[len(m.TradingRewardPoolCampaignSchedule)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardCampaignAccountPoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradingRewardCampaignAccountPoints = append(m.TradingRewardCampaignAccountPoints, &TradingRewardCampaignAccountPoints{}) + if err := m.TradingRewardCampaignAccountPoints[len(m.TradingRewardCampaignAccountPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDiscountSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeDiscountSchedule == nil { + m.FeeDiscountSchedule = &FeeDiscountSchedule{} + } + if err := m.FeeDiscountSchedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDiscountAccountTierTtl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeDiscountAccountTierTtl = append(m.FeeDiscountAccountTierTtl, &FeeDiscountAccountTierTTL{}) + if err := m.FeeDiscountAccountTierTtl[len(m.FeeDiscountAccountTierTtl)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDiscountBucketVolumeAccounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeDiscountBucketVolumeAccounts = append(m.FeeDiscountBucketVolumeAccounts, &FeeDiscountBucketVolumeAccounts{}) + if err := m.FeeDiscountBucketVolumeAccounts[len(m.FeeDiscountBucketVolumeAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFirstFeeCycleFinished", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFirstFeeCycleFinished = bool(v != 0) + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTradingRewardPoolCampaignSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingTradingRewardPoolCampaignSchedule = append(m.PendingTradingRewardPoolCampaignSchedule, &CampaignRewardPool{}) + if err := m.PendingTradingRewardPoolCampaignSchedule[len(m.PendingTradingRewardPoolCampaignSchedule)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTradingRewardCampaignAccountPoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingTradingRewardCampaignAccountPoints = append(m.PendingTradingRewardCampaignAccountPoints, &TradingRewardCampaignAccountPendingPoints{}) + if err := m.PendingTradingRewardCampaignAccountPoints[len(m.PendingTradingRewardCampaignAccountPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardsOptOutAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardsOptOutAddresses = append(m.RewardsOptOutAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalTradeRecords", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HistoricalTradeRecords = append(m.HistoricalTradeRecords, &TradeRecords{}) + if err := m.HistoricalTradeRecords[len(m.HistoricalTradeRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 26: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsMarkets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsMarkets = append(m.BinaryOptionsMarkets, &BinaryOptionsMarket{}) + if err := m.BinaryOptionsMarkets[len(m.BinaryOptionsMarkets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsMarketIdsScheduledForSettlement", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsMarketIdsScheduledForSettlement = append(m.BinaryOptionsMarketIdsScheduledForSettlement, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketIdsScheduledToForceClose", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarketIdsScheduledToForceClose = append(m.SpotMarketIdsScheduledToForceClose, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomDecimals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomDecimals = append(m.DenomDecimals, DenomDecimals{}) + if err := m.DenomDecimals[len(m.DenomDecimals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 30: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConditionalDerivativeOrderbooks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConditionalDerivativeOrderbooks = append(m.ConditionalDerivativeOrderbooks, &ConditionalDerivativeOrderBook{}) + if err := m.ConditionalDerivativeOrderbooks[len(m.ConditionalDerivativeOrderbooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 31: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketFeeMultipliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketFeeMultipliers = append(m.MarketFeeMultipliers, &MarketFeeMultiplier{}) + if err := m.MarketFeeMultipliers[len(m.MarketFeeMultipliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 32: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderbookSequences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderbookSequences = append(m.OrderbookSequences, &OrderbookSequence{}) + if err := m.OrderbookSequences[len(m.OrderbookSequences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 33: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountVolumes = append(m.SubaccountVolumes, &AggregateSubaccountVolumeRecord{}) + if err := m.SubaccountVolumes[len(m.SubaccountVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketVolumes = append(m.MarketVolumes, &MarketVolume{}) + if err := m.MarketVolumes[len(m.MarketVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrantAuthorizations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GrantAuthorizations = append(m.GrantAuthorizations, &FullGrantAuthorizations{}) + if err := m.GrantAuthorizations[len(m.GrantAuthorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveGrants", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActiveGrants = append(m.ActiveGrants, &FullActiveGrant{}) + if err := m.ActiveGrants[len(m.ActiveGrants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderbookSequence) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderbookSequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderbookSequence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountAccountTierTTL) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountAccountTierTTL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountAccountTierTTL: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TierTtl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TierTtl == nil { + m.TierTtl = &FeeDiscountTierTTL{} + } + if err := m.TierTtl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountBucketVolumeAccounts) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountBucketVolumeAccounts: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountBucketVolumeAccounts: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketStartTimestamp", wireType) + } + m.BucketStartTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BucketStartTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountVolume = append(m.AccountVolume, &AccountVolume{}) + if err := m.AccountVolume[len(m.AccountVolume)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountVolume) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignAccountPoints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignAccountPoints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignAccountPoints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Points", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Points.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignAccountPendingPoints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignAccountPendingPoints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignAccountPendingPoints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardPoolStartTimestamp", wireType) + } + m.RewardPoolStartTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RewardPoolStartTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountPoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountPoints = append(m.AccountPoints, &TradingRewardCampaignAccountPoints{}) + if err := m.AccountPoints[len(m.AccountPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountNonce) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountNonce: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountNonce: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountTradeNonce", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SubaccountTradeNonce.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullGrantAuthorizations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullGrantAuthorizations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullGrantAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalGrantAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalGrantAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastDelegationsCheckedTime", wireType) + } + m.LastDelegationsCheckedTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastDelegationsCheckedTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grants = append(m.Grants, &GrantAuthorization{}) + if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullActiveGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullActiveGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullActiveGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveGrant", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ActiveGrant == nil { + m.ActiveGrant = &ActiveGrant{} + } + if err := m.ActiveGrant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/market.go b/chain/exchange/types/v2/market.go new file mode 100644 index 00000000..6e3b2c53 --- /dev/null +++ b/chain/exchange/types/v2/market.go @@ -0,0 +1,456 @@ +package v2 + +import ( + "cosmossdk.io/math" + "github.com/ethereum/go-ethereum/common" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +var BinaryOptionsMarketRefundFlagPrice = math.LegacyNewDec(-1) + +type DerivativeMarketInfo struct { + Market *DerivativeMarket + MarkPrice math.LegacyDec + Funding *PerpetualMarketFunding +} + +type MarketInterface interface { + PriceFromChainFormat(price math.LegacyDec) math.LegacyDec + QuantityFromChainFormat(quantity math.LegacyDec) math.LegacyDec + NotionalFromChainFormat(notional math.LegacyDec) math.LegacyDec + PriceToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec + QuantityToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec + NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec +} + +func NewV1MarketVolumeFromV2(market MarketInterface, v2MarketVolume MarketVolume) types.MarketVolume { + return types.MarketVolume{ + MarketId: v2MarketVolume.MarketId, + Volume: NewV1VolumeRecordFromV2(market, v2MarketVolume.Volume), + } +} + +func NewV1VolumeRecordFromV2(market MarketInterface, v2VolumeRecord VolumeRecord) types.VolumeRecord { + chainFormatMakerVolume := market.NotionalToChainFormat(v2VolumeRecord.MakerVolume) + chainFormatTakerVolume := market.NotionalToChainFormat(v2VolumeRecord.TakerVolume) + return types.VolumeRecord{ + MakerVolume: chainFormatMakerVolume, + TakerVolume: chainFormatTakerVolume, + } +} + +func NewV1SpotMarketFromV2(spotMarket SpotMarket) types.SpotMarket { + chainFormattedMinPriceTickSize := spotMarket.PriceToChainFormat(spotMarket.MinPriceTickSize) + chainFormattedMinQuantityTickSize := spotMarket.QuantityToChainFormat(spotMarket.MinQuantityTickSize) + chainFormattedMinNotional := spotMarket.NotionalToChainFormat(spotMarket.MinNotional) + return types.SpotMarket{ + Ticker: spotMarket.Ticker, + BaseDenom: spotMarket.BaseDenom, + QuoteDenom: spotMarket.QuoteDenom, + MakerFeeRate: spotMarket.MakerFeeRate, + TakerFeeRate: spotMarket.TakerFeeRate, + RelayerFeeShareRate: spotMarket.RelayerFeeShareRate, + MarketId: spotMarket.MarketId, + Status: types.MarketStatus(spotMarket.Status), + MinPriceTickSize: chainFormattedMinPriceTickSize, + MinQuantityTickSize: chainFormattedMinQuantityTickSize, + MinNotional: chainFormattedMinNotional, + Admin: spotMarket.Admin, + AdminPermissions: spotMarket.AdminPermissions, + BaseDecimals: spotMarket.BaseDecimals, + QuoteDecimals: spotMarket.QuoteDecimals, + } +} + +func (m *SpotMarket) IsActive() bool { + return m.Status == MarketStatus_Active +} + +func (m *SpotMarket) IsInactive() bool { + return !m.IsActive() +} + +func (m *SpotMarket) MarketID() common.Hash { + return common.HexToHash(m.MarketId) +} + +func (m *SpotMarket) StatusSupportsOrderCancellations() bool { + if m == nil { + return false + } + return m.Status.SupportsOrderCancellations() +} + +func (m *SpotMarket) GetMarketType() types.MarketType { + return types.MarketType_Spot +} + +func (m *SpotMarket) GetMakerFeeRate() math.LegacyDec { + return m.MakerFeeRate +} + +func (m *SpotMarket) GetTakerFeeRate() math.LegacyDec { + return m.TakerFeeRate +} + +func (m *SpotMarket) GetRelayerFeeShareRate() math.LegacyDec { + return m.RelayerFeeShareRate +} + +func (m *SpotMarket) GetMinPriceTickSize() math.LegacyDec { + return m.MinPriceTickSize +} + +func (m *SpotMarket) GetMinQuantityTickSize() math.LegacyDec { + return m.MinQuantityTickSize +} + +func (m *SpotMarket) GetMinNotional() math.LegacyDec { + return m.MinNotional +} + +func (m *SpotMarket) GetMarketStatus() MarketStatus { + return m.Status +} + +func (m *SpotMarket) PriceFromChainFormat(price math.LegacyDec) math.LegacyDec { + return types.PriceFromChainFormat(price, m.BaseDecimals, m.QuoteDecimals) +} + +func (m *SpotMarket) QuantityFromChainFormat(quantity math.LegacyDec) math.LegacyDec { + return types.QuantityFromChainFormat(quantity, m.BaseDecimals) +} + +func (m *SpotMarket) NotionalFromChainFormat(notional math.LegacyDec) math.LegacyDec { + return types.NotionalFromChainFormat(notional, m.QuoteDecimals) +} + +func (m *SpotMarket) PriceToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.PriceToChainFormat(humanReadableValue, m.BaseDecimals, m.QuoteDecimals) +} + +func (m *SpotMarket) QuantityToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.QuantityToChainFormat(humanReadableValue, m.BaseDecimals) +} + +func (m *SpotMarket) NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.NotionalToChainFormat(humanReadableValue, m.QuoteDecimals) +} + +func NewV1ExpiryFuturesMarketInfoStateFromV2(market DerivativeMarket, marketInfoState ExpiryFuturesMarketInfoState) types.ExpiryFuturesMarketInfoState { + v1MarketInfo := NewV1ExpiryFuturesMarketInfoFromV2(market, *marketInfoState.MarketInfo) + return types.ExpiryFuturesMarketInfoState{ + MarketId: marketInfoState.MarketId, + MarketInfo: &v1MarketInfo, + } +} + +func NewV1ExpiryFuturesMarketInfoFromV2(market DerivativeMarket, marketInfo ExpiryFuturesMarketInfo) types.ExpiryFuturesMarketInfo { + return types.ExpiryFuturesMarketInfo{ + MarketId: marketInfo.MarketId, + ExpirationTimestamp: marketInfo.ExpirationTimestamp, + TwapStartTimestamp: marketInfo.TwapStartTimestamp, + ExpirationTwapStartPriceCumulative: market.PriceToChainFormat(marketInfo.ExpirationTwapStartPriceCumulative), + SettlementPrice: market.PriceToChainFormat(marketInfo.SettlementPrice), + } +} + +func (m *ExpiryFuturesMarketInfo) IsPremature(currBlockTime int64) bool { + return currBlockTime < m.TwapStartTimestamp +} + +func (m *ExpiryFuturesMarketInfo) IsStartingMaturation(currBlockTime int64) bool { + return currBlockTime >= m.TwapStartTimestamp && (m.ExpirationTwapStartPriceCumulative.IsNil() || m.ExpirationTwapStartPriceCumulative.IsZero()) +} + +func (m *ExpiryFuturesMarketInfo) IsMatured(currBlockTime int64) bool { + return currBlockTime >= m.ExpirationTimestamp +} + +func NewV1DerivativeMarketFromV2(derivativeMarket DerivativeMarket) types.DerivativeMarket { + return types.DerivativeMarket{ + Ticker: derivativeMarket.Ticker, + OracleBase: derivativeMarket.OracleBase, + OracleQuote: derivativeMarket.OracleQuote, + OracleType: derivativeMarket.OracleType, + OracleScaleFactor: derivativeMarket.OracleScaleFactor + derivativeMarket.QuoteDecimals, + QuoteDenom: derivativeMarket.QuoteDenom, + MarketId: derivativeMarket.MarketId, + InitialMarginRatio: derivativeMarket.InitialMarginRatio, + MaintenanceMarginRatio: derivativeMarket.MaintenanceMarginRatio, + MakerFeeRate: derivativeMarket.MakerFeeRate, + TakerFeeRate: derivativeMarket.TakerFeeRate, + RelayerFeeShareRate: derivativeMarket.RelayerFeeShareRate, + IsPerpetual: derivativeMarket.IsPerpetual, + Status: types.MarketStatus(derivativeMarket.Status), + MinPriceTickSize: derivativeMarket.PriceToChainFormat(derivativeMarket.MinPriceTickSize), + MinQuantityTickSize: derivativeMarket.QuantityToChainFormat(derivativeMarket.MinQuantityTickSize), + MinNotional: derivativeMarket.NotionalToChainFormat(derivativeMarket.MinNotional), + Admin: derivativeMarket.Admin, + AdminPermissions: derivativeMarket.AdminPermissions, + QuoteDecimals: derivativeMarket.QuoteDecimals, + } +} + +func (m *DerivativeMarket) MarketID() common.Hash { + return common.HexToHash(m.MarketId) +} + +func (m *DerivativeMarket) StatusSupportsOrderCancellations() bool { + if m == nil { + return false + } + return m.Status.SupportsOrderCancellations() +} + +func (m *DerivativeMarket) IsTimeExpiry() bool { + return !m.IsPerpetual +} + +func (m *DerivativeMarket) IsActive() bool { + return m.Status == MarketStatus_Active +} + +func (m *DerivativeMarket) IsInactive() bool { + return !m.IsActive() +} + +func (m *DerivativeMarket) GetMinQuantityTickSize() math.LegacyDec { + return m.MinQuantityTickSize +} + +func (m *DerivativeMarket) GetMinNotional() math.LegacyDec { + return m.MinNotional +} + +func (m *DerivativeMarket) GetMarketType() types.MarketType { + if m.IsPerpetual { + return types.MarketType_Perpetual + } else { + return types.MarketType_Expiry + } +} + +func (m *DerivativeMarket) GetMakerFeeRate() math.LegacyDec { + return m.MakerFeeRate +} + +func (m *DerivativeMarket) GetTakerFeeRate() math.LegacyDec { + return m.TakerFeeRate +} + +func (m *DerivativeMarket) GetRelayerFeeShareRate() math.LegacyDec { + return m.RelayerFeeShareRate +} + +func (m *DerivativeMarket) GetInitialMarginRatio() math.LegacyDec { + return m.InitialMarginRatio +} + +func (m *DerivativeMarket) GetMinPriceTickSize() math.LegacyDec { + return m.MinPriceTickSize +} + +func (m *DerivativeMarket) GetQuoteDenom() string { + return m.QuoteDenom +} + +func (m *DerivativeMarket) GetTicker() string { + return m.Ticker +} + +func (m *DerivativeMarket) GetIsPerpetual() bool { + return m.IsPerpetual +} + +func (m *DerivativeMarket) GetOracleScaleFactor() uint32 { + return m.OracleScaleFactor +} + +func (m *DerivativeMarket) GetMarketStatus() MarketStatus { + return m.Status +} + +func (m *DerivativeMarket) GetQuoteDecimals() uint32 { + return m.QuoteDecimals +} + +func (m *DerivativeMarket) PriceFromChainFormat(price math.LegacyDec) math.LegacyDec { + return types.PriceFromChainFormat(price, 0, m.QuoteDecimals) +} + +func (m *DerivativeMarket) QuantityFromChainFormat(quantity math.LegacyDec) math.LegacyDec { + return types.QuantityFromChainFormat(quantity, 0) +} + +func (m *DerivativeMarket) NotionalFromChainFormat(notional math.LegacyDec) math.LegacyDec { + return types.NotionalFromChainFormat(notional, m.QuoteDecimals) +} + +func (m *DerivativeMarket) PriceToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.PriceToChainFormat(humanReadableValue, 0, m.QuoteDecimals) +} + +func (m *DerivativeMarket) QuantityToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.QuantityToChainFormat(humanReadableValue, 0) +} + +func (m *DerivativeMarket) NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.NotionalToChainFormat(humanReadableValue, m.QuoteDecimals) +} + +/// Binary Options Markets +// + +func NewV1BinaryOptionsMarketFromV2(market BinaryOptionsMarket) types.BinaryOptionsMarket { + v1Market := types.BinaryOptionsMarket{ + Ticker: market.Ticker, + OracleSymbol: market.OracleSymbol, + OracleProvider: market.OracleProvider, + OracleType: market.OracleType, + OracleScaleFactor: market.OracleScaleFactor + market.QuoteDecimals, + ExpirationTimestamp: market.ExpirationTimestamp, + SettlementTimestamp: market.SettlementTimestamp, + Admin: market.Admin, + QuoteDenom: market.QuoteDenom, + MarketId: market.MarketId, + MakerFeeRate: market.MakerFeeRate, + TakerFeeRate: market.TakerFeeRate, + RelayerFeeShareRate: market.RelayerFeeShareRate, + Status: types.MarketStatus(market.Status), + MinPriceTickSize: market.PriceToChainFormat(market.MinPriceTickSize), + MinQuantityTickSize: market.QuantityToChainFormat(market.MinQuantityTickSize), + MinNotional: market.NotionalToChainFormat(market.MinNotional), + AdminPermissions: market.AdminPermissions, + QuoteDecimals: market.QuoteDecimals, + } + + if market.SettlementPrice != nil { + chainFormatSettlementPrice := market.PriceToChainFormat(*market.SettlementPrice) + v1Market.SettlementPrice = &chainFormatSettlementPrice + } + + return v1Market +} + +func (m *BinaryOptionsMarket) GetMarketType() types.MarketType { + return types.MarketType_BinaryOption +} + +func (m *BinaryOptionsMarket) GetInitialMarginRatio() math.LegacyDec { + return math.LegacyOneDec() +} +func (m *BinaryOptionsMarket) IsInactive() bool { + return !m.IsActive() +} + +func (m *BinaryOptionsMarket) IsActive() bool { + return m.Status == MarketStatus_Active +} + +func (m *BinaryOptionsMarket) MarketID() common.Hash { + return common.HexToHash(m.MarketId) +} + +func (m *BinaryOptionsMarket) GetMinPriceTickSize() math.LegacyDec { + return m.MinPriceTickSize +} + +func (m *BinaryOptionsMarket) GetMinQuantityTickSize() math.LegacyDec { + return m.MinQuantityTickSize +} + +func (m *BinaryOptionsMarket) GetMinNotional() math.LegacyDec { + return m.MinNotional +} + +func (m *BinaryOptionsMarket) GetTicker() string { + return m.Ticker +} + +func (m *BinaryOptionsMarket) GetQuoteDenom() string { + return m.QuoteDenom +} + +func (m *BinaryOptionsMarket) GetMakerFeeRate() math.LegacyDec { + return m.MakerFeeRate +} + +func (m *BinaryOptionsMarket) GetTakerFeeRate() math.LegacyDec { + return m.TakerFeeRate +} + +func (m *BinaryOptionsMarket) GetRelayerFeeShareRate() math.LegacyDec { + return m.RelayerFeeShareRate +} + +func (m *BinaryOptionsMarket) GetIsPerpetual() bool { + return false +} + +func (m *BinaryOptionsMarket) StatusSupportsOrderCancellations() bool { + if m == nil { + return false + } + return m.Status.SupportsOrderCancellations() +} + +func (m *BinaryOptionsMarket) GetOracleScaleFactor() uint32 { + return m.OracleScaleFactor +} + +func (m *BinaryOptionsMarket) GetMarketStatus() MarketStatus { + return m.Status +} + +func (m *BinaryOptionsMarket) GetQuoteDecimals() uint32 { + return m.QuoteDecimals +} + +func (m *BinaryOptionsMarket) PriceFromChainFormat(price math.LegacyDec) math.LegacyDec { + return types.PriceFromChainFormat(price, 0, m.QuoteDecimals) +} + +func (m *BinaryOptionsMarket) QuantityFromChainFormat(quantity math.LegacyDec) math.LegacyDec { + return types.QuantityFromChainFormat(quantity, 0) +} + +func (m *BinaryOptionsMarket) NotionalFromChainFormat(notional math.LegacyDec) math.LegacyDec { + return types.NotionalFromChainFormat(notional, m.QuoteDecimals) +} + +func (m *BinaryOptionsMarket) PriceToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.PriceToChainFormat(humanReadableValue, 0, m.QuoteDecimals) +} + +func (m *BinaryOptionsMarket) QuantityToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.QuantityToChainFormat(humanReadableValue, 0) +} + +func (m *BinaryOptionsMarket) NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { + return types.NotionalToChainFormat(humanReadableValue, m.QuoteDecimals) +} + +func NewV1PerpetualMarketFundingStateFromV2(market DerivativeMarket, fundingState PerpetualMarketFundingState) types.PerpetualMarketFundingState { + v1Funding := NewV1PerpetualMarketFundingFromV2(market, *fundingState.Funding) + return types.PerpetualMarketFundingState{ + MarketId: fundingState.MarketId, + Funding: &v1Funding, + } +} + +func NewV1PerpetualMarketFundingFromV2(market DerivativeMarket, funding PerpetualMarketFunding) types.PerpetualMarketFunding { + return types.PerpetualMarketFunding{ + CumulativeFunding: market.NotionalToChainFormat(funding.CumulativeFunding), + CumulativePrice: market.PriceToChainFormat(funding.CumulativePrice), + LastTimestamp: funding.LastTimestamp, + } +} + +func NewV1DerivativeMarketSettlementInfoFromV2(market DerivativeMarket, settlementInfo DerivativeMarketSettlementInfo) types.DerivativeMarketSettlementInfo { + return types.DerivativeMarketSettlementInfo{ + MarketId: settlementInfo.MarketId, + SettlementPrice: market.PriceToChainFormat(settlementInfo.SettlementPrice), + } +} diff --git a/chain/exchange/types/v2/market.pb.go b/chain/exchange/types/v2/market.pb.go new file mode 100644 index 00000000..115e7a87 --- /dev/null +++ b/chain/exchange/types/v2/market.pb.go @@ -0,0 +1,5261 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/market.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type MarketStatus int32 + +const ( + MarketStatus_Unspecified MarketStatus = 0 + MarketStatus_Active MarketStatus = 1 + MarketStatus_Paused MarketStatus = 2 + MarketStatus_Demolished MarketStatus = 3 + MarketStatus_Expired MarketStatus = 4 +) + +var MarketStatus_name = map[int32]string{ + 0: "Unspecified", + 1: "Active", + 2: "Paused", + 3: "Demolished", + 4: "Expired", +} + +var MarketStatus_value = map[string]int32{ + "Unspecified": 0, + "Active": 1, + "Paused": 2, + "Demolished": 3, + "Expired": 4, +} + +func (x MarketStatus) String() string { + return proto.EnumName(MarketStatus_name, int32(x)) +} + +func (MarketStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{0} +} + +type MarketFeeMultiplier struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + FeeMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=fee_multiplier,json=feeMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee_multiplier"` +} + +func (m *MarketFeeMultiplier) Reset() { *m = MarketFeeMultiplier{} } +func (m *MarketFeeMultiplier) String() string { return proto.CompactTextString(m) } +func (*MarketFeeMultiplier) ProtoMessage() {} +func (*MarketFeeMultiplier) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{0} +} +func (m *MarketFeeMultiplier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MarketFeeMultiplier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MarketFeeMultiplier.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MarketFeeMultiplier) XXX_Merge(src proto.Message) { + xxx_messageInfo_MarketFeeMultiplier.Merge(m, src) +} +func (m *MarketFeeMultiplier) XXX_Size() int { + return m.Size() +} +func (m *MarketFeeMultiplier) XXX_DiscardUnknown() { + xxx_messageInfo_MarketFeeMultiplier.DiscardUnknown(m) +} + +var xxx_messageInfo_MarketFeeMultiplier proto.InternalMessageInfo + +// An object describing trade pair of two assets. +type SpotMarket struct { + // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote + // asset. + Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Coin denom used for the base asset + BaseDenom string `protobuf:"bytes,2,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + // Coin used for the quote asset + QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // maker_fee_rate defines the fee percentage makers pay when trading + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the fee percentage takers pay when trading + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // relayer_fee_share_rate defines the percentage of the transaction fee shared + // with the relayer in a derivative market + RelayerFeeShareRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate"` + // Unique market ID. + MarketId string `protobuf:"bytes,7,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Status of the market + Status MarketStatus `protobuf:"varint,8,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + // min_price_tick_size defines the minimum tick size that the price required + // for orders in the market + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the quantity + // required for orders in the market + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + // current market admin + Admin string `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` + // level of admin permissions + AdminPermissions uint32 `protobuf:"varint,13,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,14,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,15,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *SpotMarket) Reset() { *m = SpotMarket{} } +func (m *SpotMarket) String() string { return proto.CompactTextString(m) } +func (*SpotMarket) ProtoMessage() {} +func (*SpotMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{1} +} +func (m *SpotMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotMarket.Merge(m, src) +} +func (m *SpotMarket) XXX_Size() int { + return m.Size() +} +func (m *SpotMarket) XXX_DiscardUnknown() { + xxx_messageInfo_SpotMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotMarket proto.InternalMessageInfo + +func (m *SpotMarket) GetTicker() string { + if m != nil { + return m.Ticker + } + return "" +} + +func (m *SpotMarket) GetBaseDenom() string { + if m != nil { + return m.BaseDenom + } + return "" +} + +func (m *SpotMarket) GetQuoteDenom() string { + if m != nil { + return m.QuoteDenom + } + return "" +} + +func (m *SpotMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *SpotMarket) GetStatus() MarketStatus { + if m != nil { + return m.Status + } + return MarketStatus_Unspecified +} + +func (m *SpotMarket) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *SpotMarket) GetAdminPermissions() uint32 { + if m != nil { + return m.AdminPermissions + } + return 0 +} + +func (m *SpotMarket) GetBaseDecimals() uint32 { + if m != nil { + return m.BaseDecimals + } + return 0 +} + +func (m *SpotMarket) GetQuoteDecimals() uint32 { + if m != nil { + return m.QuoteDecimals + } + return 0 +} + +// An object describing a binary options market in Injective Protocol. +type BinaryOptionsMarket struct { + // Ticker for the derivative contract. + Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Oracle symbol + OracleSymbol string `protobuf:"bytes,2,opt,name=oracle_symbol,json=oracleSymbol,proto3" json:"oracle_symbol,omitempty"` + // Oracle Provider + OracleProvider string `protobuf:"bytes,3,opt,name=oracle_provider,json=oracleProvider,proto3" json:"oracle_provider,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,4,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,5,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // expiration timestamp + ExpirationTimestamp int64 `protobuf:"varint,6,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration timestamp + SettlementTimestamp int64 `protobuf:"varint,7,opt,name=settlement_timestamp,json=settlementTimestamp,proto3" json:"settlement_timestamp,omitempty"` + // admin of the market + Admin string `protobuf:"bytes,8,opt,name=admin,proto3" json:"admin,omitempty"` + // Address of the quote currency denomination for the binary options contract + QuoteDenom string `protobuf:"bytes,9,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Unique market ID. + MarketId string `protobuf:"bytes,10,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // maker_fee_rate defines the maker fee rate of a binary options market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the taker fee rate of a derivative market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // relayer_fee_share_rate defines the percentage of the transaction fee shared + // with the relayer in a derivative market + RelayerFeeShareRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate"` + // Status of the market + Status MarketStatus `protobuf:"varint,14,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + // min_price_tick_size defines the minimum tick size that the price and margin + // required for orders in the market + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the quantity + // required for orders in the market + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + // level of admin permissions + AdminPermissions uint32 `protobuf:"varint,19,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,20,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *BinaryOptionsMarket) Reset() { *m = BinaryOptionsMarket{} } +func (m *BinaryOptionsMarket) String() string { return proto.CompactTextString(m) } +func (*BinaryOptionsMarket) ProtoMessage() {} +func (*BinaryOptionsMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{2} +} +func (m *BinaryOptionsMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BinaryOptionsMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BinaryOptionsMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BinaryOptionsMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_BinaryOptionsMarket.Merge(m, src) +} +func (m *BinaryOptionsMarket) XXX_Size() int { + return m.Size() +} +func (m *BinaryOptionsMarket) XXX_DiscardUnknown() { + xxx_messageInfo_BinaryOptionsMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_BinaryOptionsMarket proto.InternalMessageInfo + +// An object describing a derivative market in the Injective Futures Protocol. +type DerivativeMarket struct { + // Ticker for the derivative contract. + Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,2,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,3,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,4,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,5,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Address of the quote currency denomination for the derivative contract + QuoteDenom string `protobuf:"bytes,6,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Unique market ID. + MarketId string `protobuf:"bytes,7,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // initial_margin_ratio defines the initial margin ratio of a derivative + // market + InitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio"` + // maintenance_margin_ratio defines the maintenance margin ratio of a + // derivative market + MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` + // maker_fee_rate defines the maker fee rate of a derivative market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the taker fee rate of a derivative market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // relayer_fee_share_rate defines the percentage of the transaction fee shared + // with the relayer in a derivative market + RelayerFeeShareRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate"` + // true if the market is a perpetual market. false if the market is an expiry + // futures market + IsPerpetual bool `protobuf:"varint,13,opt,name=isPerpetual,proto3" json:"isPerpetual,omitempty"` + // Status of the market + Status MarketStatus `protobuf:"varint,14,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + // min_price_tick_size defines the minimum tick size that the price and margin + // required for orders in the market + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the quantity + // required for orders in the market + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + // current market admin + Admin string `protobuf:"bytes,18,opt,name=admin,proto3" json:"admin,omitempty"` + // level of admin permissions + AdminPermissions uint32 `protobuf:"varint,19,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,20,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *DerivativeMarket) Reset() { *m = DerivativeMarket{} } +func (m *DerivativeMarket) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarket) ProtoMessage() {} +func (*DerivativeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{3} +} +func (m *DerivativeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarket.Merge(m, src) +} +func (m *DerivativeMarket) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarket proto.InternalMessageInfo + +type DerivativeMarketSettlementInfo struct { + // market ID. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // settlement_price defines the settlement price + SettlementPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price"` +} + +func (m *DerivativeMarketSettlementInfo) Reset() { *m = DerivativeMarketSettlementInfo{} } +func (m *DerivativeMarketSettlementInfo) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarketSettlementInfo) ProtoMessage() {} +func (*DerivativeMarketSettlementInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{4} +} +func (m *DerivativeMarketSettlementInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarketSettlementInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarketSettlementInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarketSettlementInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarketSettlementInfo.Merge(m, src) +} +func (m *DerivativeMarketSettlementInfo) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarketSettlementInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarketSettlementInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarketSettlementInfo proto.InternalMessageInfo + +func (m *DerivativeMarketSettlementInfo) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type MarketVolume struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Volume VolumeRecord `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume"` +} + +func (m *MarketVolume) Reset() { *m = MarketVolume{} } +func (m *MarketVolume) String() string { return proto.CompactTextString(m) } +func (*MarketVolume) ProtoMessage() {} +func (*MarketVolume) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{5} +} +func (m *MarketVolume) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MarketVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MarketVolume.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MarketVolume) XXX_Merge(src proto.Message) { + xxx_messageInfo_MarketVolume.Merge(m, src) +} +func (m *MarketVolume) XXX_Size() int { + return m.Size() +} +func (m *MarketVolume) XXX_DiscardUnknown() { + xxx_messageInfo_MarketVolume.DiscardUnknown(m) +} + +var xxx_messageInfo_MarketVolume proto.InternalMessageInfo + +func (m *MarketVolume) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MarketVolume) GetVolume() VolumeRecord { + if m != nil { + return m.Volume + } + return VolumeRecord{} +} + +type VolumeRecord struct { + MakerVolume cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=maker_volume,json=makerVolume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_volume"` + TakerVolume cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=taker_volume,json=takerVolume,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_volume"` +} + +func (m *VolumeRecord) Reset() { *m = VolumeRecord{} } +func (m *VolumeRecord) String() string { return proto.CompactTextString(m) } +func (*VolumeRecord) ProtoMessage() {} +func (*VolumeRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{6} +} +func (m *VolumeRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VolumeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VolumeRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VolumeRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeRecord.Merge(m, src) +} +func (m *VolumeRecord) XXX_Size() int { + return m.Size() +} +func (m *VolumeRecord) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeRecord proto.InternalMessageInfo + +type ExpiryFuturesMarketInfoState struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + MarketInfo *ExpiryFuturesMarketInfo `protobuf:"bytes,2,opt,name=market_info,json=marketInfo,proto3" json:"market_info,omitempty"` +} + +func (m *ExpiryFuturesMarketInfoState) Reset() { *m = ExpiryFuturesMarketInfoState{} } +func (m *ExpiryFuturesMarketInfoState) String() string { return proto.CompactTextString(m) } +func (*ExpiryFuturesMarketInfoState) ProtoMessage() {} +func (*ExpiryFuturesMarketInfoState) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{7} +} +func (m *ExpiryFuturesMarketInfoState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpiryFuturesMarketInfoState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpiryFuturesMarketInfoState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExpiryFuturesMarketInfoState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpiryFuturesMarketInfoState.Merge(m, src) +} +func (m *ExpiryFuturesMarketInfoState) XXX_Size() int { + return m.Size() +} +func (m *ExpiryFuturesMarketInfoState) XXX_DiscardUnknown() { + xxx_messageInfo_ExpiryFuturesMarketInfoState.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpiryFuturesMarketInfoState proto.InternalMessageInfo + +func (m *ExpiryFuturesMarketInfoState) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *ExpiryFuturesMarketInfoState) GetMarketInfo() *ExpiryFuturesMarketInfo { + if m != nil { + return m.MarketInfo + } + return nil +} + +type PerpetualMarketFundingState struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Funding *PerpetualMarketFunding `protobuf:"bytes,2,opt,name=funding,proto3" json:"funding,omitempty"` +} + +func (m *PerpetualMarketFundingState) Reset() { *m = PerpetualMarketFundingState{} } +func (m *PerpetualMarketFundingState) String() string { return proto.CompactTextString(m) } +func (*PerpetualMarketFundingState) ProtoMessage() {} +func (*PerpetualMarketFundingState) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{8} +} +func (m *PerpetualMarketFundingState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerpetualMarketFundingState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerpetualMarketFundingState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerpetualMarketFundingState) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerpetualMarketFundingState.Merge(m, src) +} +func (m *PerpetualMarketFundingState) XXX_Size() int { + return m.Size() +} +func (m *PerpetualMarketFundingState) XXX_DiscardUnknown() { + xxx_messageInfo_PerpetualMarketFundingState.DiscardUnknown(m) +} + +var xxx_messageInfo_PerpetualMarketFundingState proto.InternalMessageInfo + +func (m *PerpetualMarketFundingState) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *PerpetualMarketFundingState) GetFunding() *PerpetualMarketFunding { + if m != nil { + return m.Funding + } + return nil +} + +type ExpiryFuturesMarketInfo struct { + // market ID. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // expiration_timestamp defines the expiration time for a time expiry futures + // market. + ExpirationTimestamp int64 `protobuf:"varint,2,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration_twap_start_timestamp defines the start time of the TWAP + // calculation window + TwapStartTimestamp int64 `protobuf:"varint,3,opt,name=twap_start_timestamp,json=twapStartTimestamp,proto3" json:"twap_start_timestamp,omitempty"` + // expiration_twap_start_price_cumulative defines the cumulative price for the + // start of the TWAP window + ExpirationTwapStartPriceCumulative cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=expiration_twap_start_price_cumulative,json=expirationTwapStartPriceCumulative,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expiration_twap_start_price_cumulative"` + // settlement_price defines the settlement price for a time expiry futures + // market. + SettlementPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price"` +} + +func (m *ExpiryFuturesMarketInfo) Reset() { *m = ExpiryFuturesMarketInfo{} } +func (m *ExpiryFuturesMarketInfo) String() string { return proto.CompactTextString(m) } +func (*ExpiryFuturesMarketInfo) ProtoMessage() {} +func (*ExpiryFuturesMarketInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{9} +} +func (m *ExpiryFuturesMarketInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpiryFuturesMarketInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpiryFuturesMarketInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExpiryFuturesMarketInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpiryFuturesMarketInfo.Merge(m, src) +} +func (m *ExpiryFuturesMarketInfo) XXX_Size() int { + return m.Size() +} +func (m *ExpiryFuturesMarketInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ExpiryFuturesMarketInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpiryFuturesMarketInfo proto.InternalMessageInfo + +func (m *ExpiryFuturesMarketInfo) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *ExpiryFuturesMarketInfo) GetExpirationTimestamp() int64 { + if m != nil { + return m.ExpirationTimestamp + } + return 0 +} + +func (m *ExpiryFuturesMarketInfo) GetTwapStartTimestamp() int64 { + if m != nil { + return m.TwapStartTimestamp + } + return 0 +} + +type PerpetualMarketInfo struct { + // market ID. + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // hourly_funding_rate_cap defines the maximum absolute value of the hourly + // funding rate + HourlyFundingRateCap cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=hourly_funding_rate_cap,json=hourlyFundingRateCap,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"hourly_funding_rate_cap"` + // hourly_interest_rate defines the hourly interest rate + HourlyInterestRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=hourly_interest_rate,json=hourlyInterestRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"hourly_interest_rate"` + // next_funding_timestamp defines the next funding timestamp in seconds of a + // perpetual market + NextFundingTimestamp int64 `protobuf:"varint,4,opt,name=next_funding_timestamp,json=nextFundingTimestamp,proto3" json:"next_funding_timestamp,omitempty"` + // funding_interval defines the next funding interval in seconds of a + // perpetual market. + FundingInterval int64 `protobuf:"varint,5,opt,name=funding_interval,json=fundingInterval,proto3" json:"funding_interval,omitempty"` +} + +func (m *PerpetualMarketInfo) Reset() { *m = PerpetualMarketInfo{} } +func (m *PerpetualMarketInfo) String() string { return proto.CompactTextString(m) } +func (*PerpetualMarketInfo) ProtoMessage() {} +func (*PerpetualMarketInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{10} +} +func (m *PerpetualMarketInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerpetualMarketInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerpetualMarketInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerpetualMarketInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerpetualMarketInfo.Merge(m, src) +} +func (m *PerpetualMarketInfo) XXX_Size() int { + return m.Size() +} +func (m *PerpetualMarketInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PerpetualMarketInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_PerpetualMarketInfo proto.InternalMessageInfo + +func (m *PerpetualMarketInfo) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *PerpetualMarketInfo) GetNextFundingTimestamp() int64 { + if m != nil { + return m.NextFundingTimestamp + } + return 0 +} + +func (m *PerpetualMarketInfo) GetFundingInterval() int64 { + if m != nil { + return m.FundingInterval + } + return 0 +} + +type PerpetualMarketFunding struct { + // cumulative_funding defines the cumulative funding of a perpetual market. + CumulativeFunding cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=cumulative_funding,json=cumulativeFunding,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding"` + // cumulative_price defines the cumulative price for the current hour up to + // the last timestamp + CumulativePrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=cumulative_price,json=cumulativePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_price"` + LastTimestamp int64 `protobuf:"varint,3,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` +} + +func (m *PerpetualMarketFunding) Reset() { *m = PerpetualMarketFunding{} } +func (m *PerpetualMarketFunding) String() string { return proto.CompactTextString(m) } +func (*PerpetualMarketFunding) ProtoMessage() {} +func (*PerpetualMarketFunding) Descriptor() ([]byte, []int) { + return fileDescriptor_c255fc568a8e9667, []int{11} +} +func (m *PerpetualMarketFunding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerpetualMarketFunding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerpetualMarketFunding.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerpetualMarketFunding) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerpetualMarketFunding.Merge(m, src) +} +func (m *PerpetualMarketFunding) XXX_Size() int { + return m.Size() +} +func (m *PerpetualMarketFunding) XXX_DiscardUnknown() { + xxx_messageInfo_PerpetualMarketFunding.DiscardUnknown(m) +} + +var xxx_messageInfo_PerpetualMarketFunding proto.InternalMessageInfo + +func (m *PerpetualMarketFunding) GetLastTimestamp() int64 { + if m != nil { + return m.LastTimestamp + } + return 0 +} + +func init() { + proto.RegisterEnum("injective.exchange.v2.MarketStatus", MarketStatus_name, MarketStatus_value) + proto.RegisterType((*MarketFeeMultiplier)(nil), "injective.exchange.v2.MarketFeeMultiplier") + proto.RegisterType((*SpotMarket)(nil), "injective.exchange.v2.SpotMarket") + proto.RegisterType((*BinaryOptionsMarket)(nil), "injective.exchange.v2.BinaryOptionsMarket") + proto.RegisterType((*DerivativeMarket)(nil), "injective.exchange.v2.DerivativeMarket") + proto.RegisterType((*DerivativeMarketSettlementInfo)(nil), "injective.exchange.v2.DerivativeMarketSettlementInfo") + proto.RegisterType((*MarketVolume)(nil), "injective.exchange.v2.MarketVolume") + proto.RegisterType((*VolumeRecord)(nil), "injective.exchange.v2.VolumeRecord") + proto.RegisterType((*ExpiryFuturesMarketInfoState)(nil), "injective.exchange.v2.ExpiryFuturesMarketInfoState") + proto.RegisterType((*PerpetualMarketFundingState)(nil), "injective.exchange.v2.PerpetualMarketFundingState") + proto.RegisterType((*ExpiryFuturesMarketInfo)(nil), "injective.exchange.v2.ExpiryFuturesMarketInfo") + proto.RegisterType((*PerpetualMarketInfo)(nil), "injective.exchange.v2.PerpetualMarketInfo") + proto.RegisterType((*PerpetualMarketFunding)(nil), "injective.exchange.v2.PerpetualMarketFunding") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/market.proto", fileDescriptor_c255fc568a8e9667) +} + +var fileDescriptor_c255fc568a8e9667 = []byte{ + // 1436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4b, 0x6f, 0x1b, 0x55, + 0x1b, 0xce, 0x24, 0xa9, 0x93, 0xbc, 0xbe, 0xc4, 0x19, 0xfb, 0x4b, 0xad, 0xf6, 0xfb, 0x92, 0x7c, + 0x0e, 0x85, 0x02, 0xaa, 0x4d, 0x03, 0x2b, 0x58, 0x35, 0x4d, 0x83, 0x82, 0x7a, 0x49, 0x27, 0x29, + 0x42, 0x95, 0xd0, 0xe8, 0x64, 0xfc, 0xda, 0x3e, 0x64, 0x6e, 0x9d, 0x39, 0xe3, 0xd6, 0xdd, 0xc2, + 0x82, 0x05, 0x20, 0x7e, 0x01, 0xe2, 0x3f, 0xf0, 0x1f, 0x50, 0x97, 0x5d, 0x22, 0x16, 0x15, 0x6a, + 0xf8, 0x13, 0xec, 0xd0, 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22, 0x36, 0x9a, 0x6d, 0x62, 0x31, 0x2f, 0x10, 0xd3, 0x54, 0x34, 0x96, + 0x14, 0x35, 0xee, 0xd9, 0x16, 0x0e, 0xfd, 0x26, 0x54, 0xf1, 0x99, 0x4f, 0x03, 0xc2, 0x7f, 0xb1, + 0xc9, 0xa8, 0x83, 0x21, 0x23, 0x8e, 0x2f, 0x66, 0x65, 0xc6, 0xa8, 0xa4, 0xbe, 0xfd, 0xd8, 0xc5, + 0x53, 0x42, 0x64, 0xcc, 0x46, 0x07, 0x5d, 0x96, 0x49, 0x99, 0x93, 0x29, 0xa9, 0x2f, 0x4d, 0x49, + 0x3a, 0x3d, 0x9f, 0xed, 0xf4, 0x80, 0xc0, 0x2c, 0x9c, 0x10, 0x98, 0x63, 0x03, 0x07, 0x03, 0x03, + 0x77, 0x52, 0x7d, 0xf2, 0x17, 0xa7, 0x3e, 0x85, 0x8b, 0x57, 0x9f, 0xe2, 0x39, 0xd5, 0x27, 0x15, + 0x98, 0xd2, 0x85, 0x09, 0xcc, 0xe2, 0xdf, 0x23, 0x30, 0xe5, 0x73, 0x0a, 0xcc, 0x7d, 0x28, 0x67, + 0x76, 0x98, 0x20, 0x5d, 0x5b, 0x4a, 0x30, 0xb5, 0xb3, 0x30, 0x17, 0xd3, 0x64, 0xc1, 0xf8, 0x84, + 0x60, 0xe9, 0x7f, 0x51, 0xb0, 0x86, 0x4a, 0x53, 0x65, 0x84, 0x34, 0x9d, 0x54, 0x9d, 0xea, 0x10, + 0xd5, 0x51, 0x27, 0xf6, 0x77, 0x0b, 0x50, 0xde, 0xc2, 0x80, 0xf6, 0x08, 0xef, 0xe7, 0x19, 0xc2, + 0xb3, 0x9a, 0x48, 0x05, 0x97, 0x39, 0x25, 0x3b, 0x4a, 0x04, 0x36, 0x49, 0x88, 0xfa, 0xff, 0x41, + 0x89, 0x90, 0x29, 0x6a, 0x29, 0xc5, 0x51, 0x49, 0x0f, 0xb9, 0xe9, 0x9f, 0x92, 0x9b, 0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ea, 0xe5, 0xd1, 0xca, 0xd4, 0x2f, 0x47, 0x2b, 0x53, 0x8f, 0x1f, 0x76, 0x28, 0xeb, + 0x46, 0x07, 0x0d, 0xcb, 0x73, 0x9a, 0x3b, 0xb1, 0x8e, 0xdc, 0x25, 0x07, 0x61, 0x33, 0x51, 0x95, + 0x1b, 0x96, 0x17, 0x60, 0xf6, 0xb5, 0x4b, 0xa8, 0xdb, 0x74, 0xbc, 0x56, 0x64, 0x63, 0x98, 0xfe, + 0x67, 0xc8, 0xef, 0xc6, 0x61, 0xb3, 0xb7, 0x71, 0x90, 0x13, 0xff, 0xef, 0xbd, 0xff, 0x67, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x46, 0x92, 0x64, 0xcb, 0x59, 0x14, 0x00, 0x00, +} + +func (m *MarketFeeMultiplier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MarketFeeMultiplier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MarketFeeMultiplier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.FeeMultiplier.Size() + i -= size + if _, err := m.FeeMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x78 + } + if m.BaseDecimals != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x70 + } + if m.AdminPermissions != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.AdminPermissions)) + i-- + dAtA[i] = 0x68 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x62 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if m.Status != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x40 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x3a + } + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintMarket(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintMarket(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BinaryOptionsMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BinaryOptionsMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BinaryOptionsMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } + if m.AdminPermissions != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.AdminPermissions)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + if m.SettlementPrice != nil { + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.Status != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x70 + } + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x52 + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintMarket(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x4a + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x42 + } + if m.SettlementTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.SettlementTimestamp)) + i-- + dAtA[i] = 0x38 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x30 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x28 + } + if m.OracleType != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x20 + } + if len(m.OracleProvider) > 0 { + i -= len(m.OracleProvider) + copy(dAtA[i:], m.OracleProvider) + i = encodeVarintMarket(dAtA, i, uint64(len(m.OracleProvider))) + i-- + dAtA[i] = 0x1a + } + if len(m.OracleSymbol) > 0 { + i -= len(m.OracleSymbol) + copy(dAtA[i:], m.OracleSymbol) + i = encodeVarintMarket(dAtA, i, uint64(len(m.OracleSymbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } + if m.AdminPermissions != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.AdminPermissions)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.Status != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x70 + } + if m.IsPerpetual { + i-- + if m.IsPerpetual { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x3a + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintMarket(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x32 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x28 + } + if m.OracleType != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x20 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintMarket(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x1a + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintMarket(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0x12 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintMarket(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarketSettlementInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarketSettlementInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarketSettlementInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MarketVolume) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MarketVolume) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MarketVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VolumeRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VolumeRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TakerVolume.Size() + i -= size + if _, err := m.TakerVolume.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.MakerVolume.Size() + i -= size + if _, err := m.MakerVolume.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ExpiryFuturesMarketInfoState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpiryFuturesMarketInfoState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiryFuturesMarketInfoState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MarketInfo != nil { + { + size, err := m.MarketInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PerpetualMarketFundingState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerpetualMarketFundingState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerpetualMarketFundingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Funding != nil { + { + size, err := m.Funding.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExpiryFuturesMarketInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpiryFuturesMarketInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiryFuturesMarketInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.ExpirationTwapStartPriceCumulative.Size() + i -= size + if _, err := m.ExpirationTwapStartPriceCumulative.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.TwapStartTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.TwapStartTimestamp)) + i-- + dAtA[i] = 0x18 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PerpetualMarketInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerpetualMarketInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerpetualMarketInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FundingInterval != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.FundingInterval)) + i-- + dAtA[i] = 0x28 + } + if m.NextFundingTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.NextFundingTimestamp)) + i-- + dAtA[i] = 0x20 + } + { + size := m.HourlyInterestRate.Size() + i -= size + if _, err := m.HourlyInterestRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.HourlyFundingRateCap.Size() + i -= size + if _, err := m.HourlyFundingRateCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintMarket(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PerpetualMarketFunding) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerpetualMarketFunding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerpetualMarketFunding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastTimestamp != 0 { + i = encodeVarintMarket(dAtA, i, uint64(m.LastTimestamp)) + i-- + dAtA[i] = 0x18 + } + { + size := m.CumulativePrice.Size() + i -= size + if _, err := m.CumulativePrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.CumulativeFunding.Size() + i -= size + if _, err := m.CumulativeFunding.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintMarket(dAtA []byte, offset int, v uint64) int { + offset -= sovMarket(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MarketFeeMultiplier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.FeeMultiplier.Size() + n += 1 + l + sovMarket(uint64(l)) + return n +} + +func (m *SpotMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovMarket(uint64(m.Status)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovMarket(uint64(l)) + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.AdminPermissions != 0 { + n += 1 + sovMarket(uint64(m.AdminPermissions)) + } + if m.BaseDecimals != 0 { + n += 1 + sovMarket(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovMarket(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *BinaryOptionsMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.OracleSymbol) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.OracleProvider) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovMarket(uint64(m.OracleType)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovMarket(uint64(m.OracleScaleFactor)) + } + if m.ExpirationTimestamp != 0 { + n += 1 + sovMarket(uint64(m.ExpirationTimestamp)) + } + if m.SettlementTimestamp != 0 { + n += 1 + sovMarket(uint64(m.SettlementTimestamp)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovMarket(uint64(l)) + if m.Status != 0 { + n += 1 + sovMarket(uint64(m.Status)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 2 + l + sovMarket(uint64(l)) + if m.SettlementPrice != nil { + l = m.SettlementPrice.Size() + n += 2 + l + sovMarket(uint64(l)) + } + l = m.MinNotional.Size() + n += 2 + l + sovMarket(uint64(l)) + if m.AdminPermissions != 0 { + n += 2 + sovMarket(uint64(m.AdminPermissions)) + } + if m.QuoteDecimals != 0 { + n += 2 + sovMarket(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *DerivativeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovMarket(uint64(m.OracleType)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovMarket(uint64(m.OracleScaleFactor)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.InitialMarginRatio.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovMarket(uint64(l)) + if m.IsPerpetual { + n += 2 + } + if m.Status != 0 { + n += 1 + sovMarket(uint64(m.Status)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 2 + l + sovMarket(uint64(l)) + l = m.MinNotional.Size() + n += 2 + l + sovMarket(uint64(l)) + l = len(m.Admin) + if l > 0 { + n += 2 + l + sovMarket(uint64(l)) + } + if m.AdminPermissions != 0 { + n += 2 + sovMarket(uint64(m.AdminPermissions)) + } + if m.QuoteDecimals != 0 { + n += 2 + sovMarket(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *DerivativeMarketSettlementInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.SettlementPrice.Size() + n += 1 + l + sovMarket(uint64(l)) + return n +} + +func (m *MarketVolume) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.Volume.Size() + n += 1 + l + sovMarket(uint64(l)) + return n +} + +func (m *VolumeRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MakerVolume.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.TakerVolume.Size() + n += 1 + l + sovMarket(uint64(l)) + return n +} + +func (m *ExpiryFuturesMarketInfoState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.MarketInfo != nil { + l = m.MarketInfo.Size() + n += 1 + l + sovMarket(uint64(l)) + } + return n +} + +func (m *PerpetualMarketFundingState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.Funding != nil { + l = m.Funding.Size() + n += 1 + l + sovMarket(uint64(l)) + } + return n +} + +func (m *ExpiryFuturesMarketInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + if m.ExpirationTimestamp != 0 { + n += 1 + sovMarket(uint64(m.ExpirationTimestamp)) + } + if m.TwapStartTimestamp != 0 { + n += 1 + sovMarket(uint64(m.TwapStartTimestamp)) + } + l = m.ExpirationTwapStartPriceCumulative.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.SettlementPrice.Size() + n += 1 + l + sovMarket(uint64(l)) + return n +} + +func (m *PerpetualMarketInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovMarket(uint64(l)) + } + l = m.HourlyFundingRateCap.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.HourlyInterestRate.Size() + n += 1 + l + sovMarket(uint64(l)) + if m.NextFundingTimestamp != 0 { + n += 1 + sovMarket(uint64(m.NextFundingTimestamp)) + } + if m.FundingInterval != 0 { + n += 1 + sovMarket(uint64(m.FundingInterval)) + } + return n +} + +func (m *PerpetualMarketFunding) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CumulativeFunding.Size() + n += 1 + l + sovMarket(uint64(l)) + l = m.CumulativePrice.Size() + n += 1 + l + sovMarket(uint64(l)) + if m.LastTimestamp != 0 { + n += 1 + sovMarket(uint64(m.LastTimestamp)) + } + return n +} + +func sovMarket(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMarket(x uint64) (n int) { + return sovMarket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MarketFeeMultiplier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MarketFeeMultiplier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MarketFeeMultiplier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FeeMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminPermissions", wireType) + } + m.AdminPermissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AdminPermissions |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BinaryOptionsMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BinaryOptionsMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryOptionsMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleSymbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleSymbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementTimestamp", wireType) + } + m.SettlementTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettlementTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.SettlementPrice = &v + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminPermissions", wireType) + } + m.AdminPermissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AdminPermissions |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsPerpetual", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsPerpetual = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminPermissions", wireType) + } + m.AdminPermissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AdminPermissions |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarketSettlementInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarketSettlementInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarketSettlementInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MarketVolume) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MarketVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MarketVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerVolume", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerVolume", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpiryFuturesMarketInfoState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpiryFuturesMarketInfoState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpiryFuturesMarketInfoState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarketInfo == nil { + m.MarketInfo = &ExpiryFuturesMarketInfo{} + } + if err := m.MarketInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerpetualMarketFundingState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerpetualMarketFundingState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerpetualMarketFundingState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Funding == nil { + m.Funding = &PerpetualMarketFunding{} + } + if err := m.Funding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpiryFuturesMarketInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpiryFuturesMarketInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpiryFuturesMarketInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TwapStartTimestamp", wireType) + } + m.TwapStartTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TwapStartTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTwapStartPriceCumulative", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExpirationTwapStartPriceCumulative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerpetualMarketInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerpetualMarketInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerpetualMarketInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HourlyFundingRateCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.HourlyFundingRateCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HourlyInterestRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.HourlyInterestRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextFundingTimestamp", wireType) + } + m.NextFundingTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextFundingTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingInterval", wireType) + } + m.FundingInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FundingInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerpetualMarketFunding) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerpetualMarketFunding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerpetualMarketFunding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeFunding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CumulativeFunding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CumulativePrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType) + } + m.LastTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMarket(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMarket + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMarket + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMarket + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMarket + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMarket = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMarket = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMarket = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/market_admin.go b/chain/exchange/types/v2/market_admin.go new file mode 100644 index 00000000..9c90e398 --- /dev/null +++ b/chain/exchange/types/v2/market_admin.go @@ -0,0 +1,8 @@ +package v2 + +func EmptyAdminInfo() AdminInfo { + return AdminInfo{ + Admin: "", + AdminPermissions: 0, + } +} diff --git a/chain/exchange/types/v2/msgs.go b/chain/exchange/types/v2/msgs.go new file mode 100644 index 00000000..5991d255 --- /dev/null +++ b/chain/exchange/types/v2/msgs.go @@ -0,0 +1,2112 @@ +package v2 + +import ( + "bytes" + "encoding/json" + + "cosmossdk.io/errors" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/common" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + wasmxtypes "github.com/InjectiveLabs/sdk-go/chain/wasmx/types" +) + +const RouterKey = types.ModuleName + +var ( + _ sdk.Msg = &MsgDeposit{} + _ sdk.Msg = &MsgWithdraw{} + _ sdk.Msg = &MsgCreateSpotLimitOrder{} + _ sdk.Msg = &MsgBatchCreateSpotLimitOrders{} + _ sdk.Msg = &MsgCreateSpotMarketOrder{} + _ sdk.Msg = &MsgCancelSpotOrder{} + _ sdk.Msg = &MsgBatchCancelSpotOrders{} + _ sdk.Msg = &MsgCreateDerivativeLimitOrder{} + _ sdk.Msg = &MsgBatchCreateDerivativeLimitOrders{} + _ sdk.Msg = &MsgCreateDerivativeMarketOrder{} + _ sdk.Msg = &MsgCancelDerivativeOrder{} + _ sdk.Msg = &MsgBatchCancelDerivativeOrders{} + _ sdk.Msg = &MsgSubaccountTransfer{} + _ sdk.Msg = &MsgExternalTransfer{} + _ sdk.Msg = &MsgIncreasePositionMargin{} + _ sdk.Msg = &MsgDecreasePositionMargin{} + _ sdk.Msg = &MsgLiquidatePosition{} + _ sdk.Msg = &MsgEmergencySettleMarket{} + _ sdk.Msg = &MsgInstantSpotMarketLaunch{} + _ sdk.Msg = &MsgInstantPerpetualMarketLaunch{} + _ sdk.Msg = &MsgInstantExpiryFuturesMarketLaunch{} + _ sdk.Msg = &MsgBatchUpdateOrders{} + _ sdk.Msg = &MsgPrivilegedExecuteContract{} + _ sdk.Msg = &MsgRewardsOptOut{} + _ sdk.Msg = &MsgInstantBinaryOptionsMarketLaunch{} + _ sdk.Msg = &MsgCreateBinaryOptionsLimitOrder{} + _ sdk.Msg = &MsgCreateBinaryOptionsMarketOrder{} + _ sdk.Msg = &MsgCancelBinaryOptionsOrder{} + _ sdk.Msg = &MsgAdminUpdateBinaryOptionsMarket{} + _ sdk.Msg = &MsgBatchCancelBinaryOptionsOrders{} + _ sdk.Msg = &MsgUpdateParams{} + _ sdk.Msg = &MsgUpdateSpotMarket{} + _ sdk.Msg = &MsgUpdateDerivativeMarket{} +) + +// exchange message types +const ( + TypeMsgDeposit = "msgDeposit" + TypeMsgWithdraw = "msgWithdraw" + TypeMsgCreateSpotLimitOrder = "createSpotLimitOrder" + TypeMsgBatchCreateSpotLimitOrders = "batchCreateSpotLimitOrders" + TypeMsgCreateSpotMarketOrder = "createSpotMarketOrder" + TypeMsgCancelSpotOrder = "cancelSpotOrder" + TypeMsgBatchCancelSpotOrders = "batchCancelSpotOrders" + TypeMsgCreateDerivativeLimitOrder = "createDerivativeLimitOrder" + TypeMsgBatchCreateDerivativeLimitOrders = "batchCreateDerivativeLimitOrder" + TypeMsgCreateDerivativeMarketOrder = "createDerivativeMarketOrder" + TypeMsgCancelDerivativeOrder = "cancelDerivativeOrder" + TypeMsgBatchCancelDerivativeOrders = "batchCancelDerivativeOrder" + TypeMsgSubaccountTransfer = "subaccountTransfer" + TypeMsgExternalTransfer = "externalTransfer" + TypeMsgIncreasePositionMargin = "increasePositionMargin" + TypeMsgDecreasePositionMargin = "decreasePositionMargin" + TypeMsgLiquidatePosition = "liquidatePosition" + TypeMsgEmergencySettleMarket = "emergencySettleMarket" + TypeMsgInstantSpotMarketLaunch = "instantSpotMarketLaunch" + TypeMsgInstantPerpetualMarketLaunch = "instantPerpetualMarketLaunch" + TypeMsgInstantExpiryFuturesMarketLaunch = "instantExpiryFuturesMarketLaunch" + TypeMsgBatchUpdateOrders = "batchUpdateOrders" + TypeMsgPrivilegedExecuteContract = "privilegedExecuteContract" + TypeMsgRewardsOptOut = "rewardsOptOut" + TypeMsgInstantBinaryOptionsMarketLaunch = "instantBinaryOptionsMarketLaunch" + TypeMsgCreateBinaryOptionsLimitOrder = "createBinaryOptionsLimitOrder" + TypeMsgCreateBinaryOptionsMarketOrder = "createBinaryOptionsMarketOrder" + TypeMsgCancelBinaryOptionsOrder = "cancelBinaryOptionsOrder" + TypeMsgAdminUpdateBinaryOptionsMarket = "adminUpdateBinaryOptionsMarket" + TypeMsgBatchCancelBinaryOptionsOrders = "batchCancelBinaryOptionsOrders" + TypeMsgUpdateParams = "updateParams" + TypeMsgUpdateSpotMarket = "updateSpotMarket" + TypeMsgUpdateDerivativeMarket = "updateDerivativeMarket" + TypeMsgAuthorizeStakeGrants = "authorizeStakeGrant" + TypeMsgActivateStakeGrant = "acceptStakeGrant" +) + +func (msg MsgUpdateParams) Route() string { return RouterKey } + +func (msg MsgUpdateParams) Type() string { return TypeMsgUpdateParams } + +func (msg MsgUpdateParams) ValidateBasic() error { + if err := types.ValidateAddress(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + if err := msg.Params.Validate(); err != nil { + return err + } + + return nil +} + +func (msg *MsgUpdateParams) GetSignBytes() []byte { + return types.ModuleCdc.MustMarshal(msg) +} + +func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// Declaration to validate adherence to interface +var _ types.UpdateSpotMarketMessage = &MsgUpdateSpotMarket{} + +func (msg MsgUpdateSpotMarket) GetNewMinPriceTickSize() math.LegacyDec { + return msg.NewMinPriceTickSize +} + +func (msg MsgUpdateSpotMarket) GetNewMinQuantityTickSize() math.LegacyDec { + return msg.NewMinQuantityTickSize +} + +func (msg MsgUpdateSpotMarket) GetNewMinNotional() math.LegacyDec { + return msg.NewMinNotional +} + +func (msg *MsgUpdateSpotMarket) ValidateBasic() error { + return types.UpdateSpotMarketMessageValidateBasic(msg) +} + +func (msg *MsgUpdateSpotMarket) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(msg.Admin)} +} + +func (msg *MsgUpdateSpotMarket) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgUpdateSpotMarket) Route() string { + return RouterKey +} + +func (msg *MsgUpdateSpotMarket) Type() string { + return TypeMsgUpdateSpotMarket +} + +func (msg *MsgUpdateSpotMarket) HasTickerUpdate() bool { + return msg.NewTicker != "" +} + +func (msg *MsgUpdateSpotMarket) HasMinPriceTickSizeUpdate() bool { + return !msg.NewMinPriceTickSize.IsNil() && !msg.NewMinPriceTickSize.IsZero() +} + +func (msg *MsgUpdateSpotMarket) HasMinQuantityTickSizeUpdate() bool { + return !msg.NewMinQuantityTickSize.IsNil() && !msg.NewMinQuantityTickSize.IsZero() +} + +func (msg *MsgUpdateSpotMarket) HasMinNotionalUpdate() bool { + return !msg.NewMinNotional.IsNil() && !msg.NewMinNotional.IsZero() +} + +func (msg *MsgUpdateDerivativeMarket) ValidateBasic() error { + if err := types.ValidateAddress(msg.Admin); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Admin) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + hasNoUpdate := !msg.HasTickerUpdate() && + !msg.HasMinPriceTickSizeUpdate() && + !msg.HasMinNotionalUpdate() && + !msg.HasMinQuantityTickSizeUpdate() && + !msg.HasInitialMarginRatioUpdate() && + !msg.HasMaintenanceMarginRatioUpdate() + + if hasNoUpdate { + return errors.Wrap(types.ErrBadField, "no update value present") + } + + if len(msg.NewTicker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not exceed %d characters", types.MaxTickerLength) + } + + if msg.HasMinPriceTickSizeUpdate() { + if err := types.ValidateTickSize(msg.NewMinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + } + + if msg.HasMinQuantityTickSizeUpdate() { + if err := types.ValidateTickSize(msg.NewMinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + } + + if msg.HasMinNotionalUpdate() { + if err := types.ValidateMinNotional(msg.NewMinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + } + + if msg.HasInitialMarginRatioUpdate() { + if err := types.ValidateMarginRatio(msg.NewInitialMarginRatio); err != nil { + return err + } + } + + if msg.HasMaintenanceMarginRatioUpdate() { + if err := types.ValidateMarginRatio(msg.NewMaintenanceMarginRatio); err != nil { + return err + } + } + + if msg.HasInitialMarginRatioUpdate() && msg.HasMaintenanceMarginRatioUpdate() { + if msg.NewInitialMarginRatio.LT(msg.NewMaintenanceMarginRatio) { + return types.ErrMarginsRelation + } + } + + return nil +} + +func (msg *MsgUpdateDerivativeMarket) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(msg.Admin)} +} + +func (msg *MsgUpdateDerivativeMarket) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgUpdateDerivativeMarket) Route() string { + return RouterKey +} + +func (msg *MsgUpdateDerivativeMarket) Type() string { + return TypeMsgUpdateDerivativeMarket +} + +func (msg *MsgUpdateDerivativeMarket) HasTickerUpdate() bool { + return msg.NewTicker != "" +} + +func (msg *MsgUpdateDerivativeMarket) HasMinPriceTickSizeUpdate() bool { + return !msg.NewMinPriceTickSize.IsNil() && !msg.NewMinPriceTickSize.IsZero() +} + +func (msg *MsgUpdateDerivativeMarket) HasMinQuantityTickSizeUpdate() bool { + return !msg.NewMinQuantityTickSize.IsNil() && !msg.NewMinQuantityTickSize.IsZero() +} + +func (msg *MsgUpdateDerivativeMarket) HasInitialMarginRatioUpdate() bool { + return !msg.NewInitialMarginRatio.IsNil() && !msg.NewInitialMarginRatio.IsZero() +} + +func (msg *MsgUpdateDerivativeMarket) HasMaintenanceMarginRatioUpdate() bool { + return !msg.NewMaintenanceMarginRatio.IsNil() && !msg.NewMaintenanceMarginRatio.IsZero() +} + +func (msg *MsgUpdateDerivativeMarket) HasMinNotionalUpdate() bool { + return !msg.NewMinNotional.IsNil() && !msg.NewMinNotional.IsZero() +} + +func (m *SpotOrder) ValidateBasic(senderAddr sdk.AccAddress) error { + if !types.IsHexHash(m.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, m.MarketId) + } + switch m.OrderType { + case OrderType_BUY, OrderType_SELL, OrderType_BUY_PO, OrderType_SELL_PO, OrderType_BUY_ATOMIC, OrderType_SELL_ATOMIC: + // do nothing + default: + return errors.Wrap(types.ErrUnrecognizedOrderType, string(m.OrderType)) + } + + // for legacy support purposes, allow non-conditional orders to send a 0 trigger price + if m.TriggerPrice != nil && (m.TriggerPrice.IsNil() || m.TriggerPrice.IsNegative() || m.TriggerPrice.GT(types.MaxOrderPrice)) { + return types.ErrInvalidTriggerPrice + } + + if m.OrderInfo.FeeRecipient != "" { + if err := types.ValidateAddress(m.OrderInfo.FeeRecipient); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, m.OrderInfo.FeeRecipient) + } + } + return m.OrderInfo.ValidateBasic(senderAddr, false, false) +} + +func (m *OrderInfo) ValidateBasic(senderAddr sdk.AccAddress, hasBinaryPriceBand, isDerivative bool) error { + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, m.SubaccountId); err != nil { + return err + } + + if m.Cid != "" && !types.IsValidCid(m.Cid) { + return errors.Wrap(types.ErrInvalidCid, m.Cid) + } + + if m.Quantity.IsNil() || m.Quantity.LTE(math.LegacyZeroDec()) || m.Quantity.GT(types.MaxOrderQuantity) { + return errors.Wrap(types.ErrInvalidQuantity, m.Quantity.String()) + } + + if hasBinaryPriceBand { + // o.Price.GT(types.MaxOrderPrice) is correct (as opposed to o.Price.GT(math.LegacyOneDec())), because the price here is scaled + // and we have no idea what the scale factor of the market is here when we execute ValidateBasic(), and thus we allow + // very high ceiling price to cover all cases + if m.Price.IsNil() || m.Price.LT(math.LegacyZeroDec()) || m.Price.GT(types.MaxOrderPrice) { + return errors.Wrap(types.ErrInvalidPrice, m.Price.String()) + } + } else { + if m.Price.IsNil() || m.Price.LTE(math.LegacyZeroDec()) || m.Price.GT(types.MaxOrderPrice) { + return errors.Wrap(types.ErrInvalidPrice, m.Price.String()) + } + } + + if isDerivative && !hasBinaryPriceBand && m.Price.LT(types.MinDerivativeOrderPrice) { + return errors.Wrap(types.ErrInvalidPrice, m.Price.String()) + } + + return nil +} + +func (o *DerivativeOrder) ValidateBasic(senderAddr sdk.AccAddress, hasBinaryPriceBand bool) error { + if !types.IsHexHash(o.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, o.MarketId) + } + + switch o.OrderType { + case OrderType_BUY, OrderType_SELL, OrderType_BUY_PO, OrderType_SELL_PO, OrderType_STOP_BUY, OrderType_STOP_SELL, OrderType_TAKE_BUY, OrderType_TAKE_SELL, OrderType_BUY_ATOMIC, OrderType_SELL_ATOMIC: + // do nothing + default: + return errors.Wrap(types.ErrUnrecognizedOrderType, string(o.OrderType)) + } + + if o.Margin.IsNil() || o.Margin.LT(math.LegacyZeroDec()) { + return errors.Wrap(types.ErrInsufficientMargin, o.Margin.String()) + } + + if o.Margin.GT(types.MaxOrderMargin) { + return errors.Wrap(types.ErrTooMuchOrderMargin, o.Margin.String()) + } + + // for legacy support purposes, allow non-conditional orders to send a 0 trigger price + if o.TriggerPrice != nil && (o.TriggerPrice.IsNil() || o.TriggerPrice.IsNegative() || o.TriggerPrice.GT(types.MaxOrderPrice)) { + return types.ErrInvalidTriggerPrice + } + + if o.IsConditional() && (o.TriggerPrice == nil || o.TriggerPrice.LT(types.MinDerivativeOrderPrice)) { /*|| + !o.IsConditional() && o.TriggerPrice != nil */ // commented out this check since FE is sending to us 0.0 trigger price for all orders + return errors.Wrapf(types.ErrInvalidTriggerPrice, "Mismatch between triggerPrice: %v and orderType: %v, or triggerPrice is incorrect", o.TriggerPrice, o.OrderType) + } + + if o.OrderInfo.FeeRecipient != "" { + _, err := sdk.AccAddressFromBech32(o.OrderInfo.FeeRecipient) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, o.OrderInfo.FeeRecipient) + } + } + return o.OrderInfo.ValidateBasic(senderAddr, hasBinaryPriceBand, !hasBinaryPriceBand) +} + +func (o *OrderData) ValidateBasic(senderAddr sdk.AccAddress) error { + if !types.IsHexHash(o.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, o.MarketId) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, o.SubaccountId); err != nil { + return err + } + + // order data must contain either an order hash or cid + if o.Cid == "" && o.OrderHash == "" { + return types.ErrOrderHashInvalid + } + + if o.Cid != "" && !types.IsValidCid(o.Cid) { + return errors.Wrap(types.ErrInvalidCid, o.Cid) + } + + if o.OrderHash != "" && !types.IsValidOrderHash(o.OrderHash) { + return errors.Wrap(types.ErrOrderHashInvalid, o.OrderHash) + } + return nil +} + +func (o *OrderData) GetIdentifier() any { + return types.GetOrderIdentifier(o.OrderHash, o.Cid) +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgDeposit) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgDeposit) Type() string { return TypeMsgDeposit } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgDeposit) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !msg.Amount.IsValid() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if types.IsNonceDerivedSubaccountID(msg.SubaccountId) { + subaccountID, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.SubaccountId) + if err != nil { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + if types.IsDefaultSubaccountID(subaccountID) { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + } else { + // deposits to externally owned subaccounts are allowed but they MUST be explicitly specified + _, ok := types.IsValidSubaccountID(msg.SubaccountId) + if !ok { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + if types.IsDefaultSubaccountID(common.HexToHash(msg.SubaccountId)) { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgDeposit) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgDeposit) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgWithdraw) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgWithdraw) Type() string { return TypeMsgWithdraw } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgWithdraw) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !msg.Amount.IsValid() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.SubaccountId); err != nil { + return err + } + + subaccountID, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.SubaccountId) + if err != nil { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + + if types.IsDefaultSubaccountID(subaccountID) { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgWithdraw) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgWithdraw) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgInstantSpotMarketLaunch) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgInstantSpotMarketLaunch) Type() string { return TypeMsgInstantSpotMarketLaunch } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgInstantSpotMarketLaunch) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Ticker == "" || len(msg.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if msg.BaseDenom == "" { + return errors.Wrap(types.ErrInvalidBaseDenom, "base denom should not be empty") + } + if msg.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + if msg.BaseDenom == msg.QuoteDenom { + return types.ErrSameDenoms + } + + if err := types.ValidateTickSize(msg.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(msg.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(msg.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + if msg.BaseDecimals <= 0 || msg.BaseDecimals > types.MaxOracleScaleFactor { + return errors.Wrap(types.ErrInvalidDenomDecimal, "base decimals is invalid") + } + if msg.QuoteDecimals <= 0 || msg.QuoteDecimals > types.MaxOracleScaleFactor { + return errors.Wrap(types.ErrInvalidDenomDecimal, "quote decimals is invalid") + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgInstantSpotMarketLaunch) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgInstantSpotMarketLaunch) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgInstantPerpetualMarketLaunch) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgInstantPerpetualMarketLaunch) Type() string { return TypeMsgInstantPerpetualMarketLaunch } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgInstantPerpetualMarketLaunch) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Ticker == "" || len(msg.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if msg.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + oracleParams := types.NewOracleParams(msg.OracleBase, msg.OracleQuote, msg.OracleScaleFactor, msg.OracleType) + if err := oracleParams.ValidateBasic(); err != nil { + return err + } + if err := types.ValidateMakerFee(msg.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(msg.TakerFeeRate); err != nil { + return err + } + if err := types.ValidateMarginRatio(msg.InitialMarginRatio); err != nil { + return err + } + if err := types.ValidateMarginRatio(msg.MaintenanceMarginRatio); err != nil { + return err + } + if msg.MakerFeeRate.GT(msg.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + if msg.InitialMarginRatio.LT(msg.MaintenanceMarginRatio) { + return types.ErrMarginsRelation + } + if err := types.ValidateTickSize(msg.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(msg.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(msg.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgInstantPerpetualMarketLaunch) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgInstantPerpetualMarketLaunch) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgInstantBinaryOptionsMarketLaunch) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgInstantBinaryOptionsMarketLaunch) Type() string { + return TypeMsgInstantBinaryOptionsMarketLaunch +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgInstantBinaryOptionsMarketLaunch) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Ticker == "" || len(msg.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if msg.OracleSymbol == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle symbol should not be empty") + } + if msg.OracleProvider == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle provider should not be empty") + } + if msg.OracleType != oracletypes.OracleType_Provider { + return errors.Wrap(types.ErrInvalidOracleType, msg.OracleType.String()) + } + if msg.OracleScaleFactor > types.MaxOracleScaleFactor { + return types.ErrExceedsMaxOracleScaleFactor + } + if err := types.ValidateMakerFee(msg.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(msg.TakerFeeRate); err != nil { + return err + } + if msg.MakerFeeRate.GT(msg.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + if msg.ExpirationTimestamp >= msg.SettlementTimestamp || msg.ExpirationTimestamp < 0 || msg.SettlementTimestamp < 0 { + return types.ErrInvalidExpiry + } + if msg.Admin != "" { + _, err := sdk.AccAddressFromBech32(msg.Admin) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Admin) + } + } + if msg.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + if err := types.ValidateTickSize(msg.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(msg.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(msg.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgInstantBinaryOptionsMarketLaunch) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgInstantBinaryOptionsMarketLaunch) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgInstantExpiryFuturesMarketLaunch) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgInstantExpiryFuturesMarketLaunch) Type() string { + return TypeMsgInstantExpiryFuturesMarketLaunch +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgInstantExpiryFuturesMarketLaunch) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Ticker == "" || len(msg.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if msg.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + + oracleParams := types.NewOracleParams(msg.OracleBase, msg.OracleQuote, msg.OracleScaleFactor, msg.OracleType) + if err := oracleParams.ValidateBasic(); err != nil { + return err + } + if msg.Expiry <= 0 { + return errors.Wrap(types.ErrInvalidExpiry, "expiry should not be empty") + } + if err := types.ValidateMakerFee(msg.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(msg.TakerFeeRate); err != nil { + return err + } + if err := types.ValidateMarginRatio(msg.InitialMarginRatio); err != nil { + return err + } + if err := types.ValidateMarginRatio(msg.MaintenanceMarginRatio); err != nil { + return err + } + if msg.MakerFeeRate.GT(msg.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + if msg.InitialMarginRatio.LT(msg.MaintenanceMarginRatio) { + return types.ErrMarginsRelation + } + if err := types.ValidateTickSize(msg.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(msg.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(msg.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgInstantExpiryFuturesMarketLaunch) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgInstantExpiryFuturesMarketLaunch) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgCreateSpotLimitOrder) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgCreateSpotLimitOrder) Type() string { return TypeMsgCreateSpotLimitOrder } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgCreateSpotLimitOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { // We don't need to check if sender is empty. + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if err := msg.Order.ValidateBasic(senderAddr); err != nil { + return err + } + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgCreateSpotLimitOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgCreateSpotLimitOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgBatchCreateSpotLimitOrders) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgBatchCreateSpotLimitOrders) Type() string { return TypeMsgBatchCreateSpotLimitOrders } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgBatchCreateSpotLimitOrders) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { // We don't need to check if sender is empty. + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if len(msg.Orders) == 0 { + return errors.Wrap(types.ErrOrderDoesntExist, "must create at least 1 order") + } + + for idx := range msg.Orders { + order := msg.Orders[idx] + if err := order.ValidateBasic(senderAddr); err != nil { + return err + } + } + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgBatchCreateSpotLimitOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgBatchCreateSpotLimitOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgCreateSpotMarketOrder) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgCreateSpotMarketOrder) Type() string { return TypeMsgCreateSpotMarketOrder } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgCreateSpotMarketOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if msg.Order.OrderType == OrderType_BUY_PO || msg.Order.OrderType == OrderType_SELL_PO { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Spot market order can't be a post only order") + } + + if err := msg.Order.ValidateBasic(senderAddr); err != nil { + return err + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgCreateSpotMarketOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgCreateSpotMarketOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg *MsgCancelSpotOrder) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgCancelSpotOrder) Type() string { return TypeMsgCancelSpotOrder } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgCancelSpotOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + orderData := OrderData{ + MarketId: msg.MarketId, + SubaccountId: msg.SubaccountId, + OrderHash: msg.OrderHash, + Cid: msg.Cid, + } + return orderData.ValidateBasic(senderAddr) +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgCancelSpotOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgCancelSpotOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg *MsgBatchCancelSpotOrders) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgBatchCancelSpotOrders) Type() string { return TypeMsgBatchCancelSpotOrders } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgBatchCancelSpotOrders) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if len(msg.Data) == 0 { + return errors.Wrap(types.ErrOrderDoesntExist, "must cancel at least 1 order") + } + + for idx := range msg.Data { + if err := msg.Data[idx].ValidateBasic(senderAddr); err != nil { + return err + } + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgBatchCancelSpotOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgBatchCancelSpotOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route should return the name of the module +func (msg MsgCreateDerivativeLimitOrder) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgCreateDerivativeLimitOrder) Type() string { return TypeMsgCreateDerivativeLimitOrder } + +// ValidateBasic runs stateless checks on the message +func (msg MsgCreateDerivativeLimitOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Order.OrderType == OrderType_BUY_ATOMIC || msg.Order.OrderType == OrderType_SELL_ATOMIC { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Derivative limit orders can't be atomic orders") + } + if err := msg.Order.ValidateBasic(senderAddr, false); err != nil { + return err + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgCreateDerivativeLimitOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateDerivativeLimitOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func NewMsgCreateBinaryOptionsLimitOrder( + sender sdk.AccAddress, + market *BinaryOptionsMarket, + subaccountID string, + feeRecipient string, + price, quantity math.LegacyDec, + orderType OrderType, + isReduceOnly bool, +) *MsgCreateBinaryOptionsLimitOrder { + margin := types.GetRequiredBinaryOptionsOrderMargin(price, quantity, market.OracleScaleFactor, orderType.IsBuy(), isReduceOnly) + + return &MsgCreateBinaryOptionsLimitOrder{ + Sender: sender.String(), + Order: DerivativeOrder{ + MarketId: market.MarketId, + OrderInfo: OrderInfo{ + SubaccountId: subaccountID, + FeeRecipient: feeRecipient, + Price: price, + Quantity: quantity, + }, + OrderType: orderType, + Margin: margin, + TriggerPrice: nil, + }, + } +} + +// Route should return the name of the module +func (msg MsgCreateBinaryOptionsLimitOrder) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgCreateBinaryOptionsLimitOrder) Type() string { + return TypeMsgCreateBinaryOptionsLimitOrder +} + +// ValidateBasic runs stateless checks on the message +func (msg MsgCreateBinaryOptionsLimitOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if msg.Order.OrderType.IsConditional() { + return errors.Wrap(types.ErrUnrecognizedOrderType, string(msg.Order.OrderType)) + } + if err := msg.Order.ValidateBasic(senderAddr, true); err != nil { + return err + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgCreateBinaryOptionsLimitOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateBinaryOptionsLimitOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route should return the name of the module +func (msg MsgBatchCreateDerivativeLimitOrders) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgBatchCreateDerivativeLimitOrders) Type() string { + return TypeMsgBatchCreateDerivativeLimitOrders +} + +// ValidateBasic runs stateless checks on the message +func (msg MsgBatchCreateDerivativeLimitOrders) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if len(msg.Orders) == 0 { + return errors.Wrap(types.ErrOrderDoesntExist, "must create at least 1 order") + } + + for idx := range msg.Orders { + order := msg.Orders[idx] + if err := order.ValidateBasic(senderAddr, false); err != nil { + return err + } + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgBatchCreateDerivativeLimitOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgBatchCreateDerivativeLimitOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route should return the name of the module +func (msg MsgCreateDerivativeMarketOrder) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgCreateDerivativeMarketOrder) Type() string { return TypeMsgCreateDerivativeMarketOrder } + +// ValidateBasic runs stateless checks on the message +func (msg MsgCreateDerivativeMarketOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if msg.Order.OrderType == OrderType_BUY_PO || msg.Order.OrderType == OrderType_SELL_PO { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Derivative market order can't be a post only order") + } + + if err := msg.Order.ValidateBasic(senderAddr, false); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgCreateDerivativeMarketOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateDerivativeMarketOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func NewMsgCreateBinaryOptionsMarketOrder( + sender sdk.AccAddress, + market *BinaryOptionsMarket, + subaccountID string, + feeRecipient string, + price, quantity math.LegacyDec, + orderType OrderType, + isReduceOnly bool, +) *MsgCreateBinaryOptionsMarketOrder { + margin := types.GetRequiredBinaryOptionsOrderMargin( + price, + quantity, + market.OracleScaleFactor, + orderType.IsBuy(), + isReduceOnly, + ) + + return &MsgCreateBinaryOptionsMarketOrder{ + Sender: sender.String(), + Order: DerivativeOrder{ + MarketId: market.MarketId, + OrderInfo: OrderInfo{ + SubaccountId: subaccountID, + FeeRecipient: feeRecipient, + Price: price, + Quantity: quantity, + }, + OrderType: orderType, + Margin: margin, + TriggerPrice: nil, + }, + } +} + +// Route should return the name of the module +func (msg MsgCreateBinaryOptionsMarketOrder) Route() string { return RouterKey } + +// Type should return the action +func (msg MsgCreateBinaryOptionsMarketOrder) Type() string { + return TypeMsgCreateBinaryOptionsMarketOrder +} + +// ValidateBasic runs stateless checks on the message +func (msg MsgCreateBinaryOptionsMarketOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if msg.Order.OrderType == OrderType_BUY_PO || msg.Order.OrderType == OrderType_SELL_PO { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "market order can't be a post only order") + } + if msg.Order.OrderType.IsConditional() { + return errors.Wrap(types.ErrUnrecognizedOrderType, string(msg.Order.OrderType)) + } + + if err := msg.Order.ValidateBasic(senderAddr, true); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgCreateBinaryOptionsMarketOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateBinaryOptionsMarketOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg *MsgCancelDerivativeOrder) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgCancelDerivativeOrder) Type() string { + return TypeMsgCancelDerivativeOrder +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgCancelDerivativeOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + orderData := OrderData{ + MarketId: msg.MarketId, + SubaccountId: msg.SubaccountId, + OrderHash: msg.OrderHash, + Cid: msg.Cid, + } + return orderData.ValidateBasic(senderAddr) +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgCancelDerivativeOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgCancelDerivativeOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg *MsgBatchCancelDerivativeOrders) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgBatchCancelDerivativeOrders) Type() string { + return TypeMsgBatchCancelDerivativeOrders +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgBatchCancelDerivativeOrders) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if len(msg.Data) == 0 { + return errors.Wrap(types.ErrOrderDoesntExist, "must cancel at least 1 order") + } + + for idx := range msg.Data { + if err := msg.Data[idx].ValidateBasic(senderAddr); err != nil { + return err + } + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgBatchCancelDerivativeOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgBatchCancelDerivativeOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg *MsgCancelBinaryOptionsOrder) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgCancelBinaryOptionsOrder) Type() string { + return TypeMsgCancelBinaryOptionsOrder +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgCancelBinaryOptionsOrder) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + orderData := OrderData{ + MarketId: msg.MarketId, + SubaccountId: msg.SubaccountId, + OrderHash: msg.OrderHash, + Cid: msg.Cid, + } + return orderData.ValidateBasic(senderAddr) +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgCancelBinaryOptionsOrder) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgCancelBinaryOptionsOrder) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgBatchCancelBinaryOptionsOrders) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface. It should return the action. +func (msg *MsgBatchCancelBinaryOptionsOrders) Type() string { + return TypeMsgBatchCancelBinaryOptionsOrders +} + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg *MsgBatchCancelBinaryOptionsOrders) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if len(msg.Data) == 0 { + return errors.Wrap(types.ErrOrderDoesntExist, "must cancel at least 1 order") + } + + for idx := range msg.Data { + if err := msg.Data[idx].ValidateBasic(senderAddr); err != nil { + return err + } + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgBatchCancelBinaryOptionsOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg *MsgBatchCancelBinaryOptionsOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgSubaccountTransfer) Route() string { + return RouterKey +} + +func (msg *MsgSubaccountTransfer) Type() string { + return TypeMsgSubaccountTransfer +} + +func (msg *MsgSubaccountTransfer) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + if !msg.Amount.IsValid() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.SourceSubaccountId); err != nil { + return err + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.DestinationSubaccountId); err != nil { + return err + } + + sourceSubaccount, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.SourceSubaccountId) + if err != nil { + return errors.Wrap(types.ErrBadSubaccountID, msg.SourceSubaccountId) + } + + destinationSubaccount, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.DestinationSubaccountId) + if err != nil { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + + if types.IsDefaultSubaccountID(sourceSubaccount) { + return errors.Wrap(types.ErrBadSubaccountID, msg.SourceSubaccountId) + } + + if types.IsDefaultSubaccountID(destinationSubaccount) { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + + if !bytes.Equal(types.SubaccountIDToSdkAddress(sourceSubaccount).Bytes(), types.SubaccountIDToSdkAddress(destinationSubaccount).Bytes()) { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + + return nil +} + +func (msg *MsgSubaccountTransfer) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgSubaccountTransfer) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgExternalTransfer) Route() string { + return RouterKey +} + +func (msg *MsgExternalTransfer) Type() string { + return TypeMsgExternalTransfer +} + +func (msg *MsgExternalTransfer) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !msg.Amount.IsValid() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.SourceSubaccountId); err != nil { + return err + } + + sourceSubaccountId, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.SourceSubaccountId) + if err != nil { + return errors.Wrap(types.ErrBadSubaccountID, msg.SourceSubaccountId) + } + + if types.IsDefaultSubaccountID(common.HexToHash(msg.SourceSubaccountId)) { + return errors.Wrap(types.ErrBadSubaccountID, msg.SourceSubaccountId) + } + + if _, ok := types.IsValidSubaccountID(msg.DestinationSubaccountId); !ok { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + + if !bytes.Equal(types.SubaccountIDToSdkAddress(sourceSubaccountId).Bytes(), senderAddr.Bytes()) { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + return nil +} + +func (msg *MsgExternalTransfer) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgExternalTransfer) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgIncreasePositionMargin) Route() string { + return RouterKey +} + +func (msg *MsgIncreasePositionMargin) Type() string { + return TypeMsgIncreasePositionMargin +} + +func (msg *MsgIncreasePositionMargin) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if msg.Amount.GT(types.MaxOrderMargin) { + return errors.Wrap(types.ErrTooMuchOrderMargin, msg.Amount.String()) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.SourceSubaccountId); err != nil { + return err + } + + _, ok := types.IsValidSubaccountID(msg.DestinationSubaccountId) + if !ok { + return errors.Wrap(types.ErrBadSubaccountID, msg.DestinationSubaccountId) + } + + return nil +} + +func (msg *MsgIncreasePositionMargin) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgIncreasePositionMargin) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgDecreasePositionMargin) Route() string { + return RouterKey +} + +func (msg *MsgDecreasePositionMargin) Type() string { + return TypeMsgDecreasePositionMargin +} + +func (msg *MsgDecreasePositionMargin) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + if !msg.Amount.IsPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Amount.String()) + } + + if msg.Amount.GT(types.MaxOrderMargin) { + return errors.Wrap(types.ErrTooMuchOrderMargin, msg.Amount.String()) + } + + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.SourceSubaccountId); err != nil { + return err + } + if err := types.CheckValidSubaccountIDOrNonce(senderAddr, msg.DestinationSubaccountId); err != nil { + return err + } + + return nil +} + +func (msg *MsgDecreasePositionMargin) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgDecreasePositionMargin) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgPrivilegedExecuteContract) Route() string { + return RouterKey +} + +func (msg *MsgPrivilegedExecuteContract) Type() string { + return TypeMsgPrivilegedExecuteContract +} + +func (msg *MsgPrivilegedExecuteContract) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + // funds must either be "empty" or a valid funds coins string + if !msg.HasEmptyFunds() { + if coins, err := sdk.ParseDecCoins(msg.Funds); err != nil || !coins.IsAllPositive() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, msg.Funds) + } + } + + _, err = sdk.AccAddressFromBech32(msg.ContractAddress) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.ContractAddress) + } + + var e wasmxtypes.ExecutionData + if err := json.Unmarshal([]byte(msg.Data), &e); err != nil { + return errors.Wrap(err, msg.Data) + } + + if e.Name == "" { + return errors.Wrap(types.ErrBadField, "name should not be empty") + } else if e.Origin != "" && e.Origin != msg.Sender { + return errors.Wrap(types.ErrBadField, "origin must match sender or be empty") + } + + return nil +} + +func (msg *MsgPrivilegedExecuteContract) HasEmptyFunds() bool { + return msg.Funds == "" || msg.Funds == "0" || msg.Funds == "0inj" +} + +func (msg *MsgPrivilegedExecuteContract) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgPrivilegedExecuteContract) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgRewardsOptOut) Route() string { + return RouterKey +} + +func (msg *MsgRewardsOptOut) Type() string { + return TypeMsgRewardsOptOut +} + +func (msg *MsgRewardsOptOut) ValidateBasic() error { + + return nil +} + +func (msg *MsgRewardsOptOut) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgRewardsOptOut) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgLiquidatePosition) Route() string { + return RouterKey +} + +func (msg *MsgLiquidatePosition) Type() string { + return TypeMsgLiquidatePosition +} + +func (msg *MsgLiquidatePosition) ValidateBasic() error { + senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) + + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + _, ok := types.IsValidSubaccountID(msg.SubaccountId) + if !ok { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + + if msg.Order != nil { + liquidatorSubaccountID, err := types.GetSubaccountIDOrDeriveFromNonce(senderAddr, msg.Order.OrderInfo.SubaccountId) + if err != nil { + return err + } + + // cannot liquidate own position with an order + if liquidatorSubaccountID == common.HexToHash(msg.SubaccountId) { + return types.ErrInvalidLiquidationOrder + } + + if err := msg.Order.ValidateBasic(senderAddr, false); err != nil { + return err + } + } + + return nil +} + +func (msg *MsgLiquidatePosition) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgLiquidatePosition) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgEmergencySettleMarket) Route() string { + return RouterKey +} + +func (msg *MsgEmergencySettleMarket) Type() string { + return TypeMsgEmergencySettleMarket +} + +func (msg *MsgEmergencySettleMarket) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + _, ok := types.IsValidSubaccountID(msg.SubaccountId) + if !ok { + return errors.Wrap(types.ErrBadSubaccountID, msg.SubaccountId) + } + + return nil +} + +func (msg *MsgEmergencySettleMarket) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgEmergencySettleMarket) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// Route implements the sdk.Msg interface. It should return the name of the module +func (msg MsgBatchUpdateOrders) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface. It should return the action. +func (msg MsgBatchUpdateOrders) Type() string { return TypeMsgBatchUpdateOrders } + +// ValidateBasic implements the sdk.Msg interface. It runs stateless checks on the message +func (msg MsgBatchUpdateOrders) ValidateBasic() error { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + hasCancelAllMarketId := len(msg.SpotMarketIdsToCancelAll) > 0 || len(msg.DerivativeMarketIdsToCancelAll) > 0 || len(msg.BinaryOptionsMarketIdsToCancelAll) > 0 + + // for MsgBatchUpdateOrders, empty subaccountIDs do not count as the default subaccount + hasSubaccountIdForCancelAll := msg.SubaccountId != "" + + if hasCancelAllMarketId && !hasSubaccountIdForCancelAll { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains cancel all marketIDs but no subaccountID") + } + + if hasSubaccountIdForCancelAll && !hasCancelAllMarketId { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains subaccountID but no cancel all marketIDs") + } + + if hasSubaccountIdForCancelAll { + if err := types.CheckValidSubaccountIDOrNonce(sender, msg.SubaccountId); err != nil { + return err + } + + hasDuplicateSpotMarketIDs := types.HasDuplicatesHexHash(msg.SpotMarketIdsToCancelAll) + if hasDuplicateSpotMarketIDs { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate cancel all spot market ids") + } + + hasDuplicateDerivativesMarketIDs := types.HasDuplicatesHexHash(msg.DerivativeMarketIdsToCancelAll) + if hasDuplicateDerivativesMarketIDs { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate cancel all derivative market ids") + } + hasDuplicateBinaryOptionsMarketIDs := types.HasDuplicatesHexHash(msg.BinaryOptionsMarketIdsToCancelAll) + if hasDuplicateBinaryOptionsMarketIDs { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate cancel all binary options market ids") + } + } + + if !hasSubaccountIdForCancelAll && + len(msg.DerivativeOrdersToCancel) == 0 && + len(msg.SpotOrdersToCancel) == 0 && + len(msg.DerivativeOrdersToCreate) == 0 && + len(msg.SpotOrdersToCreate) == 0 && + len(msg.BinaryOptionsOrdersToCreate) == 0 && + len(msg.BinaryOptionsOrdersToCancel) == 0 { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg is empty") + } + + hasDuplicateSpotOrderToCancel := hasDuplicatesOrder(msg.SpotOrdersToCancel) + if hasDuplicateSpotOrderToCancel { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate spot order to cancel") + } + + hasDuplicateDerivativeOrderToCancel := hasDuplicatesOrder(msg.DerivativeOrdersToCancel) + if hasDuplicateDerivativeOrderToCancel { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate derivative order to cancel") + } + + hasDuplicateBinaryOptionsOrderToCancel := hasDuplicatesOrder(msg.BinaryOptionsOrdersToCancel) + if hasDuplicateBinaryOptionsOrderToCancel { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains duplicate binary options order to cancel") + } + + if len(msg.SpotMarketIdsToCancelAll) > 0 && len(msg.SpotOrdersToCancel) > 0 { + seen := make(map[common.Hash]struct{}) + for _, marketID := range msg.SpotMarketIdsToCancelAll { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + seen[common.HexToHash(marketID)] = struct{}{} + } + + for idx := range msg.SpotOrdersToCancel { + if _, ok := seen[common.HexToHash(msg.SpotOrdersToCancel[idx].MarketId)]; ok { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains order to cancel in a spot market that is also in cancel all") + } + } + } + + if len(msg.DerivativeMarketIdsToCancelAll) > 0 && len(msg.DerivativeOrdersToCancel) > 0 { + seen := make(map[common.Hash]struct{}) + for _, marketID := range msg.DerivativeMarketIdsToCancelAll { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + seen[common.HexToHash(marketID)] = struct{}{} + } + + for idx := range msg.DerivativeOrdersToCancel { + if _, ok := seen[common.HexToHash(msg.DerivativeOrdersToCancel[idx].MarketId)]; ok { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains order to cancel in a derivative market that is also in cancel all") + } + } + } + + if len(msg.BinaryOptionsMarketIdsToCancelAll) > 0 && len(msg.BinaryOptionsOrdersToCancel) > 0 { + seen := make(map[common.Hash]struct{}) + for _, marketID := range msg.BinaryOptionsMarketIdsToCancelAll { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + seen[common.HexToHash(marketID)] = struct{}{} + } + + for idx := range msg.BinaryOptionsOrdersToCancel { + if _, ok := seen[common.HexToHash(msg.BinaryOptionsOrdersToCancel[idx].MarketId)]; ok { + return errors.Wrap(types.ErrInvalidBatchMsgUpdate, "msg contains order to cancel in a binary options market that is also in cancel all") + } + } + } + + for idx := range msg.SpotOrdersToCancel { + if err := msg.SpotOrdersToCancel[idx].ValidateBasic(sender); err != nil { + return err + } + } + + for idx := range msg.DerivativeOrdersToCancel { + if err := msg.DerivativeOrdersToCancel[idx].ValidateBasic(sender); err != nil { + return err + } + } + for idx := range msg.BinaryOptionsOrdersToCancel { + if err := msg.BinaryOptionsOrdersToCancel[idx].ValidateBasic(sender); err != nil { + return err + } + } + + for idx := range msg.SpotOrdersToCreate { + if err := msg.SpotOrdersToCreate[idx].ValidateBasic(sender); err != nil { + return err + } + if msg.SpotOrdersToCreate[idx].OrderType.IsAtomic() { // must be checked separately as type is SpotOrder, so it won't check for atomic orders properly + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Spot limit orders can't be atomic orders") + } + } + + for idx := range msg.DerivativeOrdersToCreate { + if err := msg.DerivativeOrdersToCreate[idx].ValidateBasic(sender, false); err != nil { + return err + } + if msg.DerivativeOrdersToCreate[idx].OrderType.IsAtomic() { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Derivative limit orders can't be atomic orders") + } + } + + for idx := range msg.BinaryOptionsOrdersToCreate { + if err := msg.BinaryOptionsOrdersToCreate[idx].ValidateBasic(sender, true); err != nil { + return err + } + if msg.BinaryOptionsOrdersToCreate[idx].OrderType.IsAtomic() { + return errors.Wrap(types.ErrInvalidOrderTypeForMessage, "Binary limit orders can't be atomic orders") + } + } + + return nil +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgBatchUpdateOrders) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners implements the sdk.Msg interface. It defines whose signature is required +func (msg MsgBatchUpdateOrders) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgAdminUpdateBinaryOptionsMarket) Route() string { + return RouterKey +} + +func (msg *MsgAdminUpdateBinaryOptionsMarket) Type() string { + return TypeMsgAdminUpdateBinaryOptionsMarket +} + +func (msg *MsgAdminUpdateBinaryOptionsMarket) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if !types.IsHexHash(msg.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, msg.MarketId) + } + + if (msg.SettlementTimestamp > 0 && msg.ExpirationTimestamp >= msg.SettlementTimestamp) || + msg.ExpirationTimestamp < 0 { + return types.ErrInvalidExpiry + } + + if msg.SettlementTimestamp < 0 { + return types.ErrInvalidSettlement + } + + // price is either nil (not set), -1 (demolish with refund) or [0..1] (demolish with settle) + switch { + case msg.SettlementPrice == nil, + msg.SettlementPrice.IsNil(): + // ok + case msg.SettlementPrice.Equal(types.BinaryOptionsMarketRefundFlagPrice), + msg.SettlementPrice.GTE(math.LegacyZeroDec()) && msg.SettlementPrice.LTE(types.MaxBinaryOptionsOrderPrice): + if msg.Status != MarketStatus_Demolished { + return errors.Wrapf(types.ErrInvalidMarketStatus, "status should be set to demolished when the settlement price is set, status: %s", msg.Status.String()) + } + // ok + default: + return errors.Wrap(types.ErrInvalidPrice, msg.SettlementPrice.String()) + } + // admin can only change status to demolished + switch msg.Status { + case + MarketStatus_Unspecified, + MarketStatus_Demolished: + default: + return errors.Wrap(types.ErrInvalidMarketStatus, msg.Status.String()) + } + + return nil +} + +func (msg *MsgAdminUpdateBinaryOptionsMarket) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgAdminUpdateBinaryOptionsMarket) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgAuthorizeStakeGrants) Route() string { return RouterKey } + +func (msg *MsgAuthorizeStakeGrants) Type() string { return TypeMsgAuthorizeStakeGrants } + +func (msg *MsgAuthorizeStakeGrants) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + for idx := range msg.Grants { + grant := msg.Grants[idx] + + if _, err := sdk.AccAddressFromBech32(grant.Grantee); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, grant.Grantee) + } + + if grant.Amount.IsNegative() || grant.Amount.GT(types.MaxTokenInt) { + return errors.Wrap(types.ErrInvalidStakeGrant, grant.Amount.String()) + + } + } + return nil +} + +func (msg *MsgAuthorizeStakeGrants) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +// GetSignBytes implements the sdk.Msg interface. It encodes the message for signing +func (msg *MsgAuthorizeStakeGrants) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgActivateStakeGrant) Route() string { return RouterKey } + +func (msg *MsgActivateStakeGrant) Type() string { return TypeMsgActivateStakeGrant } + +func (msg *MsgActivateStakeGrant) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + + if _, err := sdk.AccAddressFromBech32(msg.Granter); err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, msg.Granter) + } + return nil +} + +func (msg *MsgActivateStakeGrant) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgActivateStakeGrant) GetSignBytes() []byte { + return sdk.MustSortJSON(types.ModuleCdc.MustMarshalJSON(msg)) +} + +func hasDuplicatesOrder(slice []*OrderData) bool { + seenHashes := make(map[string]struct{}) + seenCids := make(map[string]struct{}) + for _, item := range slice { + var hash, cid string + hash, cid = item.GetOrderHash(), item.GetCid() + _, hashExists := seenHashes[hash] + _, cidExists := seenCids[cid] + + if (hash != "" && hashExists) || (cid != "" && cidExists) { + return true + } + seenHashes[hash] = struct{}{} + seenCids[cid] = struct{}{} + } + return false +} diff --git a/chain/exchange/types/v2/order.go b/chain/exchange/types/v2/order.go new file mode 100644 index 00000000..59e9e7d0 --- /dev/null +++ b/chain/exchange/types/v2/order.go @@ -0,0 +1,25 @@ +package v2 + +import v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + +func NewV1OrderInfoFromV2(market MarketInterface, orderInfo OrderInfo) v1.OrderInfo { + return v1.OrderInfo{ + SubaccountId: orderInfo.SubaccountId, + FeeRecipient: orderInfo.FeeRecipient, + Price: market.PriceToChainFormat(orderInfo.Price), + Quantity: market.QuantityToChainFormat(orderInfo.Quantity), + Cid: orderInfo.Cid, + } +} + +func NewV1SubaccountOrderDataFromV2(market MarketInterface, orderData *SubaccountOrderData) *v1.SubaccountOrderData { + return &v1.SubaccountOrderData{ + Order: &v1.SubaccountOrder{ + Price: market.PriceToChainFormat(orderData.Order.Price), + Quantity: market.QuantityToChainFormat(orderData.Order.Quantity), + IsReduceOnly: orderData.Order.IsReduceOnly, + Cid: orderData.Order.Cid, + }, + OrderHash: orderData.OrderHash, + } +} diff --git a/chain/exchange/types/v2/order.pb.go b/chain/exchange/types/v2/order.pb.go new file mode 100644 index 00000000..f38dd8e4 --- /dev/null +++ b/chain/exchange/types/v2/order.pb.go @@ -0,0 +1,2930 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/order.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type OrderType int32 + +const ( + OrderType_UNSPECIFIED OrderType = 0 + OrderType_BUY OrderType = 1 + OrderType_SELL OrderType = 2 + OrderType_STOP_BUY OrderType = 3 + OrderType_STOP_SELL OrderType = 4 + OrderType_TAKE_BUY OrderType = 5 + OrderType_TAKE_SELL OrderType = 6 + OrderType_BUY_PO OrderType = 7 + OrderType_SELL_PO OrderType = 8 + OrderType_BUY_ATOMIC OrderType = 9 + OrderType_SELL_ATOMIC OrderType = 10 +) + +var OrderType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "BUY", + 2: "SELL", + 3: "STOP_BUY", + 4: "STOP_SELL", + 5: "TAKE_BUY", + 6: "TAKE_SELL", + 7: "BUY_PO", + 8: "SELL_PO", + 9: "BUY_ATOMIC", + 10: "SELL_ATOMIC", +} + +var OrderType_value = map[string]int32{ + "UNSPECIFIED": 0, + "BUY": 1, + "SELL": 2, + "STOP_BUY": 3, + "STOP_SELL": 4, + "TAKE_BUY": 5, + "TAKE_SELL": 6, + "BUY_PO": 7, + "SELL_PO": 8, + "BUY_ATOMIC": 9, + "SELL_ATOMIC": 10, +} + +func (x OrderType) String() string { + return proto.EnumName(OrderType_name, int32(x)) +} + +func (OrderType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{0} +} + +type OrderMask int32 + +const ( + OrderMask_UNUSED OrderMask = 0 + OrderMask_ANY OrderMask = 1 + OrderMask_REGULAR OrderMask = 2 + OrderMask_CONDITIONAL OrderMask = 4 + OrderMask_BUY_OR_HIGHER OrderMask = 8 + OrderMask_SELL_OR_LOWER OrderMask = 16 + OrderMask_MARKET OrderMask = 32 + OrderMask_LIMIT OrderMask = 64 +) + +var OrderMask_name = map[int32]string{ + 0: "UNUSED", + 1: "ANY", + 2: "REGULAR", + 4: "CONDITIONAL", + 8: "DIRECTION_BUY_OR_HIGHER", + 16: "DIRECTION_SELL_OR_LOWER", + 32: "TYPE_MARKET", + 64: "TYPE_LIMIT", +} + +var OrderMask_value = map[string]int32{ + "UNUSED": 0, + "ANY": 1, + "REGULAR": 2, + "CONDITIONAL": 4, + "DIRECTION_BUY_OR_HIGHER": 8, + "DIRECTION_SELL_OR_LOWER": 16, + "TYPE_MARKET": 32, + "TYPE_LIMIT": 64, +} + +func (x OrderMask) String() string { + return proto.EnumName(OrderMask_name, int32(x)) +} + +func (OrderMask) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{1} +} + +type AtomicMarketOrderAccessLevel int32 + +const ( + AtomicMarketOrderAccessLevel_Nobody AtomicMarketOrderAccessLevel = 0 + // currently unsupported + AtomicMarketOrderAccessLevel_BeginBlockerSmartContractsOnly AtomicMarketOrderAccessLevel = 1 + AtomicMarketOrderAccessLevel_SmartContractsOnly AtomicMarketOrderAccessLevel = 2 + AtomicMarketOrderAccessLevel_Everyone AtomicMarketOrderAccessLevel = 3 +) + +var AtomicMarketOrderAccessLevel_name = map[int32]string{ + 0: "Nobody", + 1: "BeginBlockerSmartContractsOnly", + 2: "SmartContractsOnly", + 3: "Everyone", +} + +var AtomicMarketOrderAccessLevel_value = map[string]int32{ + "Nobody": 0, + "BeginBlockerSmartContractsOnly": 1, + "SmartContractsOnly": 2, + "Everyone": 3, +} + +func (x AtomicMarketOrderAccessLevel) String() string { + return proto.EnumName(AtomicMarketOrderAccessLevel_name, int32(x)) +} + +func (AtomicMarketOrderAccessLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{2} +} + +type OrderInfo struct { + // bytes32 subaccount ID that created the order + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // address fee_recipient address that will receive fees for the order + FeeRecipient string `protobuf:"bytes,2,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty"` + // price of the order + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *OrderInfo) Reset() { *m = OrderInfo{} } +func (m *OrderInfo) String() string { return proto.CompactTextString(m) } +func (*OrderInfo) ProtoMessage() {} +func (*OrderInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{0} +} +func (m *OrderInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderInfo.Merge(m, src) +} +func (m *OrderInfo) XXX_Size() int { + return m.Size() +} +func (m *OrderInfo) XXX_DiscardUnknown() { + xxx_messageInfo_OrderInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderInfo proto.InternalMessageInfo + +func (m *OrderInfo) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *OrderInfo) GetFeeRecipient() string { + if m != nil { + return m.FeeRecipient + } + return "" +} + +func (m *OrderInfo) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type SpotOrder struct { + // market_id represents the unique ID of the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,2,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + // order types + OrderType OrderType `protobuf:"varint,3,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` +} + +func (m *SpotOrder) Reset() { *m = SpotOrder{} } +func (m *SpotOrder) String() string { return proto.CompactTextString(m) } +func (*SpotOrder) ProtoMessage() {} +func (*SpotOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{1} +} +func (m *SpotOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotOrder.Merge(m, src) +} +func (m *SpotOrder) XXX_Size() int { + return m.Size() +} +func (m *SpotOrder) XXX_DiscardUnknown() { + xxx_messageInfo_SpotOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotOrder proto.InternalMessageInfo + +func (m *SpotOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *SpotOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *SpotOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +// A valid Spot market order with Metadata. +type SpotMarketOrder struct { + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,1,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + OrderHash []byte `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + // order types + OrderType OrderType `protobuf:"varint,4,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` +} + +func (m *SpotMarketOrder) Reset() { *m = SpotMarketOrder{} } +func (m *SpotMarketOrder) String() string { return proto.CompactTextString(m) } +func (*SpotMarketOrder) ProtoMessage() {} +func (*SpotMarketOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{2} +} +func (m *SpotMarketOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotMarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotMarketOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotMarketOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotMarketOrder.Merge(m, src) +} +func (m *SpotMarketOrder) XXX_Size() int { + return m.Size() +} +func (m *SpotMarketOrder) XXX_DiscardUnknown() { + xxx_messageInfo_SpotMarketOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotMarketOrder proto.InternalMessageInfo + +func (m *SpotMarketOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *SpotMarketOrder) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +func (m *SpotMarketOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +// A valid Spot limit order with Metadata. +type SpotLimitOrder struct { + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,1,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + // order types + OrderType OrderType `protobuf:"varint,2,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + // the amount of the quantity remaining fillable + Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` + OrderHash []byte `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` +} + +func (m *SpotLimitOrder) Reset() { *m = SpotLimitOrder{} } +func (m *SpotLimitOrder) String() string { return proto.CompactTextString(m) } +func (*SpotLimitOrder) ProtoMessage() {} +func (*SpotLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{3} +} +func (m *SpotLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotLimitOrder.Merge(m, src) +} +func (m *SpotLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *SpotLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_SpotLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotLimitOrder proto.InternalMessageInfo + +func (m *SpotLimitOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *SpotLimitOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +func (m *SpotLimitOrder) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +type DerivativeOrder struct { + // market_id represents the unique ID of the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,2,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + // order types + OrderType OrderType `protobuf:"varint,3,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + // margin is the margin used by the limit order + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` +} + +func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } +func (m *DerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*DerivativeOrder) ProtoMessage() {} +func (*DerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{4} +} +func (m *DerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeOrder.Merge(m, src) +} +func (m *DerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *DerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeOrder proto.InternalMessageInfo + +func (m *DerivativeOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *DerivativeOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *DerivativeOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +// A valid Derivative market order with Metadata. +type DerivativeMarketOrder struct { + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,1,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + // order types + OrderType OrderType `protobuf:"varint,2,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + MarginHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=margin_hold,json=marginHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin_hold"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` + OrderHash []byte `protobuf:"bytes,6,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` +} + +func (m *DerivativeMarketOrder) Reset() { *m = DerivativeMarketOrder{} } +func (m *DerivativeMarketOrder) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarketOrder) ProtoMessage() {} +func (*DerivativeMarketOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{5} +} +func (m *DerivativeMarketOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarketOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarketOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarketOrder.Merge(m, src) +} +func (m *DerivativeMarketOrder) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarketOrder) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarketOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarketOrder proto.InternalMessageInfo + +func (m *DerivativeMarketOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *DerivativeMarketOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +func (m *DerivativeMarketOrder) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +// A valid Derivative limit order with Metadata. +type DerivativeLimitOrder struct { + // order_info contains the information of the order + OrderInfo OrderInfo `protobuf:"bytes,1,opt,name=order_info,json=orderInfo,proto3" json:"order_info"` + // order types + OrderType OrderType `protobuf:"varint,2,opt,name=order_type,json=orderType,proto3,enum=injective.exchange.v2.OrderType" json:"order_type,omitempty"` + // margin is the margin used by the limit order + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the amount of the quantity remaining fillable + Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` + // trigger_price is the trigger price used by stop/take orders + TriggerPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=trigger_price,json=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"trigger_price,omitempty"` + OrderHash []byte `protobuf:"bytes,6,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` +} + +func (m *DerivativeLimitOrder) Reset() { *m = DerivativeLimitOrder{} } +func (m *DerivativeLimitOrder) String() string { return proto.CompactTextString(m) } +func (*DerivativeLimitOrder) ProtoMessage() {} +func (*DerivativeLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_1b3b639e8910d9af, []int{6} +} +func (m *DerivativeLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeLimitOrder.Merge(m, src) +} +func (m *DerivativeLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *DerivativeLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeLimitOrder proto.InternalMessageInfo + +func (m *DerivativeLimitOrder) GetOrderInfo() OrderInfo { + if m != nil { + return m.OrderInfo + } + return OrderInfo{} +} + +func (m *DerivativeLimitOrder) GetOrderType() OrderType { + if m != nil { + return m.OrderType + } + return OrderType_UNSPECIFIED +} + +func (m *DerivativeLimitOrder) GetOrderHash() []byte { + if m != nil { + return m.OrderHash + } + return nil +} + +func init() { + proto.RegisterEnum("injective.exchange.v2.OrderType", OrderType_name, OrderType_value) + proto.RegisterEnum("injective.exchange.v2.OrderMask", OrderMask_name, OrderMask_value) + proto.RegisterEnum("injective.exchange.v2.AtomicMarketOrderAccessLevel", AtomicMarketOrderAccessLevel_name, AtomicMarketOrderAccessLevel_value) + proto.RegisterType((*OrderInfo)(nil), "injective.exchange.v2.OrderInfo") + proto.RegisterType((*SpotOrder)(nil), "injective.exchange.v2.SpotOrder") + proto.RegisterType((*SpotMarketOrder)(nil), "injective.exchange.v2.SpotMarketOrder") + proto.RegisterType((*SpotLimitOrder)(nil), "injective.exchange.v2.SpotLimitOrder") + proto.RegisterType((*DerivativeOrder)(nil), "injective.exchange.v2.DerivativeOrder") + proto.RegisterType((*DerivativeMarketOrder)(nil), "injective.exchange.v2.DerivativeMarketOrder") + proto.RegisterType((*DerivativeLimitOrder)(nil), "injective.exchange.v2.DerivativeLimitOrder") +} + +func init() { proto.RegisterFile("injective/exchange/v2/order.proto", fileDescriptor_1b3b639e8910d9af) } + +var fileDescriptor_1b3b639e8910d9af = []byte{ + // 1002 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x97, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xc7, 0x45, 0x7d, 0x59, 0x1a, 0xc9, 0x36, 0xbb, 0x48, 0x52, 0x95, 0x4e, 0x15, 0xd6, 0xb9, + 0x14, 0x06, 0x2a, 0x01, 0xee, 0xa9, 0xe8, 0xc1, 0x95, 0x2c, 0x26, 0x26, 0x22, 0x8b, 0x2e, 0x25, + 0xa1, 0x70, 0x2f, 0x04, 0x45, 0xae, 0xa5, 0xad, 0x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x71, 0xb0, 0xbf, 0xf8, 0x55, + 0x60, 0x23, 0xc4, 0xaf, 0x8e, 0x8f, 0x7b, 0x59, 0xfe, 0xf9, 0xff, 0xe9, 0xdf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x9f, 0xf1, 0xfa, 0x07, 0x50, 0x0c, 0x00, 0x00, +} + +func (m *OrderInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x2a + } + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.FeeRecipient) > 0 { + i -= len(m.FeeRecipient) + copy(dAtA[i:], m.FeeRecipient) + i = encodeVarintOrder(dAtA, i, uint64(len(m.FeeRecipient))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintOrder(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintOrder(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotMarketOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotMarketOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x20 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintOrder(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x1a + } + { + size := m.BalanceHold.Size() + i -= size + if _, err := m.BalanceHold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SpotLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintOrder(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x2a + } + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size := m.Fillable.Size() + i -= size + if _, err := m.Fillable.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintOrder(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarketOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarketOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintOrder(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x32 + } + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.MarginHold.Size() + i -= size + if _, err := m.MarginHold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DerivativeLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintOrder(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x32 + } + if m.TriggerPrice != nil { + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.Fillable.Size() + i -= size + if _, err := m.Fillable.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.OrderType != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OrderType)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { + offset -= sovOrder(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *OrderInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = len(m.FeeRecipient) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovOrder(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovOrder(uint64(l)) + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *SpotOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *SpotMarketOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + l = m.BalanceHold.Size() + n += 1 + l + sovOrder(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *SpotLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + l = m.Fillable.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *DerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + l = m.Margin.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *DerivativeMarketOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + l = m.Margin.Size() + n += 1 + l + sovOrder(uint64(l)) + l = m.MarginHold.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func (m *DerivativeLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderInfo.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.OrderType != 0 { + n += 1 + sovOrder(uint64(m.OrderType)) + } + l = m.Margin.Size() + n += 1 + l + sovOrder(uint64(l)) + l = m.Fillable.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.TriggerPrice != nil { + l = m.TriggerPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func sovOrder(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOrder(x uint64) (n int) { + return sovOrder(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OrderInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRecipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRecipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotMarketOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotMarketOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotMarketOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BalanceHold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BalanceHold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fillable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fillable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarketOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarketOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarketOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarginHold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MarginHold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderType", wireType) + } + m.OrderType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderType |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fillable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fillable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TriggerPrice = &v + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) + if m.OrderHash == nil { + m.OrderHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOrder(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrder + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrder + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrder + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthOrder + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOrder + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOrder + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOrder = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOrder = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/orderbook.go b/chain/exchange/types/v2/orderbook.go new file mode 100644 index 00000000..ba66d4ed --- /dev/null +++ b/chain/exchange/types/v2/orderbook.go @@ -0,0 +1,165 @@ +package v2 + +import ( + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + "os" + "sort" + "strings" + + "cosmossdk.io/math" + "github.com/ethereum/go-ethereum/common" + "github.com/olekukonko/tablewriter" +) + +func NewOrderbook(marketID common.Hash) *Orderbook { + return &Orderbook{ + MarketId: marketID.Bytes(), + BuyLevels: make([]*Level, 0), + SellLevels: make([]*Level, 0), + } +} + +func NewOrderbookWithLevels(marketID common.Hash, buyLevels, sellLevels []*Level) *Orderbook { + return &Orderbook{ + MarketId: marketID.Bytes(), + BuyLevels: buyLevels, + SellLevels: sellLevels, + } +} + +func (o *Orderbook) AppendLevel(isBuy bool, level *Level) { + if isBuy { + o.BuyLevels = append(o.BuyLevels, level) + return + } + o.SellLevels = append(o.SellLevels, level) +} + +func (o *Orderbook) IsCrossed() bool { + if len(o.BuyLevels) == 0 || len(o.SellLevels) == 0 { + return false + } + + highestBuyLevel := o.BuyLevels[len(o.BuyLevels)-1] + + if highestBuyLevel.Q.IsZero() { + return false + } + + lowestSellPrice := math.LegacyZeroDec() + + isQuantityAllZero := true + + for _, level := range o.SellLevels { + if level.Q.IsZero() { + continue + } + lowestSellPrice = level.P + isQuantityAllZero = false + break + } + + if isQuantityAllZero { + return false + } + + return highestBuyLevel.P.GTE(lowestSellPrice) +} + +// PrintDisplay is a helper function to print the orderbook in a human readable format for debugging purposes +func (o *Orderbook) PrintDisplay() { + PrintDisplayLevels(o.BuyLevels, o.SellLevels) +} + +// PrintDisplayLevels is a helper function to print the orderbook in a human readable format for debugging purposes +func PrintDisplayLevels(buyLevels, sellLevels []*Level) { + buyLevelsSorted := make([]*Level, len(buyLevels)) + copy(buyLevelsSorted, buyLevels) + sellLevelsSorted := make([]*Level, len(sellLevels)) + copy(sellLevelsSorted, sellLevels) + if len(buyLevels) > 1 { + sort.SliceStable(buyLevelsSorted, func(i, j int) bool { + return buyLevelsSorted[i].GetPrice().GT(buyLevelsSorted[j].GetPrice()) + }) + } + if len(sellLevelsSorted) > 1 { + sort.SliceStable(sellLevelsSorted, func(i, j int) bool { + return sellLevelsSorted[i].GetPrice().LT(sellLevelsSorted[j].GetPrice()) + }) + } + + table := tablewriter.NewWriter(os.Stdout) + table.SetHeader([]string{"Buy Price", "Buy Quantity", "Sell Price", "Sell Quantity"}) + + maxLength := len(buyLevelsSorted) + if len(sellLevelsSorted) > maxLength { + maxLength = len(sellLevelsSorted) + } + + for idx := 0; idx < maxLength; idx++ { + row := make([]string, 0) + if idx < len(buyLevelsSorted) { + row = append(row, getReadableDec(buyLevelsSorted[idx].P), getReadableDec(buyLevelsSorted[idx].Q)) + } else { + row = append(row, "-", "-") + } + if idx < len(sellLevelsSorted) { + row = append(row, getReadableDec(sellLevelsSorted[idx].P), getReadableDec(sellLevelsSorted[idx].Q)) + } else { + row = append(row, "-", "-") + } + table.Append(row) + } + table.Render() +} + +func (o *Orderbook) Equals(other *Orderbook) bool { + if len(o.BuyLevels) != len(other.BuyLevels) || len(o.SellLevels) != len(other.SellLevels) { + return false + } + for i, level := range o.BuyLevels { + metaLevel := other.BuyLevels[i] + if !level.Q.Equal(metaLevel.Q) || !level.P.Equal(metaLevel.P) { + return false + } + } + return true +} + +// getReadableDec is a test utility function to return a readable representation of decimal strings +func getReadableDec(d math.LegacyDec) string { + if d.IsNil() { + return d.String() + } + dec := strings.TrimRight(d.String(), "0") + if len(dec) < 2 { + return dec + } + + if dec[len(dec)-1:] == "." { + return dec + "0" + } + return dec +} + +func NewLevel(price, quantity math.LegacyDec) *Level { + return &Level{ + P: price, + Q: quantity, + } +} + +func (l *Level) GetPrice() math.LegacyDec { + return l.P +} + +func (l *Level) GetQuantity() math.LegacyDec { + return l.Q +} + +func NewV1LevelFromV2(market MarketInterface, level *Level) *types.Level { + return &types.Level{ + P: market.PriceToChainFormat(level.P), + Q: market.QuantityToChainFormat(level.Q), + } +} diff --git a/chain/exchange/types/v2/orderbook.pb.go b/chain/exchange/types/v2/orderbook.pb.go new file mode 100644 index 00000000..5e4a02c1 --- /dev/null +++ b/chain/exchange/types/v2/orderbook.pb.go @@ -0,0 +1,1424 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/orderbook.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Spot Exchange Limit Orderbook +type SpotOrderBook struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuySide bool `protobuf:"varint,2,opt,name=isBuySide,proto3" json:"isBuySide,omitempty"` + Orders []*SpotLimitOrder `protobuf:"bytes,3,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *SpotOrderBook) Reset() { *m = SpotOrderBook{} } +func (m *SpotOrderBook) String() string { return proto.CompactTextString(m) } +func (*SpotOrderBook) ProtoMessage() {} +func (*SpotOrderBook) Descriptor() ([]byte, []int) { + return fileDescriptor_d2fb0f56aadb9282, []int{0} +} +func (m *SpotOrderBook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotOrderBook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotOrderBook.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotOrderBook) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotOrderBook.Merge(m, src) +} +func (m *SpotOrderBook) XXX_Size() int { + return m.Size() +} +func (m *SpotOrderBook) XXX_DiscardUnknown() { + xxx_messageInfo_SpotOrderBook.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotOrderBook proto.InternalMessageInfo + +// Derivative Exchange Limit Orderbook +type DerivativeOrderBook struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuySide bool `protobuf:"varint,2,opt,name=isBuySide,proto3" json:"isBuySide,omitempty"` + Orders []*DerivativeLimitOrder `protobuf:"bytes,3,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *DerivativeOrderBook) Reset() { *m = DerivativeOrderBook{} } +func (m *DerivativeOrderBook) String() string { return proto.CompactTextString(m) } +func (*DerivativeOrderBook) ProtoMessage() {} +func (*DerivativeOrderBook) Descriptor() ([]byte, []int) { + return fileDescriptor_d2fb0f56aadb9282, []int{1} +} +func (m *DerivativeOrderBook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeOrderBook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeOrderBook.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeOrderBook) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeOrderBook.Merge(m, src) +} +func (m *DerivativeOrderBook) XXX_Size() int { + return m.Size() +} +func (m *DerivativeOrderBook) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeOrderBook.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeOrderBook proto.InternalMessageInfo + +// Orderbook containing limit & market conditional orders +type ConditionalDerivativeOrderBook struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + LimitBuyOrders []*DerivativeLimitOrder `protobuf:"bytes,2,rep,name=limit_buy_orders,json=limitBuyOrders,proto3" json:"limit_buy_orders,omitempty"` + MarketBuyOrders []*DerivativeMarketOrder `protobuf:"bytes,3,rep,name=market_buy_orders,json=marketBuyOrders,proto3" json:"market_buy_orders,omitempty"` + LimitSellOrders []*DerivativeLimitOrder `protobuf:"bytes,4,rep,name=limit_sell_orders,json=limitSellOrders,proto3" json:"limit_sell_orders,omitempty"` + MarketSellOrders []*DerivativeMarketOrder `protobuf:"bytes,5,rep,name=market_sell_orders,json=marketSellOrders,proto3" json:"market_sell_orders,omitempty"` +} + +func (m *ConditionalDerivativeOrderBook) Reset() { *m = ConditionalDerivativeOrderBook{} } +func (m *ConditionalDerivativeOrderBook) String() string { return proto.CompactTextString(m) } +func (*ConditionalDerivativeOrderBook) ProtoMessage() {} +func (*ConditionalDerivativeOrderBook) Descriptor() ([]byte, []int) { + return fileDescriptor_d2fb0f56aadb9282, []int{2} +} +func (m *ConditionalDerivativeOrderBook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConditionalDerivativeOrderBook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConditionalDerivativeOrderBook.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ConditionalDerivativeOrderBook) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConditionalDerivativeOrderBook.Merge(m, src) +} +func (m *ConditionalDerivativeOrderBook) XXX_Size() int { + return m.Size() +} +func (m *ConditionalDerivativeOrderBook) XXX_DiscardUnknown() { + xxx_messageInfo_ConditionalDerivativeOrderBook.DiscardUnknown(m) +} + +var xxx_messageInfo_ConditionalDerivativeOrderBook proto.InternalMessageInfo + +type SubaccountOrderbookMetadata struct { + VanillaLimitOrderCount uint32 `protobuf:"varint,1,opt,name=vanilla_limit_order_count,json=vanillaLimitOrderCount,proto3" json:"vanilla_limit_order_count,omitempty"` + ReduceOnlyLimitOrderCount uint32 `protobuf:"varint,2,opt,name=reduce_only_limit_order_count,json=reduceOnlyLimitOrderCount,proto3" json:"reduce_only_limit_order_count,omitempty"` + // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the + // subaccount's reduce-only limit orders in the given direction. + AggregateReduceOnlyQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=aggregate_reduce_only_quantity,json=aggregateReduceOnlyQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_reduce_only_quantity"` + // AggregateVanillaQuantity is the aggregate fillable quantity of the + // subaccount's vanilla limit orders in the given direction. + AggregateVanillaQuantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=aggregate_vanilla_quantity,json=aggregateVanillaQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"aggregate_vanilla_quantity"` + VanillaConditionalOrderCount uint32 `protobuf:"varint,5,opt,name=vanilla_conditional_order_count,json=vanillaConditionalOrderCount,proto3" json:"vanilla_conditional_order_count,omitempty"` + ReduceOnlyConditionalOrderCount uint32 `protobuf:"varint,6,opt,name=reduce_only_conditional_order_count,json=reduceOnlyConditionalOrderCount,proto3" json:"reduce_only_conditional_order_count,omitempty"` +} + +func (m *SubaccountOrderbookMetadata) Reset() { *m = SubaccountOrderbookMetadata{} } +func (m *SubaccountOrderbookMetadata) String() string { return proto.CompactTextString(m) } +func (*SubaccountOrderbookMetadata) ProtoMessage() {} +func (*SubaccountOrderbookMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d2fb0f56aadb9282, []int{3} +} +func (m *SubaccountOrderbookMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountOrderbookMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountOrderbookMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountOrderbookMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountOrderbookMetadata.Merge(m, src) +} +func (m *SubaccountOrderbookMetadata) XXX_Size() int { + return m.Size() +} +func (m *SubaccountOrderbookMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountOrderbookMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountOrderbookMetadata proto.InternalMessageInfo + +func (m *SubaccountOrderbookMetadata) GetVanillaLimitOrderCount() uint32 { + if m != nil { + return m.VanillaLimitOrderCount + } + return 0 +} + +func (m *SubaccountOrderbookMetadata) GetReduceOnlyLimitOrderCount() uint32 { + if m != nil { + return m.ReduceOnlyLimitOrderCount + } + return 0 +} + +func (m *SubaccountOrderbookMetadata) GetVanillaConditionalOrderCount() uint32 { + if m != nil { + return m.VanillaConditionalOrderCount + } + return 0 +} + +func (m *SubaccountOrderbookMetadata) GetReduceOnlyConditionalOrderCount() uint32 { + if m != nil { + return m.ReduceOnlyConditionalOrderCount + } + return 0 +} + +func init() { + proto.RegisterType((*SpotOrderBook)(nil), "injective.exchange.v2.SpotOrderBook") + proto.RegisterType((*DerivativeOrderBook)(nil), "injective.exchange.v2.DerivativeOrderBook") + proto.RegisterType((*ConditionalDerivativeOrderBook)(nil), "injective.exchange.v2.ConditionalDerivativeOrderBook") + proto.RegisterType((*SubaccountOrderbookMetadata)(nil), "injective.exchange.v2.SubaccountOrderbookMetadata") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/orderbook.proto", fileDescriptor_d2fb0f56aadb9282) +} + +var fileDescriptor_d2fb0f56aadb9282 = []byte{ + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0x86, 0xed, 0xa6, 0xad, 0x92, 0x41, 0xa5, 0xad, 0xb9, 0x28, 0x4d, 0x8a, 0x1d, 0x5a, 0x55, + 0x8a, 0x04, 0xd8, 0x52, 0x58, 0x81, 0x84, 0x84, 0x92, 0xb2, 0xa8, 0x94, 0xaa, 0xaa, 0x23, 0x2e, + 0xea, 0xc6, 0x1a, 0xdb, 0x23, 0x67, 0x88, 0xed, 0x09, 0xf6, 0xd8, 0xc2, 0x6f, 0xc0, 0x12, 0x89, + 0x07, 0xa0, 0x2f, 0xc0, 0x7b, 0x74, 0xd9, 0x25, 0x62, 0x51, 0xa1, 0x64, 0xc3, 0x43, 0xb0, 0x40, + 0x9e, 0x71, 0x6c, 0x53, 0xa5, 0x85, 0x20, 0x76, 0xf1, 0xe4, 0x3f, 0xdf, 0xff, 0x9f, 0x33, 0x17, + 0xb0, 0x87, 0xfd, 0xb7, 0xc8, 0xa2, 0x38, 0x46, 0x1a, 0x7a, 0x6f, 0x0d, 0xa1, 0xef, 0x20, 0x2d, + 0xee, 0x68, 0x24, 0xb0, 0x51, 0x60, 0x12, 0x32, 0x52, 0xc7, 0x01, 0xa1, 0x44, 0xba, 0x93, 0xcb, + 0xd4, 0x99, 0x4c, 0x8d, 0x3b, 0x8d, 0xdb, 0x0e, 0x71, 0x08, 0x53, 0x68, 0xe9, 0x2f, 0x2e, 0x6e, + 0xdc, 0xbf, 0x86, 0xc9, 0x25, 0x3b, 0x9f, 0x44, 0xb0, 0x36, 0x18, 0x13, 0x7a, 0x94, 0xae, 0x75, + 0x09, 0x19, 0x49, 0x4d, 0x50, 0xf3, 0x60, 0x30, 0x42, 0xd4, 0xc0, 0x76, 0x5d, 0x6c, 0x89, 0xed, + 0x9a, 0x5e, 0xe5, 0x0b, 0x07, 0xb6, 0xb4, 0x0d, 0x6a, 0x38, 0xec,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x65, 0xe1, 0xe4, 0xd8, 0xc1, 0x74, 0x18, 0x99, + 0xaa, 0x45, 0x3c, 0xed, 0x60, 0x76, 0xd8, 0xfa, 0xd0, 0x0c, 0xb5, 0xfc, 0xe8, 0x3d, 0xb2, 0x48, + 0x80, 0xca, 0x9f, 0x43, 0x88, 0x7d, 0xcd, 0x23, 0x76, 0xe4, 0xa2, 0xb0, 0x78, 0x59, 0x69, 0x32, + 0x46, 0xa1, 0x16, 0x77, 0xcc, 0x55, 0xf6, 0xb4, 0x3e, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6c, + 0x90, 0xfd, 0xe5, 0xd3, 0x05, 0x00, 0x00, +} + +func (m *SpotOrderBook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotOrderBook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotOrderBook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.IsBuySide { + i-- + if m.IsBuySide { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintOrderbook(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeOrderBook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeOrderBook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeOrderBook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.IsBuySide { + i-- + if m.IsBuySide { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintOrderbook(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConditionalDerivativeOrderBook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConditionalDerivativeOrderBook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConditionalDerivativeOrderBook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketSellOrders) > 0 { + for iNdEx := len(m.MarketSellOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketSellOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.LimitSellOrders) > 0 { + for iNdEx := len(m.LimitSellOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LimitSellOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.MarketBuyOrders) > 0 { + for iNdEx := len(m.MarketBuyOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketBuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.LimitBuyOrders) > 0 { + for iNdEx := len(m.LimitBuyOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LimitBuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintOrderbook(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountOrderbookMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountOrderbookMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountOrderbookMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ReduceOnlyConditionalOrderCount != 0 { + i = encodeVarintOrderbook(dAtA, i, uint64(m.ReduceOnlyConditionalOrderCount)) + i-- + dAtA[i] = 0x30 + } + if m.VanillaConditionalOrderCount != 0 { + i = encodeVarintOrderbook(dAtA, i, uint64(m.VanillaConditionalOrderCount)) + i-- + dAtA[i] = 0x28 + } + { + size := m.AggregateVanillaQuantity.Size() + i -= size + if _, err := m.AggregateVanillaQuantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.AggregateReduceOnlyQuantity.Size() + i -= size + if _, err := m.AggregateReduceOnlyQuantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintOrderbook(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ReduceOnlyLimitOrderCount != 0 { + i = encodeVarintOrderbook(dAtA, i, uint64(m.ReduceOnlyLimitOrderCount)) + i-- + dAtA[i] = 0x10 + } + if m.VanillaLimitOrderCount != 0 { + i = encodeVarintOrderbook(dAtA, i, uint64(m.VanillaLimitOrderCount)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintOrderbook(dAtA []byte, offset int, v uint64) int { + offset -= sovOrderbook(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SpotOrderBook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovOrderbook(uint64(l)) + } + if m.IsBuySide { + n += 2 + } + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + return n +} + +func (m *DerivativeOrderBook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovOrderbook(uint64(l)) + } + if m.IsBuySide { + n += 2 + } + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + return n +} + +func (m *ConditionalDerivativeOrderBook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovOrderbook(uint64(l)) + } + if len(m.LimitBuyOrders) > 0 { + for _, e := range m.LimitBuyOrders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + if len(m.MarketBuyOrders) > 0 { + for _, e := range m.MarketBuyOrders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + if len(m.LimitSellOrders) > 0 { + for _, e := range m.LimitSellOrders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + if len(m.MarketSellOrders) > 0 { + for _, e := range m.MarketSellOrders { + l = e.Size() + n += 1 + l + sovOrderbook(uint64(l)) + } + } + return n +} + +func (m *SubaccountOrderbookMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VanillaLimitOrderCount != 0 { + n += 1 + sovOrderbook(uint64(m.VanillaLimitOrderCount)) + } + if m.ReduceOnlyLimitOrderCount != 0 { + n += 1 + sovOrderbook(uint64(m.ReduceOnlyLimitOrderCount)) + } + l = m.AggregateReduceOnlyQuantity.Size() + n += 1 + l + sovOrderbook(uint64(l)) + l = m.AggregateVanillaQuantity.Size() + n += 1 + l + sovOrderbook(uint64(l)) + if m.VanillaConditionalOrderCount != 0 { + n += 1 + sovOrderbook(uint64(m.VanillaConditionalOrderCount)) + } + if m.ReduceOnlyConditionalOrderCount != 0 { + n += 1 + sovOrderbook(uint64(m.ReduceOnlyConditionalOrderCount)) + } + return n +} + +func sovOrderbook(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOrderbook(x uint64) (n int) { + return sovOrderbook(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SpotOrderBook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotOrderBook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotOrderBook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuySide", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuySide = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &SpotLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrderbook(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrderbook + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeOrderBook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeOrderBook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeOrderBook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuySide", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuySide = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &DerivativeLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrderbook(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrderbook + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConditionalDerivativeOrderBook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConditionalDerivativeOrderBook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConditionalDerivativeOrderBook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitBuyOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LimitBuyOrders = append(m.LimitBuyOrders, &DerivativeLimitOrder{}) + if err := m.LimitBuyOrders[len(m.LimitBuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketBuyOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketBuyOrders = append(m.MarketBuyOrders, &DerivativeMarketOrder{}) + if err := m.MarketBuyOrders[len(m.MarketBuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitSellOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LimitSellOrders = append(m.LimitSellOrders, &DerivativeLimitOrder{}) + if err := m.LimitSellOrders[len(m.LimitSellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketSellOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketSellOrders = append(m.MarketSellOrders, &DerivativeMarketOrder{}) + if err := m.MarketSellOrders[len(m.MarketSellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrderbook(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrderbook + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountOrderbookMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountOrderbookMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountOrderbookMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VanillaLimitOrderCount", wireType) + } + m.VanillaLimitOrderCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VanillaLimitOrderCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReduceOnlyLimitOrderCount", wireType) + } + m.ReduceOnlyLimitOrderCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReduceOnlyLimitOrderCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateReduceOnlyQuantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AggregateReduceOnlyQuantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVanillaQuantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOrderbook + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrderbook + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AggregateVanillaQuantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VanillaConditionalOrderCount", wireType) + } + m.VanillaConditionalOrderCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VanillaConditionalOrderCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReduceOnlyConditionalOrderCount", wireType) + } + m.ReduceOnlyConditionalOrderCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrderbook + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReduceOnlyConditionalOrderCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOrderbook(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrderbook + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOrderbook(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrderbook + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrderbook + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOrderbook + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthOrderbook + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOrderbook + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOrderbook + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOrderbook = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOrderbook = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOrderbook = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/params.go b/chain/exchange/types/v2/params.go new file mode 100644 index 00000000..7f79e1af --- /dev/null +++ b/chain/exchange/types/v2/params.go @@ -0,0 +1,251 @@ +package v2 + +import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +var _ paramtypes.ParamSet = &Params{} + +// Parameter keys +var ( + KeySpotMarketInstantListingFee = []byte("SpotMarketInstantListingFee") + KeyDerivativeMarketInstantListingFee = []byte("DerivativeMarketInstantListingFee") + KeyDefaultSpotMakerFeeRate = []byte("DefaultSpotMakerFeeRate") + KeyDefaultSpotTakerFeeRate = []byte("DefaultSpotTakerFeeRate") + KeyDefaultDerivativeMakerFeeRate = []byte("DefaultDerivativeMakerFeeRate") + KeyDefaultDerivativeTakerFeeRate = []byte("DefaultDerivativeTakerFeeRate") + KeyDefaultInitialMarginRatio = []byte("DefaultInitialMarginRatio") + KeyDefaultMaintenanceMarginRatio = []byte("DefaultMaintenanceMarginRatio") + KeyDefaultFundingInterval = []byte("DefaultFundingInterval") + KeyFundingMultiple = []byte("FundingMultiple") + KeyRelayerFeeShareRate = []byte("RelayerFeeShareRate") + KeyDefaultHourlyFundingRateCap = []byte("DefaultHourlyFundingRateCap") + KeyDefaultHourlyInterestRate = []byte("DefaultHourlyInterestRate") + KeyMaxDerivativeOrderSideCount = []byte("MaxDerivativeOrderSideCount") + KeyInjRewardStakedRequirementThreshold = []byte("KeyInjRewardStakedRequirementThreshold") + KeyTradingRewardsVestingDuration = []byte("TradingRewardsVestingDuration") + KeyLiquidatorRewardShareRate = []byte("LiquidatorRewardShareRate") + KeyBinaryOptionsMarketInstantListingFee = []byte("BinaryOptionsMarketInstantListingFee") + KeyAtomicMarketOrderAccessLevel = []byte("AtomicMarketOrderAccessLevel") + KeySpotAtomicMarketOrderFeeMultiplier = []byte("SpotAtomicMarketOrderFeeMultiplier") + KeyDerivativeAtomicMarketOrderFeeMultiplier = []byte("DerivativeAtomicMarketOrderFeeMultiplier") + KeyBinaryOptionsAtomicMarketOrderFeeMultiplier = []byte("BinaryOptionsAtomicMarketOrderFeeMultiplier") + KeyMinimalProtocolFeeRate = []byte("MinimalProtocolFeeRate") + KeyIsInstantDerivativeMarketLaunchEnabled = []byte("IsInstantDerivativeMarketLaunchEnabled") + KeyPostOnlyModeHeightThreshold = []byte("PostOnlyModeHeightThreshold") +) + +func NewV1ExchangeParamsFromV2(params Params) types.Params { + return types.Params{ + SpotMarketInstantListingFee: params.SpotMarketInstantListingFee, + DerivativeMarketInstantListingFee: params.DerivativeMarketInstantListingFee, + DefaultSpotMakerFeeRate: params.DefaultSpotMakerFeeRate, + DefaultSpotTakerFeeRate: params.DefaultSpotTakerFeeRate, + DefaultDerivativeMakerFeeRate: params.DefaultDerivativeMakerFeeRate, + DefaultDerivativeTakerFeeRate: params.DefaultDerivativeTakerFeeRate, + DefaultInitialMarginRatio: params.DefaultInitialMarginRatio, + DefaultMaintenanceMarginRatio: params.DefaultMaintenanceMarginRatio, + DefaultFundingInterval: params.DefaultFundingInterval, + FundingMultiple: params.FundingMultiple, + RelayerFeeShareRate: params.RelayerFeeShareRate, + DefaultHourlyFundingRateCap: params.DefaultHourlyFundingRateCap, + DefaultHourlyInterestRate: params.DefaultHourlyInterestRate, + MaxDerivativeOrderSideCount: params.MaxDerivativeOrderSideCount, + InjRewardStakedRequirementThreshold: params.InjRewardStakedRequirementThreshold, + TradingRewardsVestingDuration: params.TradingRewardsVestingDuration, + LiquidatorRewardShareRate: params.LiquidatorRewardShareRate, + BinaryOptionsMarketInstantListingFee: params.BinaryOptionsMarketInstantListingFee, + AtomicMarketOrderAccessLevel: types.AtomicMarketOrderAccessLevel(params.AtomicMarketOrderAccessLevel), + SpotAtomicMarketOrderFeeMultiplier: params.SpotAtomicMarketOrderFeeMultiplier, + DerivativeAtomicMarketOrderFeeMultiplier: params.DerivativeAtomicMarketOrderFeeMultiplier, + BinaryOptionsAtomicMarketOrderFeeMultiplier: params.BinaryOptionsAtomicMarketOrderFeeMultiplier, + MinimalProtocolFeeRate: params.MinimalProtocolFeeRate, + IsInstantDerivativeMarketLaunchEnabled: params.IsInstantDerivativeMarketLaunchEnabled, + PostOnlyModeHeightThreshold: params.PostOnlyModeHeightThreshold, + MarginDecreasePriceTimestampThresholdSeconds: params.MarginDecreasePriceTimestampThresholdSeconds, + ExchangeAdmins: params.ExchangeAdmins, + InjAuctionMaxCap: params.InjAuctionMaxCap, + } +} + +// ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeySpotMarketInstantListingFee, &p.SpotMarketInstantListingFee, types.ValidateSpotMarketInstantListingFee), + paramtypes.NewParamSetPair(KeyDerivativeMarketInstantListingFee, &p.DerivativeMarketInstantListingFee, types.ValidateDerivativeMarketInstantListingFee), + paramtypes.NewParamSetPair(KeyDefaultSpotMakerFeeRate, &p.DefaultSpotMakerFeeRate, types.ValidateMakerFee), + paramtypes.NewParamSetPair(KeyDefaultSpotTakerFeeRate, &p.DefaultSpotTakerFeeRate, types.ValidateFee), + paramtypes.NewParamSetPair(KeyDefaultDerivativeMakerFeeRate, &p.DefaultDerivativeMakerFeeRate, types.ValidateMakerFee), + paramtypes.NewParamSetPair(KeyDefaultDerivativeTakerFeeRate, &p.DefaultDerivativeTakerFeeRate, types.ValidateFee), + paramtypes.NewParamSetPair(KeyDefaultInitialMarginRatio, &p.DefaultInitialMarginRatio, types.ValidateMarginRatio), + paramtypes.NewParamSetPair(KeyDefaultMaintenanceMarginRatio, &p.DefaultMaintenanceMarginRatio, types.ValidateMarginRatio), + paramtypes.NewParamSetPair(KeyDefaultFundingInterval, &p.DefaultFundingInterval, types.ValidateFundingInterval), + paramtypes.NewParamSetPair(KeyFundingMultiple, &p.FundingMultiple, types.ValidateFundingMultiple), + paramtypes.NewParamSetPair(KeyRelayerFeeShareRate, &p.RelayerFeeShareRate, types.ValidateFee), + paramtypes.NewParamSetPair(KeyDefaultHourlyFundingRateCap, &p.DefaultHourlyFundingRateCap, types.ValidateFee), + paramtypes.NewParamSetPair(KeyDefaultHourlyInterestRate, &p.DefaultHourlyInterestRate, types.ValidateFee), + paramtypes.NewParamSetPair(KeyMaxDerivativeOrderSideCount, &p.MaxDerivativeOrderSideCount, types.ValidateDerivativeOrderSideCount), + paramtypes.NewParamSetPair(KeyInjRewardStakedRequirementThreshold, &p.InjRewardStakedRequirementThreshold, types.ValidateInjRewardStakedRequirementThreshold), + paramtypes.NewParamSetPair(KeyTradingRewardsVestingDuration, &p.TradingRewardsVestingDuration, types.ValidateTradingRewardsVestingDuration), + paramtypes.NewParamSetPair(KeyLiquidatorRewardShareRate, &p.LiquidatorRewardShareRate, types.ValidateLiquidatorRewardShareRate), + paramtypes.NewParamSetPair(KeyBinaryOptionsMarketInstantListingFee, &p.BinaryOptionsMarketInstantListingFee, types.ValidateBinaryOptionsMarketInstantListingFee), + paramtypes.NewParamSetPair(KeyAtomicMarketOrderAccessLevel, &p.AtomicMarketOrderAccessLevel, ValidateAtomicMarketOrderAccessLevel), + paramtypes.NewParamSetPair(KeySpotAtomicMarketOrderFeeMultiplier, &p.SpotAtomicMarketOrderFeeMultiplier, types.ValidateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyDerivativeAtomicMarketOrderFeeMultiplier, &p.DerivativeAtomicMarketOrderFeeMultiplier, types.ValidateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyBinaryOptionsAtomicMarketOrderFeeMultiplier, &p.BinaryOptionsAtomicMarketOrderFeeMultiplier, types.ValidateAtomicMarketOrderFeeMultiplier), + paramtypes.NewParamSetPair(KeyMinimalProtocolFeeRate, &p.MinimalProtocolFeeRate, types.ValidateFee), + paramtypes.NewParamSetPair(KeyIsInstantDerivativeMarketLaunchEnabled, &p.IsInstantDerivativeMarketLaunchEnabled, types.ValidateBool), + paramtypes.NewParamSetPair(KeyPostOnlyModeHeightThreshold, &p.PostOnlyModeHeightThreshold, types.ValidatePostOnlyModeHeightThreshold), + } +} + +// DefaultParams returns a default set of parameters. +func DefaultParams() Params { + return Params{ + SpotMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(types.SpotMarketInstantListingFee, 18)), + DerivativeMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(types.DerivativeMarketInstantListingFee, 18)), + DefaultSpotMakerFeeRate: math.LegacyNewDecWithPrec(-1, 4), // default -0.01% maker fees + DefaultSpotTakerFeeRate: math.LegacyNewDecWithPrec(1, 3), // default 0.1% taker fees + DefaultDerivativeMakerFeeRate: math.LegacyNewDecWithPrec(-1, 4), // default -0.01% maker fees + DefaultDerivativeTakerFeeRate: math.LegacyNewDecWithPrec(1, 3), // default 0.1% taker fees + DefaultInitialMarginRatio: math.LegacyNewDecWithPrec(5, 2), // default 5% initial margin ratio + DefaultMaintenanceMarginRatio: math.LegacyNewDecWithPrec(2, 2), // default 2% maintenance margin ratio + DefaultFundingInterval: types.DefaultFundingIntervalSeconds, + FundingMultiple: types.DefaultFundingMultipleSeconds, + RelayerFeeShareRate: math.LegacyNewDecWithPrec(40, 2), // default 40% relayer fee share + DefaultHourlyFundingRateCap: math.LegacyNewDecWithPrec(625, 6), // default 0.0625% max hourly funding rate + DefaultHourlyInterestRate: math.LegacyNewDecWithPrec(416666, 11), // 0.01% daily interest rate = 0.0001 / 24 = 0.00000416666 + MaxDerivativeOrderSideCount: types.MaxDerivativeOrderSideCount, + InjRewardStakedRequirementThreshold: math.NewIntWithDecimal(100, 18), // 100 INJ + TradingRewardsVestingDuration: 604800, // 7 days + LiquidatorRewardShareRate: math.LegacyNewDecWithPrec(5, 2), // 5% liquidator reward + BinaryOptionsMarketInstantListingFee: sdk.NewCoin("inj", math.NewIntWithDecimal(types.BinaryOptionsMarketInstantListingFee, 18)), + AtomicMarketOrderAccessLevel: AtomicMarketOrderAccessLevel_SmartContractsOnly, + SpotAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier + DerivativeAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier + BinaryOptionsAtomicMarketOrderFeeMultiplier: math.LegacyNewDecWithPrec(25, 1), // default 2.5 multiplier + MinimalProtocolFeeRate: math.LegacyMustNewDecFromStr("0.00005"), // default 0.005% minimal fee rate + IsInstantDerivativeMarketLaunchEnabled: false, + PostOnlyModeHeightThreshold: 0, + MarginDecreasePriceTimestampThresholdSeconds: 60, + ExchangeAdmins: []string{}, + InjAuctionMaxCap: types.DefaultInjAuctionMaxCap, + } +} + +// Validate performs basic validation on exchange parameters. +func (p Params) Validate() error { + if err := types.ValidateSpotMarketInstantListingFee(p.SpotMarketInstantListingFee); err != nil { + return fmt.Errorf("spot_market_instant_listing_fee is incorrect: %w", err) + } + if err := types.ValidateDerivativeMarketInstantListingFee(p.DerivativeMarketInstantListingFee); err != nil { + return fmt.Errorf("derivative_market_instant_listing_fee is incorrect: %w", err) + } + if err := types.ValidateMakerFee(p.DefaultSpotMakerFeeRate); err != nil { + return fmt.Errorf("default_spot_maker_fee_rate is incorrect: %w", err) + } + if err := types.ValidateFee(p.DefaultSpotTakerFeeRate); err != nil { + return fmt.Errorf("default_spot_taker_fee_rate is incorrect: %w", err) + } + if err := types.ValidateMakerFee(p.DefaultDerivativeMakerFeeRate); err != nil { + return fmt.Errorf("default_derivative_maker_fee_rate is incorrect: %w", err) + } + if err := types.ValidateFee(p.DefaultDerivativeTakerFeeRate); err != nil { + return fmt.Errorf("default_derivative_taker_fee_rate is incorrect: %w", err) + } + if err := types.ValidateMarginRatio(p.DefaultInitialMarginRatio); err != nil { + return fmt.Errorf("default_initial_margin_ratio is incorrect: %w", err) + } + if err := types.ValidateMarginRatio(p.DefaultMaintenanceMarginRatio); err != nil { + return fmt.Errorf("default_maintenance_margin_ratio is incorrect: %w", err) + } + if err := types.ValidateFundingInterval(p.DefaultFundingInterval); err != nil { + return fmt.Errorf("default_funding_interval is incorrect: %w", err) + } + if err := types.ValidateFundingMultiple(p.FundingMultiple); err != nil { + return fmt.Errorf("funding_multiple is incorrect: %w", err) + } + if err := types.ValidateFee(p.RelayerFeeShareRate); err != nil { + return fmt.Errorf("relayer_fee_share_rate is incorrect: %w", err) + } + if err := types.ValidateFee(p.DefaultHourlyFundingRateCap); err != nil { + return fmt.Errorf("default_hourly_funding_rate_cap is incorrect: %w", err) + } + if err := types.ValidateFee(p.DefaultHourlyInterestRate); err != nil { + return fmt.Errorf("default_hourly_interest_rate is incorrect: %w", err) + } + if err := types.ValidateDerivativeOrderSideCount(p.MaxDerivativeOrderSideCount); err != nil { + return fmt.Errorf("max_derivative_order_side_count is incorrect: %w", err) + } + if err := types.ValidateInjRewardStakedRequirementThreshold(p.InjRewardStakedRequirementThreshold); err != nil { + return fmt.Errorf("inj_reward_staked_requirement_threshold is incorrect: %w", err) + } + if err := types.ValidateLiquidatorRewardShareRate(p.LiquidatorRewardShareRate); err != nil { + return fmt.Errorf("liquidator_reward_share_rate is incorrect: %w", err) + } + if err := types.ValidateBinaryOptionsMarketInstantListingFee(p.BinaryOptionsMarketInstantListingFee); err != nil { + return fmt.Errorf("binary_options_market_instant_listing_fee is incorrect: %w", err) + } + if err := ValidateAtomicMarketOrderAccessLevel(p.AtomicMarketOrderAccessLevel); err != nil { + return fmt.Errorf("atomic_market_order_access_level is incorrect: %w", err) + } + if err := types.ValidateAtomicMarketOrderFeeMultiplier(p.SpotAtomicMarketOrderFeeMultiplier); err != nil { + return fmt.Errorf("spot_atomic_market_order_fee_multiplier is incorrect: %w", err) + } + if err := types.ValidateAtomicMarketOrderFeeMultiplier(p.DerivativeAtomicMarketOrderFeeMultiplier); err != nil { + return fmt.Errorf("derivative_atomic_market_order_fee_multiplier is incorrect: %w", err) + } + if err := types.ValidateAtomicMarketOrderFeeMultiplier(p.BinaryOptionsAtomicMarketOrderFeeMultiplier); err != nil { + return fmt.Errorf("binary_options_atomic_market_order_fee_multiplier is incorrect: %w", err) + } + if err := types.ValidateFee(p.MinimalProtocolFeeRate); err != nil { + return fmt.Errorf("minimal_protocol_fee_rate is incorrect: %w", err) + } + if err := types.ValidatePostOnlyModeHeightThreshold(p.PostOnlyModeHeightThreshold); err != nil { + return fmt.Errorf("post_only_mode_height_threshold is incorrect: %w", err) + } + if err := validateAdmins(p.ExchangeAdmins); err != nil { + return fmt.Errorf("ExchangeAdmins is incorrect: %w", err) + } + return nil +} + +func validateAdmins(i interface{}) error { + v, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + admins := make(map[string]struct{}) + + for _, admin := range v { + adminAddr, err := sdk.AccAddressFromBech32(admin) + if err != nil { + return fmt.Errorf("invalid admin address: %s", admin) + } + + if _, found := admins[adminAddr.String()]; found { + return fmt.Errorf("duplicate admin: %s", admin) + } + admins[adminAddr.String()] = struct{}{} + } + + return nil +} + +func ValidateAtomicMarketOrderAccessLevel(i interface{}) error { + v, ok := i.(AtomicMarketOrderAccessLevel) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if !v.IsValid() { + return fmt.Errorf("invalid AtomicMarketOrderAccessLevel value: %v", v) + } + return nil +} diff --git a/chain/exchange/types/v2/position.go b/chain/exchange/types/v2/position.go new file mode 100644 index 00000000..8ca48901 --- /dev/null +++ b/chain/exchange/types/v2/position.go @@ -0,0 +1,406 @@ +package v2 + +import ( + "cosmossdk.io/math" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" +) + +func NewV1DerivativePositonFromV2(market MarketInterface, position DerivativePosition) v1.DerivativePosition { + v1Position := NewV1PositionFromV2(market, *position.Position) + return v1.DerivativePosition{ + SubaccountId: position.SubaccountId, + MarketId: position.MarketId, + Position: &v1Position, + } +} + +func NewV1PositionFromV2(market MarketInterface, position Position) v1.Position { + return v1.Position{ + IsLong: position.IsLong, + Quantity: market.QuantityToChainFormat(position.Quantity), + EntryPrice: market.PriceToChainFormat(position.EntryPrice), + Margin: market.NotionalToChainFormat(position.Margin), + CumulativeFundingEntry: market.NotionalFromChainFormat(position.CumulativeFundingEntry), + } +} + +func (p *DerivativePosition) Copy() *DerivativePosition { + return &DerivativePosition{ + SubaccountId: p.SubaccountId, + MarketId: p.MarketId, + Position: p.Position.Copy(), + } +} + +func (m *PositionDelta) IsShort() bool { return !m.IsLong } + +// NewPosition initializes a new position with a given cumulativeFundingEntry (should be nil for non-perpetual markets) +func NewPosition(isLong bool, cumulativeFundingEntry math.LegacyDec) *Position { + position := &Position{ + IsLong: isLong, + Quantity: math.LegacyZeroDec(), + EntryPrice: math.LegacyZeroDec(), + Margin: math.LegacyZeroDec(), + } + if !cumulativeFundingEntry.IsNil() { + position.CumulativeFundingEntry = cumulativeFundingEntry + } + return position +} + +func (p *Position) IsShort() bool { return !p.IsLong } + +func (p *Position) Copy() *Position { + return &Position{ + IsLong: p.IsLong, + Quantity: p.Quantity, + EntryPrice: p.EntryPrice, + Margin: p.Margin, + CumulativeFundingEntry: p.CumulativeFundingEntry, + } +} + +// GetEffectiveMarginRatio returns the effective margin ratio of the position, based on the input closing price. +// CONTRACT: position must already be funding-adjusted (if perpetual) and have positive quantity. +func (p *Position) GetEffectiveMarginRatio(closingPrice, closingFee math.LegacyDec) (marginRatio math.LegacyDec) { + // nolint:all + // marginRatio = (margin + quantity * PnlPerContract) / (closingPrice * quantity) + effectiveMargin := p.Margin.Add(p.GetPayoutFromPnl(closingPrice, p.Quantity)).Sub(closingFee) + return effectiveMargin.Quo(closingPrice.Mul(p.Quantity)) +} + +// ApplyProfitHaircutForDerivatives results in reducing the payout (pnl * quantity) by the given rate (e.g. 0.1=10%) by modifying the entry price. +// Formula for adjustment: +// newPayoutFromPnl = oldPayoutFromPnl * (1 - missingFundsRate) +// => Entry price adjustment for buys +// (newEntryPrice - settlementPrice) * quantity = (entryPrice - settlementPrice) * quantity * (1 - missingFundsRate) +// newEntryPrice = entryPrice - entryPrice * haircutPercentage + settlementPrice * haircutPercentage +// => Entry price adjustment for sells +// (settlementPrice - newEntryPrice) * quantity = (settlementPrice - entryPrice) * quantity * (1 - missingFundsRate) +// newEntryPrice = entryPrice - entryPrice * haircutPercentage + settlementPrice * haircutPercentage +func (p *Position) ApplyProfitHaircutForDerivatives(deficitAmount, totalProfits, settlementPrice math.LegacyDec) { + // haircutPercentage = deficitAmount / totalProfits + // To preserve precision, the division by totalProfits is done last. + // newEntryPrice = haircutPercentage * (settlementPrice - entryPrice) + entryPrice + newEntryPrice := deficitAmount.Mul(settlementPrice.Sub(p.EntryPrice)).Quo(totalProfits).Add(p.EntryPrice) + p.EntryPrice = newEntryPrice + + // profitable position but with negative margin, we didn't account for negative margin previously, + // so we can safely add it if payout becomes negative from haircut + newPositionPayout := p.GetPayoutIfFullyClosing(settlementPrice, math.LegacyZeroDec()).Payout + if newPositionPayout.IsNegative() { + p.Margin = p.Margin.Add(newPositionPayout.Abs()) + } +} + +func (p *Position) ApplyTotalPositionPayoutHaircut(deficitAmount, totalPayouts, settlementPrice math.LegacyDec) { + p.ApplyProfitHaircutForDerivatives(deficitAmount, totalPayouts, settlementPrice) + + removedMargin := p.Margin.Mul(deficitAmount).Quo(totalPayouts) + p.Margin = p.Margin.Sub(removedMargin) +} + +func (p *Position) ApplyProfitHaircutForBinaryOptions(deficitAmount, totalAssets math.LegacyDec, oracleScaleFactor uint32) { + // haircutPercentage = deficitAmount / totalAssets + // To preserve precision, the division by totalAssets is done last. + // newMargin = p.Margin - p.Margin * haircutPercentage + newMargin := p.Margin.Sub(deficitAmount.Mul(p.Margin).Quo(totalAssets)) + p.Margin = newMargin + + // updating entry price just for consistency, but it has no effect since applied haircut is on margin, not on entry price during binary options refunds + if p.IsLong { + p.EntryPrice = p.Margin.Quo(p.Quantity) + } else { + scaledOne := types.GetScaledPrice(math.LegacyOneDec(), oracleScaleFactor) + p.EntryPrice = scaledOne.Sub(p.Margin.Quo(p.Quantity)) + } +} + +func (p *Position) ClosePositionWithSettlePrice(settlementPrice, closingFeeRate math.LegacyDec) (payout, closeTradingFee math.LegacyDec, positionDelta *PositionDelta, pnl math.LegacyDec) { + closingDirection := !p.IsLong + fullyClosingQuantity := p.Quantity + + closeTradingFee = settlementPrice.Mul(fullyClosingQuantity).Mul(closingFeeRate) + positionDelta = &PositionDelta{ + IsLong: closingDirection, + ExecutionQuantity: fullyClosingQuantity, + ExecutionMargin: math.LegacyZeroDec(), + ExecutionPrice: settlementPrice, + } + + // there should not be positions with 0 quantity + if fullyClosingQuantity.IsZero() { + return math.LegacyZeroDec(), closeTradingFee, positionDelta, math.LegacyZeroDec() + } + + payout, _, _, pnl = p.ApplyPositionDelta(positionDelta, closeTradingFee) + + return payout, closeTradingFee, positionDelta, pnl +} + +func (p *Position) ClosePositionWithoutPayouts() { + p.IsLong = false + p.EntryPrice = math.LegacyZeroDec() + p.Quantity = math.LegacyZeroDec() + p.Margin = math.LegacyZeroDec() + p.CumulativeFundingEntry = math.LegacyZeroDec() +} + +func (p *Position) ClosePositionByRefunding(closingFeeRate math.LegacyDec) (payout, closeTradingFee math.LegacyDec, positionDelta *PositionDelta, pnl math.LegacyDec) { + return p.ClosePositionWithSettlePrice(p.EntryPrice, closingFeeRate) +} + +func (p *Position) GetDirectionString() string { + directionStr := "Long" + if p.IsShort() { + directionStr = "Short" + } + return directionStr +} + +func (p *Position) CheckValidPositionToReduce( + marketType v1.MarketType, + reducePrice math.LegacyDec, + isBuyOrder bool, + tradeFeeRate math.LegacyDec, + funding *PerpetualMarketFunding, + orderMargin math.LegacyDec, +) error { + if isBuyOrder == p.IsLong { + return types.ErrInvalidReduceOnlyPositionDirection + } + + if marketType == v1.MarketType_BinaryOption { + return nil + } + + if err := p.checkValidClosingPrice(reducePrice, tradeFeeRate, funding, orderMargin); err != nil { + return err + } + + return nil +} + +func (p *Position) checkValidClosingPrice(closingPrice, tradeFeeRate math.LegacyDec, funding *PerpetualMarketFunding, orderMargin math.LegacyDec) error { + bankruptcyPrice := p.GetBankruptcyPriceWithAddedMargin(funding, orderMargin) + + if p.IsLong { + // For long positions, Price ≥ BankruptcyPrice / (1 - TradeFeeRate) must hold + feeAdjustedBankruptcyPrice := bankruptcyPrice.Quo(math.LegacyOneDec().Sub(tradeFeeRate)) + + if closingPrice.LT(feeAdjustedBankruptcyPrice) { + return types.ErrPriceSurpassesBankruptcyPrice + } + } else { + // For short positions, Price ≤ BankruptcyPrice / (1 + TradeFeeRate) must hold + feeAdjustedBankruptcyPrice := bankruptcyPrice.Quo(math.LegacyOneDec().Add(tradeFeeRate)) + + if closingPrice.GT(feeAdjustedBankruptcyPrice) { + return types.ErrPriceSurpassesBankruptcyPrice + } + } + return nil +} + +func (p *Position) GetLiquidationMarketOrderWorstPrice(markPrice math.LegacyDec, funding *PerpetualMarketFunding) math.LegacyDec { + bankruptcyPrice := p.GetBankruptcyPrice(funding) + hasNegativeEquity := (p.IsLong && markPrice.LT(bankruptcyPrice)) || (p.IsShort() && markPrice.GT(bankruptcyPrice)) + + if hasNegativeEquity { + return markPrice + } + + return bankruptcyPrice +} + +func (p *Position) GetBankruptcyPrice(funding *PerpetualMarketFunding) (bankruptcyPrice math.LegacyDec) { + return p.GetLiquidationPrice(math.LegacyZeroDec(), funding) +} + +func (p *Position) GetBankruptcyPriceWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) (bankruptcyPrice math.LegacyDec) { + return p.getLiquidationPriceWithAddedMargin(math.LegacyZeroDec(), funding, addedMargin) +} + +func (p *Position) GetLiquidationPrice(maintenanceMarginRatio math.LegacyDec, funding *PerpetualMarketFunding) math.LegacyDec { + return p.getLiquidationPriceWithAddedMargin(maintenanceMarginRatio, funding, math.LegacyZeroDec()) +} + +func (p *Position) getLiquidationPriceWithAddedMargin(maintenanceMarginRatio math.LegacyDec, funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { + adjustedUnitMargin := p.getFundingAdjustedUnitMarginWithAddedMargin(funding, addedMargin) + + // TODO include closing fee for reduce only ? + + var liquidationPrice math.LegacyDec + if p.IsLong { + // liquidation price = (entry price - unit margin) / (1 - maintenanceMarginRatio) + liquidationPrice = p.EntryPrice.Sub(adjustedUnitMargin).Quo(math.LegacyOneDec().Sub(maintenanceMarginRatio)) + } else { + // liquidation price = (entry price + unit margin) / (1 + maintenanceMarginRatio) + liquidationPrice = p.EntryPrice.Add(adjustedUnitMargin).Quo(math.LegacyOneDec().Add(maintenanceMarginRatio)) + } + return liquidationPrice +} + +func (p *Position) GetEffectiveMargin(funding *PerpetualMarketFunding, closingPrice math.LegacyDec) math.LegacyDec { + fundingAdjustedMargin := p.Margin + if funding != nil { + fundingAdjustedMargin = p.getFundingAdjustedMargin(funding) + } + pnlNotional := math.LegacyZeroDec() + if !closingPrice.IsNil() { + pnlNotional = p.GetPayoutFromPnl(closingPrice, p.Quantity) + } + effectiveMargin := fundingAdjustedMargin.Add(pnlNotional) + return effectiveMargin +} + +// ApplyFunding updates the position to account for any funding payment. +func (p *Position) ApplyFunding(funding *PerpetualMarketFunding) { + if funding != nil { + p.Margin = p.getFundingAdjustedMargin(funding) + + // update the cumulative funding entry to current + p.CumulativeFundingEntry = funding.CumulativeFunding + } +} + +func (p *Position) getFundingAdjustedMargin(funding *PerpetualMarketFunding) math.LegacyDec { + return p.getFundingAdjustedMarginWithAddedMargin(funding, math.LegacyZeroDec()) +} + +func (p *Position) getFundingAdjustedMarginWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { + adjustedMargin := p.Margin.Add(addedMargin) + + // Compute the adjusted position margin for positions in perpetual markets + if funding != nil { + unrealizedFundingPayment := p.Quantity.Mul(funding.CumulativeFunding.Sub(p.CumulativeFundingEntry)) + + // For longs, Margin -= Funding + // For shorts, Margin += Funding + if p.IsLong { + adjustedMargin = adjustedMargin.Sub(unrealizedFundingPayment) + } else { + adjustedMargin = adjustedMargin.Add(unrealizedFundingPayment) + } + } + + return adjustedMargin +} + +func (p *Position) getFundingAdjustedUnitMarginWithAddedMargin(funding *PerpetualMarketFunding, addedMargin math.LegacyDec) math.LegacyDec { + adjustedMargin := p.getFundingAdjustedMarginWithAddedMargin(funding, addedMargin) + + // Unit Margin = PositionMargin / PositionQuantity + fundingAdjustedUnitMargin := adjustedMargin.Quo(p.Quantity) + return fundingAdjustedUnitMargin +} + +func (p *Position) GetAverageWeightedEntryPrice(executionQuantity, executionPrice math.LegacyDec) math.LegacyDec { + num := p.Quantity.Mul(p.EntryPrice).Add(executionQuantity.Mul(executionPrice)) + denom := p.Quantity.Add(executionQuantity) + + return num.Quo(denom) +} + +func (p *Position) GetPayoutIfFullyClosing(closingPrice, closingFeeRate math.LegacyDec) *v1.PositionPayout { + isProfitable := (p.IsLong && p.EntryPrice.LT(closingPrice)) || (!p.IsLong && p.EntryPrice.GT(closingPrice)) + + fullyClosingQuantity := p.Quantity + positionMargin := p.Margin + + closeTradingFee := closingPrice.Mul(fullyClosingQuantity).Mul(closingFeeRate) + payoutFromPnl := p.GetPayoutFromPnl(closingPrice, fullyClosingQuantity) + pnlNotional := payoutFromPnl.Sub(closeTradingFee) + payout := pnlNotional.Add(positionMargin) + + return &v1.PositionPayout{ + Payout: payout, + PnlNotional: pnlNotional, + IsProfitable: isProfitable, + } +} + +func (p *Position) GetPayoutFromPnl(closingPrice, closingQuantity math.LegacyDec) math.LegacyDec { + var pnlNotional math.LegacyDec + + if p.IsLong { + // nolint:all + // pnl = closingQuantity * (executionPrice - entryPrice) + pnlNotional = closingQuantity.Mul(closingPrice.Sub(p.EntryPrice)) + } else { + // nolint:all + // pnl = -closingQuantity * (executionPrice - entryPrice) + pnlNotional = closingQuantity.Mul(closingPrice.Sub(p.EntryPrice)).Neg() + } + + return pnlNotional +} + +func (p *Position) ApplyPositionDelta(delta *PositionDelta, tradingFeeForReduceOnly math.LegacyDec) ( + payout, closeExecutionMargin, collateralizationMargin, pnl math.LegacyDec, +) { + // No payouts or margin changes if the position delta is nil + if delta == nil || p == nil { + return math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec() + } + + if p.Quantity.IsZero() { + p.IsLong = delta.IsLong + } + + payout, closeExecutionMargin, collateralizationMargin = math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec() + isNettingInSameDirection := (p.IsLong && delta.IsLong) || (p.IsShort() && delta.IsShort()) + + if isNettingInSameDirection { + p.EntryPrice = p.GetAverageWeightedEntryPrice(delta.ExecutionQuantity, delta.ExecutionPrice) + p.Quantity = p.Quantity.Add(delta.ExecutionQuantity) + p.Margin = p.Margin.Add(delta.ExecutionMargin) + collateralizationMargin = delta.ExecutionMargin + + return payout, closeExecutionMargin, collateralizationMargin, math.LegacyZeroDec() + } + + // netting in opposing direction + closingQuantity := math.LegacyMinDec(p.Quantity, delta.ExecutionQuantity) + // closeExecutionMargin = execution margin * closing quantity / execution quantity + closeExecutionMargin = delta.ExecutionMargin.Mul(closingQuantity).Quo(delta.ExecutionQuantity) + + pnlNotional := p.GetPayoutFromPnl(delta.ExecutionPrice, closingQuantity) + isReduceOnlyTrade := delta.ExecutionMargin.IsZero() + + if isReduceOnlyTrade { + // deduct fees from PNL (position margin) for reduce-only orders + + // only use the closing trading fee for now + pnlNotional = pnlNotional.Sub(tradingFeeForReduceOnly) + } + + positionClosingMargin := p.Margin.Mul(closingQuantity).Quo(p.Quantity) + payout = pnlNotional.Add(positionClosingMargin) + + // for netting opposite direction + newPositionQuantity := p.Quantity.Sub(closingQuantity) + p.Margin = p.Margin.Mul(newPositionQuantity).Quo(p.Quantity) + p.Quantity = newPositionQuantity + + isFlippingPosition := delta.ExecutionQuantity.GT(closingQuantity) + + if isFlippingPosition { + remainingExecutionQuantity := delta.ExecutionQuantity.Sub(closingQuantity) + remainingExecutionMargin := delta.ExecutionMargin.Sub(closeExecutionMargin) + + newPositionDelta := &PositionDelta{ + IsLong: !p.IsLong, + ExecutionQuantity: remainingExecutionQuantity, + ExecutionMargin: remainingExecutionMargin, + ExecutionPrice: delta.ExecutionPrice, + } + + // recurse + _, _, collateralizationMargin, _ = p.ApplyPositionDelta(newPositionDelta, tradingFeeForReduceOnly) + } + + return payout, closeExecutionMargin, collateralizationMargin, pnlNotional +} diff --git a/chain/exchange/types/v2/proposal.go b/chain/exchange/types/v2/proposal.go new file mode 100644 index 00000000..3467991d --- /dev/null +++ b/chain/exchange/types/v2/proposal.go @@ -0,0 +1,1767 @@ +package v2 + +import ( + "fmt" + + "cosmossdk.io/errors" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + gov "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/ethereum/go-ethereum/common" + + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" +) + +// constants +const ( + ProposalTypeExchangeEnable string = "ProposalTypeExchangeEnableV2" + ProposalTypeBatchExchangeModification string = "ProposalTypeBatchExchangeModificationV2" + ProposalTypeSpotMarketParamUpdate string = "ProposalTypeSpotMarketParamUpdateV2" + ProposalTypeSpotMarketLaunch string = "ProposalTypeSpotMarketLaunchV2" + ProposalTypePerpetualMarketLaunch string = "ProposalTypePerpetualMarketLaunchV2" + ProposalTypeExpiryFuturesMarketLaunch string = "ProposalTypeExpiryFuturesMarketLaunchV2" + ProposalTypeDerivativeMarketParamUpdate string = "ProposalTypeDerivativeMarketParamUpdateV2" + ProposalTypeMarketForcedSettlement string = "ProposalTypeMarketForcedSettlementV2" + ProposalUpdateDenomDecimals string = "ProposalUpdateDenomDecimalsV2" + ProposalTypeTradingRewardCampaign string = "ProposalTypeTradingRewardCampaignV2" + ProposalTypeTradingRewardCampaignUpdate string = "ProposalTypeTradingRewardCampaignUpdateProposalV2" + ProposalTypeTradingRewardPointsUpdate string = "ProposalTypeTradingRewardPointsUpdateProposalV2" + ProposalTypeFeeDiscountProposal string = "ProposalTypeFeeDiscountProposalV2" + ProposalTypeBatchCommunityPoolSpendProposal string = "ProposalTypeBatchCommunityPoolSpendProposalV2" + ProposalTypeBinaryOptionsMarketLaunch string = "ProposalTypeBinaryOptionsMarketLaunchV2" + ProposalTypeBinaryOptionsMarketParamUpdate string = "ProposalTypeBinaryOptionsMarketParamUpdateV2" + ProposalAtomicMarketOrderFeeMultiplierSchedule string = "ProposalAtomicMarketOrderFeeMultiplierScheduleV2" +) + +func init() { + govtypes.RegisterProposalType(ProposalTypeExchangeEnable) + govtypes.RegisterProposalType(ProposalTypeBatchExchangeModification) + govtypes.RegisterProposalType(ProposalTypeSpotMarketParamUpdate) + govtypes.RegisterProposalType(ProposalTypeSpotMarketLaunch) + govtypes.RegisterProposalType(ProposalTypePerpetualMarketLaunch) + govtypes.RegisterProposalType(ProposalTypeExpiryFuturesMarketLaunch) + govtypes.RegisterProposalType(ProposalTypeDerivativeMarketParamUpdate) + govtypes.RegisterProposalType(ProposalTypeMarketForcedSettlement) + govtypes.RegisterProposalType(ProposalUpdateDenomDecimals) + govtypes.RegisterProposalType(ProposalTypeTradingRewardCampaign) + govtypes.RegisterProposalType(ProposalTypeTradingRewardCampaignUpdate) + govtypes.RegisterProposalType(ProposalTypeTradingRewardPointsUpdate) + govtypes.RegisterProposalType(ProposalTypeFeeDiscountProposal) + govtypes.RegisterProposalType(ProposalTypeBatchCommunityPoolSpendProposal) + govtypes.RegisterProposalType(ProposalTypeBinaryOptionsMarketLaunch) + govtypes.RegisterProposalType(ProposalTypeBinaryOptionsMarketParamUpdate) + govtypes.RegisterProposalType(ProposalAtomicMarketOrderFeeMultiplierSchedule) +} + +func SafeIsPositiveInt(v math.Int) bool { + if v.IsNil() { + return false + } + + return v.IsPositive() +} + +func SafeIsPositiveDec(v math.LegacyDec) bool { + if v.IsNil() { + return false + } + + return v.IsPositive() +} + +func SafeIsNonNegativeDec(v math.LegacyDec) bool { + if v.IsNil() { + return false + } + + return !v.IsNegative() +} + +func IsZeroOrNilInt(v math.Int) bool { + return v.IsNil() || v.IsZero() +} + +func IsZeroOrNilDec(v math.LegacyDec) bool { + return v.IsNil() || v.IsZero() +} + +// Implements Proposal Interface +var _ govtypes.Content = &ExchangeEnableProposal{} + +// GetTitle returns the title of this proposal. +func (p *ExchangeEnableProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *ExchangeEnableProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *ExchangeEnableProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *ExchangeEnableProposal) ProposalType() string { + return ProposalTypeExchangeEnable +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *ExchangeEnableProposal) ValidateBasic() error { + + switch p.ExchangeType { + case ExchangeType_SPOT, ExchangeType_DERIVATIVES: + default: + return types.ErrBadField + } + return govtypes.ValidateAbstract(p) +} + +// Implements Proposal Interface +var _ govtypes.Content = &BatchExchangeModificationProposal{} + +// GetTitle returns the title of this proposal. +func (p *BatchExchangeModificationProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *BatchExchangeModificationProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *BatchExchangeModificationProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *BatchExchangeModificationProposal) ProposalType() string { + return ProposalTypeBatchExchangeModification +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *BatchExchangeModificationProposal) ValidateBasic() error { + for _, proposal := range p.SpotMarketParamUpdateProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.DerivativeMarketParamUpdateProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.SpotMarketLaunchProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.PerpetualMarketLaunchProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.ExpiryFuturesMarketLaunchProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + if p.TradingRewardCampaignUpdateProposal != nil { + if err := p.TradingRewardCampaignUpdateProposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.BinaryOptionsMarketLaunchProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.BinaryOptionsParamUpdateProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + if p.DenomDecimalsUpdateProposal != nil { + if err := p.DenomDecimalsUpdateProposal.ValidateBasic(); err != nil { + return err + } + } + + if p.FeeDiscountProposal != nil { + if err := p.FeeDiscountProposal.ValidateBasic(); err != nil { + return err + } + } + + for _, proposal := range p.MarketForcedSettlementProposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + + return govtypes.ValidateAbstract(p) +} + +// NewSpotMarketParamUpdateProposal returns new instance of SpotMarketParamUpdateProposal +func NewSpotMarketParamUpdateProposal(title, description string, marketID common.Hash, makerFeeRate, takerFeeRate, relayerFeeShareRate, minPriceTickSize, minQuantityTickSize, minNotional *math.LegacyDec, status MarketStatus, ticker string, baseDecimals, quoteDecimals uint32) *SpotMarketParamUpdateProposal { + return &SpotMarketParamUpdateProposal{ + title, + description, + marketID.Hex(), + makerFeeRate, + takerFeeRate, + relayerFeeShareRate, + minPriceTickSize, + minQuantityTickSize, + status, + ticker, + minNotional, + nil, + baseDecimals, + quoteDecimals, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &SpotMarketParamUpdateProposal{} + +// GetTitle returns the title of this proposal. +func (p *SpotMarketParamUpdateProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *SpotMarketParamUpdateProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *SpotMarketParamUpdateProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *SpotMarketParamUpdateProposal) ProposalType() string { + return ProposalTypeSpotMarketParamUpdate +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *SpotMarketParamUpdateProposal) ValidateBasic() error { + if !types.IsHexHash(p.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, p.MarketId) + } + if p.MakerFeeRate == nil && + p.TakerFeeRate == nil && + p.RelayerFeeShareRate == nil && + p.MinPriceTickSize == nil && + p.MinQuantityTickSize == nil && + p.MinNotional == nil && + p.AdminInfo == nil && + p.Status == MarketStatus_Unspecified { + return errors.Wrap(gov.ErrInvalidProposalContent, "At least one field should not be nil") + } + + if p.MakerFeeRate != nil { + if err := types.ValidateMakerFee(*p.MakerFeeRate); err != nil { + return err + } + } + if p.TakerFeeRate != nil { + if err := types.ValidateFee(*p.TakerFeeRate); err != nil { + return err + } + } + if p.RelayerFeeShareRate != nil { + if err := types.ValidateFee(*p.RelayerFeeShareRate); err != nil { + return err + } + } + + if p.MinPriceTickSize != nil { + if err := types.ValidateTickSize(*p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + } + if p.MinQuantityTickSize != nil { + if err := types.ValidateTickSize(*p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + } + if p.MinNotional != nil { + if err := types.ValidateMinNotional(*p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + } + + if p.AdminInfo != nil { + if p.AdminInfo.Admin != "" { + if _, err := sdk.AccAddressFromBech32(p.AdminInfo.Admin); err != nil { + return errors.Wrap(types.ErrInvalidAddress, err.Error()) + } + } + if p.AdminInfo.AdminPermissions > types.MaxPerm { + return types.ErrInvalidPermissions + } + } + + if len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not exceed %d characters", types.MaxTickerLength) + } + + switch p.Status { + case + MarketStatus_Unspecified, + MarketStatus_Active, + MarketStatus_Paused, + MarketStatus_Demolished, + MarketStatus_Expired: + + default: + return errors.Wrap(types.ErrInvalidMarketStatus, p.Status.String()) + } + + if p.BaseDecimals > types.MaxDecimals { + return errors.Wrap(types.ErrInvalidDenomDecimal, "base decimals is invalid") + } + if p.QuoteDecimals > types.MaxDecimals { + return errors.Wrap(types.ErrInvalidDenomDecimal, "quote decimals is invalid") + } + + return govtypes.ValidateAbstract(p) +} + +// NewSpotMarketLaunchProposal returns new instance of SpotMarketLaunchProposal +func NewSpotMarketLaunchProposal( + title string, + description string, + ticker string, + baseDenom string, + quoteDenom string, + minPriceTickSize math.LegacyDec, + minQuantityTickSize math.LegacyDec, + minNotional math.LegacyDec, + makerFeeRate *math.LegacyDec, + takerFeeRate *math.LegacyDec, + baseDecimals uint32, + quoteDecimals uint32, +) *SpotMarketLaunchProposal { + return &SpotMarketLaunchProposal{ + Title: title, + Description: description, + Ticker: ticker, + BaseDenom: baseDenom, + QuoteDenom: quoteDenom, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + BaseDecimals: baseDecimals, + QuoteDecimals: quoteDecimals, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &SpotMarketLaunchProposal{} + +// GetTitle returns the title of this proposal. +func (p *SpotMarketLaunchProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *SpotMarketLaunchProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *SpotMarketLaunchProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *SpotMarketLaunchProposal) ProposalType() string { + return ProposalTypeSpotMarketLaunch +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *SpotMarketLaunchProposal) ValidateBasic() error { + if p.Ticker == "" || len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if p.BaseDenom == "" { + return errors.Wrap(types.ErrInvalidBaseDenom, "base denom should not be empty") + } + if p.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + if p.BaseDenom == p.QuoteDenom { + return types.ErrSameDenoms + } + + if err := types.ValidateTickSize(p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + if p.MakerFeeRate != nil { + if err := types.ValidateMakerFee(*p.MakerFeeRate); err != nil { + return err + } + } + + if p.TakerFeeRate != nil { + if err := types.ValidateFee(*p.TakerFeeRate); err != nil { + return err + } + } + + if (p.MakerFeeRate == nil && p.TakerFeeRate != nil) || (p.MakerFeeRate != nil && p.TakerFeeRate == nil) { + return errors.Wrap(types.ErrFeeRatesRelation, "maker and taker fee rate must either be both nil or both specified") + } + + if p.MakerFeeRate != nil && p.TakerFeeRate != nil { + if p.MakerFeeRate.GT(*p.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + } + + if p.BaseDecimals > types.MaxDecimals { + return errors.Wrap(types.ErrInvalidDenomDecimal, "base decimals is invalid") + } + if p.QuoteDecimals > types.MaxDecimals { + return errors.Wrap(types.ErrInvalidDenomDecimal, "quote decimals is invalid") + } + + return govtypes.ValidateAbstract(p) +} + +// NewDerivativeMarketParamUpdateProposal returns new instance of DerivativeMarketParamUpdateProposal +func NewDerivativeMarketParamUpdateProposal( + title string, + description string, + marketID string, + initialMarginRatio *math.LegacyDec, + maintenanceMarginRatio *math.LegacyDec, + makerFeeRate *math.LegacyDec, + takerFeeRate *math.LegacyDec, + relayerFeeShareRate *math.LegacyDec, + minPriceTickSize *math.LegacyDec, + minQuantityTickSize *math.LegacyDec, + minNotional *math.LegacyDec, + hourlyInterestRate *math.LegacyDec, + hourlyFundingRateCap *math.LegacyDec, + status MarketStatus, + oracleParams *OracleParams, + ticker string, + adminInfo *AdminInfo, +) *DerivativeMarketParamUpdateProposal { + return &DerivativeMarketParamUpdateProposal{ + Title: title, + Description: description, + MarketId: marketID, + InitialMarginRatio: initialMarginRatio, + MaintenanceMarginRatio: maintenanceMarginRatio, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + RelayerFeeShareRate: relayerFeeShareRate, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + HourlyInterestRate: hourlyInterestRate, + HourlyFundingRateCap: hourlyFundingRateCap, + Status: status, + OracleParams: oracleParams, + Ticker: ticker, + MinNotional: minNotional, + AdminInfo: adminInfo, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &DerivativeMarketParamUpdateProposal{} + +// GetTitle returns the title of this proposal +func (p *DerivativeMarketParamUpdateProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *DerivativeMarketParamUpdateProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *DerivativeMarketParamUpdateProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *DerivativeMarketParamUpdateProposal) ProposalType() string { + return ProposalTypeDerivativeMarketParamUpdate +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *DerivativeMarketParamUpdateProposal) ValidateBasic() error { + if !types.IsHexHash(p.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, p.MarketId) + } + if p.MakerFeeRate == nil && + p.TakerFeeRate == nil && + p.RelayerFeeShareRate == nil && + p.MinPriceTickSize == nil && + p.MinQuantityTickSize == nil && + p.MinNotional == nil && + p.InitialMarginRatio == nil && + p.MaintenanceMarginRatio == nil && + p.HourlyInterestRate == nil && + p.HourlyFundingRateCap == nil && + p.Status == MarketStatus_Unspecified && + p.AdminInfo == nil && + p.OracleParams == nil { + return errors.Wrap(gov.ErrInvalidProposalContent, "At least one field should not be nil") + } + + if p.MakerFeeRate != nil { + if err := types.ValidateMakerFee(*p.MakerFeeRate); err != nil { + return err + } + } + if p.TakerFeeRate != nil { + if err := types.ValidateFee(*p.TakerFeeRate); err != nil { + return err + } + } + + if p.RelayerFeeShareRate != nil { + if err := types.ValidateFee(*p.RelayerFeeShareRate); err != nil { + return err + } + } + + if p.InitialMarginRatio != nil { + if err := types.ValidateMarginRatio(*p.InitialMarginRatio); err != nil { + return err + } + } + if p.MaintenanceMarginRatio != nil { + if err := types.ValidateMarginRatio(*p.MaintenanceMarginRatio); err != nil { + return err + } + } + + if p.MinPriceTickSize != nil { + if err := types.ValidateTickSize(*p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + } + if p.MinQuantityTickSize != nil { + if err := types.ValidateTickSize(*p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + } + if p.MinNotional != nil { + if err := types.ValidateMinNotional(*p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + } + + if p.HourlyInterestRate != nil { + if err := types.ValidateHourlyInterestRate(*p.HourlyInterestRate); err != nil { + return errors.Wrap(types.ErrInvalidHourlyInterestRate, err.Error()) + } + } + + if p.HourlyFundingRateCap != nil { + if err := types.ValidateHourlyFundingRateCap(*p.HourlyFundingRateCap); err != nil { + return errors.Wrap(types.ErrInvalidHourlyFundingRateCap, err.Error()) + } + } + + if p.AdminInfo != nil { + if p.AdminInfo.Admin != "" { + if _, err := sdk.AccAddressFromBech32(p.AdminInfo.Admin); err != nil { + return errors.Wrap(types.ErrInvalidAddress, err.Error()) + } + } + if p.AdminInfo.AdminPermissions > types.MaxPerm { + return types.ErrInvalidPermissions + } + } + + if len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not exceed %d characters", types.MaxTickerLength) + } + + switch p.Status { + case + MarketStatus_Unspecified, + MarketStatus_Active, + MarketStatus_Paused, + MarketStatus_Demolished, + MarketStatus_Expired: + + default: + return errors.Wrap(types.ErrInvalidMarketStatus, p.Status.String()) + } + + if p.OracleParams != nil { + if err := p.OracleParams.ValidateBasic(); err != nil { + return err + } + } + + return govtypes.ValidateAbstract(p) +} + +// NewMarketForcedSettlementProposal returns new instance of MarketForcedSettlementProposal +func NewMarketForcedSettlementProposal( + title, description string, marketID string, + settlementPrice *math.LegacyDec, +) *MarketForcedSettlementProposal { + return &MarketForcedSettlementProposal{ + Title: title, + Description: description, + MarketId: marketID, + SettlementPrice: settlementPrice, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &MarketForcedSettlementProposal{} + +// GetTitle returns the title of this proposal +func (p *MarketForcedSettlementProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *MarketForcedSettlementProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *MarketForcedSettlementProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *MarketForcedSettlementProposal) ProposalType() string { + return ProposalTypeMarketForcedSettlement +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *MarketForcedSettlementProposal) ValidateBasic() error { + if !types.IsHexHash(p.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, p.MarketId) + } + + if p.SettlementPrice != nil && !SafeIsPositiveDec(*p.SettlementPrice) { + return errors.Wrap(types.ErrInvalidSettlement, "settlement price must be positive for derivatives and nil for spot") + } + + return govtypes.ValidateAbstract(p) +} + +// NewUpdateDenomDecimalsProposal returns new instance of UpdateDenomDecimalsProposal +func NewUpdateDenomDecimalsProposal( + title, description string, + denomDecimals []*DenomDecimals, +) *UpdateDenomDecimalsProposal { + return &UpdateDenomDecimalsProposal{ + Title: title, + Description: description, + DenomDecimals: denomDecimals, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &UpdateDenomDecimalsProposal{} + +// GetTitle returns the title of this proposal +func (p *UpdateDenomDecimalsProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *UpdateDenomDecimalsProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *UpdateDenomDecimalsProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *UpdateDenomDecimalsProposal) ProposalType() string { + return ProposalUpdateDenomDecimals +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *UpdateDenomDecimalsProposal) ValidateBasic() error { + for _, d := range p.DenomDecimals { + if err := d.Validate(); err != nil { + return err + } + } + return govtypes.ValidateAbstract(p) +} + +func (d *DenomDecimals) Validate() error { + if d.Denom == "" { + return errors.Wrap(sdkerrors.ErrInvalidCoins, d.Denom) + } + + if d.Decimals <= 0 || d.Decimals > uint64(types.MaxDecimals) { + return errors.Wrapf(types.ErrInvalidDenomDecimal, "invalid decimals passed: %d", d.Decimals) + } + return nil +} + +func NewOracleParams( + oracleBase string, + oracleQuote string, + oracleScaleFactor uint32, + oracleType oracletypes.OracleType, +) *OracleParams { + return &OracleParams{ + OracleBase: oracleBase, + OracleQuote: oracleQuote, + OracleScaleFactor: oracleScaleFactor, + OracleType: oracleType, + } +} + +func (p *OracleParams) ValidateBasic() error { + if p.OracleBase == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle base should not be empty") + } + if p.OracleQuote == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle quote should not be empty") + } + if p.OracleBase == p.OracleQuote { + return types.ErrSameOracles + } + switch p.OracleType { + case oracletypes.OracleType_Band, oracletypes.OracleType_PriceFeed, oracletypes.OracleType_Coinbase, oracletypes.OracleType_Chainlink, oracletypes.OracleType_Razor, + oracletypes.OracleType_Dia, oracletypes.OracleType_API3, oracletypes.OracleType_Uma, oracletypes.OracleType_Pyth, oracletypes.OracleType_BandIBC, oracletypes.OracleType_Provider, + oracletypes.OracleType_Stork: + + default: + return errors.Wrap(types.ErrInvalidOracleType, p.OracleType.String()) + } + + if p.OracleScaleFactor > types.MaxOracleScaleFactor { + return types.ErrExceedsMaxOracleScaleFactor + } + + return nil +} + +func NewProviderOracleParams( + symbol string, + oracleProvider string, + oracleScaleFactor uint32, + oracleType oracletypes.OracleType, +) *ProviderOracleParams { + return &ProviderOracleParams{ + Symbol: symbol, + Provider: oracleProvider, + OracleScaleFactor: oracleScaleFactor, + OracleType: oracleType, + } +} + +func (p *ProviderOracleParams) ValidateBasic() error { + if p.Symbol == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle symbol should not be empty") + } + if p.Provider == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle provider should not be empty") + } + + if p.OracleType != oracletypes.OracleType_Provider { + return errors.Wrap(types.ErrInvalidOracleType, p.OracleType.String()) + } + + if p.OracleScaleFactor > types.MaxOracleScaleFactor { + return types.ErrExceedsMaxOracleScaleFactor + } + + return nil +} + +// NewPerpetualMarketLaunchProposal returns new instance of PerpetualMarketLaunchProposal +func NewPerpetualMarketLaunchProposal( + title, description, ticker, quoteDenom, + oracleBase, oracleQuote string, oracleScaleFactor uint32, oracleType oracletypes.OracleType, + initialMarginRatio, maintenanceMarginRatio, makerFeeRate, takerFeeRate, minPriceTickSize, minQuantityTickSize, minNotional math.LegacyDec, +) *PerpetualMarketLaunchProposal { + return &PerpetualMarketLaunchProposal{ + Title: title, + Description: description, + Ticker: ticker, + QuoteDenom: quoteDenom, + OracleBase: oracleBase, + OracleQuote: oracleQuote, + OracleScaleFactor: oracleScaleFactor, + OracleType: oracleType, + InitialMarginRatio: initialMarginRatio, + MaintenanceMarginRatio: maintenanceMarginRatio, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &PerpetualMarketLaunchProposal{} + +// GetTitle returns the title of this proposal. +func (p *PerpetualMarketLaunchProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *PerpetualMarketLaunchProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *PerpetualMarketLaunchProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *PerpetualMarketLaunchProposal) ProposalType() string { + return ProposalTypePerpetualMarketLaunch +} + +// ValidateBasic returns ValidateBasic result of a perpetual market launch proposal. +func (p *PerpetualMarketLaunchProposal) ValidateBasic() error { + if p.Ticker == "" || len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if p.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + + oracleParams := NewOracleParams(p.OracleBase, p.OracleQuote, p.OracleScaleFactor, p.OracleType) + if err := oracleParams.ValidateBasic(); err != nil { + return err + } + if err := types.ValidateMakerFee(p.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(p.TakerFeeRate); err != nil { + return err + } + if err := types.ValidateMarginRatio(p.InitialMarginRatio); err != nil { + return err + } + if err := types.ValidateMarginRatio(p.MaintenanceMarginRatio); err != nil { + return err + } + if p.MakerFeeRate.GT(p.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) { + return types.ErrMarginsRelation + } + + if err := types.ValidateTickSize(p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return govtypes.ValidateAbstract(p) +} + +// NewExpiryFuturesMarketLaunchProposal returns new instance of ExpiryFuturesMarketLaunchProposal +func NewExpiryFuturesMarketLaunchProposal( + title, description, ticker, quoteDenom, + oracleBase, oracleQuote string, oracleScaleFactor uint32, oracleType oracletypes.OracleType, expiry int64, + initialMarginRatio, maintenanceMarginRatio, makerFeeRate, takerFeeRate, minPriceTickSize, minQuantityTickSize, minNotional math.LegacyDec, +) *ExpiryFuturesMarketLaunchProposal { + return &ExpiryFuturesMarketLaunchProposal{ + Title: title, + Description: description, + Ticker: ticker, + QuoteDenom: quoteDenom, + OracleBase: oracleBase, + OracleQuote: oracleQuote, + OracleScaleFactor: oracleScaleFactor, + OracleType: oracleType, + Expiry: expiry, + InitialMarginRatio: initialMarginRatio, + MaintenanceMarginRatio: maintenanceMarginRatio, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &ExpiryFuturesMarketLaunchProposal{} + +// GetTitle returns the title of this proposal. +func (p *ExpiryFuturesMarketLaunchProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *ExpiryFuturesMarketLaunchProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *ExpiryFuturesMarketLaunchProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *ExpiryFuturesMarketLaunchProposal) ProposalType() string { + return ProposalTypeExpiryFuturesMarketLaunch +} + +// ValidateBasic returns ValidateBasic result of a perpetual market launch proposal. +func (p *ExpiryFuturesMarketLaunchProposal) ValidateBasic() error { + if p.Ticker == "" || len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if p.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + + oracleParams := NewOracleParams(p.OracleBase, p.OracleQuote, p.OracleScaleFactor, p.OracleType) + if err := oracleParams.ValidateBasic(); err != nil { + return err + } + if p.Expiry <= 0 { + return errors.Wrap(types.ErrInvalidExpiry, "expiry should not be empty") + } + if err := types.ValidateMakerFee(p.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(p.TakerFeeRate); err != nil { + return err + } + if err := types.ValidateMarginRatio(p.InitialMarginRatio); err != nil { + return err + } + if err := types.ValidateMarginRatio(p.MaintenanceMarginRatio); err != nil { + return err + } + if p.MakerFeeRate.GT(p.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + if p.InitialMarginRatio.LT(p.MaintenanceMarginRatio) { + return types.ErrMarginsRelation + } + + if err := types.ValidateTickSize(p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return govtypes.ValidateAbstract(p) +} + +// NewTradingRewardCampaignUpdateProposal returns new instance of TradingRewardCampaignLaunchProposal +func NewTradingRewardCampaignUpdateProposal( + title, description string, + campaignInfo *TradingRewardCampaignInfo, + rewardPoolsAdditions []*CampaignRewardPool, + rewardPoolsUpdates []*CampaignRewardPool, +) *TradingRewardCampaignUpdateProposal { + p := &TradingRewardCampaignUpdateProposal{ + Title: title, + Description: description, + CampaignInfo: campaignInfo, + CampaignRewardPoolsAdditions: rewardPoolsAdditions, + CampaignRewardPoolsUpdates: rewardPoolsUpdates, + } + if err := p.ValidateBasic(); err != nil { + panic(err) + } + return p +} + +// Implements Proposal Interface +var _ govtypes.Content = &TradingRewardCampaignUpdateProposal{} + +// GetTitle returns the title of this proposal +func (p *TradingRewardCampaignUpdateProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *TradingRewardCampaignUpdateProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *TradingRewardCampaignUpdateProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *TradingRewardCampaignUpdateProposal) ProposalType() string { + return ProposalTypeTradingRewardCampaign +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *TradingRewardCampaignUpdateProposal) ValidateBasic() error { + var err error + + if err := p.CampaignInfo.ValidateBasic(); err != nil { + return err + } + + prevStartTimestamp := int64(0) + for _, pool := range p.CampaignRewardPoolsAdditions { + if pool == nil { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign reward pool addition cannot be nil") + } + + prevStartTimestamp, err = validateCampaignRewardPool(pool, p.CampaignInfo.CampaignDurationSeconds, prevStartTimestamp) + if err != nil { + return err + } + } + + prevStartTimestamp = int64(0) + for _, pool := range p.CampaignRewardPoolsUpdates { + prevStartTimestamp, err = validateCampaignRewardPool(pool, p.CampaignInfo.CampaignDurationSeconds, prevStartTimestamp) + if err != nil { + return err + } + } + + return govtypes.ValidateAbstract(p) +} + +// Implements Proposal Interface +var _ govtypes.Content = &TradingRewardPendingPointsUpdateProposal{} + +// GetTitle returns the title of this proposal +func (p *TradingRewardPendingPointsUpdateProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *TradingRewardPendingPointsUpdateProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *TradingRewardPendingPointsUpdateProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *TradingRewardPendingPointsUpdateProposal) ProposalType() string { + return ProposalTypeTradingRewardPointsUpdate +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *TradingRewardPendingPointsUpdateProposal) ValidateBasic() error { + if len(p.RewardPointUpdates) == 0 { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "reward pending points update cannot be nil") + } + + if p.PendingPoolTimestamp <= 0 { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "pending pool timestamp cannot be zero") + } + + accountAddresses := make([]string, 0) + + for _, rewardPointUpdate := range p.RewardPointUpdates { + if rewardPointUpdate == nil { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "reward pending point update cannot be nil") + } + + _, err := sdk.AccAddressFromBech32(rewardPointUpdate.AccountAddress) + + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, rewardPointUpdate.AccountAddress) + } + + accountAddresses = append(accountAddresses, rewardPointUpdate.AccountAddress) + + if rewardPointUpdate.NewPoints.IsNil() { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "reward pending points cannot be nil") + } + + if rewardPointUpdate.NewPoints.IsNegative() { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "reward pending points cannot be negative") + } + } + + hasDuplicateAccountAddresses := types.HasDuplicates(accountAddresses) + if hasDuplicateAccountAddresses { + return errors.Wrap(types.ErrInvalidTradingRewardsPendingPointsUpdate, "account address cannot have duplicates") + } + + return govtypes.ValidateAbstract(p) +} + +// NewTradingRewardCampaignLaunchProposal returns new instance of TradingRewardCampaignLaunchProposal +func NewTradingRewardCampaignLaunchProposal( + title, description string, + campaignInfo *TradingRewardCampaignInfo, + campaignRewardPools []*CampaignRewardPool, +) *TradingRewardCampaignLaunchProposal { + p := &TradingRewardCampaignLaunchProposal{ + Title: title, + Description: description, + CampaignInfo: campaignInfo, + CampaignRewardPools: campaignRewardPools, + } + if err := p.ValidateBasic(); err != nil { + panic(err) + } + return p +} + +// Implements Proposal Interface +var _ govtypes.Content = &TradingRewardCampaignLaunchProposal{} + +// GetTitle returns the title of this proposal +func (p *TradingRewardCampaignLaunchProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *TradingRewardCampaignLaunchProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *TradingRewardCampaignLaunchProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *TradingRewardCampaignLaunchProposal) ProposalType() string { + return ProposalTypeTradingRewardCampaign +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *TradingRewardCampaignLaunchProposal) ValidateBasic() error { + var err error + + if p.CampaignInfo == nil { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "new campaign info cannot be nil") + } + + if len(p.CampaignRewardPools) == 0 { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "new campaign reward pools cannot be nil") + } + + err = p.CampaignInfo.ValidateBasic() + if err != nil { + return err + } + + prevStartTimestamp := int64(0) + for _, pool := range p.CampaignRewardPools { + prevStartTimestamp, err = validateCampaignRewardPool(pool, p.CampaignInfo.CampaignDurationSeconds, prevStartTimestamp) + if err != nil { + return err + } + } + + return nil +} + +func (t *TradingRewardCampaignBoostInfo) ValidateBasic() error { + if len(t.BoostedSpotMarketIds) != len(t.SpotMarketMultipliers) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "boosted spot market ids is not matching spot market multipliers") + } + + for _, marketID := range t.BoostedSpotMarketIds { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + } + + for _, marketID := range t.BoostedDerivativeMarketIds { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + } + + if len(t.BoostedDerivativeMarketIds) != len(t.DerivativeMarketMultipliers) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "boosted derivative market ids is not matching derivative market multipliers") + } + + hasDuplicatesInMarkets := types.HasDuplicates(t.BoostedSpotMarketIds) || types.HasDuplicates(t.BoostedDerivativeMarketIds) + if hasDuplicatesInMarkets { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign contains duplicate boosted market ids") + } + + for _, multiplier := range t.SpotMarketMultipliers { + if IsZeroOrNilDec(multiplier.MakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "spot market maker multiplier cannot be zero or nil") + } + + if IsZeroOrNilDec(multiplier.TakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "spot market taker multiplier cannot be zero or nil") + } + + if !SafeIsPositiveDec(multiplier.MakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "spot market maker multiplier cannot be negative") + } + + if !SafeIsPositiveDec(multiplier.TakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "spot market taker multiplier cannot be negative") + } + } + + for _, multiplier := range t.DerivativeMarketMultipliers { + if IsZeroOrNilDec(multiplier.MakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "derivative market maker multiplier cannot be zero or nil") + } + + if IsZeroOrNilDec(multiplier.TakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "derivative market taker multiplier cannot be zero or nil") + } + + if !SafeIsPositiveDec(multiplier.MakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "derivative market maker multiplier cannot be negative") + } + + if !SafeIsPositiveDec(multiplier.TakerPointsMultiplier) { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "derivative market taker multiplier cannot be negative") + } + } + return nil +} + +func (c *TradingRewardCampaignInfo) ValidateBasic() error { + if c == nil { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign info cannot be nil") + } + + if c.CampaignDurationSeconds <= 0 { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign duration cannot be zero") + } + + if len(c.QuoteDenoms) == 0 { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign quote denoms cannot be nil") + } + + hasTradingRewardBoostInfoDefined := c.TradingRewardBoostInfo != nil + if hasTradingRewardBoostInfoDefined { + if err := c.TradingRewardBoostInfo.ValidateBasic(); err != nil { + return err + } + } + + for _, marketID := range c.DisqualifiedMarketIds { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + } + + hasDuplicatesInDisqualifiedMarkets := types.HasDuplicates(c.DisqualifiedMarketIds) + if hasDuplicatesInDisqualifiedMarkets { + return errors.Wrap(types.ErrInvalidTradingRewardCampaign, "campaign contains duplicate disqualified market ids") + } + + return nil +} + +func validateCampaignRewardPool(pool *CampaignRewardPool, campaignDurationSeconds, prevStartTimestamp int64) (int64, error) { + if pool == nil { + return 0, errors.Wrap(types.ErrInvalidTradingRewardCampaign, "new campaign reward pool cannot be nil") + } + + if pool.StartTimestamp <= prevStartTimestamp { + return 0, errors.Wrap(types.ErrInvalidTradingRewardCampaign, "reward pool start timestamps must be in ascending order") + } + + hasValidStartTimestamp := prevStartTimestamp == 0 || pool.StartTimestamp == (prevStartTimestamp+campaignDurationSeconds) + if !hasValidStartTimestamp { + return 0, errors.Wrap(types.ErrInvalidTradingRewardCampaign, "start timestamps not matching campaign duration") + } + + prevStartTimestamp = pool.StartTimestamp + + hasDuplicatesInEpochRewards := types.HasDuplicatesCoin(pool.MaxCampaignRewards) + if hasDuplicatesInEpochRewards { + return 0, errors.Wrap(types.ErrInvalidTradingRewardCampaign, "reward pool campaign contains duplicate market coins") + } + + for _, epochRewardDenom := range pool.MaxCampaignRewards { + if !epochRewardDenom.IsValid() { + return 0, errors.Wrap(sdkerrors.ErrInvalidCoins, epochRewardDenom.String()) + } + + if IsZeroOrNilInt(epochRewardDenom.Amount) { + return 0, errors.Wrap(types.ErrInvalidTradingRewardCampaign, "reward pool contains zero or nil reward amount") + } + } + + return prevStartTimestamp, nil +} + +// NewFeeDiscountProposal returns new instance of FeeDiscountProposal +func NewFeeDiscountProposal(title, description string, schedule *FeeDiscountSchedule) *FeeDiscountProposal { + return &FeeDiscountProposal{ + Title: title, + Description: description, + Schedule: schedule, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &FeeDiscountProposal{} + +// GetTitle returns the title of this proposal +func (p *FeeDiscountProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *FeeDiscountProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *FeeDiscountProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *FeeDiscountProposal) ProposalType() string { + return ProposalTypeFeeDiscountProposal +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *FeeDiscountProposal) ValidateBasic() error { + if p.Schedule == nil { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule cannot be nil") + } + + if p.Schedule.BucketCount < 2 { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule must have at least 2 buckets") + } + + if p.Schedule.BucketDuration < 10 { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule must have have bucket durations of at least 10 seconds") + } + + if types.HasDuplicates(p.Schedule.QuoteDenoms) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule cannot have duplicate quote denoms") + } + + for _, marketID := range p.Schedule.DisqualifiedMarketIds { + if !types.IsHexHash(marketID) { + return errors.Wrap(types.ErrMarketInvalid, marketID) + } + } + + if types.HasDuplicates(p.Schedule.DisqualifiedMarketIds) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule cannot have duplicate disqualified market ids") + } + + if len(p.Schedule.TierInfos) < 1 { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "new fee discount schedule must have at least one discount tier") + } + + for idx, tierInfo := range p.Schedule.TierInfos { + if err := tierInfo.ValidateBasic(); err != nil { + return err + } + + if idx > 0 { + prevTierInfo := p.Schedule.TierInfos[idx-1] + + if prevTierInfo.MakerDiscountRate.GT(tierInfo.MakerDiscountRate) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "successive MakerDiscountRates must be equal or larger than those of lower tiers") + } + + if prevTierInfo.TakerDiscountRate.GT(tierInfo.TakerDiscountRate) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "successive TakerDiscountRates must be equal or larger than those of lower tiers") + } + + if prevTierInfo.StakedAmount.GT(tierInfo.StakedAmount) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "successive StakedAmount must be equal or larger than those of lower tiers") + } + + if prevTierInfo.Volume.GT(tierInfo.Volume) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "successive Volume must be equal or larger than those of lower tiers") + } + } + } + + return govtypes.ValidateAbstract(p) +} + +func (t *FeeDiscountTierInfo) ValidateBasic() error { + if !SafeIsNonNegativeDec(t.MakerDiscountRate) || t.MakerDiscountRate.GT(math.LegacyOneDec()) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "MakerDiscountRate must be between 0 and 1") + } + + if !SafeIsNonNegativeDec(t.TakerDiscountRate) || t.TakerDiscountRate.GT(math.LegacyOneDec()) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "TakerDiscountRate must be between 0 and 1") + } + + if !SafeIsPositiveInt(t.StakedAmount) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "StakedAmount must be non-negative") + } + + if !SafeIsPositiveDec(t.Volume) { + return errors.Wrap(types.ErrInvalidFeeDiscountSchedule, "Volume must be non-negative") + } + return nil +} + +// Implements Proposal Interface +var _ govtypes.Content = &BatchCommunityPoolSpendProposal{} + +// GetTitle returns the title of this proposal. +func (p *BatchCommunityPoolSpendProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *BatchCommunityPoolSpendProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *BatchCommunityPoolSpendProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *BatchCommunityPoolSpendProposal) ProposalType() string { + return ProposalTypeBatchCommunityPoolSpendProposal +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *BatchCommunityPoolSpendProposal) ValidateBasic() error { + for _, proposal := range p.Proposals { + if err := proposal.ValidateBasic(); err != nil { + return err + } + } + return govtypes.ValidateAbstract(p) +} + +// NewBinaryOptionsMarketLaunchProposal returns new instance of BinaryOptionsMarketLaunchProposal +func NewBinaryOptionsMarketLaunchProposal( + title, description, ticker, oracleSymbol, oracleProvider string, + oracleType oracletypes.OracleType, oracleScaleFactor uint32, + expirationTimestamp, settlementTimestamp int64, + admin, quoteDenom string, + makerFeeRate, takerFeeRate, minPriceTickSize, minQuantityTickSize, minNotional math.LegacyDec, + +) *BinaryOptionsMarketLaunchProposal { + return &BinaryOptionsMarketLaunchProposal{ + Title: title, + Description: description, + Ticker: ticker, + OracleSymbol: oracleSymbol, + OracleProvider: oracleProvider, + OracleType: oracleType, + OracleScaleFactor: oracleScaleFactor, + ExpirationTimestamp: expirationTimestamp, + SettlementTimestamp: settlementTimestamp, + Admin: admin, + QuoteDenom: quoteDenom, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &BinaryOptionsMarketLaunchProposal{} + +// GetTitle returns the title of this proposal. +func (p *BinaryOptionsMarketLaunchProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal. +func (p *BinaryOptionsMarketLaunchProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *BinaryOptionsMarketLaunchProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *BinaryOptionsMarketLaunchProposal) ProposalType() string { + return ProposalTypeBinaryOptionsMarketLaunch +} + +// ValidateBasic returns ValidateBasic result of a perpetual market launch proposal. +func (p *BinaryOptionsMarketLaunchProposal) ValidateBasic() error { + if p.Ticker == "" || len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not be empty or exceed %d characters", types.MaxTickerLength) + } + if p.OracleSymbol == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle symbol should not be empty") + } + if p.OracleProvider == "" { + return errors.Wrap(types.ErrInvalidOracle, "oracle provider should not be empty") + } + if p.OracleType != oracletypes.OracleType_Provider { + return errors.Wrap(types.ErrInvalidOracleType, p.OracleType.String()) + } + if p.OracleScaleFactor > types.MaxOracleScaleFactor { + return types.ErrExceedsMaxOracleScaleFactor + } + + if p.ExpirationTimestamp >= p.SettlementTimestamp || p.ExpirationTimestamp < 0 || p.SettlementTimestamp < 0 { + return types.ErrInvalidExpiry + } + + if p.Admin != "" { + _, err := sdk.AccAddressFromBech32(p.Admin) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidAddress, p.Admin) + } + } + if p.QuoteDenom == "" { + return errors.Wrap(types.ErrInvalidQuoteDenom, "quote denom should not be empty") + } + if err := types.ValidateMakerFee(p.MakerFeeRate); err != nil { + return err + } + if err := types.ValidateFee(p.TakerFeeRate); err != nil { + return err + } + + if p.MakerFeeRate.GT(p.TakerFeeRate) { + return types.ErrFeeRatesRelation + } + + if err := types.ValidateTickSize(p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + if err := types.ValidateTickSize(p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + if err := types.ValidateMinNotional(p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + + return govtypes.ValidateAbstract(p) +} + +// NewBinaryOptionsMarketParamUpdateProposal returns new instance of BinaryOptionsMarketParamUpdateProposal +func NewBinaryOptionsMarketParamUpdateProposal( + title string, + description string, + marketID string, + makerFeeRate, takerFeeRate, relayerFeeShareRate, minPriceTickSize, minQuantityTickSize, minNotional *math.LegacyDec, + expirationTimestamp, settlementTimestamp int64, + admin string, + status MarketStatus, + oracleParams *ProviderOracleParams, + ticker string, +) *BinaryOptionsMarketParamUpdateProposal { + return &BinaryOptionsMarketParamUpdateProposal{ + Title: title, + Description: description, + MarketId: marketID, + MakerFeeRate: makerFeeRate, + TakerFeeRate: takerFeeRate, + RelayerFeeShareRate: relayerFeeShareRate, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, + ExpirationTimestamp: expirationTimestamp, + SettlementTimestamp: settlementTimestamp, + Admin: admin, + Status: status, + OracleParams: oracleParams, + Ticker: ticker, + } +} + +// Implements Proposal Interface +var _ govtypes.Content = &BinaryOptionsMarketParamUpdateProposal{} + +// GetTitle returns the title of this proposal +func (p *BinaryOptionsMarketParamUpdateProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *BinaryOptionsMarketParamUpdateProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *BinaryOptionsMarketParamUpdateProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *BinaryOptionsMarketParamUpdateProposal) ProposalType() string { + return ProposalTypeBinaryOptionsMarketParamUpdate +} + +// ValidateBasic returns ValidateBasic result of this proposal. +func (p *BinaryOptionsMarketParamUpdateProposal) ValidateBasic() error { + if !types.IsHexHash(p.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, p.MarketId) + } + if p.MakerFeeRate == nil && + p.TakerFeeRate == nil && + p.RelayerFeeShareRate == nil && + p.MinPriceTickSize == nil && + p.MinQuantityTickSize == nil && + p.MinNotional == nil && + p.Status == MarketStatus_Unspecified && + p.ExpirationTimestamp == 0 && + p.SettlementTimestamp == 0 && + p.SettlementPrice == nil && + p.Admin == "" && + p.OracleParams == nil { + return errors.Wrap(gov.ErrInvalidProposalContent, "At least one field should not be nil") + } + + if p.MakerFeeRate != nil { + if err := types.ValidateMakerFee(*p.MakerFeeRate); err != nil { + return err + } + } + if p.TakerFeeRate != nil { + if err := types.ValidateFee(*p.TakerFeeRate); err != nil { + return err + } + } + + if p.RelayerFeeShareRate != nil { + if err := types.ValidateFee(*p.RelayerFeeShareRate); err != nil { + return err + } + } + + if p.MinPriceTickSize != nil { + if err := types.ValidateTickSize(*p.MinPriceTickSize); err != nil { + return errors.Wrap(types.ErrInvalidPriceTickSize, err.Error()) + } + } + + if p.MinQuantityTickSize != nil { + if err := types.ValidateTickSize(*p.MinQuantityTickSize); err != nil { + return errors.Wrap(types.ErrInvalidQuantityTickSize, err.Error()) + } + } + + if p.MinNotional != nil { + if err := types.ValidateMinNotional(*p.MinNotional); err != nil { + return errors.Wrap(types.ErrInvalidNotional, err.Error()) + } + } + + if p.ExpirationTimestamp != 0 && p.SettlementTimestamp != 0 { + if p.ExpirationTimestamp >= p.SettlementTimestamp || p.ExpirationTimestamp < 0 || p.SettlementTimestamp < 0 { + return types.ErrInvalidExpiry + } + } + + if p.SettlementTimestamp < 0 { + return types.ErrInvalidSettlement + } + + if p.Admin != "" { + if _, err := sdk.AccAddressFromBech32(p.Admin); err != nil { + return err + } + } + + if len(p.Ticker) > types.MaxTickerLength { + return errors.Wrapf(types.ErrInvalidTicker, "ticker should not exceed %d characters", types.MaxTickerLength) + } + + // price is either nil (not set), -1 (demolish with refund) or [0..1] (demolish with settle) + switch { + case p.SettlementPrice == nil, + p.SettlementPrice.IsNil(): + // ok + case p.SettlementPrice.Equal(BinaryOptionsMarketRefundFlagPrice), + p.SettlementPrice.GTE(math.LegacyZeroDec()) && p.SettlementPrice.LTE(types.MaxBinaryOptionsOrderPrice): + if p.Status != MarketStatus_Demolished { + return errors.Wrapf(types.ErrInvalidMarketStatus, "status should be set to demolished when the settlement price is set, status: %s", p.Status.String()) + } + // ok + default: + return errors.Wrap(types.ErrInvalidPrice, p.SettlementPrice.String()) + } + + switch p.Status { + case + MarketStatus_Unspecified, + MarketStatus_Demolished: + default: + return errors.Wrap(types.ErrInvalidMarketStatus, p.Status.String()) + } + + if p.OracleParams != nil { + if err := p.OracleParams.ValidateBasic(); err != nil { + return err + } + } + + return govtypes.ValidateAbstract(p) +} + +// Implements Proposal Interface +var _ govtypes.Content = &AtomicMarketOrderFeeMultiplierScheduleProposal{} + +// GetTitle returns the title of this proposal +func (p *AtomicMarketOrderFeeMultiplierScheduleProposal) GetTitle() string { + return p.Title +} + +// GetDescription returns the description of this proposal +func (p *AtomicMarketOrderFeeMultiplierScheduleProposal) GetDescription() string { + return p.Description +} + +// ProposalRoute returns router key of this proposal. +func (p *AtomicMarketOrderFeeMultiplierScheduleProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns proposal type of this proposal. +func (p *AtomicMarketOrderFeeMultiplierScheduleProposal) ProposalType() string { + return ProposalAtomicMarketOrderFeeMultiplierSchedule +} + +func (p *AtomicMarketOrderFeeMultiplierScheduleProposal) ValidateBasic() error { + if len(p.MarketFeeMultipliers) == 0 { + return errors.Wrap(gov.ErrInvalidProposalContent, "At least one fee multiplier should be provided") + } + for _, m := range p.MarketFeeMultipliers { + if !types.IsHexHash(m.MarketId) { + return errors.Wrap(types.ErrMarketInvalid, m.MarketId) + } + multiplier := m.FeeMultiplier + if multiplier.IsNil() { + return fmt.Errorf("atomic taker fee multiplier cannot be nil: %v", multiplier) + } + + if multiplier.LT(math.LegacyOneDec()) { + return fmt.Errorf("atomic taker fee multiplier cannot be less than 1: %v", multiplier) + } + + if multiplier.GT(types.MaxFeeMultiplier) { + return fmt.Errorf("atomicMarketOrderFeeMultiplier cannot be bigger than %v: %v", multiplier, types.MaxFeeMultiplier) + } + } + return govtypes.ValidateAbstract(p) +} diff --git a/chain/exchange/types/v2/proposal.pb.go b/chain/exchange/types/v2/proposal.pb.go new file mode 100644 index 00000000..1612c8e6 --- /dev/null +++ b/chain/exchange/types/v2/proposal.pb.go @@ -0,0 +1,10580 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/proposal.proto + +package v2 + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + types1 "github.com/cosmos/cosmos-sdk/x/distribution/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExchangeType int32 + +const ( + ExchangeType_EXCHANGE_UNSPECIFIED ExchangeType = 0 + ExchangeType_SPOT ExchangeType = 1 + ExchangeType_DERIVATIVES ExchangeType = 2 +) + +var ExchangeType_name = map[int32]string{ + 0: "EXCHANGE_UNSPECIFIED", + 1: "SPOT", + 2: "DERIVATIVES", +} + +var ExchangeType_value = map[string]int32{ + "EXCHANGE_UNSPECIFIED": 0, + "SPOT": 1, + "DERIVATIVES": 2, +} + +func (x ExchangeType) String() string { + return proto.EnumName(ExchangeType_name, int32(x)) +} + +func (ExchangeType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{0} +} + +type SpotMarketParamUpdateProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // maker_fee_rate defines the trade fee rate for makers on the spot market + MakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate,omitempty"` + // taker_fee_rate defines the trade fee rate for takers on the spot market + TakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate,omitempty"` + // relayer_fee_share_rate defines the relayer fee share rate for the spot + // market + RelayerFeeShareRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate,omitempty"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size,omitempty"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size,omitempty"` + Status MarketStatus `protobuf:"varint,9,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + Ticker string `protobuf:"bytes,10,opt,name=ticker,proto3" json:"ticker,omitempty"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional,omitempty"` + AdminInfo *AdminInfo `protobuf:"bytes,12,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,13,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,14,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *SpotMarketParamUpdateProposal) Reset() { *m = SpotMarketParamUpdateProposal{} } +func (m *SpotMarketParamUpdateProposal) String() string { return proto.CompactTextString(m) } +func (*SpotMarketParamUpdateProposal) ProtoMessage() {} +func (*SpotMarketParamUpdateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{0} +} +func (m *SpotMarketParamUpdateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotMarketParamUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotMarketParamUpdateProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotMarketParamUpdateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotMarketParamUpdateProposal.Merge(m, src) +} +func (m *SpotMarketParamUpdateProposal) XXX_Size() int { + return m.Size() +} +func (m *SpotMarketParamUpdateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_SpotMarketParamUpdateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotMarketParamUpdateProposal proto.InternalMessageInfo + +type ExchangeEnableProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ExchangeType ExchangeType `protobuf:"varint,3,opt,name=exchangeType,proto3,enum=injective.exchange.v2.ExchangeType" json:"exchangeType,omitempty"` +} + +func (m *ExchangeEnableProposal) Reset() { *m = ExchangeEnableProposal{} } +func (m *ExchangeEnableProposal) String() string { return proto.CompactTextString(m) } +func (*ExchangeEnableProposal) ProtoMessage() {} +func (*ExchangeEnableProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{1} +} +func (m *ExchangeEnableProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExchangeEnableProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExchangeEnableProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExchangeEnableProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExchangeEnableProposal.Merge(m, src) +} +func (m *ExchangeEnableProposal) XXX_Size() int { + return m.Size() +} +func (m *ExchangeEnableProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ExchangeEnableProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ExchangeEnableProposal proto.InternalMessageInfo + +type BatchExchangeModificationProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + SpotMarketParamUpdateProposals []*SpotMarketParamUpdateProposal `protobuf:"bytes,3,rep,name=spot_market_param_update_proposals,json=spotMarketParamUpdateProposals,proto3" json:"spot_market_param_update_proposals,omitempty"` + DerivativeMarketParamUpdateProposals []*DerivativeMarketParamUpdateProposal `protobuf:"bytes,4,rep,name=derivative_market_param_update_proposals,json=derivativeMarketParamUpdateProposals,proto3" json:"derivative_market_param_update_proposals,omitempty"` + SpotMarketLaunchProposals []*SpotMarketLaunchProposal `protobuf:"bytes,5,rep,name=spot_market_launch_proposals,json=spotMarketLaunchProposals,proto3" json:"spot_market_launch_proposals,omitempty"` + PerpetualMarketLaunchProposals []*PerpetualMarketLaunchProposal `protobuf:"bytes,6,rep,name=perpetual_market_launch_proposals,json=perpetualMarketLaunchProposals,proto3" json:"perpetual_market_launch_proposals,omitempty"` + ExpiryFuturesMarketLaunchProposals []*ExpiryFuturesMarketLaunchProposal `protobuf:"bytes,7,rep,name=expiry_futures_market_launch_proposals,json=expiryFuturesMarketLaunchProposals,proto3" json:"expiry_futures_market_launch_proposals,omitempty"` + TradingRewardCampaignUpdateProposal *TradingRewardCampaignUpdateProposal `protobuf:"bytes,8,opt,name=trading_reward_campaign_update_proposal,json=tradingRewardCampaignUpdateProposal,proto3" json:"trading_reward_campaign_update_proposal,omitempty"` + BinaryOptionsMarketLaunchProposals []*BinaryOptionsMarketLaunchProposal `protobuf:"bytes,9,rep,name=binary_options_market_launch_proposals,json=binaryOptionsMarketLaunchProposals,proto3" json:"binary_options_market_launch_proposals,omitempty"` + BinaryOptionsParamUpdateProposals []*BinaryOptionsMarketParamUpdateProposal `protobuf:"bytes,10,rep,name=binary_options_param_update_proposals,json=binaryOptionsParamUpdateProposals,proto3" json:"binary_options_param_update_proposals,omitempty"` + DenomDecimalsUpdateProposal *UpdateDenomDecimalsProposal `protobuf:"bytes,11,opt,name=denom_decimals_update_proposal,json=denomDecimalsUpdateProposal,proto3" json:"denom_decimals_update_proposal,omitempty"` + FeeDiscountProposal *FeeDiscountProposal `protobuf:"bytes,12,opt,name=fee_discount_proposal,json=feeDiscountProposal,proto3" json:"fee_discount_proposal,omitempty"` + MarketForcedSettlementProposals []*MarketForcedSettlementProposal `protobuf:"bytes,13,rep,name=market_forced_settlement_proposals,json=marketForcedSettlementProposals,proto3" json:"market_forced_settlement_proposals,omitempty"` +} + +func (m *BatchExchangeModificationProposal) Reset() { *m = BatchExchangeModificationProposal{} } +func (m *BatchExchangeModificationProposal) String() string { return proto.CompactTextString(m) } +func (*BatchExchangeModificationProposal) ProtoMessage() {} +func (*BatchExchangeModificationProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{2} +} +func (m *BatchExchangeModificationProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchExchangeModificationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchExchangeModificationProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchExchangeModificationProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchExchangeModificationProposal.Merge(m, src) +} +func (m *BatchExchangeModificationProposal) XXX_Size() int { + return m.Size() +} +func (m *BatchExchangeModificationProposal) XXX_DiscardUnknown() { + xxx_messageInfo_BatchExchangeModificationProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchExchangeModificationProposal proto.InternalMessageInfo + +// SpotMarketLaunchProposal defines a SDK message for proposing a new spot +// market through governance +type SpotMarketLaunchProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Ticker for the spot market. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the base currency + BaseDenom string `protobuf:"bytes,4,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + // type of coin to use as the quote currency + QuoteDenom string `protobuf:"bytes,5,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // min_price_tick_size defines the minimum tick size of the order's price + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // maker_fee_rate defines the fee percentage makers pay when trading + MakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate,omitempty"` + // taker_fee_rate defines the fee percentage takers pay when trading + TakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate,omitempty"` + // min_notional defines the minimum notional for orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + AdminInfo *AdminInfo `protobuf:"bytes,11,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,14,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,15,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *SpotMarketLaunchProposal) Reset() { *m = SpotMarketLaunchProposal{} } +func (m *SpotMarketLaunchProposal) String() string { return proto.CompactTextString(m) } +func (*SpotMarketLaunchProposal) ProtoMessage() {} +func (*SpotMarketLaunchProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{3} +} +func (m *SpotMarketLaunchProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotMarketLaunchProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotMarketLaunchProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotMarketLaunchProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotMarketLaunchProposal.Merge(m, src) +} +func (m *SpotMarketLaunchProposal) XXX_Size() int { + return m.Size() +} +func (m *SpotMarketLaunchProposal) XXX_DiscardUnknown() { + xxx_messageInfo_SpotMarketLaunchProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotMarketLaunchProposal proto.InternalMessageInfo + +// PerpetualMarketLaunchProposal defines a SDK message for proposing a new +// perpetual futures market through governance +type PerpetualMarketLaunchProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Ticker for the derivative market. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the base currency + QuoteDenom string `protobuf:"bytes,4,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,5,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,6,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,7,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,8,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // initial_margin_ratio defines the initial margin ratio for the derivative + // market + InitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio"` + // maintenance_margin_ratio defines the maintenance margin ratio for the + // derivative market + MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` + // maker_fee_rate defines the exchange trade fee for makers for the derivative + // market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the exchange trade fee for takers for the derivative + // market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + AdminInfo *AdminInfo `protobuf:"bytes,16,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` +} + +func (m *PerpetualMarketLaunchProposal) Reset() { *m = PerpetualMarketLaunchProposal{} } +func (m *PerpetualMarketLaunchProposal) String() string { return proto.CompactTextString(m) } +func (*PerpetualMarketLaunchProposal) ProtoMessage() {} +func (*PerpetualMarketLaunchProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{4} +} +func (m *PerpetualMarketLaunchProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerpetualMarketLaunchProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerpetualMarketLaunchProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerpetualMarketLaunchProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerpetualMarketLaunchProposal.Merge(m, src) +} +func (m *PerpetualMarketLaunchProposal) XXX_Size() int { + return m.Size() +} +func (m *PerpetualMarketLaunchProposal) XXX_DiscardUnknown() { + xxx_messageInfo_PerpetualMarketLaunchProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_PerpetualMarketLaunchProposal proto.InternalMessageInfo + +type BinaryOptionsMarketLaunchProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Ticker for the derivative contract. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Oracle symbol + OracleSymbol string `protobuf:"bytes,4,opt,name=oracle_symbol,json=oracleSymbol,proto3" json:"oracle_symbol,omitempty"` + // Oracle Provider + OracleProvider string `protobuf:"bytes,5,opt,name=oracle_provider,json=oracleProvider,proto3" json:"oracle_provider,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,6,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,7,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // expiration timestamp + ExpirationTimestamp int64 `protobuf:"varint,8,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration timestamp + SettlementTimestamp int64 `protobuf:"varint,9,opt,name=settlement_timestamp,json=settlementTimestamp,proto3" json:"settlement_timestamp,omitempty"` + // admin of the market + Admin string `protobuf:"bytes,10,opt,name=admin,proto3" json:"admin,omitempty"` + // Address of the quote currency denomination for the binary options contract + QuoteDenom string `protobuf:"bytes,11,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // maker_fee_rate defines the maker fee rate of a binary options market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the taker fee rate of a derivative market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // min_price_tick_size defines the minimum tick size that the price and margin + // required for orders in the market + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the quantity + // required for orders in the market + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + AdminPermissions uint32 `protobuf:"varint,17,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` +} + +func (m *BinaryOptionsMarketLaunchProposal) Reset() { *m = BinaryOptionsMarketLaunchProposal{} } +func (m *BinaryOptionsMarketLaunchProposal) String() string { return proto.CompactTextString(m) } +func (*BinaryOptionsMarketLaunchProposal) ProtoMessage() {} +func (*BinaryOptionsMarketLaunchProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{5} +} +func (m *BinaryOptionsMarketLaunchProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BinaryOptionsMarketLaunchProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BinaryOptionsMarketLaunchProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BinaryOptionsMarketLaunchProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_BinaryOptionsMarketLaunchProposal.Merge(m, src) +} +func (m *BinaryOptionsMarketLaunchProposal) XXX_Size() int { + return m.Size() +} +func (m *BinaryOptionsMarketLaunchProposal) XXX_DiscardUnknown() { + xxx_messageInfo_BinaryOptionsMarketLaunchProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_BinaryOptionsMarketLaunchProposal proto.InternalMessageInfo + +// ExpiryFuturesMarketLaunchProposal defines a SDK message for proposing a new +// expiry futures market through governance +type ExpiryFuturesMarketLaunchProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Ticker for the derivative market. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the quote currency + QuoteDenom string `protobuf:"bytes,4,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,5,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,6,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,7,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,8,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Expiration time of the market + Expiry int64 `protobuf:"varint,9,opt,name=expiry,proto3" json:"expiry,omitempty"` + // initial_margin_ratio defines the initial margin ratio for the derivative + // market + InitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio"` + // maintenance_margin_ratio defines the maintenance margin ratio for the + // derivative market + MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` + // maker_fee_rate defines the exchange trade fee for makers for the derivative + // market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the exchange trade fee for takers for the derivative + // market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + AdminInfo *AdminInfo `protobuf:"bytes,17,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` +} + +func (m *ExpiryFuturesMarketLaunchProposal) Reset() { *m = ExpiryFuturesMarketLaunchProposal{} } +func (m *ExpiryFuturesMarketLaunchProposal) String() string { return proto.CompactTextString(m) } +func (*ExpiryFuturesMarketLaunchProposal) ProtoMessage() {} +func (*ExpiryFuturesMarketLaunchProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{6} +} +func (m *ExpiryFuturesMarketLaunchProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpiryFuturesMarketLaunchProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpiryFuturesMarketLaunchProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExpiryFuturesMarketLaunchProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpiryFuturesMarketLaunchProposal.Merge(m, src) +} +func (m *ExpiryFuturesMarketLaunchProposal) XXX_Size() int { + return m.Size() +} +func (m *ExpiryFuturesMarketLaunchProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ExpiryFuturesMarketLaunchProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpiryFuturesMarketLaunchProposal proto.InternalMessageInfo + +type DerivativeMarketParamUpdateProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // initial_margin_ratio defines the initial margin ratio for the derivative + // market + InitialMarginRatio *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio,omitempty"` + // maintenance_margin_ratio defines the maintenance margin ratio for the + // derivative market + MaintenanceMarginRatio *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio,omitempty"` + // maker_fee_rate defines the exchange trade fee for makers for the derivative + // market + MakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate,omitempty"` + // taker_fee_rate defines the exchange trade fee for takers for the derivative + // market + TakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate,omitempty"` + // relayer_fee_share_rate defines the relayer fee share rate for the + // derivative market + RelayerFeeShareRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate,omitempty"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size,omitempty"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size,omitempty"` + // hourly_interest_rate defines the hourly interest rate + HourlyInterestRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=HourlyInterestRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"HourlyInterestRate,omitempty"` + // hourly_funding_rate_cap defines the maximum absolute value of the hourly + // funding rate + HourlyFundingRateCap *cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=HourlyFundingRateCap,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"HourlyFundingRateCap,omitempty"` + Status MarketStatus `protobuf:"varint,13,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + OracleParams *OracleParams `protobuf:"bytes,14,opt,name=oracle_params,json=oracleParams,proto3" json:"oracle_params,omitempty"` + Ticker string `protobuf:"bytes,15,opt,name=ticker,proto3" json:"ticker,omitempty"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional,omitempty"` + AdminInfo *AdminInfo `protobuf:"bytes,17,opt,name=admin_info,json=adminInfo,proto3" json:"admin_info,omitempty"` +} + +func (m *DerivativeMarketParamUpdateProposal) Reset() { *m = DerivativeMarketParamUpdateProposal{} } +func (m *DerivativeMarketParamUpdateProposal) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarketParamUpdateProposal) ProtoMessage() {} +func (*DerivativeMarketParamUpdateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{7} +} +func (m *DerivativeMarketParamUpdateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarketParamUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarketParamUpdateProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarketParamUpdateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarketParamUpdateProposal.Merge(m, src) +} +func (m *DerivativeMarketParamUpdateProposal) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarketParamUpdateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarketParamUpdateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarketParamUpdateProposal proto.InternalMessageInfo + +type AdminInfo struct { + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + AdminPermissions uint32 `protobuf:"varint,2,opt,name=admin_permissions,json=adminPermissions,proto3" json:"admin_permissions,omitempty"` +} + +func (m *AdminInfo) Reset() { *m = AdminInfo{} } +func (m *AdminInfo) String() string { return proto.CompactTextString(m) } +func (*AdminInfo) ProtoMessage() {} +func (*AdminInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{8} +} +func (m *AdminInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AdminInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AdminInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AdminInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdminInfo.Merge(m, src) +} +func (m *AdminInfo) XXX_Size() int { + return m.Size() +} +func (m *AdminInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AdminInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AdminInfo proto.InternalMessageInfo + +func (m *AdminInfo) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *AdminInfo) GetAdminPermissions() uint32 { + if m != nil { + return m.AdminPermissions + } + return 0 +} + +type MarketForcedSettlementProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` +} + +func (m *MarketForcedSettlementProposal) Reset() { *m = MarketForcedSettlementProposal{} } +func (m *MarketForcedSettlementProposal) String() string { return proto.CompactTextString(m) } +func (*MarketForcedSettlementProposal) ProtoMessage() {} +func (*MarketForcedSettlementProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{9} +} +func (m *MarketForcedSettlementProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MarketForcedSettlementProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MarketForcedSettlementProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MarketForcedSettlementProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MarketForcedSettlementProposal.Merge(m, src) +} +func (m *MarketForcedSettlementProposal) XXX_Size() int { + return m.Size() +} +func (m *MarketForcedSettlementProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MarketForcedSettlementProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MarketForcedSettlementProposal proto.InternalMessageInfo + +type UpdateDenomDecimalsProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + DenomDecimals []*DenomDecimals `protobuf:"bytes,3,rep,name=denom_decimals,json=denomDecimals,proto3" json:"denom_decimals,omitempty"` +} + +func (m *UpdateDenomDecimalsProposal) Reset() { *m = UpdateDenomDecimalsProposal{} } +func (m *UpdateDenomDecimalsProposal) String() string { return proto.CompactTextString(m) } +func (*UpdateDenomDecimalsProposal) ProtoMessage() {} +func (*UpdateDenomDecimalsProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{10} +} +func (m *UpdateDenomDecimalsProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateDenomDecimalsProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateDenomDecimalsProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateDenomDecimalsProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateDenomDecimalsProposal.Merge(m, src) +} +func (m *UpdateDenomDecimalsProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateDenomDecimalsProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateDenomDecimalsProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateDenomDecimalsProposal proto.InternalMessageInfo + +type BinaryOptionsMarketParamUpdateProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // maker_fee_rate defines the exchange trade fee for makers for the derivative + // market + MakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate,omitempty"` + // taker_fee_rate defines the exchange trade fee for takers for the derivative + // market + TakerFeeRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate,omitempty"` + // relayer_fee_share_rate defines the relayer fee share rate for the + // derivative market + RelayerFeeShareRate *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=relayer_fee_share_rate,json=relayerFeeShareRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"relayer_fee_share_rate,omitempty"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size,omitempty"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize *cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size,omitempty"` + // expiration timestamp + ExpirationTimestamp int64 `protobuf:"varint,9,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration timestamp + SettlementTimestamp int64 `protobuf:"varint,10,opt,name=settlement_timestamp,json=settlementTimestamp,proto3" json:"settlement_timestamp,omitempty"` + // new price at which market will be settled + SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` + // admin of the market + Admin string `protobuf:"bytes,12,opt,name=admin,proto3" json:"admin,omitempty"` + Status MarketStatus `protobuf:"varint,13,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` + OracleParams *ProviderOracleParams `protobuf:"bytes,14,opt,name=oracle_params,json=oracleParams,proto3" json:"oracle_params,omitempty"` + Ticker string `protobuf:"bytes,15,opt,name=ticker,proto3" json:"ticker,omitempty"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional,omitempty"` +} + +func (m *BinaryOptionsMarketParamUpdateProposal) Reset() { + *m = BinaryOptionsMarketParamUpdateProposal{} +} +func (m *BinaryOptionsMarketParamUpdateProposal) String() string { return proto.CompactTextString(m) } +func (*BinaryOptionsMarketParamUpdateProposal) ProtoMessage() {} +func (*BinaryOptionsMarketParamUpdateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{11} +} +func (m *BinaryOptionsMarketParamUpdateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BinaryOptionsMarketParamUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BinaryOptionsMarketParamUpdateProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BinaryOptionsMarketParamUpdateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_BinaryOptionsMarketParamUpdateProposal.Merge(m, src) +} +func (m *BinaryOptionsMarketParamUpdateProposal) XXX_Size() int { + return m.Size() +} +func (m *BinaryOptionsMarketParamUpdateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_BinaryOptionsMarketParamUpdateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_BinaryOptionsMarketParamUpdateProposal proto.InternalMessageInfo + +type ProviderOracleParams struct { + // Oracle base currency + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + // Oracle quote currency + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,3,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,4,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` +} + +func (m *ProviderOracleParams) Reset() { *m = ProviderOracleParams{} } +func (m *ProviderOracleParams) String() string { return proto.CompactTextString(m) } +func (*ProviderOracleParams) ProtoMessage() {} +func (*ProviderOracleParams) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{12} +} +func (m *ProviderOracleParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProviderOracleParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProviderOracleParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProviderOracleParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderOracleParams.Merge(m, src) +} +func (m *ProviderOracleParams) XXX_Size() int { + return m.Size() +} +func (m *ProviderOracleParams) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderOracleParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderOracleParams proto.InternalMessageInfo + +func (m *ProviderOracleParams) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *ProviderOracleParams) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *ProviderOracleParams) GetOracleScaleFactor() uint32 { + if m != nil { + return m.OracleScaleFactor + } + return 0 +} + +func (m *ProviderOracleParams) GetOracleType() types.OracleType { + if m != nil { + return m.OracleType + } + return types.OracleType_Unspecified +} + +type OracleParams struct { + // Oracle base currency + OracleBase string `protobuf:"bytes,1,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,2,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,3,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Oracle type + OracleType types.OracleType `protobuf:"varint,4,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` +} + +func (m *OracleParams) Reset() { *m = OracleParams{} } +func (m *OracleParams) String() string { return proto.CompactTextString(m) } +func (*OracleParams) ProtoMessage() {} +func (*OracleParams) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{13} +} +func (m *OracleParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OracleParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OracleParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OracleParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_OracleParams.Merge(m, src) +} +func (m *OracleParams) XXX_Size() int { + return m.Size() +} +func (m *OracleParams) XXX_DiscardUnknown() { + xxx_messageInfo_OracleParams.DiscardUnknown(m) +} + +var xxx_messageInfo_OracleParams proto.InternalMessageInfo + +func (m *OracleParams) GetOracleBase() string { + if m != nil { + return m.OracleBase + } + return "" +} + +func (m *OracleParams) GetOracleQuote() string { + if m != nil { + return m.OracleQuote + } + return "" +} + +func (m *OracleParams) GetOracleScaleFactor() uint32 { + if m != nil { + return m.OracleScaleFactor + } + return 0 +} + +func (m *OracleParams) GetOracleType() types.OracleType { + if m != nil { + return m.OracleType + } + return types.OracleType_Unspecified +} + +type TradingRewardCampaignLaunchProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + CampaignInfo *TradingRewardCampaignInfo `protobuf:"bytes,3,opt,name=campaign_info,json=campaignInfo,proto3" json:"campaign_info,omitempty"` + CampaignRewardPools []*CampaignRewardPool `protobuf:"bytes,4,rep,name=campaign_reward_pools,json=campaignRewardPools,proto3" json:"campaign_reward_pools,omitempty"` +} + +func (m *TradingRewardCampaignLaunchProposal) Reset() { *m = TradingRewardCampaignLaunchProposal{} } +func (m *TradingRewardCampaignLaunchProposal) String() string { return proto.CompactTextString(m) } +func (*TradingRewardCampaignLaunchProposal) ProtoMessage() {} +func (*TradingRewardCampaignLaunchProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{14} +} +func (m *TradingRewardCampaignLaunchProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignLaunchProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignLaunchProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignLaunchProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignLaunchProposal.Merge(m, src) +} +func (m *TradingRewardCampaignLaunchProposal) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignLaunchProposal) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignLaunchProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignLaunchProposal proto.InternalMessageInfo + +type TradingRewardCampaignUpdateProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + CampaignInfo *TradingRewardCampaignInfo `protobuf:"bytes,3,opt,name=campaign_info,json=campaignInfo,proto3" json:"campaign_info,omitempty"` + CampaignRewardPoolsAdditions []*CampaignRewardPool `protobuf:"bytes,4,rep,name=campaign_reward_pools_additions,json=campaignRewardPoolsAdditions,proto3" json:"campaign_reward_pools_additions,omitempty"` + CampaignRewardPoolsUpdates []*CampaignRewardPool `protobuf:"bytes,5,rep,name=campaign_reward_pools_updates,json=campaignRewardPoolsUpdates,proto3" json:"campaign_reward_pools_updates,omitempty"` +} + +func (m *TradingRewardCampaignUpdateProposal) Reset() { *m = TradingRewardCampaignUpdateProposal{} } +func (m *TradingRewardCampaignUpdateProposal) String() string { return proto.CompactTextString(m) } +func (*TradingRewardCampaignUpdateProposal) ProtoMessage() {} +func (*TradingRewardCampaignUpdateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{15} +} +func (m *TradingRewardCampaignUpdateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardCampaignUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardCampaignUpdateProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardCampaignUpdateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardCampaignUpdateProposal.Merge(m, src) +} +func (m *TradingRewardCampaignUpdateProposal) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardCampaignUpdateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardCampaignUpdateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardCampaignUpdateProposal proto.InternalMessageInfo + +type RewardPointUpdate struct { + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // new_points overwrites the current trading reward points for the account + NewPoints cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=new_points,json=newPoints,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_points"` +} + +func (m *RewardPointUpdate) Reset() { *m = RewardPointUpdate{} } +func (m *RewardPointUpdate) String() string { return proto.CompactTextString(m) } +func (*RewardPointUpdate) ProtoMessage() {} +func (*RewardPointUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{16} +} +func (m *RewardPointUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RewardPointUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RewardPointUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RewardPointUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardPointUpdate.Merge(m, src) +} +func (m *RewardPointUpdate) XXX_Size() int { + return m.Size() +} +func (m *RewardPointUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_RewardPointUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_RewardPointUpdate proto.InternalMessageInfo + +func (m *RewardPointUpdate) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +type TradingRewardPendingPointsUpdateProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + PendingPoolTimestamp int64 `protobuf:"varint,3,opt,name=pending_pool_timestamp,json=pendingPoolTimestamp,proto3" json:"pending_pool_timestamp,omitempty"` + RewardPointUpdates []*RewardPointUpdate `protobuf:"bytes,4,rep,name=reward_point_updates,json=rewardPointUpdates,proto3" json:"reward_point_updates,omitempty"` +} + +func (m *TradingRewardPendingPointsUpdateProposal) Reset() { + *m = TradingRewardPendingPointsUpdateProposal{} +} +func (m *TradingRewardPendingPointsUpdateProposal) String() string { return proto.CompactTextString(m) } +func (*TradingRewardPendingPointsUpdateProposal) ProtoMessage() {} +func (*TradingRewardPendingPointsUpdateProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{17} +} +func (m *TradingRewardPendingPointsUpdateProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingRewardPendingPointsUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingRewardPendingPointsUpdateProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradingRewardPendingPointsUpdateProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingRewardPendingPointsUpdateProposal.Merge(m, src) +} +func (m *TradingRewardPendingPointsUpdateProposal) XXX_Size() int { + return m.Size() +} +func (m *TradingRewardPendingPointsUpdateProposal) XXX_DiscardUnknown() { + xxx_messageInfo_TradingRewardPendingPointsUpdateProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingRewardPendingPointsUpdateProposal proto.InternalMessageInfo + +type FeeDiscountProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Schedule *FeeDiscountSchedule `protobuf:"bytes,3,opt,name=schedule,proto3" json:"schedule,omitempty"` +} + +func (m *FeeDiscountProposal) Reset() { *m = FeeDiscountProposal{} } +func (m *FeeDiscountProposal) String() string { return proto.CompactTextString(m) } +func (*FeeDiscountProposal) ProtoMessage() {} +func (*FeeDiscountProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{18} +} +func (m *FeeDiscountProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeDiscountProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeDiscountProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeDiscountProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeDiscountProposal.Merge(m, src) +} +func (m *FeeDiscountProposal) XXX_Size() int { + return m.Size() +} +func (m *FeeDiscountProposal) XXX_DiscardUnknown() { + xxx_messageInfo_FeeDiscountProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeDiscountProposal proto.InternalMessageInfo + +type BatchCommunityPoolSpendProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Proposals []*types1.CommunityPoolSpendProposal `protobuf:"bytes,3,rep,name=proposals,proto3" json:"proposals,omitempty"` +} + +func (m *BatchCommunityPoolSpendProposal) Reset() { *m = BatchCommunityPoolSpendProposal{} } +func (m *BatchCommunityPoolSpendProposal) String() string { return proto.CompactTextString(m) } +func (*BatchCommunityPoolSpendProposal) ProtoMessage() {} +func (*BatchCommunityPoolSpendProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{19} +} +func (m *BatchCommunityPoolSpendProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchCommunityPoolSpendProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchCommunityPoolSpendProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BatchCommunityPoolSpendProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchCommunityPoolSpendProposal.Merge(m, src) +} +func (m *BatchCommunityPoolSpendProposal) XXX_Size() int { + return m.Size() +} +func (m *BatchCommunityPoolSpendProposal) XXX_DiscardUnknown() { + xxx_messageInfo_BatchCommunityPoolSpendProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchCommunityPoolSpendProposal proto.InternalMessageInfo + +// AtomicMarketOrderFeeMultiplierScheduleProposal defines a SDK message for +// proposing new atomic take fee multipliers for specified markets +type AtomicMarketOrderFeeMultiplierScheduleProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + MarketFeeMultipliers []*MarketFeeMultiplier `protobuf:"bytes,3,rep,name=market_fee_multipliers,json=marketFeeMultipliers,proto3" json:"market_fee_multipliers,omitempty"` +} + +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) Reset() { + *m = AtomicMarketOrderFeeMultiplierScheduleProposal{} +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) String() string { + return proto.CompactTextString(m) +} +func (*AtomicMarketOrderFeeMultiplierScheduleProposal) ProtoMessage() {} +func (*AtomicMarketOrderFeeMultiplierScheduleProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_0fb550654abc72c5, []int{20} +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AtomicMarketOrderFeeMultiplierScheduleProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_AtomicMarketOrderFeeMultiplierScheduleProposal.Merge(m, src) +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) XXX_Size() int { + return m.Size() +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) XXX_DiscardUnknown() { + xxx_messageInfo_AtomicMarketOrderFeeMultiplierScheduleProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_AtomicMarketOrderFeeMultiplierScheduleProposal proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("injective.exchange.v2.ExchangeType", ExchangeType_name, ExchangeType_value) + proto.RegisterType((*SpotMarketParamUpdateProposal)(nil), "injective.exchange.v2.SpotMarketParamUpdateProposal") + proto.RegisterType((*ExchangeEnableProposal)(nil), "injective.exchange.v2.ExchangeEnableProposal") + proto.RegisterType((*BatchExchangeModificationProposal)(nil), "injective.exchange.v2.BatchExchangeModificationProposal") + proto.RegisterType((*SpotMarketLaunchProposal)(nil), "injective.exchange.v2.SpotMarketLaunchProposal") + proto.RegisterType((*PerpetualMarketLaunchProposal)(nil), "injective.exchange.v2.PerpetualMarketLaunchProposal") + proto.RegisterType((*BinaryOptionsMarketLaunchProposal)(nil), "injective.exchange.v2.BinaryOptionsMarketLaunchProposal") + proto.RegisterType((*ExpiryFuturesMarketLaunchProposal)(nil), "injective.exchange.v2.ExpiryFuturesMarketLaunchProposal") + proto.RegisterType((*DerivativeMarketParamUpdateProposal)(nil), "injective.exchange.v2.DerivativeMarketParamUpdateProposal") + proto.RegisterType((*AdminInfo)(nil), "injective.exchange.v2.AdminInfo") + proto.RegisterType((*MarketForcedSettlementProposal)(nil), "injective.exchange.v2.MarketForcedSettlementProposal") + proto.RegisterType((*UpdateDenomDecimalsProposal)(nil), "injective.exchange.v2.UpdateDenomDecimalsProposal") + proto.RegisterType((*BinaryOptionsMarketParamUpdateProposal)(nil), "injective.exchange.v2.BinaryOptionsMarketParamUpdateProposal") + proto.RegisterType((*ProviderOracleParams)(nil), "injective.exchange.v2.ProviderOracleParams") + proto.RegisterType((*OracleParams)(nil), "injective.exchange.v2.OracleParams") + proto.RegisterType((*TradingRewardCampaignLaunchProposal)(nil), "injective.exchange.v2.TradingRewardCampaignLaunchProposal") + proto.RegisterType((*TradingRewardCampaignUpdateProposal)(nil), "injective.exchange.v2.TradingRewardCampaignUpdateProposal") + proto.RegisterType((*RewardPointUpdate)(nil), "injective.exchange.v2.RewardPointUpdate") + proto.RegisterType((*TradingRewardPendingPointsUpdateProposal)(nil), "injective.exchange.v2.TradingRewardPendingPointsUpdateProposal") + proto.RegisterType((*FeeDiscountProposal)(nil), "injective.exchange.v2.FeeDiscountProposal") + proto.RegisterType((*BatchCommunityPoolSpendProposal)(nil), "injective.exchange.v2.BatchCommunityPoolSpendProposal") + proto.RegisterType((*AtomicMarketOrderFeeMultiplierScheduleProposal)(nil), "injective.exchange.v2.AtomicMarketOrderFeeMultiplierScheduleProposal") +} + +func init() { + proto.RegisterFile("injective/exchange/v2/proposal.proto", fileDescriptor_0fb550654abc72c5) +} + +var fileDescriptor_0fb550654abc72c5 = []byte{ + // 2499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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0x70, 0xb9, 0x74, 0x7f, 0x7f, 0x4a, 0x99, 0x1f, 0x7b, 0xfa, 0x6c, 0x89, + 0xff, 0x66, 0xf1, 0xdb, 0xde, 0xd1, 0xf7, 0xde, 0xdd, 0xd8, 0xdf, 0x7b, 0x77, 0xa7, 0x3c, 0x35, + 0x38, 0x3f, 0xf9, 0xf4, 0xd9, 0x52, 0x94, 0xb4, 0x79, 0xfc, 0xf9, 0x8b, 0x05, 0xe5, 0x8b, 0x17, + 0x0b, 0xca, 0xdf, 0x5e, 0x2c, 0x28, 0x9f, 0xbc, 0x5c, 0x18, 0xf8, 0xe2, 0xe5, 0xc2, 0xc0, 0x5f, + 0x5e, 0x2e, 0x0c, 0x3c, 0x7a, 0x70, 0x88, 0xe9, 0x51, 0xad, 0x52, 0x30, 0x5d, 0xbb, 0xb8, 0x17, + 0xc4, 0xf0, 0x0e, 0xac, 0x90, 0x62, 0x18, 0xd1, 0xb7, 0x4c, 0xd7, 0x47, 0xd1, 0xcf, 0x23, 0x88, + 0x9d, 0xa2, 0xed, 0xb2, 0xbe, 0x91, 0x3a, 0xca, 0x65, 0x58, 0x8b, 0x14, 0x4f, 0xd6, 0x2a, 0x23, + 0xfc, 0x0f, 0x13, 0xbe, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x26, 0x0c, 0xc2, 0x97, 0xf5, + 0x31, 0x00, 0x00, +} + +func (m *SpotMarketParamUpdateProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotMarketParamUpdateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotMarketParamUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x70 + } + if m.BaseDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x68 + } + if m.AdminInfo != nil { + { + size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.MinNotional != nil { + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x52 + } + if m.Status != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x48 + } + if m.MinQuantityTickSize != nil { + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.MinPriceTickSize != nil { + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.RelayerFeeShareRate != nil { + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.TakerFeeRate != nil { + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.MakerFeeRate != nil { + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintProposal(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExchangeEnableProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExchangeEnableProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExchangeEnableProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExchangeType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.ExchangeType)) + i-- + dAtA[i] = 0x18 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchExchangeModificationProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchExchangeModificationProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchExchangeModificationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketForcedSettlementProposals) > 0 { + for iNdEx := len(m.MarketForcedSettlementProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketForcedSettlementProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + } + if m.FeeDiscountProposal != nil { + { + size, err := m.FeeDiscountProposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.DenomDecimalsUpdateProposal != nil { + { + size, err := m.DenomDecimalsUpdateProposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if len(m.BinaryOptionsParamUpdateProposals) > 0 { + for iNdEx := len(m.BinaryOptionsParamUpdateProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BinaryOptionsParamUpdateProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.BinaryOptionsMarketLaunchProposals) > 0 { + for iNdEx := len(m.BinaryOptionsMarketLaunchProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BinaryOptionsMarketLaunchProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if m.TradingRewardCampaignUpdateProposal != nil { + { + size, err := m.TradingRewardCampaignUpdateProposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if len(m.ExpiryFuturesMarketLaunchProposals) > 0 { + for iNdEx := len(m.ExpiryFuturesMarketLaunchProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExpiryFuturesMarketLaunchProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.PerpetualMarketLaunchProposals) > 0 { + for iNdEx := len(m.PerpetualMarketLaunchProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PerpetualMarketLaunchProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.SpotMarketLaunchProposals) > 0 { + for iNdEx := len(m.SpotMarketLaunchProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotMarketLaunchProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.DerivativeMarketParamUpdateProposals) > 0 { + for iNdEx := len(m.DerivativeMarketParamUpdateProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeMarketParamUpdateProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.SpotMarketParamUpdateProposals) > 0 { + for iNdEx := len(m.SpotMarketParamUpdateProposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotMarketParamUpdateProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotMarketLaunchProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotMarketLaunchProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotMarketLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x78 + } + if m.BaseDecimals != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x70 + } + if m.AdminInfo != nil { + { + size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + if m.TakerFeeRate != nil { + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.MakerFeeRate != nil { + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintProposal(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x2a + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintProposal(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PerpetualMarketLaunchProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerpetualMarketLaunchProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerpetualMarketLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminInfo != nil { + { + size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if m.OracleType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x40 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x38 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x32 + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0x2a + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintProposal(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BinaryOptionsMarketLaunchProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BinaryOptionsMarketLaunchProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BinaryOptionsMarketLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminPermissions != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.AdminPermissions)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintProposal(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x5a + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x52 + } + if m.SettlementTimestamp != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.SettlementTimestamp)) + i-- + dAtA[i] = 0x48 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x40 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x38 + } + if m.OracleType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x30 + } + if len(m.OracleProvider) > 0 { + i -= len(m.OracleProvider) + copy(dAtA[i:], m.OracleProvider) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleProvider))) + i-- + dAtA[i] = 0x2a + } + if len(m.OracleSymbol) > 0 { + i -= len(m.OracleSymbol) + copy(dAtA[i:], m.OracleSymbol) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleSymbol))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExpiryFuturesMarketLaunchProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpiryFuturesMarketLaunchProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpiryFuturesMarketLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminInfo != nil { + { + size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + if m.Expiry != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.Expiry)) + i-- + dAtA[i] = 0x48 + } + if m.OracleType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x40 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x38 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x32 + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0x2a + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintProposal(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarketParamUpdateProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarketParamUpdateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarketParamUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminInfo != nil { + { + size, err := m.AdminInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if m.MinNotional != nil { + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x7a + } + if m.OracleParams != nil { + { + size, err := m.OracleParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if m.Status != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x68 + } + if m.HourlyFundingRateCap != nil { + { + size := m.HourlyFundingRateCap.Size() + i -= size + if _, err := m.HourlyFundingRateCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.HourlyInterestRate != nil { + { + size := m.HourlyInterestRate.Size() + i -= size + if _, err := m.HourlyInterestRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.MinQuantityTickSize != nil { + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.MinPriceTickSize != nil { + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.RelayerFeeShareRate != nil { + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.TakerFeeRate != nil { + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.MakerFeeRate != nil { + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.MaintenanceMarginRatio != nil { + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.InitialMarginRatio != nil { + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintProposal(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AdminInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AdminInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminPermissions != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.AdminPermissions)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MarketForcedSettlementProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MarketForcedSettlementProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MarketForcedSettlementProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SettlementPrice != nil { + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintProposal(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateDenomDecimalsProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateDenomDecimalsProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateDenomDecimalsProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DenomDecimals) > 0 { + for iNdEx := len(m.DenomDecimals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomDecimals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BinaryOptionsMarketParamUpdateProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BinaryOptionsMarketParamUpdateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BinaryOptionsMarketParamUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MinNotional != nil { + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x7a + } + if m.OracleParams != nil { + { + size, err := m.OracleParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if m.Status != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x68 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x62 + } + if m.SettlementPrice != nil { + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.SettlementTimestamp != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.SettlementTimestamp)) + i-- + dAtA[i] = 0x50 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x48 + } + if m.MinQuantityTickSize != nil { + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.MinPriceTickSize != nil { + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.RelayerFeeShareRate != nil { + { + size := m.RelayerFeeShareRate.Size() + i -= size + if _, err := m.RelayerFeeShareRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.TakerFeeRate != nil { + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.MakerFeeRate != nil { + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintProposal(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ProviderOracleParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProviderOracleParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProviderOracleParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OracleType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x20 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x18 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OracleParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OracleParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OracleParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OracleType != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x20 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x18 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x12 + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintProposal(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignLaunchProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignLaunchProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignLaunchProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CampaignRewardPools) > 0 { + for iNdEx := len(m.CampaignRewardPools) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CampaignRewardPools[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.CampaignInfo != nil { + { + size, err := m.CampaignInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardCampaignUpdateProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardCampaignUpdateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardCampaignUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CampaignRewardPoolsUpdates) > 0 { + for iNdEx := len(m.CampaignRewardPoolsUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CampaignRewardPoolsUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.CampaignRewardPoolsAdditions) > 0 { + for iNdEx := len(m.CampaignRewardPoolsAdditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CampaignRewardPoolsAdditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.CampaignInfo != nil { + { + size, err := m.CampaignInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RewardPointUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RewardPointUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RewardPointUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NewPoints.Size() + i -= size + if _, err := m.NewPoints.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintProposal(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingRewardPendingPointsUpdateProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradingRewardPendingPointsUpdateProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingRewardPendingPointsUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RewardPointUpdates) > 0 { + for iNdEx := len(m.RewardPointUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardPointUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.PendingPoolTimestamp != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.PendingPoolTimestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FeeDiscountProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FeeDiscountProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeDiscountProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Schedule != nil { + { + size, err := m.Schedule.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BatchCommunityPoolSpendProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BatchCommunityPoolSpendProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchCommunityPoolSpendProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Proposals) > 0 { + for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketFeeMultipliers) > 0 { + for iNdEx := len(m.MarketFeeMultipliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MarketFeeMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { + offset -= sovProposal(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SpotMarketParamUpdateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.MakerFeeRate != nil { + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.TakerFeeRate != nil { + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.RelayerFeeShareRate != nil { + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinPriceTickSize != nil { + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinQuantityTickSize != nil { + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovProposal(uint64(m.Status)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinNotional != nil { + l = m.MinNotional.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.AdminInfo != nil { + l = m.AdminInfo.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.BaseDecimals != 0 { + n += 1 + sovProposal(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovProposal(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *ExchangeEnableProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.ExchangeType != 0 { + n += 1 + sovProposal(uint64(m.ExchangeType)) + } + return n +} + +func (m *BatchExchangeModificationProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.SpotMarketParamUpdateProposals) > 0 { + for _, e := range m.SpotMarketParamUpdateProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.DerivativeMarketParamUpdateProposals) > 0 { + for _, e := range m.DerivativeMarketParamUpdateProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.SpotMarketLaunchProposals) > 0 { + for _, e := range m.SpotMarketLaunchProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.PerpetualMarketLaunchProposals) > 0 { + for _, e := range m.PerpetualMarketLaunchProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.ExpiryFuturesMarketLaunchProposals) > 0 { + for _, e := range m.ExpiryFuturesMarketLaunchProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if m.TradingRewardCampaignUpdateProposal != nil { + l = m.TradingRewardCampaignUpdateProposal.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.BinaryOptionsMarketLaunchProposals) > 0 { + for _, e := range m.BinaryOptionsMarketLaunchProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.BinaryOptionsParamUpdateProposals) > 0 { + for _, e := range m.BinaryOptionsParamUpdateProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if m.DenomDecimalsUpdateProposal != nil { + l = m.DenomDecimalsUpdateProposal.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.FeeDiscountProposal != nil { + l = m.FeeDiscountProposal.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.MarketForcedSettlementProposals) > 0 { + for _, e := range m.MarketForcedSettlementProposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *SpotMarketLaunchProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + if m.MakerFeeRate != nil { + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.TakerFeeRate != nil { + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + l = m.MinNotional.Size() + n += 1 + l + sovProposal(uint64(l)) + if m.AdminInfo != nil { + l = m.AdminInfo.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.BaseDecimals != 0 { + n += 1 + sovProposal(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovProposal(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *PerpetualMarketLaunchProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovProposal(uint64(m.OracleScaleFactor)) + } + if m.OracleType != 0 { + n += 1 + sovProposal(uint64(m.OracleType)) + } + l = m.InitialMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovProposal(uint64(l)) + if m.AdminInfo != nil { + l = m.AdminInfo.Size() + n += 2 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *BinaryOptionsMarketLaunchProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleSymbol) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleProvider) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovProposal(uint64(m.OracleType)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovProposal(uint64(m.OracleScaleFactor)) + } + if m.ExpirationTimestamp != 0 { + n += 1 + sovProposal(uint64(m.ExpirationTimestamp)) + } + if m.SettlementTimestamp != 0 { + n += 1 + sovProposal(uint64(m.SettlementTimestamp)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinNotional.Size() + n += 2 + l + sovProposal(uint64(l)) + if m.AdminPermissions != 0 { + n += 2 + sovProposal(uint64(m.AdminPermissions)) + } + return n +} + +func (m *ExpiryFuturesMarketLaunchProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovProposal(uint64(m.OracleScaleFactor)) + } + if m.OracleType != 0 { + n += 1 + sovProposal(uint64(m.OracleType)) + } + if m.Expiry != 0 { + n += 1 + sovProposal(uint64(m.Expiry)) + } + l = m.InitialMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.MinNotional.Size() + n += 2 + l + sovProposal(uint64(l)) + if m.AdminInfo != nil { + l = m.AdminInfo.Size() + n += 2 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *DerivativeMarketParamUpdateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.InitialMarginRatio != nil { + l = m.InitialMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MaintenanceMarginRatio != nil { + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MakerFeeRate != nil { + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.TakerFeeRate != nil { + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.RelayerFeeShareRate != nil { + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinPriceTickSize != nil { + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinQuantityTickSize != nil { + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.HourlyInterestRate != nil { + l = m.HourlyInterestRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.HourlyFundingRateCap != nil { + l = m.HourlyFundingRateCap.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovProposal(uint64(m.Status)) + } + if m.OracleParams != nil { + l = m.OracleParams.Size() + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinNotional != nil { + l = m.MinNotional.Size() + n += 2 + l + sovProposal(uint64(l)) + } + if m.AdminInfo != nil { + l = m.AdminInfo.Size() + n += 2 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *AdminInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.AdminPermissions != 0 { + n += 1 + sovProposal(uint64(m.AdminPermissions)) + } + return n +} + +func (m *MarketForcedSettlementProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.SettlementPrice != nil { + l = m.SettlementPrice.Size() + n += 1 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *UpdateDenomDecimalsProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.DenomDecimals) > 0 { + for _, e := range m.DenomDecimals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *BinaryOptionsMarketParamUpdateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.MakerFeeRate != nil { + l = m.MakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.TakerFeeRate != nil { + l = m.TakerFeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.RelayerFeeShareRate != nil { + l = m.RelayerFeeShareRate.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinPriceTickSize != nil { + l = m.MinPriceTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinQuantityTickSize != nil { + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if m.ExpirationTimestamp != 0 { + n += 1 + sovProposal(uint64(m.ExpirationTimestamp)) + } + if m.SettlementTimestamp != 0 { + n += 1 + sovProposal(uint64(m.SettlementTimestamp)) + } + if m.SettlementPrice != nil { + l = m.SettlementPrice.Size() + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovProposal(uint64(m.Status)) + } + if m.OracleParams != nil { + l = m.OracleParams.Size() + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.MinNotional != nil { + l = m.MinNotional.Size() + n += 2 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *ProviderOracleParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovProposal(uint64(m.OracleScaleFactor)) + } + if m.OracleType != 0 { + n += 1 + sovProposal(uint64(m.OracleType)) + } + return n +} + +func (m *OracleParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovProposal(uint64(m.OracleScaleFactor)) + } + if m.OracleType != 0 { + n += 1 + sovProposal(uint64(m.OracleType)) + } + return n +} + +func (m *TradingRewardCampaignLaunchProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.CampaignInfo != nil { + l = m.CampaignInfo.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.CampaignRewardPools) > 0 { + for _, e := range m.CampaignRewardPools { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *TradingRewardCampaignUpdateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.CampaignInfo != nil { + l = m.CampaignInfo.Size() + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.CampaignRewardPoolsAdditions) > 0 { + for _, e := range m.CampaignRewardPoolsAdditions { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + if len(m.CampaignRewardPoolsUpdates) > 0 { + for _, e := range m.CampaignRewardPoolsUpdates { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *RewardPointUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = m.NewPoints.Size() + n += 1 + l + sovProposal(uint64(l)) + return n +} + +func (m *TradingRewardPendingPointsUpdateProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.PendingPoolTimestamp != 0 { + n += 1 + sovProposal(uint64(m.PendingPoolTimestamp)) + } + if len(m.RewardPointUpdates) > 0 { + for _, e := range m.RewardPointUpdates { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *FeeDiscountProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.Schedule != nil { + l = m.Schedule.Size() + n += 1 + l + sovProposal(uint64(l)) + } + return n +} + +func (m *BatchCommunityPoolSpendProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.Proposals) > 0 { + for _, e := range m.Proposals { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.MarketFeeMultipliers) > 0 { + for _, e := range m.MarketFeeMultipliers { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + +func sovProposal(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProposal(x uint64) (n int) { + return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SpotMarketParamUpdateProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotMarketParamUpdateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotMarketParamUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MakerFeeRate = &v + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TakerFeeRate = &v + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.RelayerFeeShareRate = &v + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinPriceTickSize = &v + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinQuantityTickSize = &v + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinNotional = &v + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdminInfo == nil { + m.AdminInfo = &AdminInfo{} + } + if err := m.AdminInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExchangeEnableProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExchangeEnableProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExchangeEnableProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExchangeType", wireType) + } + m.ExchangeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExchangeType |= ExchangeType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchExchangeModificationProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchExchangeModificationProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchExchangeModificationProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketParamUpdateProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarketParamUpdateProposals = append(m.SpotMarketParamUpdateProposals, &SpotMarketParamUpdateProposal{}) + if err := m.SpotMarketParamUpdateProposals[len(m.SpotMarketParamUpdateProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarketParamUpdateProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarketParamUpdateProposals = append(m.DerivativeMarketParamUpdateProposals, &DerivativeMarketParamUpdateProposal{}) + if err := m.DerivativeMarketParamUpdateProposals[len(m.DerivativeMarketParamUpdateProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketLaunchProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarketLaunchProposals = append(m.SpotMarketLaunchProposals, &SpotMarketLaunchProposal{}) + if err := m.SpotMarketLaunchProposals[len(m.SpotMarketLaunchProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerpetualMarketLaunchProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PerpetualMarketLaunchProposals = append(m.PerpetualMarketLaunchProposals, &PerpetualMarketLaunchProposal{}) + if err := m.PerpetualMarketLaunchProposals[len(m.PerpetualMarketLaunchProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryFuturesMarketLaunchProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExpiryFuturesMarketLaunchProposals = append(m.ExpiryFuturesMarketLaunchProposals, &ExpiryFuturesMarketLaunchProposal{}) + if err := m.ExpiryFuturesMarketLaunchProposals[len(m.ExpiryFuturesMarketLaunchProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardCampaignUpdateProposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TradingRewardCampaignUpdateProposal == nil { + m.TradingRewardCampaignUpdateProposal = &TradingRewardCampaignUpdateProposal{} + } + if err := m.TradingRewardCampaignUpdateProposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsMarketLaunchProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsMarketLaunchProposals = append(m.BinaryOptionsMarketLaunchProposals, &BinaryOptionsMarketLaunchProposal{}) + if err := m.BinaryOptionsMarketLaunchProposals[len(m.BinaryOptionsMarketLaunchProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsParamUpdateProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsParamUpdateProposals = append(m.BinaryOptionsParamUpdateProposals, &BinaryOptionsMarketParamUpdateProposal{}) + if err := m.BinaryOptionsParamUpdateProposals[len(m.BinaryOptionsParamUpdateProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomDecimalsUpdateProposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DenomDecimalsUpdateProposal == nil { + m.DenomDecimalsUpdateProposal = &UpdateDenomDecimalsProposal{} + } + if err := m.DenomDecimalsUpdateProposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDiscountProposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeDiscountProposal == nil { + m.FeeDiscountProposal = &FeeDiscountProposal{} + } + if err := m.FeeDiscountProposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketForcedSettlementProposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketForcedSettlementProposals = append(m.MarketForcedSettlementProposals, &MarketForcedSettlementProposal{}) + if err := m.MarketForcedSettlementProposals[len(m.MarketForcedSettlementProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotMarketLaunchProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotMarketLaunchProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotMarketLaunchProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MakerFeeRate = &v + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TakerFeeRate = &v + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdminInfo == nil { + m.AdminInfo = &AdminInfo{} + } + if err := m.AdminInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerpetualMarketLaunchProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerpetualMarketLaunchProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerpetualMarketLaunchProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdminInfo == nil { + m.AdminInfo = &AdminInfo{} + } + if err := m.AdminInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BinaryOptionsMarketLaunchProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BinaryOptionsMarketLaunchProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryOptionsMarketLaunchProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleSymbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleSymbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementTimestamp", wireType) + } + m.SettlementTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettlementTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminPermissions", wireType) + } + m.AdminPermissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AdminPermissions |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpiryFuturesMarketLaunchProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpiryFuturesMarketLaunchProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpiryFuturesMarketLaunchProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + m.Expiry = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Expiry |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdminInfo == nil { + m.AdminInfo = &AdminInfo{} + } + if err := m.AdminInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarketParamUpdateProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarketParamUpdateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarketParamUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.InitialMarginRatio = &v + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MaintenanceMarginRatio = &v + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MakerFeeRate = &v + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TakerFeeRate = &v + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.RelayerFeeShareRate = &v + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinPriceTickSize = &v + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinQuantityTickSize = &v + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HourlyInterestRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.HourlyInterestRate = &v + if err := m.HourlyInterestRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HourlyFundingRateCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.HourlyFundingRateCap = &v + if err := m.HourlyFundingRateCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OracleParams == nil { + m.OracleParams = &OracleParams{} + } + if err := m.OracleParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinNotional = &v + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdminInfo == nil { + m.AdminInfo = &AdminInfo{} + } + if err := m.AdminInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AdminInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminPermissions", wireType) + } + m.AdminPermissions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AdminPermissions |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MarketForcedSettlementProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MarketForcedSettlementProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MarketForcedSettlementProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.SettlementPrice = &v + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateDenomDecimalsProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateDenomDecimalsProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateDenomDecimalsProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomDecimals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomDecimals = append(m.DenomDecimals, &DenomDecimals{}) + if err := m.DenomDecimals[len(m.DenomDecimals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BinaryOptionsMarketParamUpdateProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BinaryOptionsMarketParamUpdateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryOptionsMarketParamUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MakerFeeRate = &v + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.TakerFeeRate = &v + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerFeeShareRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.RelayerFeeShareRate = &v + if err := m.RelayerFeeShareRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinPriceTickSize = &v + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinQuantityTickSize = &v + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementTimestamp", wireType) + } + m.SettlementTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettlementTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.SettlementPrice = &v + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OracleParams == nil { + m.OracleParams = &ProviderOracleParams{} + } + if err := m.OracleParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MinNotional = &v + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProviderOracleParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProviderOracleParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProviderOracleParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OracleParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OracleParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OracleParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignLaunchProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignLaunchProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignLaunchProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CampaignInfo == nil { + m.CampaignInfo = &TradingRewardCampaignInfo{} + } + if err := m.CampaignInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignRewardPools", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CampaignRewardPools = append(m.CampaignRewardPools, &CampaignRewardPool{}) + if err := m.CampaignRewardPools[len(m.CampaignRewardPools)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardCampaignUpdateProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardCampaignUpdateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardCampaignUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CampaignInfo == nil { + m.CampaignInfo = &TradingRewardCampaignInfo{} + } + if err := m.CampaignInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignRewardPoolsAdditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CampaignRewardPoolsAdditions = append(m.CampaignRewardPoolsAdditions, &CampaignRewardPool{}) + if err := m.CampaignRewardPoolsAdditions[len(m.CampaignRewardPoolsAdditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CampaignRewardPoolsUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CampaignRewardPoolsUpdates = append(m.CampaignRewardPoolsUpdates, &CampaignRewardPool{}) + if err := m.CampaignRewardPoolsUpdates[len(m.CampaignRewardPoolsUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RewardPointUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RewardPointUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RewardPointUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPoints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewPoints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradingRewardPendingPointsUpdateProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradingRewardPendingPointsUpdateProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingRewardPendingPointsUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingPoolTimestamp", wireType) + } + m.PendingPoolTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PendingPoolTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardPointUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardPointUpdates = append(m.RewardPointUpdates, &RewardPointUpdate{}) + if err := m.RewardPointUpdates[len(m.RewardPointUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeDiscountProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeDiscountProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeDiscountProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Schedule == nil { + m.Schedule = &FeeDiscountSchedule{} + } + if err := m.Schedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BatchCommunityPoolSpendProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BatchCommunityPoolSpendProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchCommunityPoolSpendProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposals = append(m.Proposals, &types1.CommunityPoolSpendProposal{}) + if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AtomicMarketOrderFeeMultiplierScheduleProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AtomicMarketOrderFeeMultiplierScheduleProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AtomicMarketOrderFeeMultiplierScheduleProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketFeeMultipliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketFeeMultipliers = append(m.MarketFeeMultipliers, &MarketFeeMultiplier{}) + if err := m.MarketFeeMultipliers[len(m.MarketFeeMultipliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProposal(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProposal + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProposal + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProposal + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/query.go b/chain/exchange/types/v2/query.go new file mode 100644 index 00000000..c2689c70 --- /dev/null +++ b/chain/exchange/types/v2/query.go @@ -0,0 +1,122 @@ +package v2 + +import v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + +func NewV1FullSpotMarketFromV2(fullSpotMarket FullSpotMarket) v1.FullSpotMarket { + v1SpotMarket := NewV1SpotMarketFromV2(*fullSpotMarket.Market) + newFullSpotMarket := v1.FullSpotMarket{ + Market: &v1SpotMarket, + } + + if fullSpotMarket.MidPriceAndTob != nil { + v1MidPriceAndTOB := NewV1MidPriceAndTOBFromV2(fullSpotMarket.Market, *fullSpotMarket.MidPriceAndTob) + newFullSpotMarket.MidPriceAndTob = &v1MidPriceAndTOB + } + + return newFullSpotMarket +} + +func NewV1FullDerivativeMarketFromV2(fullDerivativeMarket FullDerivativeMarket) v1.FullDerivativeMarket { + v1FullMarket := v1.FullDerivativeMarket{} + + switch info := fullDerivativeMarket.Info.(type) { + case *FullDerivativeMarket_FuturesInfo: + v1FuturesInfo := NewV1FuturesInfoFromV2(fullDerivativeMarket.Market, *info) + v1FullMarket.Info = &v1FuturesInfo + case *FullDerivativeMarket_PerpetualInfo: + v1PerpetualInfo := NewV1PerpetualInfoFromV2(fullDerivativeMarket.Market, *info) + v1FullMarket.Info = &v1PerpetualInfo + } + + v1FullMarket.MarkPrice = fullDerivativeMarket.Market.PriceToChainFormat(fullDerivativeMarket.MarkPrice) + + v1DerivativeMarket := NewV1DerivativeMarketFromV2(*fullDerivativeMarket.Market) + v1FullMarket.Market = &v1DerivativeMarket + + if fullDerivativeMarket.MidPriceAndTob != nil { + v1MidPriceAndTOB := NewV1MidPriceAndTOBFromV2(fullDerivativeMarket.Market, *fullDerivativeMarket.MidPriceAndTob) + v1FullMarket.MidPriceAndTob = &v1MidPriceAndTOB + } + + return v1FullMarket +} + +func NewV1MidPriceAndTOBFromV2(market MarketInterface, midPriceAndTOB MidPriceAndTOB) v1.MidPriceAndTOB { + chainFormatMidPrice := market.PriceToChainFormat(*midPriceAndTOB.MidPrice) + chainFormatBestBuyPrice := market.PriceToChainFormat(*midPriceAndTOB.BestBuyPrice) + chainFormatBestSellPrice := market.PriceToChainFormat(*midPriceAndTOB.BestSellPrice) + return v1.MidPriceAndTOB{ + MidPrice: &chainFormatMidPrice, + BestBuyPrice: &chainFormatBestBuyPrice, + BestSellPrice: &chainFormatBestSellPrice, + } +} + +func NewV1FuturesInfoFromV2(market MarketInterface, info FullDerivativeMarket_FuturesInfo) v1.FullDerivativeMarket_FuturesInfo { + v1FuturesInfo := v1.ExpiryFuturesMarketInfo{ + MarketId: info.FuturesInfo.MarketId, + ExpirationTimestamp: info.FuturesInfo.ExpirationTimestamp, + TwapStartTimestamp: info.FuturesInfo.TwapStartTimestamp, + ExpirationTwapStartPriceCumulative: market.PriceToChainFormat(info.FuturesInfo.ExpirationTwapStartPriceCumulative), + SettlementPrice: market.PriceToChainFormat(info.FuturesInfo.SettlementPrice), + } + return v1.FullDerivativeMarket_FuturesInfo{ + FuturesInfo: &v1FuturesInfo, + } +} + +func NewV1PerpetualInfoFromV2(market MarketInterface, perpetualInfo FullDerivativeMarket_PerpetualInfo) v1.FullDerivativeMarket_PerpetualInfo { + v1PerpetualMarketInfo := NewV1PerpetualMarketInfoFromV2(*perpetualInfo.PerpetualInfo.MarketInfo) + v1FundingInfo := NewV1FundingInfoFromV2(market, *perpetualInfo.PerpetualInfo.FundingInfo) + return v1.FullDerivativeMarket_PerpetualInfo{ + PerpetualInfo: &v1.PerpetualMarketState{ + MarketInfo: &v1PerpetualMarketInfo, + FundingInfo: &v1FundingInfo, + }, + } +} + +func NewV1FundingInfoFromV2(market MarketInterface, fundingInfo PerpetualMarketFunding) v1.PerpetualMarketFunding { + return v1.PerpetualMarketFunding{ + CumulativeFunding: market.NotionalToChainFormat(fundingInfo.CumulativeFunding), + CumulativePrice: market.PriceToChainFormat(fundingInfo.CumulativePrice), + LastTimestamp: fundingInfo.LastTimestamp, + } +} + +func NewV1PerpetualMarketInfoFromV2(perpetualMarketInfo PerpetualMarketInfo) v1.PerpetualMarketInfo { + return v1.PerpetualMarketInfo{ + MarketId: perpetualMarketInfo.MarketId, + HourlyFundingRateCap: perpetualMarketInfo.HourlyFundingRateCap, + HourlyInterestRate: perpetualMarketInfo.HourlyInterestRate, + NextFundingTimestamp: perpetualMarketInfo.NextFundingTimestamp, + FundingInterval: perpetualMarketInfo.FundingInterval, + } +} + +func NewV1TrimmedDerivativeLimitOrderFromV2(market MarketInterface, trimmedOrder TrimmedDerivativeLimitOrder) v1.TrimmedDerivativeLimitOrder { + chainFormatPrice := market.PriceToChainFormat(trimmedOrder.Price) + chainFormatQuantity := market.QuantityToChainFormat(trimmedOrder.Quantity) + chainFormatMargin := market.NotionalToChainFormat(trimmedOrder.Margin) + chainFormatFillable := market.QuantityToChainFormat(trimmedOrder.Fillable) + return v1.TrimmedDerivativeLimitOrder{ + Price: chainFormatPrice, + Quantity: chainFormatQuantity, + Margin: chainFormatMargin, + Fillable: chainFormatFillable, + IsBuy: trimmedOrder.IsBuy, + OrderHash: trimmedOrder.OrderHash, + Cid: trimmedOrder.Cid, + } +} + +func NewV1TrimmedSpotLimitOrderFromV2(market MarketInterface, trimmedOrder *TrimmedSpotLimitOrder) *v1.TrimmedSpotLimitOrder { + return &v1.TrimmedSpotLimitOrder{ + Price: market.PriceToChainFormat(trimmedOrder.Price), + Quantity: market.QuantityToChainFormat(trimmedOrder.Quantity), + Fillable: market.QuantityToChainFormat(trimmedOrder.Fillable), + IsBuy: trimmedOrder.IsBuy, + OrderHash: trimmedOrder.OrderHash, + Cid: trimmedOrder.Cid, + } +} diff --git a/chain/exchange/types/v2/query.pb.go b/chain/exchange/types/v2/query.pb.go new file mode 100644 index 00000000..74c20c7d --- /dev/null +++ b/chain/exchange/types/v2/query.pb.go @@ -0,0 +1,31892 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/query.proto + +package v2 + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type OrderSide int32 + +const ( + // will return both + OrderSide_Side_Unspecified OrderSide = 0 + OrderSide_Buy OrderSide = 1 + OrderSide_Sell OrderSide = 2 +) + +var OrderSide_name = map[int32]string{ + 0: "Side_Unspecified", + 1: "Buy", + 2: "Sell", +} + +var OrderSide_value = map[string]int32{ + "Side_Unspecified": 0, + "Buy": 1, + "Sell": 2, +} + +func (x OrderSide) String() string { + return proto.EnumName(OrderSide_name, int32(x)) +} + +func (OrderSide) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{0} +} + +// CancellationStrategy is the list of cancellation strategies. +type CancellationStrategy int32 + +const ( + // just cancelling in random order in most efficient way + CancellationStrategy_UnspecifiedOrder CancellationStrategy = 0 + // e.g. for buy orders from lowest to highest price + CancellationStrategy_FromWorstToBest CancellationStrategy = 1 + // e.g. for buy orders from higest to lowest price + CancellationStrategy_FromBestToWorst CancellationStrategy = 2 +) + +var CancellationStrategy_name = map[int32]string{ + 0: "UnspecifiedOrder", + 1: "FromWorstToBest", + 2: "FromBestToWorst", +} + +var CancellationStrategy_value = map[string]int32{ + "UnspecifiedOrder": 0, + "FromWorstToBest": 1, + "FromBestToWorst": 2, +} + +func (x CancellationStrategy) String() string { + return proto.EnumName(CancellationStrategy_name, int32(x)) +} + +func (CancellationStrategy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{1} +} + +type Subaccount struct { + Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty"` + SubaccountNonce uint32 `protobuf:"varint,2,opt,name=subaccount_nonce,json=subaccountNonce,proto3" json:"subaccount_nonce,omitempty"` +} + +func (m *Subaccount) Reset() { *m = Subaccount{} } +func (m *Subaccount) String() string { return proto.CompactTextString(m) } +func (*Subaccount) ProtoMessage() {} +func (*Subaccount) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{0} +} +func (m *Subaccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subaccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subaccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Subaccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subaccount.Merge(m, src) +} +func (m *Subaccount) XXX_Size() int { + return m.Size() +} +func (m *Subaccount) XXX_DiscardUnknown() { + xxx_messageInfo_Subaccount.DiscardUnknown(m) +} + +var xxx_messageInfo_Subaccount proto.InternalMessageInfo + +func (m *Subaccount) GetTrader() string { + if m != nil { + return m.Trader + } + return "" +} + +func (m *Subaccount) GetSubaccountNonce() uint32 { + if m != nil { + return m.SubaccountNonce + } + return 0 +} + +type QuerySubaccountOrdersRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QuerySubaccountOrdersRequest) Reset() { *m = QuerySubaccountOrdersRequest{} } +func (m *QuerySubaccountOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountOrdersRequest) ProtoMessage() {} +func (*QuerySubaccountOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{1} +} +func (m *QuerySubaccountOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountOrdersRequest.Merge(m, src) +} +func (m *QuerySubaccountOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountOrdersRequest proto.InternalMessageInfo + +func (m *QuerySubaccountOrdersRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySubaccountOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QuerySubaccountOrdersResponse struct { + BuyOrders []*SubaccountOrderData `protobuf:"bytes,1,rep,name=buy_orders,json=buyOrders,proto3" json:"buy_orders,omitempty"` + SellOrders []*SubaccountOrderData `protobuf:"bytes,2,rep,name=sell_orders,json=sellOrders,proto3" json:"sell_orders,omitempty"` +} + +func (m *QuerySubaccountOrdersResponse) Reset() { *m = QuerySubaccountOrdersResponse{} } +func (m *QuerySubaccountOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountOrdersResponse) ProtoMessage() {} +func (*QuerySubaccountOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{2} +} +func (m *QuerySubaccountOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountOrdersResponse.Merge(m, src) +} +func (m *QuerySubaccountOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountOrdersResponse proto.InternalMessageInfo + +func (m *QuerySubaccountOrdersResponse) GetBuyOrders() []*SubaccountOrderData { + if m != nil { + return m.BuyOrders + } + return nil +} + +func (m *QuerySubaccountOrdersResponse) GetSellOrders() []*SubaccountOrderData { + if m != nil { + return m.SellOrders + } + return nil +} + +type SubaccountOrderbookMetadataWithMarket struct { + Metadata *SubaccountOrderbookMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,3,opt,name=isBuy,proto3" json:"isBuy,omitempty"` +} + +func (m *SubaccountOrderbookMetadataWithMarket) Reset() { *m = SubaccountOrderbookMetadataWithMarket{} } +func (m *SubaccountOrderbookMetadataWithMarket) String() string { return proto.CompactTextString(m) } +func (*SubaccountOrderbookMetadataWithMarket) ProtoMessage() {} +func (*SubaccountOrderbookMetadataWithMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{3} +} +func (m *SubaccountOrderbookMetadataWithMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountOrderbookMetadataWithMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountOrderbookMetadataWithMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountOrderbookMetadataWithMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountOrderbookMetadataWithMarket.Merge(m, src) +} +func (m *SubaccountOrderbookMetadataWithMarket) XXX_Size() int { + return m.Size() +} +func (m *SubaccountOrderbookMetadataWithMarket) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountOrderbookMetadataWithMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountOrderbookMetadataWithMarket proto.InternalMessageInfo + +func (m *SubaccountOrderbookMetadataWithMarket) GetMetadata() *SubaccountOrderbookMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *SubaccountOrderbookMetadataWithMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *SubaccountOrderbookMetadataWithMarket) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +// QueryExchangeParamsRequest is the request type for the Query/ExchangeParams +// RPC method. +type QueryExchangeParamsRequest struct { +} + +func (m *QueryExchangeParamsRequest) Reset() { *m = QueryExchangeParamsRequest{} } +func (m *QueryExchangeParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeParamsRequest) ProtoMessage() {} +func (*QueryExchangeParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{4} +} +func (m *QueryExchangeParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeParamsRequest.Merge(m, src) +} +func (m *QueryExchangeParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeParamsRequest proto.InternalMessageInfo + +// QueryExchangeParamsRequest is the response type for the Query/ExchangeParams +// RPC method. +type QueryExchangeParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryExchangeParamsResponse) Reset() { *m = QueryExchangeParamsResponse{} } +func (m *QueryExchangeParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeParamsResponse) ProtoMessage() {} +func (*QueryExchangeParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{5} +} +func (m *QueryExchangeParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeParamsResponse.Merge(m, src) +} +func (m *QueryExchangeParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeParamsResponse proto.InternalMessageInfo + +func (m *QueryExchangeParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QuerySubaccountDepositsRequest is the request type for the +// Query/SubaccountDeposits RPC method. +type QuerySubaccountDepositsRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Subaccount *Subaccount `protobuf:"bytes,2,opt,name=subaccount,proto3" json:"subaccount,omitempty"` +} + +func (m *QuerySubaccountDepositsRequest) Reset() { *m = QuerySubaccountDepositsRequest{} } +func (m *QuerySubaccountDepositsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountDepositsRequest) ProtoMessage() {} +func (*QuerySubaccountDepositsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{6} +} +func (m *QuerySubaccountDepositsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountDepositsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountDepositsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountDepositsRequest.Merge(m, src) +} +func (m *QuerySubaccountDepositsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountDepositsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountDepositsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountDepositsRequest proto.InternalMessageInfo + +func (m *QuerySubaccountDepositsRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySubaccountDepositsRequest) GetSubaccount() *Subaccount { + if m != nil { + return m.Subaccount + } + return nil +} + +// QuerySubaccountDepositsResponse is the response type for the +// Query/SubaccountDeposits RPC method. +type QuerySubaccountDepositsResponse struct { + Deposits map[string]*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *QuerySubaccountDepositsResponse) Reset() { *m = QuerySubaccountDepositsResponse{} } +func (m *QuerySubaccountDepositsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountDepositsResponse) ProtoMessage() {} +func (*QuerySubaccountDepositsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{7} +} +func (m *QuerySubaccountDepositsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountDepositsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountDepositsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountDepositsResponse.Merge(m, src) +} +func (m *QuerySubaccountDepositsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountDepositsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountDepositsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountDepositsResponse proto.InternalMessageInfo + +func (m *QuerySubaccountDepositsResponse) GetDeposits() map[string]*Deposit { + if m != nil { + return m.Deposits + } + return nil +} + +// QueryExchangeBalancesRequest is the request type for the +// Query/ExchangeBalances RPC method. +type QueryExchangeBalancesRequest struct { +} + +func (m *QueryExchangeBalancesRequest) Reset() { *m = QueryExchangeBalancesRequest{} } +func (m *QueryExchangeBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeBalancesRequest) ProtoMessage() {} +func (*QueryExchangeBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{8} +} +func (m *QueryExchangeBalancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeBalancesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeBalancesRequest.Merge(m, src) +} +func (m *QueryExchangeBalancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeBalancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeBalancesRequest proto.InternalMessageInfo + +// QuerySubaccountDepositsResponse is the response type for the +// Query/SubaccountDeposits RPC method. +type QueryExchangeBalancesResponse struct { + Balances []Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances"` +} + +func (m *QueryExchangeBalancesResponse) Reset() { *m = QueryExchangeBalancesResponse{} } +func (m *QueryExchangeBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryExchangeBalancesResponse) ProtoMessage() {} +func (*QueryExchangeBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{9} +} +func (m *QueryExchangeBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExchangeBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExchangeBalancesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExchangeBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExchangeBalancesResponse.Merge(m, src) +} +func (m *QueryExchangeBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryExchangeBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExchangeBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExchangeBalancesResponse proto.InternalMessageInfo + +func (m *QueryExchangeBalancesResponse) GetBalances() []Balance { + if m != nil { + return m.Balances + } + return nil +} + +// QueryAggregateVolumeRequest is the request type for the Query/AggregateVolume +// RPC method. +type QueryAggregateVolumeRequest struct { + // can either be an address or a subaccount + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *QueryAggregateVolumeRequest) Reset() { *m = QueryAggregateVolumeRequest{} } +func (m *QueryAggregateVolumeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVolumeRequest) ProtoMessage() {} +func (*QueryAggregateVolumeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{10} +} +func (m *QueryAggregateVolumeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVolumeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVolumeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVolumeRequest.Merge(m, src) +} +func (m *QueryAggregateVolumeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVolumeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVolumeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVolumeRequest proto.InternalMessageInfo + +func (m *QueryAggregateVolumeRequest) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +// QueryAggregateVolumeResponse is the response type for the +// Query/AggregateVolume RPC method. +type QueryAggregateVolumeResponse struct { + // if an address is specified, then the aggregate_volumes will aggregate the + // volumes across all subaccounts for the address + AggregateVolumes []*MarketVolume `protobuf:"bytes,1,rep,name=aggregate_volumes,json=aggregateVolumes,proto3" json:"aggregate_volumes,omitempty"` +} + +func (m *QueryAggregateVolumeResponse) Reset() { *m = QueryAggregateVolumeResponse{} } +func (m *QueryAggregateVolumeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVolumeResponse) ProtoMessage() {} +func (*QueryAggregateVolumeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{11} +} +func (m *QueryAggregateVolumeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVolumeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVolumeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVolumeResponse.Merge(m, src) +} +func (m *QueryAggregateVolumeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVolumeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVolumeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVolumeResponse proto.InternalMessageInfo + +func (m *QueryAggregateVolumeResponse) GetAggregateVolumes() []*MarketVolume { + if m != nil { + return m.AggregateVolumes + } + return nil +} + +// QueryAggregateVolumesRequest is the request type for the +// Query/AggregateVolumes RPC method. +type QueryAggregateVolumesRequest struct { + Accounts []string `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *QueryAggregateVolumesRequest) Reset() { *m = QueryAggregateVolumesRequest{} } +func (m *QueryAggregateVolumesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVolumesRequest) ProtoMessage() {} +func (*QueryAggregateVolumesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{12} +} +func (m *QueryAggregateVolumesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVolumesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVolumesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVolumesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVolumesRequest.Merge(m, src) +} +func (m *QueryAggregateVolumesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVolumesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVolumesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVolumesRequest proto.InternalMessageInfo + +func (m *QueryAggregateVolumesRequest) GetAccounts() []string { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryAggregateVolumesRequest) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +// QueryAggregateVolumesResponse is the response type for the +// Query/AggregateVolumes RPC method. +type QueryAggregateVolumesResponse struct { + // the aggregate volume records for the accounts specified + AggregateAccountVolumes []*AggregateAccountVolumeRecord `protobuf:"bytes,1,rep,name=aggregate_account_volumes,json=aggregateAccountVolumes,proto3" json:"aggregate_account_volumes,omitempty"` + // the aggregate volumes for the markets specified + AggregateMarketVolumes []*MarketVolume `protobuf:"bytes,2,rep,name=aggregate_market_volumes,json=aggregateMarketVolumes,proto3" json:"aggregate_market_volumes,omitempty"` +} + +func (m *QueryAggregateVolumesResponse) Reset() { *m = QueryAggregateVolumesResponse{} } +func (m *QueryAggregateVolumesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateVolumesResponse) ProtoMessage() {} +func (*QueryAggregateVolumesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{13} +} +func (m *QueryAggregateVolumesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateVolumesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateVolumesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateVolumesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateVolumesResponse.Merge(m, src) +} +func (m *QueryAggregateVolumesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateVolumesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateVolumesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateVolumesResponse proto.InternalMessageInfo + +func (m *QueryAggregateVolumesResponse) GetAggregateAccountVolumes() []*AggregateAccountVolumeRecord { + if m != nil { + return m.AggregateAccountVolumes + } + return nil +} + +func (m *QueryAggregateVolumesResponse) GetAggregateMarketVolumes() []*MarketVolume { + if m != nil { + return m.AggregateMarketVolumes + } + return nil +} + +// QueryAggregateMarketVolumeRequest is the request type for the +// Query/AggregateMarketVolume RPC method. +type QueryAggregateMarketVolumeRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryAggregateMarketVolumeRequest) Reset() { *m = QueryAggregateMarketVolumeRequest{} } +func (m *QueryAggregateMarketVolumeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateMarketVolumeRequest) ProtoMessage() {} +func (*QueryAggregateMarketVolumeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{14} +} +func (m *QueryAggregateMarketVolumeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateMarketVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateMarketVolumeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateMarketVolumeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateMarketVolumeRequest.Merge(m, src) +} +func (m *QueryAggregateMarketVolumeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateMarketVolumeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateMarketVolumeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateMarketVolumeRequest proto.InternalMessageInfo + +func (m *QueryAggregateMarketVolumeRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryAggregateMarketVolumeResponse is the response type for the +// Query/AggregateMarketVolume RPC method. +type QueryAggregateMarketVolumeResponse struct { + Volume VolumeRecord `protobuf:"bytes,1,opt,name=volume,proto3" json:"volume"` +} + +func (m *QueryAggregateMarketVolumeResponse) Reset() { *m = QueryAggregateMarketVolumeResponse{} } +func (m *QueryAggregateMarketVolumeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateMarketVolumeResponse) ProtoMessage() {} +func (*QueryAggregateMarketVolumeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{15} +} +func (m *QueryAggregateMarketVolumeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateMarketVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateMarketVolumeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateMarketVolumeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateMarketVolumeResponse.Merge(m, src) +} +func (m *QueryAggregateMarketVolumeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateMarketVolumeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateMarketVolumeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateMarketVolumeResponse proto.InternalMessageInfo + +func (m *QueryAggregateMarketVolumeResponse) GetVolume() VolumeRecord { + if m != nil { + return m.Volume + } + return VolumeRecord{} +} + +// QueryDenomDecimalRequest is the request type for the Query/DenomDecimal RPC +// method. +type QueryDenomDecimalRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryDenomDecimalRequest) Reset() { *m = QueryDenomDecimalRequest{} } +func (m *QueryDenomDecimalRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomDecimalRequest) ProtoMessage() {} +func (*QueryDenomDecimalRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{16} +} +func (m *QueryDenomDecimalRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomDecimalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomDecimalRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomDecimalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomDecimalRequest.Merge(m, src) +} +func (m *QueryDenomDecimalRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomDecimalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomDecimalRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomDecimalRequest proto.InternalMessageInfo + +func (m *QueryDenomDecimalRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryDenomDecimalResponse is the response type for the Query/DenomDecimal RPC +// method. +type QueryDenomDecimalResponse struct { + Decimal uint64 `protobuf:"varint,1,opt,name=decimal,proto3" json:"decimal,omitempty"` +} + +func (m *QueryDenomDecimalResponse) Reset() { *m = QueryDenomDecimalResponse{} } +func (m *QueryDenomDecimalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomDecimalResponse) ProtoMessage() {} +func (*QueryDenomDecimalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{17} +} +func (m *QueryDenomDecimalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomDecimalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomDecimalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomDecimalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomDecimalResponse.Merge(m, src) +} +func (m *QueryDenomDecimalResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomDecimalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomDecimalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomDecimalResponse proto.InternalMessageInfo + +func (m *QueryDenomDecimalResponse) GetDecimal() uint64 { + if m != nil { + return m.Decimal + } + return 0 +} + +// QueryDenomDecimalsRequest is the request type for the Query/DenomDecimals RPC +// method. +type QueryDenomDecimalsRequest struct { + // denoms can be empty to query all denom decimals + Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` +} + +func (m *QueryDenomDecimalsRequest) Reset() { *m = QueryDenomDecimalsRequest{} } +func (m *QueryDenomDecimalsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomDecimalsRequest) ProtoMessage() {} +func (*QueryDenomDecimalsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{18} +} +func (m *QueryDenomDecimalsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomDecimalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomDecimalsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomDecimalsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomDecimalsRequest.Merge(m, src) +} +func (m *QueryDenomDecimalsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomDecimalsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomDecimalsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomDecimalsRequest proto.InternalMessageInfo + +func (m *QueryDenomDecimalsRequest) GetDenoms() []string { + if m != nil { + return m.Denoms + } + return nil +} + +// QueryDenomDecimalsRequest is the response type for the Query/DenomDecimals +// RPC method. +type QueryDenomDecimalsResponse struct { + DenomDecimals []DenomDecimals `protobuf:"bytes,1,rep,name=denom_decimals,json=denomDecimals,proto3" json:"denom_decimals"` +} + +func (m *QueryDenomDecimalsResponse) Reset() { *m = QueryDenomDecimalsResponse{} } +func (m *QueryDenomDecimalsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomDecimalsResponse) ProtoMessage() {} +func (*QueryDenomDecimalsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{19} +} +func (m *QueryDenomDecimalsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomDecimalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomDecimalsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDenomDecimalsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomDecimalsResponse.Merge(m, src) +} +func (m *QueryDenomDecimalsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomDecimalsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomDecimalsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomDecimalsResponse proto.InternalMessageInfo + +func (m *QueryDenomDecimalsResponse) GetDenomDecimals() []DenomDecimals { + if m != nil { + return m.DenomDecimals + } + return nil +} + +// QueryAggregateMarketVolumesRequest is the request type for the +// Query/AggregateMarketVolumes RPC method. +type QueryAggregateMarketVolumesRequest struct { + MarketIds []string `protobuf:"bytes,1,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *QueryAggregateMarketVolumesRequest) Reset() { *m = QueryAggregateMarketVolumesRequest{} } +func (m *QueryAggregateMarketVolumesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateMarketVolumesRequest) ProtoMessage() {} +func (*QueryAggregateMarketVolumesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{20} +} +func (m *QueryAggregateMarketVolumesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateMarketVolumesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateMarketVolumesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateMarketVolumesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateMarketVolumesRequest.Merge(m, src) +} +func (m *QueryAggregateMarketVolumesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateMarketVolumesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateMarketVolumesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateMarketVolumesRequest proto.InternalMessageInfo + +func (m *QueryAggregateMarketVolumesRequest) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +// QueryAggregateMarketVolumesResponse is the response type for the +// Query/AggregateMarketVolumes RPC method. +type QueryAggregateMarketVolumesResponse struct { + // the aggregate volumes for the entire market + Volumes []*MarketVolume `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes,omitempty"` +} + +func (m *QueryAggregateMarketVolumesResponse) Reset() { *m = QueryAggregateMarketVolumesResponse{} } +func (m *QueryAggregateMarketVolumesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAggregateMarketVolumesResponse) ProtoMessage() {} +func (*QueryAggregateMarketVolumesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{21} +} +func (m *QueryAggregateMarketVolumesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAggregateMarketVolumesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAggregateMarketVolumesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAggregateMarketVolumesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAggregateMarketVolumesResponse.Merge(m, src) +} +func (m *QueryAggregateMarketVolumesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAggregateMarketVolumesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAggregateMarketVolumesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAggregateMarketVolumesResponse proto.InternalMessageInfo + +func (m *QueryAggregateMarketVolumesResponse) GetVolumes() []*MarketVolume { + if m != nil { + return m.Volumes + } + return nil +} + +// QuerySubaccountDepositsRequest is the request type for the +// Query/SubaccountDeposits RPC method. +type QuerySubaccountDepositRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QuerySubaccountDepositRequest) Reset() { *m = QuerySubaccountDepositRequest{} } +func (m *QuerySubaccountDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountDepositRequest) ProtoMessage() {} +func (*QuerySubaccountDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{22} +} +func (m *QuerySubaccountDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountDepositRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountDepositRequest.Merge(m, src) +} +func (m *QuerySubaccountDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountDepositRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountDepositRequest proto.InternalMessageInfo + +func (m *QuerySubaccountDepositRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySubaccountDepositRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QuerySubaccountDepositsResponse is the response type for the +// Query/SubaccountDeposits RPC method. +type QuerySubaccountDepositResponse struct { + Deposits *Deposit `protobuf:"bytes,1,opt,name=deposits,proto3" json:"deposits,omitempty"` +} + +func (m *QuerySubaccountDepositResponse) Reset() { *m = QuerySubaccountDepositResponse{} } +func (m *QuerySubaccountDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountDepositResponse) ProtoMessage() {} +func (*QuerySubaccountDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{23} +} +func (m *QuerySubaccountDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountDepositResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountDepositResponse.Merge(m, src) +} +func (m *QuerySubaccountDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountDepositResponse proto.InternalMessageInfo + +func (m *QuerySubaccountDepositResponse) GetDeposits() *Deposit { + if m != nil { + return m.Deposits + } + return nil +} + +// QuerySpotMarketsRequest is the request type for the Query/SpotMarkets RPC +// method. +type QuerySpotMarketsRequest struct { + // Status of the market, for convenience it is set to string - not enum + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Filter by market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *QuerySpotMarketsRequest) Reset() { *m = QuerySpotMarketsRequest{} } +func (m *QuerySpotMarketsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMarketsRequest) ProtoMessage() {} +func (*QuerySpotMarketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{24} +} +func (m *QuerySpotMarketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMarketsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMarketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMarketsRequest.Merge(m, src) +} +func (m *QuerySpotMarketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMarketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMarketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMarketsRequest proto.InternalMessageInfo + +func (m *QuerySpotMarketsRequest) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *QuerySpotMarketsRequest) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +// QuerySpotMarketsResponse is the response type for the Query/SpotMarkets RPC +// method. +type QuerySpotMarketsResponse struct { + Markets []*SpotMarket `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (m *QuerySpotMarketsResponse) Reset() { *m = QuerySpotMarketsResponse{} } +func (m *QuerySpotMarketsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMarketsResponse) ProtoMessage() {} +func (*QuerySpotMarketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{25} +} +func (m *QuerySpotMarketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMarketsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMarketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMarketsResponse.Merge(m, src) +} +func (m *QuerySpotMarketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMarketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMarketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMarketsResponse proto.InternalMessageInfo + +func (m *QuerySpotMarketsResponse) GetMarkets() []*SpotMarket { + if m != nil { + return m.Markets + } + return nil +} + +// QuerySpotMarketRequest is the request type for the Query/SpotMarket RPC +// method. +type QuerySpotMarketRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QuerySpotMarketRequest) Reset() { *m = QuerySpotMarketRequest{} } +func (m *QuerySpotMarketRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMarketRequest) ProtoMessage() {} +func (*QuerySpotMarketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{26} +} +func (m *QuerySpotMarketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMarketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMarketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMarketRequest.Merge(m, src) +} +func (m *QuerySpotMarketRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMarketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMarketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMarketRequest proto.InternalMessageInfo + +func (m *QuerySpotMarketRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QuerySpotMarketResponse is the response type for the Query/SpotMarket RPC +// method. +type QuerySpotMarketResponse struct { + Market *SpotMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` +} + +func (m *QuerySpotMarketResponse) Reset() { *m = QuerySpotMarketResponse{} } +func (m *QuerySpotMarketResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMarketResponse) ProtoMessage() {} +func (*QuerySpotMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{27} +} +func (m *QuerySpotMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMarketResponse.Merge(m, src) +} +func (m *QuerySpotMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMarketResponse proto.InternalMessageInfo + +func (m *QuerySpotMarketResponse) GetMarket() *SpotMarket { + if m != nil { + return m.Market + } + return nil +} + +// QuerySpotOrderbookRequest is the request type for the Query/SpotOrderbook RPC +// method. +type QuerySpotOrderbookRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + OrderSide OrderSide `protobuf:"varint,3,opt,name=order_side,json=orderSide,proto3,enum=injective.exchange.v2.OrderSide" json:"order_side,omitempty"` + LimitCumulativeNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=limit_cumulative_notional,json=limitCumulativeNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_notional,omitempty"` + LimitCumulativeQuantity *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=limit_cumulative_quantity,json=limitCumulativeQuantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_quantity,omitempty"` +} + +func (m *QuerySpotOrderbookRequest) Reset() { *m = QuerySpotOrderbookRequest{} } +func (m *QuerySpotOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotOrderbookRequest) ProtoMessage() {} +func (*QuerySpotOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{28} +} +func (m *QuerySpotOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotOrderbookRequest.Merge(m, src) +} +func (m *QuerySpotOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotOrderbookRequest proto.InternalMessageInfo + +func (m *QuerySpotOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QuerySpotOrderbookRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *QuerySpotOrderbookRequest) GetOrderSide() OrderSide { + if m != nil { + return m.OrderSide + } + return OrderSide_Side_Unspecified +} + +// QuerySpotOrderbookResponse is the response type for the Query/SpotOrderbook +// RPC method. +type QuerySpotOrderbookResponse struct { + BuysPriceLevel []*Level `protobuf:"bytes,1,rep,name=buys_price_level,json=buysPriceLevel,proto3" json:"buys_price_level,omitempty"` + SellsPriceLevel []*Level `protobuf:"bytes,2,rep,name=sells_price_level,json=sellsPriceLevel,proto3" json:"sells_price_level,omitempty"` +} + +func (m *QuerySpotOrderbookResponse) Reset() { *m = QuerySpotOrderbookResponse{} } +func (m *QuerySpotOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotOrderbookResponse) ProtoMessage() {} +func (*QuerySpotOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{29} +} +func (m *QuerySpotOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotOrderbookResponse.Merge(m, src) +} +func (m *QuerySpotOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotOrderbookResponse proto.InternalMessageInfo + +func (m *QuerySpotOrderbookResponse) GetBuysPriceLevel() []*Level { + if m != nil { + return m.BuysPriceLevel + } + return nil +} + +func (m *QuerySpotOrderbookResponse) GetSellsPriceLevel() []*Level { + if m != nil { + return m.SellsPriceLevel + } + return nil +} + +type FullSpotMarket struct { + Market *SpotMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // mid_price_and_tob defines the mid price for this market and the best ask + // and bid orders + MidPriceAndTob *MidPriceAndTOB `protobuf:"bytes,2,opt,name=mid_price_and_tob,json=midPriceAndTob,proto3" json:"mid_price_and_tob,omitempty"` +} + +func (m *FullSpotMarket) Reset() { *m = FullSpotMarket{} } +func (m *FullSpotMarket) String() string { return proto.CompactTextString(m) } +func (*FullSpotMarket) ProtoMessage() {} +func (*FullSpotMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{30} +} +func (m *FullSpotMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullSpotMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullSpotMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullSpotMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullSpotMarket.Merge(m, src) +} +func (m *FullSpotMarket) XXX_Size() int { + return m.Size() +} +func (m *FullSpotMarket) XXX_DiscardUnknown() { + xxx_messageInfo_FullSpotMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_FullSpotMarket proto.InternalMessageInfo + +func (m *FullSpotMarket) GetMarket() *SpotMarket { + if m != nil { + return m.Market + } + return nil +} + +func (m *FullSpotMarket) GetMidPriceAndTob() *MidPriceAndTOB { + if m != nil { + return m.MidPriceAndTob + } + return nil +} + +// QueryFullSpotMarketsRequest is the request type for the Query/FullSpotMarkets +// RPC method. +type QueryFullSpotMarketsRequest struct { + // Status of the market, for convenience it is set to string - not enum + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Filter by market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // Flag to return the markets mid price and top of the book buy and sell + // orders. + WithMidPriceAndTob bool `protobuf:"varint,3,opt,name=with_mid_price_and_tob,json=withMidPriceAndTob,proto3" json:"with_mid_price_and_tob,omitempty"` +} + +func (m *QueryFullSpotMarketsRequest) Reset() { *m = QueryFullSpotMarketsRequest{} } +func (m *QueryFullSpotMarketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotMarketsRequest) ProtoMessage() {} +func (*QueryFullSpotMarketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{31} +} +func (m *QueryFullSpotMarketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotMarketsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotMarketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotMarketsRequest.Merge(m, src) +} +func (m *QueryFullSpotMarketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotMarketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotMarketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotMarketsRequest proto.InternalMessageInfo + +func (m *QueryFullSpotMarketsRequest) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *QueryFullSpotMarketsRequest) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +func (m *QueryFullSpotMarketsRequest) GetWithMidPriceAndTob() bool { + if m != nil { + return m.WithMidPriceAndTob + } + return false +} + +// QueryFullSpotMarketsResponse is the response type for the +// Query/FullSpotMarkets RPC method. +type QueryFullSpotMarketsResponse struct { + Markets []*FullSpotMarket `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (m *QueryFullSpotMarketsResponse) Reset() { *m = QueryFullSpotMarketsResponse{} } +func (m *QueryFullSpotMarketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotMarketsResponse) ProtoMessage() {} +func (*QueryFullSpotMarketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{32} +} +func (m *QueryFullSpotMarketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotMarketsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotMarketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotMarketsResponse.Merge(m, src) +} +func (m *QueryFullSpotMarketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotMarketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotMarketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotMarketsResponse proto.InternalMessageInfo + +func (m *QueryFullSpotMarketsResponse) GetMarkets() []*FullSpotMarket { + if m != nil { + return m.Markets + } + return nil +} + +// QuerySpotMarketRequest is the request type for the Query/SpotMarket RPC +// method. +type QueryFullSpotMarketRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Flag to return the markets mid price and top of the book buy and sell + // orders. + WithMidPriceAndTob bool `protobuf:"varint,2,opt,name=with_mid_price_and_tob,json=withMidPriceAndTob,proto3" json:"with_mid_price_and_tob,omitempty"` +} + +func (m *QueryFullSpotMarketRequest) Reset() { *m = QueryFullSpotMarketRequest{} } +func (m *QueryFullSpotMarketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotMarketRequest) ProtoMessage() {} +func (*QueryFullSpotMarketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{33} +} +func (m *QueryFullSpotMarketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotMarketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotMarketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotMarketRequest.Merge(m, src) +} +func (m *QueryFullSpotMarketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotMarketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotMarketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotMarketRequest proto.InternalMessageInfo + +func (m *QueryFullSpotMarketRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryFullSpotMarketRequest) GetWithMidPriceAndTob() bool { + if m != nil { + return m.WithMidPriceAndTob + } + return false +} + +// QuerySpotMarketResponse is the response type for the Query/SpotMarket RPC +// method. +type QueryFullSpotMarketResponse struct { + Market *FullSpotMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` +} + +func (m *QueryFullSpotMarketResponse) Reset() { *m = QueryFullSpotMarketResponse{} } +func (m *QueryFullSpotMarketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotMarketResponse) ProtoMessage() {} +func (*QueryFullSpotMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{34} +} +func (m *QueryFullSpotMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotMarketResponse.Merge(m, src) +} +func (m *QueryFullSpotMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotMarketResponse proto.InternalMessageInfo + +func (m *QueryFullSpotMarketResponse) GetMarket() *FullSpotMarket { + if m != nil { + return m.Market + } + return nil +} + +// QuerySpotOrdersByHashesRequest is the request type for the +// Query/SpotOrdersByHashes RPC method. +type QuerySpotOrdersByHashesRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the order hashes + OrderHashes []string `protobuf:"bytes,3,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` +} + +func (m *QuerySpotOrdersByHashesRequest) Reset() { *m = QuerySpotOrdersByHashesRequest{} } +func (m *QuerySpotOrdersByHashesRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotOrdersByHashesRequest) ProtoMessage() {} +func (*QuerySpotOrdersByHashesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{35} +} +func (m *QuerySpotOrdersByHashesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotOrdersByHashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotOrdersByHashesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotOrdersByHashesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotOrdersByHashesRequest.Merge(m, src) +} +func (m *QuerySpotOrdersByHashesRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotOrdersByHashesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotOrdersByHashesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotOrdersByHashesRequest proto.InternalMessageInfo + +func (m *QuerySpotOrdersByHashesRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QuerySpotOrdersByHashesRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySpotOrdersByHashesRequest) GetOrderHashes() []string { + if m != nil { + return m.OrderHashes + } + return nil +} + +// QuerySpotOrdersByHashesResponse is the response type for the +// Query/SpotOrdersByHashes RPC method. +type QuerySpotOrdersByHashesResponse struct { + Orders []*TrimmedSpotLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QuerySpotOrdersByHashesResponse) Reset() { *m = QuerySpotOrdersByHashesResponse{} } +func (m *QuerySpotOrdersByHashesResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotOrdersByHashesResponse) ProtoMessage() {} +func (*QuerySpotOrdersByHashesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{36} +} +func (m *QuerySpotOrdersByHashesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotOrdersByHashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotOrdersByHashesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotOrdersByHashesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotOrdersByHashesResponse.Merge(m, src) +} +func (m *QuerySpotOrdersByHashesResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotOrdersByHashesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotOrdersByHashesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotOrdersByHashesResponse proto.InternalMessageInfo + +func (m *QuerySpotOrdersByHashesResponse) GetOrders() []*TrimmedSpotLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QueryTraderSpotOrdersRequest is the request type for the +// Query/TraderSpotOrders RPC method. +type QueryTraderSpotOrdersRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QueryTraderSpotOrdersRequest) Reset() { *m = QueryTraderSpotOrdersRequest{} } +func (m *QueryTraderSpotOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraderSpotOrdersRequest) ProtoMessage() {} +func (*QueryTraderSpotOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{37} +} +func (m *QueryTraderSpotOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderSpotOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderSpotOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderSpotOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderSpotOrdersRequest.Merge(m, src) +} +func (m *QueryTraderSpotOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderSpotOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderSpotOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderSpotOrdersRequest proto.InternalMessageInfo + +func (m *QueryTraderSpotOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryTraderSpotOrdersRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QueryAccountAddressSpotOrdersRequest is the request type for the +// Query/AccountAddressSpotOrders RPC method. +type QueryAccountAddressSpotOrdersRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Account address of the trader + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (m *QueryAccountAddressSpotOrdersRequest) Reset() { *m = QueryAccountAddressSpotOrdersRequest{} } +func (m *QueryAccountAddressSpotOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressSpotOrdersRequest) ProtoMessage() {} +func (*QueryAccountAddressSpotOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{38} +} +func (m *QueryAccountAddressSpotOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressSpotOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressSpotOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountAddressSpotOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressSpotOrdersRequest.Merge(m, src) +} +func (m *QueryAccountAddressSpotOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressSpotOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressSpotOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressSpotOrdersRequest proto.InternalMessageInfo + +func (m *QueryAccountAddressSpotOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryAccountAddressSpotOrdersRequest) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +type TrimmedSpotLimitOrder struct { + // price of the order + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // the amount of the quantity remaining fillable + Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` + // true if the order is a buy + IsBuy bool `protobuf:"varint,4,opt,name=isBuy,proto3" json:"isBuy,omitempty"` + OrderHash string `protobuf:"bytes,5,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *TrimmedSpotLimitOrder) Reset() { *m = TrimmedSpotLimitOrder{} } +func (m *TrimmedSpotLimitOrder) String() string { return proto.CompactTextString(m) } +func (*TrimmedSpotLimitOrder) ProtoMessage() {} +func (*TrimmedSpotLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{39} +} +func (m *TrimmedSpotLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrimmedSpotLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrimmedSpotLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TrimmedSpotLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrimmedSpotLimitOrder.Merge(m, src) +} +func (m *TrimmedSpotLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *TrimmedSpotLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_TrimmedSpotLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_TrimmedSpotLimitOrder proto.InternalMessageInfo + +func (m *TrimmedSpotLimitOrder) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *TrimmedSpotLimitOrder) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *TrimmedSpotLimitOrder) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +// QueryTraderSpotOrdersResponse is the response type for the +// Query/TraderSpotOrders RPC method. +type QueryTraderSpotOrdersResponse struct { + Orders []*TrimmedSpotLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryTraderSpotOrdersResponse) Reset() { *m = QueryTraderSpotOrdersResponse{} } +func (m *QueryTraderSpotOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraderSpotOrdersResponse) ProtoMessage() {} +func (*QueryTraderSpotOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{40} +} +func (m *QueryTraderSpotOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderSpotOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderSpotOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderSpotOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderSpotOrdersResponse.Merge(m, src) +} +func (m *QueryTraderSpotOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderSpotOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderSpotOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderSpotOrdersResponse proto.InternalMessageInfo + +func (m *QueryTraderSpotOrdersResponse) GetOrders() []*TrimmedSpotLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QueryAccountAddressSpotOrdersResponse is the response type for the +// Query/AccountAddressSpotOrders RPC method. +type QueryAccountAddressSpotOrdersResponse struct { + Orders []*TrimmedSpotLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryAccountAddressSpotOrdersResponse) Reset() { *m = QueryAccountAddressSpotOrdersResponse{} } +func (m *QueryAccountAddressSpotOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountAddressSpotOrdersResponse) ProtoMessage() {} +func (*QueryAccountAddressSpotOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{41} +} +func (m *QueryAccountAddressSpotOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressSpotOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressSpotOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountAddressSpotOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressSpotOrdersResponse.Merge(m, src) +} +func (m *QueryAccountAddressSpotOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressSpotOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressSpotOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressSpotOrdersResponse proto.InternalMessageInfo + +func (m *QueryAccountAddressSpotOrdersResponse) GetOrders() []*TrimmedSpotLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QuerySpotMidPriceAndTOBRequest is the request type for the +// Query/SpotMidPriceAndTOB RPC method. +type QuerySpotMidPriceAndTOBRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QuerySpotMidPriceAndTOBRequest) Reset() { *m = QuerySpotMidPriceAndTOBRequest{} } +func (m *QuerySpotMidPriceAndTOBRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMidPriceAndTOBRequest) ProtoMessage() {} +func (*QuerySpotMidPriceAndTOBRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{42} +} +func (m *QuerySpotMidPriceAndTOBRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMidPriceAndTOBRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMidPriceAndTOBRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMidPriceAndTOBRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMidPriceAndTOBRequest.Merge(m, src) +} +func (m *QuerySpotMidPriceAndTOBRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMidPriceAndTOBRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMidPriceAndTOBRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMidPriceAndTOBRequest proto.InternalMessageInfo + +func (m *QuerySpotMidPriceAndTOBRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QuerySpotMidPriceAndTOBResponse is the response type for the +// Query/SpotMidPriceAndTOB RPC method. +type QuerySpotMidPriceAndTOBResponse struct { + // mid price of the market + MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` + // best buy price of the market + BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` + // best sell price of the market + BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` +} + +func (m *QuerySpotMidPriceAndTOBResponse) Reset() { *m = QuerySpotMidPriceAndTOBResponse{} } +func (m *QuerySpotMidPriceAndTOBResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpotMidPriceAndTOBResponse) ProtoMessage() {} +func (*QuerySpotMidPriceAndTOBResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{43} +} +func (m *QuerySpotMidPriceAndTOBResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpotMidPriceAndTOBResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpotMidPriceAndTOBResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySpotMidPriceAndTOBResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpotMidPriceAndTOBResponse.Merge(m, src) +} +func (m *QuerySpotMidPriceAndTOBResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpotMidPriceAndTOBResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpotMidPriceAndTOBResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpotMidPriceAndTOBResponse proto.InternalMessageInfo + +// QueryDerivativeMidPriceAndTOBRequest is the request type for the +// Query/GetDerivativeMidPriceAndTOB RPC method. +type QueryDerivativeMidPriceAndTOBRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryDerivativeMidPriceAndTOBRequest) Reset() { *m = QueryDerivativeMidPriceAndTOBRequest{} } +func (m *QueryDerivativeMidPriceAndTOBRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMidPriceAndTOBRequest) ProtoMessage() {} +func (*QueryDerivativeMidPriceAndTOBRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{44} +} +func (m *QueryDerivativeMidPriceAndTOBRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMidPriceAndTOBRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMidPriceAndTOBRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMidPriceAndTOBRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMidPriceAndTOBRequest.Merge(m, src) +} +func (m *QueryDerivativeMidPriceAndTOBRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMidPriceAndTOBRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMidPriceAndTOBRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMidPriceAndTOBRequest proto.InternalMessageInfo + +func (m *QueryDerivativeMidPriceAndTOBRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryDerivativeMidPriceAndTOBResponse is the response type for the +// Query/GetDerivativeMidPriceAndTOB RPC method. +type QueryDerivativeMidPriceAndTOBResponse struct { + // mid price of the market + MidPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=mid_price,json=midPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mid_price,omitempty"` + // best buy price of the market + BestBuyPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=best_buy_price,json=bestBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_buy_price,omitempty"` + // best sell price of the market + BestSellPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=best_sell_price,json=bestSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"best_sell_price,omitempty"` +} + +func (m *QueryDerivativeMidPriceAndTOBResponse) Reset() { *m = QueryDerivativeMidPriceAndTOBResponse{} } +func (m *QueryDerivativeMidPriceAndTOBResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMidPriceAndTOBResponse) ProtoMessage() {} +func (*QueryDerivativeMidPriceAndTOBResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{45} +} +func (m *QueryDerivativeMidPriceAndTOBResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMidPriceAndTOBResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMidPriceAndTOBResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMidPriceAndTOBResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMidPriceAndTOBResponse.Merge(m, src) +} +func (m *QueryDerivativeMidPriceAndTOBResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMidPriceAndTOBResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMidPriceAndTOBResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMidPriceAndTOBResponse proto.InternalMessageInfo + +// QueryDerivativeOrderbookRequest is the request type for the +// Query/DerivativeOrderbook RPC method. +type QueryDerivativeOrderbookRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + LimitCumulativeNotional *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=limit_cumulative_notional,json=limitCumulativeNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_cumulative_notional,omitempty"` +} + +func (m *QueryDerivativeOrderbookRequest) Reset() { *m = QueryDerivativeOrderbookRequest{} } +func (m *QueryDerivativeOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeOrderbookRequest) ProtoMessage() {} +func (*QueryDerivativeOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{46} +} +func (m *QueryDerivativeOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeOrderbookRequest.Merge(m, src) +} +func (m *QueryDerivativeOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeOrderbookRequest proto.InternalMessageInfo + +func (m *QueryDerivativeOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryDerivativeOrderbookRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + +// QueryDerivativeOrderbookResponse is the response type for the +// Query/DerivativeOrderbook RPC method. +type QueryDerivativeOrderbookResponse struct { + BuysPriceLevel []*Level `protobuf:"bytes,1,rep,name=buys_price_level,json=buysPriceLevel,proto3" json:"buys_price_level,omitempty"` + SellsPriceLevel []*Level `protobuf:"bytes,2,rep,name=sells_price_level,json=sellsPriceLevel,proto3" json:"sells_price_level,omitempty"` +} + +func (m *QueryDerivativeOrderbookResponse) Reset() { *m = QueryDerivativeOrderbookResponse{} } +func (m *QueryDerivativeOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeOrderbookResponse) ProtoMessage() {} +func (*QueryDerivativeOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{47} +} +func (m *QueryDerivativeOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeOrderbookResponse.Merge(m, src) +} +func (m *QueryDerivativeOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeOrderbookResponse proto.InternalMessageInfo + +func (m *QueryDerivativeOrderbookResponse) GetBuysPriceLevel() []*Level { + if m != nil { + return m.BuysPriceLevel + } + return nil +} + +func (m *QueryDerivativeOrderbookResponse) GetSellsPriceLevel() []*Level { + if m != nil { + return m.SellsPriceLevel + } + return nil +} + +// QueryTraderSpotOrdersToCancelUpToAmountRequest is the request type for the +// Query/TraderSpotOrdersToCancelUpToAmountRequest RPC method. +type QueryTraderSpotOrdersToCancelUpToAmountRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the base amount to cancel (free up) + BaseAmount cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=base_amount,json=baseAmount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_amount"` + // the quote amount to cancel (free up) + QuoteAmount cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quote_amount,json=quoteAmount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quote_amount"` + // The cancellation strategy + Strategy CancellationStrategy `protobuf:"varint,5,opt,name=strategy,proto3,enum=injective.exchange.v2.CancellationStrategy" json:"strategy,omitempty"` + // The reference price for the cancellation strategy, e.g. mid price or mark + // price + ReferencePrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=reference_price,json=referencePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reference_price,omitempty"` +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) Reset() { + *m = QueryTraderSpotOrdersToCancelUpToAmountRequest{} +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryTraderSpotOrdersToCancelUpToAmountRequest) ProtoMessage() {} +func (*QueryTraderSpotOrdersToCancelUpToAmountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{48} +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderSpotOrdersToCancelUpToAmountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderSpotOrdersToCancelUpToAmountRequest.Merge(m, src) +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderSpotOrdersToCancelUpToAmountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderSpotOrdersToCancelUpToAmountRequest proto.InternalMessageInfo + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) GetStrategy() CancellationStrategy { + if m != nil { + return m.Strategy + } + return CancellationStrategy_UnspecifiedOrder +} + +// QueryTraderDerivativeOrdersToCancelUpToAmountRequest is the request type for +// the Query/TraderDerivativeOrdersToCancelUpToAmountRequest RPC method. +type QueryTraderDerivativeOrdersToCancelUpToAmountRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the quote amount to cancel (free up) + QuoteAmount cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=quote_amount,json=quoteAmount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quote_amount"` + // The cancellation strategy + Strategy CancellationStrategy `protobuf:"varint,4,opt,name=strategy,proto3,enum=injective.exchange.v2.CancellationStrategy" json:"strategy,omitempty"` + // The reference price for the cancellation strategy, e.g. mid price or mark + // price + ReferencePrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=reference_price,json=referencePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reference_price,omitempty"` +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) Reset() { + *m = QueryTraderDerivativeOrdersToCancelUpToAmountRequest{} +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryTraderDerivativeOrdersToCancelUpToAmountRequest) ProtoMessage() {} +func (*QueryTraderDerivativeOrdersToCancelUpToAmountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{49} +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderDerivativeOrdersToCancelUpToAmountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderDerivativeOrdersToCancelUpToAmountRequest.Merge(m, src) +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderDerivativeOrdersToCancelUpToAmountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderDerivativeOrdersToCancelUpToAmountRequest proto.InternalMessageInfo + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) GetStrategy() CancellationStrategy { + if m != nil { + return m.Strategy + } + return CancellationStrategy_UnspecifiedOrder +} + +// QueryTraderDerivativeOrdersRequest is the request type for the +// Query/TraderDerivativeOrders RPC method. +type QueryTraderDerivativeOrdersRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QueryTraderDerivativeOrdersRequest) Reset() { *m = QueryTraderDerivativeOrdersRequest{} } +func (m *QueryTraderDerivativeOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraderDerivativeOrdersRequest) ProtoMessage() {} +func (*QueryTraderDerivativeOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{50} +} +func (m *QueryTraderDerivativeOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderDerivativeOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderDerivativeOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderDerivativeOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderDerivativeOrdersRequest.Merge(m, src) +} +func (m *QueryTraderDerivativeOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderDerivativeOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderDerivativeOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderDerivativeOrdersRequest proto.InternalMessageInfo + +func (m *QueryTraderDerivativeOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryTraderDerivativeOrdersRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QueryAccountAddressSpotOrdersRequest is the request type for the +// Query/AccountAddressDerivativeOrders RPC method. +type QueryAccountAddressDerivativeOrdersRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // Account address of the trader + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) Reset() { + *m = QueryAccountAddressDerivativeOrdersRequest{} +} +func (m *QueryAccountAddressDerivativeOrdersRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryAccountAddressDerivativeOrdersRequest) ProtoMessage() {} +func (*QueryAccountAddressDerivativeOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{51} +} +func (m *QueryAccountAddressDerivativeOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressDerivativeOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressDerivativeOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountAddressDerivativeOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressDerivativeOrdersRequest.Merge(m, src) +} +func (m *QueryAccountAddressDerivativeOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressDerivativeOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressDerivativeOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressDerivativeOrdersRequest proto.InternalMessageInfo + +func (m *QueryAccountAddressDerivativeOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +type TrimmedDerivativeLimitOrder struct { + // price of the order + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // margin of the order + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // the amount of the quantity remaining fillable + Fillable cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=fillable,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fillable"` + // true if the order is a buy + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + OrderHash string `protobuf:"bytes,6,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,7,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *TrimmedDerivativeLimitOrder) Reset() { *m = TrimmedDerivativeLimitOrder{} } +func (m *TrimmedDerivativeLimitOrder) String() string { return proto.CompactTextString(m) } +func (*TrimmedDerivativeLimitOrder) ProtoMessage() {} +func (*TrimmedDerivativeLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{52} +} +func (m *TrimmedDerivativeLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrimmedDerivativeLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrimmedDerivativeLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TrimmedDerivativeLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrimmedDerivativeLimitOrder.Merge(m, src) +} +func (m *TrimmedDerivativeLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *TrimmedDerivativeLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_TrimmedDerivativeLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_TrimmedDerivativeLimitOrder proto.InternalMessageInfo + +func (m *TrimmedDerivativeLimitOrder) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *TrimmedDerivativeLimitOrder) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *TrimmedDerivativeLimitOrder) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +// QueryTraderDerivativeOrdersResponse is the response type for the +// Query/TraderDerivativeOrders RPC method. +type QueryTraderDerivativeOrdersResponse struct { + Orders []*TrimmedDerivativeLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryTraderDerivativeOrdersResponse) Reset() { *m = QueryTraderDerivativeOrdersResponse{} } +func (m *QueryTraderDerivativeOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraderDerivativeOrdersResponse) ProtoMessage() {} +func (*QueryTraderDerivativeOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{53} +} +func (m *QueryTraderDerivativeOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderDerivativeOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderDerivativeOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderDerivativeOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderDerivativeOrdersResponse.Merge(m, src) +} +func (m *QueryTraderDerivativeOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderDerivativeOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderDerivativeOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderDerivativeOrdersResponse proto.InternalMessageInfo + +func (m *QueryTraderDerivativeOrdersResponse) GetOrders() []*TrimmedDerivativeLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QueryAccountAddressDerivativeOrdersResponse is the response type for the +// Query/AccountAddressDerivativeOrders RPC method. +type QueryAccountAddressDerivativeOrdersResponse struct { + Orders []*TrimmedDerivativeLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryAccountAddressDerivativeOrdersResponse) Reset() { + *m = QueryAccountAddressDerivativeOrdersResponse{} +} +func (m *QueryAccountAddressDerivativeOrdersResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryAccountAddressDerivativeOrdersResponse) ProtoMessage() {} +func (*QueryAccountAddressDerivativeOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{54} +} +func (m *QueryAccountAddressDerivativeOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountAddressDerivativeOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountAddressDerivativeOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAccountAddressDerivativeOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountAddressDerivativeOrdersResponse.Merge(m, src) +} +func (m *QueryAccountAddressDerivativeOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountAddressDerivativeOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountAddressDerivativeOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountAddressDerivativeOrdersResponse proto.InternalMessageInfo + +func (m *QueryAccountAddressDerivativeOrdersResponse) GetOrders() []*TrimmedDerivativeLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QueryTraderDerivativeOrdersRequest is the request type for the +// Query/TraderDerivativeOrders RPC method. +type QueryDerivativeOrdersByHashesRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // SubaccountID of the trader + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + // the order hashes + OrderHashes []string `protobuf:"bytes,3,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` +} + +func (m *QueryDerivativeOrdersByHashesRequest) Reset() { *m = QueryDerivativeOrdersByHashesRequest{} } +func (m *QueryDerivativeOrdersByHashesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeOrdersByHashesRequest) ProtoMessage() {} +func (*QueryDerivativeOrdersByHashesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{55} +} +func (m *QueryDerivativeOrdersByHashesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeOrdersByHashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeOrdersByHashesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeOrdersByHashesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeOrdersByHashesRequest.Merge(m, src) +} +func (m *QueryDerivativeOrdersByHashesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeOrdersByHashesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeOrdersByHashesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeOrdersByHashesRequest proto.InternalMessageInfo + +func (m *QueryDerivativeOrdersByHashesRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryDerivativeOrdersByHashesRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QueryDerivativeOrdersByHashesRequest) GetOrderHashes() []string { + if m != nil { + return m.OrderHashes + } + return nil +} + +// QueryDerivativeOrdersByHashesResponse is the response type for the +// Query/DerivativeOrdersByHashes RPC method. +type QueryDerivativeOrdersByHashesResponse struct { + Orders []*TrimmedDerivativeLimitOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryDerivativeOrdersByHashesResponse) Reset() { *m = QueryDerivativeOrdersByHashesResponse{} } +func (m *QueryDerivativeOrdersByHashesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeOrdersByHashesResponse) ProtoMessage() {} +func (*QueryDerivativeOrdersByHashesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{56} +} +func (m *QueryDerivativeOrdersByHashesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeOrdersByHashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeOrdersByHashesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeOrdersByHashesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeOrdersByHashesResponse.Merge(m, src) +} +func (m *QueryDerivativeOrdersByHashesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeOrdersByHashesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeOrdersByHashesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeOrdersByHashesResponse proto.InternalMessageInfo + +func (m *QueryDerivativeOrdersByHashesResponse) GetOrders() []*TrimmedDerivativeLimitOrder { + if m != nil { + return m.Orders + } + return nil +} + +// QueryDerivativeMarketsRequest is the request type for the +// Query/DerivativeMarkets RPC method. +type QueryDerivativeMarketsRequest struct { + // Status of the market, for convenience it is set to string - not enum + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Filter by market IDs + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` + // Flag to return the markets mid price and top of the book buy and sell + // orders. + WithMidPriceAndTob bool `protobuf:"varint,3,opt,name=with_mid_price_and_tob,json=withMidPriceAndTob,proto3" json:"with_mid_price_and_tob,omitempty"` +} + +func (m *QueryDerivativeMarketsRequest) Reset() { *m = QueryDerivativeMarketsRequest{} } +func (m *QueryDerivativeMarketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketsRequest) ProtoMessage() {} +func (*QueryDerivativeMarketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{57} +} +func (m *QueryDerivativeMarketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketsRequest.Merge(m, src) +} +func (m *QueryDerivativeMarketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketsRequest proto.InternalMessageInfo + +func (m *QueryDerivativeMarketsRequest) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *QueryDerivativeMarketsRequest) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +func (m *QueryDerivativeMarketsRequest) GetWithMidPriceAndTob() bool { + if m != nil { + return m.WithMidPriceAndTob + } + return false +} + +type PriceLevel struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` +} + +func (m *PriceLevel) Reset() { *m = PriceLevel{} } +func (m *PriceLevel) String() string { return proto.CompactTextString(m) } +func (*PriceLevel) ProtoMessage() {} +func (*PriceLevel) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{58} +} +func (m *PriceLevel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PriceLevel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PriceLevel.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PriceLevel) XXX_Merge(src proto.Message) { + xxx_messageInfo_PriceLevel.Merge(m, src) +} +func (m *PriceLevel) XXX_Size() int { + return m.Size() +} +func (m *PriceLevel) XXX_DiscardUnknown() { + xxx_messageInfo_PriceLevel.DiscardUnknown(m) +} + +var xxx_messageInfo_PriceLevel proto.InternalMessageInfo + +type PerpetualMarketState struct { + MarketInfo *PerpetualMarketInfo `protobuf:"bytes,1,opt,name=market_info,json=marketInfo,proto3" json:"market_info,omitempty"` + FundingInfo *PerpetualMarketFunding `protobuf:"bytes,2,opt,name=funding_info,json=fundingInfo,proto3" json:"funding_info,omitempty"` +} + +func (m *PerpetualMarketState) Reset() { *m = PerpetualMarketState{} } +func (m *PerpetualMarketState) String() string { return proto.CompactTextString(m) } +func (*PerpetualMarketState) ProtoMessage() {} +func (*PerpetualMarketState) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{59} +} +func (m *PerpetualMarketState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerpetualMarketState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerpetualMarketState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerpetualMarketState) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerpetualMarketState.Merge(m, src) +} +func (m *PerpetualMarketState) XXX_Size() int { + return m.Size() +} +func (m *PerpetualMarketState) XXX_DiscardUnknown() { + xxx_messageInfo_PerpetualMarketState.DiscardUnknown(m) +} + +var xxx_messageInfo_PerpetualMarketState proto.InternalMessageInfo + +func (m *PerpetualMarketState) GetMarketInfo() *PerpetualMarketInfo { + if m != nil { + return m.MarketInfo + } + return nil +} + +func (m *PerpetualMarketState) GetFundingInfo() *PerpetualMarketFunding { + if m != nil { + return m.FundingInfo + } + return nil +} + +type FullDerivativeMarket struct { + Market *DerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // Types that are valid to be assigned to Info: + // *FullDerivativeMarket_PerpetualInfo + // *FullDerivativeMarket_FuturesInfo + Info isFullDerivativeMarket_Info `protobuf_oneof:"info"` + MarkPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=mark_price,json=markPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mark_price"` + // mid_price_and_tob defines the mid price for this market and the best ask + // and bid orders + MidPriceAndTob *MidPriceAndTOB `protobuf:"bytes,5,opt,name=mid_price_and_tob,json=midPriceAndTob,proto3" json:"mid_price_and_tob,omitempty"` +} + +func (m *FullDerivativeMarket) Reset() { *m = FullDerivativeMarket{} } +func (m *FullDerivativeMarket) String() string { return proto.CompactTextString(m) } +func (*FullDerivativeMarket) ProtoMessage() {} +func (*FullDerivativeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{60} +} +func (m *FullDerivativeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullDerivativeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullDerivativeMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullDerivativeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullDerivativeMarket.Merge(m, src) +} +func (m *FullDerivativeMarket) XXX_Size() int { + return m.Size() +} +func (m *FullDerivativeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_FullDerivativeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_FullDerivativeMarket proto.InternalMessageInfo + +type isFullDerivativeMarket_Info interface { + isFullDerivativeMarket_Info() + MarshalTo([]byte) (int, error) + Size() int +} + +type FullDerivativeMarket_PerpetualInfo struct { + PerpetualInfo *PerpetualMarketState `protobuf:"bytes,2,opt,name=perpetual_info,json=perpetualInfo,proto3,oneof" json:"perpetual_info,omitempty"` +} +type FullDerivativeMarket_FuturesInfo struct { + FuturesInfo *ExpiryFuturesMarketInfo `protobuf:"bytes,3,opt,name=futures_info,json=futuresInfo,proto3,oneof" json:"futures_info,omitempty"` +} + +func (*FullDerivativeMarket_PerpetualInfo) isFullDerivativeMarket_Info() {} +func (*FullDerivativeMarket_FuturesInfo) isFullDerivativeMarket_Info() {} + +func (m *FullDerivativeMarket) GetInfo() isFullDerivativeMarket_Info { + if m != nil { + return m.Info + } + return nil +} + +func (m *FullDerivativeMarket) GetMarket() *DerivativeMarket { + if m != nil { + return m.Market + } + return nil +} + +func (m *FullDerivativeMarket) GetPerpetualInfo() *PerpetualMarketState { + if x, ok := m.GetInfo().(*FullDerivativeMarket_PerpetualInfo); ok { + return x.PerpetualInfo + } + return nil +} + +func (m *FullDerivativeMarket) GetFuturesInfo() *ExpiryFuturesMarketInfo { + if x, ok := m.GetInfo().(*FullDerivativeMarket_FuturesInfo); ok { + return x.FuturesInfo + } + return nil +} + +func (m *FullDerivativeMarket) GetMidPriceAndTob() *MidPriceAndTOB { + if m != nil { + return m.MidPriceAndTob + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*FullDerivativeMarket) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*FullDerivativeMarket_PerpetualInfo)(nil), + (*FullDerivativeMarket_FuturesInfo)(nil), + } +} + +// QueryDerivativeMarketsResponse is the response type for the +// Query/DerivativeMarkets RPC method. +type QueryDerivativeMarketsResponse struct { + Markets []*FullDerivativeMarket `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (m *QueryDerivativeMarketsResponse) Reset() { *m = QueryDerivativeMarketsResponse{} } +func (m *QueryDerivativeMarketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketsResponse) ProtoMessage() {} +func (*QueryDerivativeMarketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{61} +} +func (m *QueryDerivativeMarketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketsResponse.Merge(m, src) +} +func (m *QueryDerivativeMarketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketsResponse proto.InternalMessageInfo + +func (m *QueryDerivativeMarketsResponse) GetMarkets() []*FullDerivativeMarket { + if m != nil { + return m.Markets + } + return nil +} + +// QueryDerivativeMarketRequest is the request type for the +// Query/DerivativeMarket RPC method. +type QueryDerivativeMarketRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryDerivativeMarketRequest) Reset() { *m = QueryDerivativeMarketRequest{} } +func (m *QueryDerivativeMarketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketRequest) ProtoMessage() {} +func (*QueryDerivativeMarketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{62} +} +func (m *QueryDerivativeMarketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketRequest.Merge(m, src) +} +func (m *QueryDerivativeMarketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketRequest proto.InternalMessageInfo + +func (m *QueryDerivativeMarketRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryDerivativeMarketResponse is the response type for the +// Query/DerivativeMarket RPC method. +type QueryDerivativeMarketResponse struct { + Market *FullDerivativeMarket `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` +} + +func (m *QueryDerivativeMarketResponse) Reset() { *m = QueryDerivativeMarketResponse{} } +func (m *QueryDerivativeMarketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketResponse) ProtoMessage() {} +func (*QueryDerivativeMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{63} +} +func (m *QueryDerivativeMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketResponse.Merge(m, src) +} +func (m *QueryDerivativeMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketResponse proto.InternalMessageInfo + +func (m *QueryDerivativeMarketResponse) GetMarket() *FullDerivativeMarket { + if m != nil { + return m.Market + } + return nil +} + +// QueryDerivativeMarketAddressRequest is the request type for the +// Query/DerivativeMarketAddress RPC method. +type QueryDerivativeMarketAddressRequest struct { + // Market ID for the market + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryDerivativeMarketAddressRequest) Reset() { *m = QueryDerivativeMarketAddressRequest{} } +func (m *QueryDerivativeMarketAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketAddressRequest) ProtoMessage() {} +func (*QueryDerivativeMarketAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{64} +} +func (m *QueryDerivativeMarketAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketAddressRequest.Merge(m, src) +} +func (m *QueryDerivativeMarketAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketAddressRequest proto.InternalMessageInfo + +func (m *QueryDerivativeMarketAddressRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryDerivativeMarketAddressResponse is the response type for the +// Query/DerivativeMarketAddress RPC method. +type QueryDerivativeMarketAddressResponse struct { + // address for the market + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // subaccountID for the market + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QueryDerivativeMarketAddressResponse) Reset() { *m = QueryDerivativeMarketAddressResponse{} } +func (m *QueryDerivativeMarketAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDerivativeMarketAddressResponse) ProtoMessage() {} +func (*QueryDerivativeMarketAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{65} +} +func (m *QueryDerivativeMarketAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDerivativeMarketAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDerivativeMarketAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryDerivativeMarketAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDerivativeMarketAddressResponse.Merge(m, src) +} +func (m *QueryDerivativeMarketAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDerivativeMarketAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDerivativeMarketAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDerivativeMarketAddressResponse proto.InternalMessageInfo + +func (m *QueryDerivativeMarketAddressResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *QueryDerivativeMarketAddressResponse) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QuerySubaccountTradeNonceRequest is the request type for the +// Query/SubaccountTradeNonce RPC method. +type QuerySubaccountTradeNonceRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QuerySubaccountTradeNonceRequest) Reset() { *m = QuerySubaccountTradeNonceRequest{} } +func (m *QuerySubaccountTradeNonceRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountTradeNonceRequest) ProtoMessage() {} +func (*QuerySubaccountTradeNonceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{66} +} +func (m *QuerySubaccountTradeNonceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountTradeNonceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountTradeNonceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountTradeNonceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountTradeNonceRequest.Merge(m, src) +} +func (m *QuerySubaccountTradeNonceRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountTradeNonceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountTradeNonceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountTradeNonceRequest proto.InternalMessageInfo + +func (m *QuerySubaccountTradeNonceRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QuerySubaccountPositionsRequest is the request type for the +// Query/SubaccountPositions RPC method. +type QuerySubaccountPositionsRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QuerySubaccountPositionsRequest) Reset() { *m = QuerySubaccountPositionsRequest{} } +func (m *QuerySubaccountPositionsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountPositionsRequest) ProtoMessage() {} +func (*QuerySubaccountPositionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{67} +} +func (m *QuerySubaccountPositionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountPositionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountPositionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountPositionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountPositionsRequest.Merge(m, src) +} +func (m *QuerySubaccountPositionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountPositionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountPositionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountPositionsRequest proto.InternalMessageInfo + +func (m *QuerySubaccountPositionsRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QuerySubaccountPositionInMarketRequest is the request type for the +// Query/SubaccountPositionInMarket RPC method. +type QuerySubaccountPositionInMarketRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QuerySubaccountPositionInMarketRequest) Reset() { + *m = QuerySubaccountPositionInMarketRequest{} +} +func (m *QuerySubaccountPositionInMarketRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountPositionInMarketRequest) ProtoMessage() {} +func (*QuerySubaccountPositionInMarketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{68} +} +func (m *QuerySubaccountPositionInMarketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountPositionInMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountPositionInMarketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountPositionInMarketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountPositionInMarketRequest.Merge(m, src) +} +func (m *QuerySubaccountPositionInMarketRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountPositionInMarketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountPositionInMarketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountPositionInMarketRequest proto.InternalMessageInfo + +func (m *QuerySubaccountPositionInMarketRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySubaccountPositionInMarketRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QuerySubaccountEffectivePositionInMarketRequest is the request type for the +// Query/SubaccountEffectivePositionInMarket RPC method. +type QuerySubaccountEffectivePositionInMarketRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) Reset() { + *m = QuerySubaccountEffectivePositionInMarketRequest{} +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) String() string { + return proto.CompactTextString(m) +} +func (*QuerySubaccountEffectivePositionInMarketRequest) ProtoMessage() {} +func (*QuerySubaccountEffectivePositionInMarketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{69} +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountEffectivePositionInMarketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountEffectivePositionInMarketRequest.Merge(m, src) +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountEffectivePositionInMarketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountEffectivePositionInMarketRequest proto.InternalMessageInfo + +func (m *QuerySubaccountEffectivePositionInMarketRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QuerySubaccountOrderMetadataRequest is the request type for the +// Query/SubaccountOrderMetadata RPC method. +type QuerySubaccountOrderMetadataRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *QuerySubaccountOrderMetadataRequest) Reset() { *m = QuerySubaccountOrderMetadataRequest{} } +func (m *QuerySubaccountOrderMetadataRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountOrderMetadataRequest) ProtoMessage() {} +func (*QuerySubaccountOrderMetadataRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{70} +} +func (m *QuerySubaccountOrderMetadataRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountOrderMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountOrderMetadataRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountOrderMetadataRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountOrderMetadataRequest.Merge(m, src) +} +func (m *QuerySubaccountOrderMetadataRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountOrderMetadataRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountOrderMetadataRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountOrderMetadataRequest proto.InternalMessageInfo + +func (m *QuerySubaccountOrderMetadataRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +// QuerySubaccountPositionsResponse is the response type for the +// Query/SubaccountPositions RPC method. +type QuerySubaccountPositionsResponse struct { + State []DerivativePosition `protobuf:"bytes,1,rep,name=state,proto3" json:"state"` +} + +func (m *QuerySubaccountPositionsResponse) Reset() { *m = QuerySubaccountPositionsResponse{} } +func (m *QuerySubaccountPositionsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountPositionsResponse) ProtoMessage() {} +func (*QuerySubaccountPositionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{71} +} +func (m *QuerySubaccountPositionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountPositionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountPositionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountPositionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountPositionsResponse.Merge(m, src) +} +func (m *QuerySubaccountPositionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountPositionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountPositionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountPositionsResponse proto.InternalMessageInfo + +func (m *QuerySubaccountPositionsResponse) GetState() []DerivativePosition { + if m != nil { + return m.State + } + return nil +} + +// QuerySubaccountPositionInMarketResponse is the response type for the +// Query/SubaccountPositionInMarket RPC method. +type QuerySubaccountPositionInMarketResponse struct { + State *Position `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` +} + +func (m *QuerySubaccountPositionInMarketResponse) Reset() { + *m = QuerySubaccountPositionInMarketResponse{} +} +func (m *QuerySubaccountPositionInMarketResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountPositionInMarketResponse) ProtoMessage() {} +func (*QuerySubaccountPositionInMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{72} +} +func (m *QuerySubaccountPositionInMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountPositionInMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountPositionInMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountPositionInMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountPositionInMarketResponse.Merge(m, src) +} +func (m *QuerySubaccountPositionInMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountPositionInMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountPositionInMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountPositionInMarketResponse proto.InternalMessageInfo + +func (m *QuerySubaccountPositionInMarketResponse) GetState() *Position { + if m != nil { + return m.State + } + return nil +} + +type EffectivePosition struct { + IsLong bool `protobuf:"varint,1,opt,name=is_long,json=isLong,proto3" json:"is_long,omitempty"` + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + EffectiveMargin cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=effective_margin,json=effectiveMargin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"effective_margin"` +} + +func (m *EffectivePosition) Reset() { *m = EffectivePosition{} } +func (m *EffectivePosition) String() string { return proto.CompactTextString(m) } +func (*EffectivePosition) ProtoMessage() {} +func (*EffectivePosition) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{73} +} +func (m *EffectivePosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EffectivePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EffectivePosition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EffectivePosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_EffectivePosition.Merge(m, src) +} +func (m *EffectivePosition) XXX_Size() int { + return m.Size() +} +func (m *EffectivePosition) XXX_DiscardUnknown() { + xxx_messageInfo_EffectivePosition.DiscardUnknown(m) +} + +var xxx_messageInfo_EffectivePosition proto.InternalMessageInfo + +func (m *EffectivePosition) GetIsLong() bool { + if m != nil { + return m.IsLong + } + return false +} + +// QuerySubaccountEffectivePositionInMarketResponse is the response type for the +// Query/SubaccountEffectivePositionInMarket RPC method. +type QuerySubaccountEffectivePositionInMarketResponse struct { + State *EffectivePosition `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` +} + +func (m *QuerySubaccountEffectivePositionInMarketResponse) Reset() { + *m = QuerySubaccountEffectivePositionInMarketResponse{} +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) String() string { + return proto.CompactTextString(m) +} +func (*QuerySubaccountEffectivePositionInMarketResponse) ProtoMessage() {} +func (*QuerySubaccountEffectivePositionInMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{74} +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountEffectivePositionInMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountEffectivePositionInMarketResponse.Merge(m, src) +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountEffectivePositionInMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountEffectivePositionInMarketResponse proto.InternalMessageInfo + +func (m *QuerySubaccountEffectivePositionInMarketResponse) GetState() *EffectivePosition { + if m != nil { + return m.State + } + return nil +} + +// QueryPerpetualMarketInfoRequest is the request type for the +// Query/PerpetualMarketInfo RPC method. +type QueryPerpetualMarketInfoRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryPerpetualMarketInfoRequest) Reset() { *m = QueryPerpetualMarketInfoRequest{} } +func (m *QueryPerpetualMarketInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPerpetualMarketInfoRequest) ProtoMessage() {} +func (*QueryPerpetualMarketInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{75} +} +func (m *QueryPerpetualMarketInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPerpetualMarketInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPerpetualMarketInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPerpetualMarketInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPerpetualMarketInfoRequest.Merge(m, src) +} +func (m *QueryPerpetualMarketInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPerpetualMarketInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPerpetualMarketInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPerpetualMarketInfoRequest proto.InternalMessageInfo + +func (m *QueryPerpetualMarketInfoRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryPerpetualMarketInfoResponse is the response type for the +// Query/PerpetualMarketInfo RPC method. +type QueryPerpetualMarketInfoResponse struct { + Info PerpetualMarketInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (m *QueryPerpetualMarketInfoResponse) Reset() { *m = QueryPerpetualMarketInfoResponse{} } +func (m *QueryPerpetualMarketInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPerpetualMarketInfoResponse) ProtoMessage() {} +func (*QueryPerpetualMarketInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{76} +} +func (m *QueryPerpetualMarketInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPerpetualMarketInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPerpetualMarketInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPerpetualMarketInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPerpetualMarketInfoResponse.Merge(m, src) +} +func (m *QueryPerpetualMarketInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPerpetualMarketInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPerpetualMarketInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPerpetualMarketInfoResponse proto.InternalMessageInfo + +func (m *QueryPerpetualMarketInfoResponse) GetInfo() PerpetualMarketInfo { + if m != nil { + return m.Info + } + return PerpetualMarketInfo{} +} + +// QueryExpiryFuturesMarketInfoRequest is the request type for the Query/ +// ExpiryFuturesMarketInfo RPC method. +type QueryExpiryFuturesMarketInfoRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryExpiryFuturesMarketInfoRequest) Reset() { *m = QueryExpiryFuturesMarketInfoRequest{} } +func (m *QueryExpiryFuturesMarketInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryExpiryFuturesMarketInfoRequest) ProtoMessage() {} +func (*QueryExpiryFuturesMarketInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{77} +} +func (m *QueryExpiryFuturesMarketInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExpiryFuturesMarketInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExpiryFuturesMarketInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExpiryFuturesMarketInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExpiryFuturesMarketInfoRequest.Merge(m, src) +} +func (m *QueryExpiryFuturesMarketInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryExpiryFuturesMarketInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExpiryFuturesMarketInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExpiryFuturesMarketInfoRequest proto.InternalMessageInfo + +func (m *QueryExpiryFuturesMarketInfoRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryExpiryFuturesMarketInfoResponse is the response type for the Query/ +// ExpiryFuturesMarketInfo RPC method. +type QueryExpiryFuturesMarketInfoResponse struct { + Info ExpiryFuturesMarketInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (m *QueryExpiryFuturesMarketInfoResponse) Reset() { *m = QueryExpiryFuturesMarketInfoResponse{} } +func (m *QueryExpiryFuturesMarketInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryExpiryFuturesMarketInfoResponse) ProtoMessage() {} +func (*QueryExpiryFuturesMarketInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{78} +} +func (m *QueryExpiryFuturesMarketInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExpiryFuturesMarketInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExpiryFuturesMarketInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryExpiryFuturesMarketInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExpiryFuturesMarketInfoResponse.Merge(m, src) +} +func (m *QueryExpiryFuturesMarketInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryExpiryFuturesMarketInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExpiryFuturesMarketInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExpiryFuturesMarketInfoResponse proto.InternalMessageInfo + +func (m *QueryExpiryFuturesMarketInfoResponse) GetInfo() ExpiryFuturesMarketInfo { + if m != nil { + return m.Info + } + return ExpiryFuturesMarketInfo{} +} + +// QueryPerpetualMarketFundingRequest is the request type for the +// Query/PerpetualMarketFunding RPC method. +type QueryPerpetualMarketFundingRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryPerpetualMarketFundingRequest) Reset() { *m = QueryPerpetualMarketFundingRequest{} } +func (m *QueryPerpetualMarketFundingRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPerpetualMarketFundingRequest) ProtoMessage() {} +func (*QueryPerpetualMarketFundingRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{79} +} +func (m *QueryPerpetualMarketFundingRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPerpetualMarketFundingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPerpetualMarketFundingRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPerpetualMarketFundingRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPerpetualMarketFundingRequest.Merge(m, src) +} +func (m *QueryPerpetualMarketFundingRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPerpetualMarketFundingRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPerpetualMarketFundingRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPerpetualMarketFundingRequest proto.InternalMessageInfo + +func (m *QueryPerpetualMarketFundingRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// QueryPerpetualMarketFundingResponse is the response type for the +// Query/PerpetualMarketFunding RPC method. +type QueryPerpetualMarketFundingResponse struct { + State PerpetualMarketFunding `protobuf:"bytes,1,opt,name=state,proto3" json:"state"` +} + +func (m *QueryPerpetualMarketFundingResponse) Reset() { *m = QueryPerpetualMarketFundingResponse{} } +func (m *QueryPerpetualMarketFundingResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPerpetualMarketFundingResponse) ProtoMessage() {} +func (*QueryPerpetualMarketFundingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{80} +} +func (m *QueryPerpetualMarketFundingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPerpetualMarketFundingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPerpetualMarketFundingResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPerpetualMarketFundingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPerpetualMarketFundingResponse.Merge(m, src) +} +func (m *QueryPerpetualMarketFundingResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPerpetualMarketFundingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPerpetualMarketFundingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPerpetualMarketFundingResponse proto.InternalMessageInfo + +func (m *QueryPerpetualMarketFundingResponse) GetState() PerpetualMarketFunding { + if m != nil { + return m.State + } + return PerpetualMarketFunding{} +} + +// QuerySubaccountOrderMetadataResponse is the response type for the +// Query/SubaccountOrderMetadata RPC method. +type QuerySubaccountOrderMetadataResponse struct { + Metadata []SubaccountOrderbookMetadataWithMarket `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata"` +} + +func (m *QuerySubaccountOrderMetadataResponse) Reset() { *m = QuerySubaccountOrderMetadataResponse{} } +func (m *QuerySubaccountOrderMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountOrderMetadataResponse) ProtoMessage() {} +func (*QuerySubaccountOrderMetadataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{81} +} +func (m *QuerySubaccountOrderMetadataResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountOrderMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountOrderMetadataResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountOrderMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountOrderMetadataResponse.Merge(m, src) +} +func (m *QuerySubaccountOrderMetadataResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountOrderMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountOrderMetadataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountOrderMetadataResponse proto.InternalMessageInfo + +func (m *QuerySubaccountOrderMetadataResponse) GetMetadata() []SubaccountOrderbookMetadataWithMarket { + if m != nil { + return m.Metadata + } + return nil +} + +// QuerySubaccountTradeNonceResponse is the response type for the +// Query/SubaccountTradeNonce RPC method. +type QuerySubaccountTradeNonceResponse struct { + Nonce uint32 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *QuerySubaccountTradeNonceResponse) Reset() { *m = QuerySubaccountTradeNonceResponse{} } +func (m *QuerySubaccountTradeNonceResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubaccountTradeNonceResponse) ProtoMessage() {} +func (*QuerySubaccountTradeNonceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{82} +} +func (m *QuerySubaccountTradeNonceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubaccountTradeNonceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubaccountTradeNonceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubaccountTradeNonceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubaccountTradeNonceResponse.Merge(m, src) +} +func (m *QuerySubaccountTradeNonceResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubaccountTradeNonceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubaccountTradeNonceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubaccountTradeNonceResponse proto.InternalMessageInfo + +func (m *QuerySubaccountTradeNonceResponse) GetNonce() uint32 { + if m != nil { + return m.Nonce + } + return 0 +} + +// QueryModuleStateRequest is the request type for the Query/ExchangeModuleState +// RPC method. +type QueryModuleStateRequest struct { +} + +func (m *QueryModuleStateRequest) Reset() { *m = QueryModuleStateRequest{} } +func (m *QueryModuleStateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleStateRequest) ProtoMessage() {} +func (*QueryModuleStateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{83} +} +func (m *QueryModuleStateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleStateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryModuleStateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleStateRequest.Merge(m, src) +} +func (m *QueryModuleStateRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleStateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleStateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleStateRequest proto.InternalMessageInfo + +// QueryModuleStateResponse is the response type for the +// Query/ExchangeModuleState RPC method. +type QueryModuleStateResponse struct { + State *GenesisState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` +} + +func (m *QueryModuleStateResponse) Reset() { *m = QueryModuleStateResponse{} } +func (m *QueryModuleStateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleStateResponse) ProtoMessage() {} +func (*QueryModuleStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{84} +} +func (m *QueryModuleStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleStateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryModuleStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleStateResponse.Merge(m, src) +} +func (m *QueryModuleStateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleStateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleStateResponse proto.InternalMessageInfo + +func (m *QueryModuleStateResponse) GetState() *GenesisState { + if m != nil { + return m.State + } + return nil +} + +// QueryPositionsRequest is the request type for the Query/Positions RPC method. +type QueryPositionsRequest struct { +} + +func (m *QueryPositionsRequest) Reset() { *m = QueryPositionsRequest{} } +func (m *QueryPositionsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPositionsRequest) ProtoMessage() {} +func (*QueryPositionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{85} +} +func (m *QueryPositionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPositionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPositionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPositionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPositionsRequest.Merge(m, src) +} +func (m *QueryPositionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPositionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPositionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPositionsRequest proto.InternalMessageInfo + +// QueryPositionsResponse is the response type for the Query/Positions RPC +// method. +type QueryPositionsResponse struct { + State []DerivativePosition `protobuf:"bytes,1,rep,name=state,proto3" json:"state"` +} + +func (m *QueryPositionsResponse) Reset() { *m = QueryPositionsResponse{} } +func (m *QueryPositionsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPositionsResponse) ProtoMessage() {} +func (*QueryPositionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{86} +} +func (m *QueryPositionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPositionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPositionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPositionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPositionsResponse.Merge(m, src) +} +func (m *QueryPositionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPositionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPositionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPositionsResponse proto.InternalMessageInfo + +func (m *QueryPositionsResponse) GetState() []DerivativePosition { + if m != nil { + return m.State + } + return nil +} + +// QueryTradeRewardPointsRequest is the request type for the +// Query/TradeRewardPoints RPC method. +type QueryTradeRewardPointsRequest struct { + Accounts []string `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + PendingPoolTimestamp int64 `protobuf:"varint,2,opt,name=pending_pool_timestamp,json=pendingPoolTimestamp,proto3" json:"pending_pool_timestamp,omitempty"` +} + +func (m *QueryTradeRewardPointsRequest) Reset() { *m = QueryTradeRewardPointsRequest{} } +func (m *QueryTradeRewardPointsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTradeRewardPointsRequest) ProtoMessage() {} +func (*QueryTradeRewardPointsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{87} +} +func (m *QueryTradeRewardPointsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTradeRewardPointsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTradeRewardPointsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTradeRewardPointsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTradeRewardPointsRequest.Merge(m, src) +} +func (m *QueryTradeRewardPointsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTradeRewardPointsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTradeRewardPointsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTradeRewardPointsRequest proto.InternalMessageInfo + +func (m *QueryTradeRewardPointsRequest) GetAccounts() []string { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryTradeRewardPointsRequest) GetPendingPoolTimestamp() int64 { + if m != nil { + return m.PendingPoolTimestamp + } + return 0 +} + +// QueryTradeRewardPointsResponse is the response type for the +// Query/TradeRewardPoints RPC method. +type QueryTradeRewardPointsResponse struct { + AccountTradeRewardPoints []cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,rep,name=account_trade_reward_points,json=accountTradeRewardPoints,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"account_trade_reward_points"` +} + +func (m *QueryTradeRewardPointsResponse) Reset() { *m = QueryTradeRewardPointsResponse{} } +func (m *QueryTradeRewardPointsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTradeRewardPointsResponse) ProtoMessage() {} +func (*QueryTradeRewardPointsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{88} +} +func (m *QueryTradeRewardPointsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTradeRewardPointsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTradeRewardPointsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTradeRewardPointsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTradeRewardPointsResponse.Merge(m, src) +} +func (m *QueryTradeRewardPointsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTradeRewardPointsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTradeRewardPointsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTradeRewardPointsResponse proto.InternalMessageInfo + +// QueryTradeRewardCampaignRequest is the request type for the +// Query/TradeRewardCampaign RPC method. +type QueryTradeRewardCampaignRequest struct { +} + +func (m *QueryTradeRewardCampaignRequest) Reset() { *m = QueryTradeRewardCampaignRequest{} } +func (m *QueryTradeRewardCampaignRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTradeRewardCampaignRequest) ProtoMessage() {} +func (*QueryTradeRewardCampaignRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{89} +} +func (m *QueryTradeRewardCampaignRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTradeRewardCampaignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTradeRewardCampaignRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTradeRewardCampaignRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTradeRewardCampaignRequest.Merge(m, src) +} +func (m *QueryTradeRewardCampaignRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTradeRewardCampaignRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTradeRewardCampaignRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTradeRewardCampaignRequest proto.InternalMessageInfo + +// QueryTradeRewardCampaignResponse is the response type for the +// Query/TradeRewardCampaign RPC method. +type QueryTradeRewardCampaignResponse struct { + TradingRewardCampaignInfo *TradingRewardCampaignInfo `protobuf:"bytes,1,opt,name=trading_reward_campaign_info,json=tradingRewardCampaignInfo,proto3" json:"trading_reward_campaign_info,omitempty"` + TradingRewardPoolCampaignSchedule []*CampaignRewardPool `protobuf:"bytes,2,rep,name=trading_reward_pool_campaign_schedule,json=tradingRewardPoolCampaignSchedule,proto3" json:"trading_reward_pool_campaign_schedule,omitempty"` + TotalTradeRewardPoints cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=total_trade_reward_points,json=totalTradeRewardPoints,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total_trade_reward_points"` + PendingTradingRewardPoolCampaignSchedule []*CampaignRewardPool `protobuf:"bytes,4,rep,name=pending_trading_reward_pool_campaign_schedule,json=pendingTradingRewardPoolCampaignSchedule,proto3" json:"pending_trading_reward_pool_campaign_schedule,omitempty"` + PendingTotalTradeRewardPoints []cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,rep,name=pending_total_trade_reward_points,json=pendingTotalTradeRewardPoints,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"pending_total_trade_reward_points"` +} + +func (m *QueryTradeRewardCampaignResponse) Reset() { *m = QueryTradeRewardCampaignResponse{} } +func (m *QueryTradeRewardCampaignResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTradeRewardCampaignResponse) ProtoMessage() {} +func (*QueryTradeRewardCampaignResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{90} +} +func (m *QueryTradeRewardCampaignResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTradeRewardCampaignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTradeRewardCampaignResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTradeRewardCampaignResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTradeRewardCampaignResponse.Merge(m, src) +} +func (m *QueryTradeRewardCampaignResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTradeRewardCampaignResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTradeRewardCampaignResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTradeRewardCampaignResponse proto.InternalMessageInfo + +func (m *QueryTradeRewardCampaignResponse) GetTradingRewardCampaignInfo() *TradingRewardCampaignInfo { + if m != nil { + return m.TradingRewardCampaignInfo + } + return nil +} + +func (m *QueryTradeRewardCampaignResponse) GetTradingRewardPoolCampaignSchedule() []*CampaignRewardPool { + if m != nil { + return m.TradingRewardPoolCampaignSchedule + } + return nil +} + +func (m *QueryTradeRewardCampaignResponse) GetPendingTradingRewardPoolCampaignSchedule() []*CampaignRewardPool { + if m != nil { + return m.PendingTradingRewardPoolCampaignSchedule + } + return nil +} + +// QueryIsRegisteredDMMRequest is the request type for the Query/IsRegisteredDMM +// RPC method. +type QueryIsOptedOutOfRewardsRequest struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *QueryIsOptedOutOfRewardsRequest) Reset() { *m = QueryIsOptedOutOfRewardsRequest{} } +func (m *QueryIsOptedOutOfRewardsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIsOptedOutOfRewardsRequest) ProtoMessage() {} +func (*QueryIsOptedOutOfRewardsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{91} +} +func (m *QueryIsOptedOutOfRewardsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIsOptedOutOfRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIsOptedOutOfRewardsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIsOptedOutOfRewardsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIsOptedOutOfRewardsRequest.Merge(m, src) +} +func (m *QueryIsOptedOutOfRewardsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIsOptedOutOfRewardsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIsOptedOutOfRewardsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIsOptedOutOfRewardsRequest proto.InternalMessageInfo + +func (m *QueryIsOptedOutOfRewardsRequest) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +// QueryIsRegisteredDMMResponse is the response type for the +// Query/IsRegisteredDMM RPC method. +type QueryIsOptedOutOfRewardsResponse struct { + IsOptedOut bool `protobuf:"varint,1,opt,name=is_opted_out,json=isOptedOut,proto3" json:"is_opted_out,omitempty"` +} + +func (m *QueryIsOptedOutOfRewardsResponse) Reset() { *m = QueryIsOptedOutOfRewardsResponse{} } +func (m *QueryIsOptedOutOfRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIsOptedOutOfRewardsResponse) ProtoMessage() {} +func (*QueryIsOptedOutOfRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{92} +} +func (m *QueryIsOptedOutOfRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIsOptedOutOfRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIsOptedOutOfRewardsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIsOptedOutOfRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIsOptedOutOfRewardsResponse.Merge(m, src) +} +func (m *QueryIsOptedOutOfRewardsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIsOptedOutOfRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIsOptedOutOfRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIsOptedOutOfRewardsResponse proto.InternalMessageInfo + +func (m *QueryIsOptedOutOfRewardsResponse) GetIsOptedOut() bool { + if m != nil { + return m.IsOptedOut + } + return false +} + +// QueryRegisteredDMMsRequest is the request type for the Query/RegisteredDMMs +// RPC method. +type QueryOptedOutOfRewardsAccountsRequest struct { +} + +func (m *QueryOptedOutOfRewardsAccountsRequest) Reset() { *m = QueryOptedOutOfRewardsAccountsRequest{} } +func (m *QueryOptedOutOfRewardsAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOptedOutOfRewardsAccountsRequest) ProtoMessage() {} +func (*QueryOptedOutOfRewardsAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{93} +} +func (m *QueryOptedOutOfRewardsAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOptedOutOfRewardsAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOptedOutOfRewardsAccountsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOptedOutOfRewardsAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOptedOutOfRewardsAccountsRequest.Merge(m, src) +} +func (m *QueryOptedOutOfRewardsAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOptedOutOfRewardsAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOptedOutOfRewardsAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOptedOutOfRewardsAccountsRequest proto.InternalMessageInfo + +// QueryRegisteredDMMsResponse is the response type for the Query/RegisteredDMMs +// RPC method. +type QueryOptedOutOfRewardsAccountsResponse struct { + Accounts []string `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (m *QueryOptedOutOfRewardsAccountsResponse) Reset() { + *m = QueryOptedOutOfRewardsAccountsResponse{} +} +func (m *QueryOptedOutOfRewardsAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOptedOutOfRewardsAccountsResponse) ProtoMessage() {} +func (*QueryOptedOutOfRewardsAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{94} +} +func (m *QueryOptedOutOfRewardsAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOptedOutOfRewardsAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOptedOutOfRewardsAccountsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryOptedOutOfRewardsAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOptedOutOfRewardsAccountsResponse.Merge(m, src) +} +func (m *QueryOptedOutOfRewardsAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOptedOutOfRewardsAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOptedOutOfRewardsAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOptedOutOfRewardsAccountsResponse proto.InternalMessageInfo + +func (m *QueryOptedOutOfRewardsAccountsResponse) GetAccounts() []string { + if m != nil { + return m.Accounts + } + return nil +} + +// QueryFeeDiscountAccountInfoRequest is the request type for the +// Query/FeeDiscountAccountInfo RPC method. +type QueryFeeDiscountAccountInfoRequest struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *QueryFeeDiscountAccountInfoRequest) Reset() { *m = QueryFeeDiscountAccountInfoRequest{} } +func (m *QueryFeeDiscountAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountAccountInfoRequest) ProtoMessage() {} +func (*QueryFeeDiscountAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{95} +} +func (m *QueryFeeDiscountAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountAccountInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountAccountInfoRequest.Merge(m, src) +} +func (m *QueryFeeDiscountAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountAccountInfoRequest proto.InternalMessageInfo + +func (m *QueryFeeDiscountAccountInfoRequest) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +// QueryFeeDiscountAccountInfoResponse is the response type for the +// Query/FeeDiscountAccountInfo RPC method. +type QueryFeeDiscountAccountInfoResponse struct { + TierLevel uint64 `protobuf:"varint,1,opt,name=tier_level,json=tierLevel,proto3" json:"tier_level,omitempty"` + AccountInfo *FeeDiscountTierInfo `protobuf:"bytes,2,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` + AccountTtl *FeeDiscountTierTTL `protobuf:"bytes,3,opt,name=account_ttl,json=accountTtl,proto3" json:"account_ttl,omitempty"` +} + +func (m *QueryFeeDiscountAccountInfoResponse) Reset() { *m = QueryFeeDiscountAccountInfoResponse{} } +func (m *QueryFeeDiscountAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountAccountInfoResponse) ProtoMessage() {} +func (*QueryFeeDiscountAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{96} +} +func (m *QueryFeeDiscountAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountAccountInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountAccountInfoResponse.Merge(m, src) +} +func (m *QueryFeeDiscountAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryFeeDiscountAccountInfoResponse) GetTierLevel() uint64 { + if m != nil { + return m.TierLevel + } + return 0 +} + +func (m *QueryFeeDiscountAccountInfoResponse) GetAccountInfo() *FeeDiscountTierInfo { + if m != nil { + return m.AccountInfo + } + return nil +} + +func (m *QueryFeeDiscountAccountInfoResponse) GetAccountTtl() *FeeDiscountTierTTL { + if m != nil { + return m.AccountTtl + } + return nil +} + +// QueryFeeDiscountScheduleRequest is the request type for the +// Query/FeeDiscountSchedule RPC method. +type QueryFeeDiscountScheduleRequest struct { +} + +func (m *QueryFeeDiscountScheduleRequest) Reset() { *m = QueryFeeDiscountScheduleRequest{} } +func (m *QueryFeeDiscountScheduleRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountScheduleRequest) ProtoMessage() {} +func (*QueryFeeDiscountScheduleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{97} +} +func (m *QueryFeeDiscountScheduleRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountScheduleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountScheduleRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountScheduleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountScheduleRequest.Merge(m, src) +} +func (m *QueryFeeDiscountScheduleRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountScheduleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountScheduleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountScheduleRequest proto.InternalMessageInfo + +// QueryFeeDiscountScheduleResponse is the response type for the +// Query/FeeDiscountSchedule RPC method. +type QueryFeeDiscountScheduleResponse struct { + FeeDiscountSchedule *FeeDiscountSchedule `protobuf:"bytes,1,opt,name=fee_discount_schedule,json=feeDiscountSchedule,proto3" json:"fee_discount_schedule,omitempty"` +} + +func (m *QueryFeeDiscountScheduleResponse) Reset() { *m = QueryFeeDiscountScheduleResponse{} } +func (m *QueryFeeDiscountScheduleResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountScheduleResponse) ProtoMessage() {} +func (*QueryFeeDiscountScheduleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{98} +} +func (m *QueryFeeDiscountScheduleResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountScheduleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountScheduleResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountScheduleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountScheduleResponse.Merge(m, src) +} +func (m *QueryFeeDiscountScheduleResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountScheduleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountScheduleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountScheduleResponse proto.InternalMessageInfo + +func (m *QueryFeeDiscountScheduleResponse) GetFeeDiscountSchedule() *FeeDiscountSchedule { + if m != nil { + return m.FeeDiscountSchedule + } + return nil +} + +// QueryBalanceMismatchesRequest is the request type for the +// Query/QueryBalanceMismatches RPC method. +type QueryBalanceMismatchesRequest struct { + DustFactor int64 `protobuf:"varint,1,opt,name=dust_factor,json=dustFactor,proto3" json:"dust_factor,omitempty"` +} + +func (m *QueryBalanceMismatchesRequest) Reset() { *m = QueryBalanceMismatchesRequest{} } +func (m *QueryBalanceMismatchesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceMismatchesRequest) ProtoMessage() {} +func (*QueryBalanceMismatchesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{99} +} +func (m *QueryBalanceMismatchesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceMismatchesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceMismatchesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceMismatchesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceMismatchesRequest.Merge(m, src) +} +func (m *QueryBalanceMismatchesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceMismatchesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceMismatchesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceMismatchesRequest proto.InternalMessageInfo + +func (m *QueryBalanceMismatchesRequest) GetDustFactor() int64 { + if m != nil { + return m.DustFactor + } + return 0 +} + +type BalanceMismatch struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` + ExpectedTotal cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=expected_total,json=expectedTotal,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"expected_total"` + Difference cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=difference,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"difference"` +} + +func (m *BalanceMismatch) Reset() { *m = BalanceMismatch{} } +func (m *BalanceMismatch) String() string { return proto.CompactTextString(m) } +func (*BalanceMismatch) ProtoMessage() {} +func (*BalanceMismatch) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{100} +} +func (m *BalanceMismatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceMismatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceMismatch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceMismatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceMismatch.Merge(m, src) +} +func (m *BalanceMismatch) XXX_Size() int { + return m.Size() +} +func (m *BalanceMismatch) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceMismatch.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceMismatch proto.InternalMessageInfo + +func (m *BalanceMismatch) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BalanceMismatch) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryBalanceMismatchesResponse is the response type for the +// Query/QueryBalanceMismatches RPC method. +type QueryBalanceMismatchesResponse struct { + BalanceMismatches []*BalanceMismatch `protobuf:"bytes,1,rep,name=balance_mismatches,json=balanceMismatches,proto3" json:"balance_mismatches,omitempty"` +} + +func (m *QueryBalanceMismatchesResponse) Reset() { *m = QueryBalanceMismatchesResponse{} } +func (m *QueryBalanceMismatchesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceMismatchesResponse) ProtoMessage() {} +func (*QueryBalanceMismatchesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{101} +} +func (m *QueryBalanceMismatchesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceMismatchesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceMismatchesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceMismatchesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceMismatchesResponse.Merge(m, src) +} +func (m *QueryBalanceMismatchesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceMismatchesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceMismatchesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceMismatchesResponse proto.InternalMessageInfo + +func (m *QueryBalanceMismatchesResponse) GetBalanceMismatches() []*BalanceMismatch { + if m != nil { + return m.BalanceMismatches + } + return nil +} + +// QueryBalanceWithBalanceHoldsRequest is the request type for the +// Query/QueryBalanceWithBalanceHolds RPC method. +type QueryBalanceWithBalanceHoldsRequest struct { +} + +func (m *QueryBalanceWithBalanceHoldsRequest) Reset() { *m = QueryBalanceWithBalanceHoldsRequest{} } +func (m *QueryBalanceWithBalanceHoldsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceWithBalanceHoldsRequest) ProtoMessage() {} +func (*QueryBalanceWithBalanceHoldsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{102} +} +func (m *QueryBalanceWithBalanceHoldsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceWithBalanceHoldsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceWithBalanceHoldsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest.Merge(m, src) +} +func (m *QueryBalanceWithBalanceHoldsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceWithBalanceHoldsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceWithBalanceHoldsRequest proto.InternalMessageInfo + +type BalanceWithMarginHold struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccountId,proto3" json:"subaccountId,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Available cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=available,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"available"` + Total cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=total,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"total"` + BalanceHold cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=balance_hold,json=balanceHold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"balance_hold"` +} + +func (m *BalanceWithMarginHold) Reset() { *m = BalanceWithMarginHold{} } +func (m *BalanceWithMarginHold) String() string { return proto.CompactTextString(m) } +func (*BalanceWithMarginHold) ProtoMessage() {} +func (*BalanceWithMarginHold) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{103} +} +func (m *BalanceWithMarginHold) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalanceWithMarginHold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalanceWithMarginHold.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BalanceWithMarginHold) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceWithMarginHold.Merge(m, src) +} +func (m *BalanceWithMarginHold) XXX_Size() int { + return m.Size() +} +func (m *BalanceWithMarginHold) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceWithMarginHold.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceWithMarginHold proto.InternalMessageInfo + +func (m *BalanceWithMarginHold) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *BalanceWithMarginHold) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryBalanceWithBalanceHoldsResponse is the response type for the +// Query/QueryBalanceWithBalanceHolds RPC method. +type QueryBalanceWithBalanceHoldsResponse struct { + BalanceWithBalanceHolds []*BalanceWithMarginHold `protobuf:"bytes,1,rep,name=balance_with_balance_holds,json=balanceWithBalanceHolds,proto3" json:"balance_with_balance_holds,omitempty"` +} + +func (m *QueryBalanceWithBalanceHoldsResponse) Reset() { *m = QueryBalanceWithBalanceHoldsResponse{} } +func (m *QueryBalanceWithBalanceHoldsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceWithBalanceHoldsResponse) ProtoMessage() {} +func (*QueryBalanceWithBalanceHoldsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{104} +} +func (m *QueryBalanceWithBalanceHoldsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceWithBalanceHoldsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceWithBalanceHoldsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBalanceWithBalanceHoldsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceWithBalanceHoldsResponse.Merge(m, src) +} +func (m *QueryBalanceWithBalanceHoldsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceWithBalanceHoldsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceWithBalanceHoldsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceWithBalanceHoldsResponse proto.InternalMessageInfo + +func (m *QueryBalanceWithBalanceHoldsResponse) GetBalanceWithBalanceHolds() []*BalanceWithMarginHold { + if m != nil { + return m.BalanceWithBalanceHolds + } + return nil +} + +// QueryFeeDiscountTierStatisticsRequest is the request type for the +// Query/QueryFeeDiscountTierStatistics RPC method. +type QueryFeeDiscountTierStatisticsRequest struct { +} + +func (m *QueryFeeDiscountTierStatisticsRequest) Reset() { *m = QueryFeeDiscountTierStatisticsRequest{} } +func (m *QueryFeeDiscountTierStatisticsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountTierStatisticsRequest) ProtoMessage() {} +func (*QueryFeeDiscountTierStatisticsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{105} +} +func (m *QueryFeeDiscountTierStatisticsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountTierStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountTierStatisticsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountTierStatisticsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountTierStatisticsRequest.Merge(m, src) +} +func (m *QueryFeeDiscountTierStatisticsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountTierStatisticsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountTierStatisticsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountTierStatisticsRequest proto.InternalMessageInfo + +type TierStatistic struct { + Tier uint64 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (m *TierStatistic) Reset() { *m = TierStatistic{} } +func (m *TierStatistic) String() string { return proto.CompactTextString(m) } +func (*TierStatistic) ProtoMessage() {} +func (*TierStatistic) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{106} +} +func (m *TierStatistic) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TierStatistic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TierStatistic.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TierStatistic) XXX_Merge(src proto.Message) { + xxx_messageInfo_TierStatistic.Merge(m, src) +} +func (m *TierStatistic) XXX_Size() int { + return m.Size() +} +func (m *TierStatistic) XXX_DiscardUnknown() { + xxx_messageInfo_TierStatistic.DiscardUnknown(m) +} + +var xxx_messageInfo_TierStatistic proto.InternalMessageInfo + +func (m *TierStatistic) GetTier() uint64 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *TierStatistic) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} + +// QueryFeeDiscountTierStatisticsResponse is the response type for the +// Query/QueryFeeDiscountTierStatistics RPC method. +type QueryFeeDiscountTierStatisticsResponse struct { + Statistics []*TierStatistic `protobuf:"bytes,1,rep,name=statistics,proto3" json:"statistics,omitempty"` +} + +func (m *QueryFeeDiscountTierStatisticsResponse) Reset() { + *m = QueryFeeDiscountTierStatisticsResponse{} +} +func (m *QueryFeeDiscountTierStatisticsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeDiscountTierStatisticsResponse) ProtoMessage() {} +func (*QueryFeeDiscountTierStatisticsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{107} +} +func (m *QueryFeeDiscountTierStatisticsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeDiscountTierStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeDiscountTierStatisticsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFeeDiscountTierStatisticsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeDiscountTierStatisticsResponse.Merge(m, src) +} +func (m *QueryFeeDiscountTierStatisticsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeDiscountTierStatisticsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeDiscountTierStatisticsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeDiscountTierStatisticsResponse proto.InternalMessageInfo + +func (m *QueryFeeDiscountTierStatisticsResponse) GetStatistics() []*TierStatistic { + if m != nil { + return m.Statistics + } + return nil +} + +// MitoVaultInfosRequest is the request type for the Query/MitoVaultInfos RPC +// method. +type MitoVaultInfosRequest struct { +} + +func (m *MitoVaultInfosRequest) Reset() { *m = MitoVaultInfosRequest{} } +func (m *MitoVaultInfosRequest) String() string { return proto.CompactTextString(m) } +func (*MitoVaultInfosRequest) ProtoMessage() {} +func (*MitoVaultInfosRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{108} +} +func (m *MitoVaultInfosRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MitoVaultInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MitoVaultInfosRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MitoVaultInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MitoVaultInfosRequest.Merge(m, src) +} +func (m *MitoVaultInfosRequest) XXX_Size() int { + return m.Size() +} +func (m *MitoVaultInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MitoVaultInfosRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MitoVaultInfosRequest proto.InternalMessageInfo + +// MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC +// method. +type MitoVaultInfosResponse struct { + MasterAddresses []string `protobuf:"bytes,1,rep,name=master_addresses,json=masterAddresses,proto3" json:"master_addresses,omitempty"` + DerivativeAddresses []string `protobuf:"bytes,2,rep,name=derivative_addresses,json=derivativeAddresses,proto3" json:"derivative_addresses,omitempty"` + SpotAddresses []string `protobuf:"bytes,3,rep,name=spot_addresses,json=spotAddresses,proto3" json:"spot_addresses,omitempty"` + Cw20Addresses []string `protobuf:"bytes,4,rep,name=cw20_addresses,json=cw20Addresses,proto3" json:"cw20_addresses,omitempty"` +} + +func (m *MitoVaultInfosResponse) Reset() { *m = MitoVaultInfosResponse{} } +func (m *MitoVaultInfosResponse) String() string { return proto.CompactTextString(m) } +func (*MitoVaultInfosResponse) ProtoMessage() {} +func (*MitoVaultInfosResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{109} +} +func (m *MitoVaultInfosResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MitoVaultInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MitoVaultInfosResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MitoVaultInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MitoVaultInfosResponse.Merge(m, src) +} +func (m *MitoVaultInfosResponse) XXX_Size() int { + return m.Size() +} +func (m *MitoVaultInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MitoVaultInfosResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MitoVaultInfosResponse proto.InternalMessageInfo + +func (m *MitoVaultInfosResponse) GetMasterAddresses() []string { + if m != nil { + return m.MasterAddresses + } + return nil +} + +func (m *MitoVaultInfosResponse) GetDerivativeAddresses() []string { + if m != nil { + return m.DerivativeAddresses + } + return nil +} + +func (m *MitoVaultInfosResponse) GetSpotAddresses() []string { + if m != nil { + return m.SpotAddresses + } + return nil +} + +func (m *MitoVaultInfosResponse) GetCw20Addresses() []string { + if m != nil { + return m.Cw20Addresses + } + return nil +} + +// QueryMarketIDFromVaultRequest is the request type for the +// Query/QueryMarketIDFromVault RPC method. +type QueryMarketIDFromVaultRequest struct { + VaultAddress string `protobuf:"bytes,1,opt,name=vault_address,json=vaultAddress,proto3" json:"vault_address,omitempty"` +} + +func (m *QueryMarketIDFromVaultRequest) Reset() { *m = QueryMarketIDFromVaultRequest{} } +func (m *QueryMarketIDFromVaultRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMarketIDFromVaultRequest) ProtoMessage() {} +func (*QueryMarketIDFromVaultRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{110} +} +func (m *QueryMarketIDFromVaultRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketIDFromVaultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketIDFromVaultRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketIDFromVaultRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketIDFromVaultRequest.Merge(m, src) +} +func (m *QueryMarketIDFromVaultRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketIDFromVaultRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketIDFromVaultRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketIDFromVaultRequest proto.InternalMessageInfo + +func (m *QueryMarketIDFromVaultRequest) GetVaultAddress() string { + if m != nil { + return m.VaultAddress + } + return "" +} + +// QueryMarketIDFromVaultResponse is the response type for the +// Query/QueryMarketIDFromVault RPC method. +type QueryMarketIDFromVaultResponse struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryMarketIDFromVaultResponse) Reset() { *m = QueryMarketIDFromVaultResponse{} } +func (m *QueryMarketIDFromVaultResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMarketIDFromVaultResponse) ProtoMessage() {} +func (*QueryMarketIDFromVaultResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{111} +} +func (m *QueryMarketIDFromVaultResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketIDFromVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketIDFromVaultResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketIDFromVaultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketIDFromVaultResponse.Merge(m, src) +} +func (m *QueryMarketIDFromVaultResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketIDFromVaultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketIDFromVaultResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketIDFromVaultResponse proto.InternalMessageInfo + +func (m *QueryMarketIDFromVaultResponse) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryHistoricalTradeRecordsRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryHistoricalTradeRecordsRequest) Reset() { *m = QueryHistoricalTradeRecordsRequest{} } +func (m *QueryHistoricalTradeRecordsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryHistoricalTradeRecordsRequest) ProtoMessage() {} +func (*QueryHistoricalTradeRecordsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{112} +} +func (m *QueryHistoricalTradeRecordsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHistoricalTradeRecordsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHistoricalTradeRecordsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryHistoricalTradeRecordsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHistoricalTradeRecordsRequest.Merge(m, src) +} +func (m *QueryHistoricalTradeRecordsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryHistoricalTradeRecordsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHistoricalTradeRecordsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryHistoricalTradeRecordsRequest proto.InternalMessageInfo + +func (m *QueryHistoricalTradeRecordsRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryHistoricalTradeRecordsResponse struct { + TradeRecords []*TradeRecords `protobuf:"bytes,1,rep,name=trade_records,json=tradeRecords,proto3" json:"trade_records,omitempty"` +} + +func (m *QueryHistoricalTradeRecordsResponse) Reset() { *m = QueryHistoricalTradeRecordsResponse{} } +func (m *QueryHistoricalTradeRecordsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHistoricalTradeRecordsResponse) ProtoMessage() {} +func (*QueryHistoricalTradeRecordsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{113} +} +func (m *QueryHistoricalTradeRecordsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHistoricalTradeRecordsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHistoricalTradeRecordsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryHistoricalTradeRecordsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHistoricalTradeRecordsResponse.Merge(m, src) +} +func (m *QueryHistoricalTradeRecordsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryHistoricalTradeRecordsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHistoricalTradeRecordsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryHistoricalTradeRecordsResponse proto.InternalMessageInfo + +func (m *QueryHistoricalTradeRecordsResponse) GetTradeRecords() []*TradeRecords { + if m != nil { + return m.TradeRecords + } + return nil +} + +// TradeHistoryOptions are the optional params for Query/MarketVolatility RPC +// method. +type TradeHistoryOptions struct { + // TradeGroupingSec of 0 means use the chain's default grouping + TradeGroupingSec uint64 `protobuf:"varint,1,opt,name=trade_grouping_sec,json=tradeGroupingSec,proto3" json:"trade_grouping_sec,omitempty"` + // MaxAge restricts the trade records oldest age in seconds from the current + // block time to consider. A value of 0 means use all the records present on + // the chain. + MaxAge uint64 `protobuf:"varint,2,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` + // If IncludeRawHistory is true, the raw underlying data used for the + // computation is included in the response + IncludeRawHistory bool `protobuf:"varint,4,opt,name=include_raw_history,json=includeRawHistory,proto3" json:"include_raw_history,omitempty"` + // If IncludeMetadata is true, metadata on the computation is included in the + // response + IncludeMetadata bool `protobuf:"varint,5,opt,name=include_metadata,json=includeMetadata,proto3" json:"include_metadata,omitempty"` +} + +func (m *TradeHistoryOptions) Reset() { *m = TradeHistoryOptions{} } +func (m *TradeHistoryOptions) String() string { return proto.CompactTextString(m) } +func (*TradeHistoryOptions) ProtoMessage() {} +func (*TradeHistoryOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{114} +} +func (m *TradeHistoryOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradeHistoryOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradeHistoryOptions.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradeHistoryOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradeHistoryOptions.Merge(m, src) +} +func (m *TradeHistoryOptions) XXX_Size() int { + return m.Size() +} +func (m *TradeHistoryOptions) XXX_DiscardUnknown() { + xxx_messageInfo_TradeHistoryOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_TradeHistoryOptions proto.InternalMessageInfo + +func (m *TradeHistoryOptions) GetTradeGroupingSec() uint64 { + if m != nil { + return m.TradeGroupingSec + } + return 0 +} + +func (m *TradeHistoryOptions) GetMaxAge() uint64 { + if m != nil { + return m.MaxAge + } + return 0 +} + +func (m *TradeHistoryOptions) GetIncludeRawHistory() bool { + if m != nil { + return m.IncludeRawHistory + } + return false +} + +func (m *TradeHistoryOptions) GetIncludeMetadata() bool { + if m != nil { + return m.IncludeMetadata + } + return false +} + +// QueryMarketVolatilityRequest are the request params for the +// Query/MarketVolatility RPC method. +type QueryMarketVolatilityRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + TradeHistoryOptions *TradeHistoryOptions `protobuf:"bytes,2,opt,name=trade_history_options,json=tradeHistoryOptions,proto3" json:"trade_history_options,omitempty"` +} + +func (m *QueryMarketVolatilityRequest) Reset() { *m = QueryMarketVolatilityRequest{} } +func (m *QueryMarketVolatilityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMarketVolatilityRequest) ProtoMessage() {} +func (*QueryMarketVolatilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{115} +} +func (m *QueryMarketVolatilityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketVolatilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketVolatilityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketVolatilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketVolatilityRequest.Merge(m, src) +} +func (m *QueryMarketVolatilityRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketVolatilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketVolatilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketVolatilityRequest proto.InternalMessageInfo + +func (m *QueryMarketVolatilityRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *QueryMarketVolatilityRequest) GetTradeHistoryOptions() *TradeHistoryOptions { + if m != nil { + return m.TradeHistoryOptions + } + return nil +} + +// QueryMarketVolatilityResponse is the response type for the +// Query/MarketVolatility RPC method. +type QueryMarketVolatilityResponse struct { + Volatility *cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=volatility,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"volatility,omitempty"` + HistoryMetadata *types.MetadataStatistics `protobuf:"bytes,2,opt,name=history_metadata,json=historyMetadata,proto3" json:"history_metadata,omitempty"` + RawHistory []*TradeRecord `protobuf:"bytes,3,rep,name=raw_history,json=rawHistory,proto3" json:"raw_history,omitempty"` +} + +func (m *QueryMarketVolatilityResponse) Reset() { *m = QueryMarketVolatilityResponse{} } +func (m *QueryMarketVolatilityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMarketVolatilityResponse) ProtoMessage() {} +func (*QueryMarketVolatilityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{116} +} +func (m *QueryMarketVolatilityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketVolatilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketVolatilityResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketVolatilityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketVolatilityResponse.Merge(m, src) +} +func (m *QueryMarketVolatilityResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketVolatilityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketVolatilityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketVolatilityResponse proto.InternalMessageInfo + +func (m *QueryMarketVolatilityResponse) GetHistoryMetadata() *types.MetadataStatistics { + if m != nil { + return m.HistoryMetadata + } + return nil +} + +func (m *QueryMarketVolatilityResponse) GetRawHistory() []*TradeRecord { + if m != nil { + return m.RawHistory + } + return nil +} + +// QuerBinaryMarketsRequest is the request type for the Query/BinaryMarkets RPC +// method. +type QueryBinaryMarketsRequest struct { + // Status of the market, for convenience it is set to string - not enum + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (m *QueryBinaryMarketsRequest) Reset() { *m = QueryBinaryMarketsRequest{} } +func (m *QueryBinaryMarketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBinaryMarketsRequest) ProtoMessage() {} +func (*QueryBinaryMarketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{117} +} +func (m *QueryBinaryMarketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBinaryMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBinaryMarketsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBinaryMarketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBinaryMarketsRequest.Merge(m, src) +} +func (m *QueryBinaryMarketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBinaryMarketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBinaryMarketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBinaryMarketsRequest proto.InternalMessageInfo + +func (m *QueryBinaryMarketsRequest) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +// QueryBinaryMarketsResponse is the response type for the Query/BinaryMarkets +// RPC method. +type QueryBinaryMarketsResponse struct { + Markets []*BinaryOptionsMarket `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets,omitempty"` +} + +func (m *QueryBinaryMarketsResponse) Reset() { *m = QueryBinaryMarketsResponse{} } +func (m *QueryBinaryMarketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBinaryMarketsResponse) ProtoMessage() {} +func (*QueryBinaryMarketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{118} +} +func (m *QueryBinaryMarketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBinaryMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBinaryMarketsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBinaryMarketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBinaryMarketsResponse.Merge(m, src) +} +func (m *QueryBinaryMarketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBinaryMarketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBinaryMarketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBinaryMarketsResponse proto.InternalMessageInfo + +func (m *QueryBinaryMarketsResponse) GetMarkets() []*BinaryOptionsMarket { + if m != nil { + return m.Markets + } + return nil +} + +// QueryConditionalOrdersRequest is the request type for the +// Query/ConditionalOrders RPC method. +type QueryTraderDerivativeConditionalOrdersRequest struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) Reset() { + *m = QueryTraderDerivativeConditionalOrdersRequest{} +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryTraderDerivativeConditionalOrdersRequest) ProtoMessage() {} +func (*QueryTraderDerivativeConditionalOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{119} +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderDerivativeConditionalOrdersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderDerivativeConditionalOrdersRequest.Merge(m, src) +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderDerivativeConditionalOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderDerivativeConditionalOrdersRequest proto.InternalMessageInfo + +func (m *QueryTraderDerivativeConditionalOrdersRequest) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type TrimmedDerivativeConditionalOrder struct { + // price of the order + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + // margin of the order + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + // price to trigger the order + TriggerPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=triggerPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"triggerPrice"` + // true if the order is a buy + IsBuy bool `protobuf:"varint,5,opt,name=isBuy,proto3" json:"isBuy"` + IsLimit bool `protobuf:"varint,6,opt,name=isLimit,proto3" json:"isLimit"` + OrderHash string `protobuf:"bytes,7,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,8,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *TrimmedDerivativeConditionalOrder) Reset() { *m = TrimmedDerivativeConditionalOrder{} } +func (m *TrimmedDerivativeConditionalOrder) String() string { return proto.CompactTextString(m) } +func (*TrimmedDerivativeConditionalOrder) ProtoMessage() {} +func (*TrimmedDerivativeConditionalOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{120} +} +func (m *TrimmedDerivativeConditionalOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrimmedDerivativeConditionalOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrimmedDerivativeConditionalOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TrimmedDerivativeConditionalOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrimmedDerivativeConditionalOrder.Merge(m, src) +} +func (m *TrimmedDerivativeConditionalOrder) XXX_Size() int { + return m.Size() +} +func (m *TrimmedDerivativeConditionalOrder) XXX_DiscardUnknown() { + xxx_messageInfo_TrimmedDerivativeConditionalOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_TrimmedDerivativeConditionalOrder proto.InternalMessageInfo + +func (m *TrimmedDerivativeConditionalOrder) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *TrimmedDerivativeConditionalOrder) GetIsLimit() bool { + if m != nil { + return m.IsLimit + } + return false +} + +func (m *TrimmedDerivativeConditionalOrder) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *TrimmedDerivativeConditionalOrder) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +// QueryTraderDerivativeOrdersResponse is the response type for the +// Query/TraderDerivativeOrders RPC method. +type QueryTraderDerivativeConditionalOrdersResponse struct { + Orders []*TrimmedDerivativeConditionalOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` +} + +func (m *QueryTraderDerivativeConditionalOrdersResponse) Reset() { + *m = QueryTraderDerivativeConditionalOrdersResponse{} +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryTraderDerivativeConditionalOrdersResponse) ProtoMessage() {} +func (*QueryTraderDerivativeConditionalOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{121} +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraderDerivativeConditionalOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraderDerivativeConditionalOrdersResponse.Merge(m, src) +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraderDerivativeConditionalOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraderDerivativeConditionalOrdersResponse proto.InternalMessageInfo + +func (m *QueryTraderDerivativeConditionalOrdersResponse) GetOrders() []*TrimmedDerivativeConditionalOrder { + if m != nil { + return m.Orders + } + return nil +} + +type QueryFullSpotOrderbookRequest struct { + // market id + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryFullSpotOrderbookRequest) Reset() { *m = QueryFullSpotOrderbookRequest{} } +func (m *QueryFullSpotOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotOrderbookRequest) ProtoMessage() {} +func (*QueryFullSpotOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{122} +} +func (m *QueryFullSpotOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotOrderbookRequest.Merge(m, src) +} +func (m *QueryFullSpotOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotOrderbookRequest proto.InternalMessageInfo + +func (m *QueryFullSpotOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryFullSpotOrderbookResponse struct { + Bids []*TrimmedLimitOrder `protobuf:"bytes,1,rep,name=Bids,proto3" json:"Bids,omitempty"` + Asks []*TrimmedLimitOrder `protobuf:"bytes,2,rep,name=Asks,proto3" json:"Asks,omitempty"` +} + +func (m *QueryFullSpotOrderbookResponse) Reset() { *m = QueryFullSpotOrderbookResponse{} } +func (m *QueryFullSpotOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullSpotOrderbookResponse) ProtoMessage() {} +func (*QueryFullSpotOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{123} +} +func (m *QueryFullSpotOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullSpotOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullSpotOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullSpotOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullSpotOrderbookResponse.Merge(m, src) +} +func (m *QueryFullSpotOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullSpotOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullSpotOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullSpotOrderbookResponse proto.InternalMessageInfo + +func (m *QueryFullSpotOrderbookResponse) GetBids() []*TrimmedLimitOrder { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryFullSpotOrderbookResponse) GetAsks() []*TrimmedLimitOrder { + if m != nil { + return m.Asks + } + return nil +} + +type QueryFullDerivativeOrderbookRequest struct { + // market id + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryFullDerivativeOrderbookRequest) Reset() { *m = QueryFullDerivativeOrderbookRequest{} } +func (m *QueryFullDerivativeOrderbookRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFullDerivativeOrderbookRequest) ProtoMessage() {} +func (*QueryFullDerivativeOrderbookRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{124} +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullDerivativeOrderbookRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullDerivativeOrderbookRequest.Merge(m, src) +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFullDerivativeOrderbookRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullDerivativeOrderbookRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullDerivativeOrderbookRequest proto.InternalMessageInfo + +func (m *QueryFullDerivativeOrderbookRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryFullDerivativeOrderbookResponse struct { + Bids []*TrimmedLimitOrder `protobuf:"bytes,1,rep,name=Bids,proto3" json:"Bids,omitempty"` + Asks []*TrimmedLimitOrder `protobuf:"bytes,2,rep,name=Asks,proto3" json:"Asks,omitempty"` +} + +func (m *QueryFullDerivativeOrderbookResponse) Reset() { *m = QueryFullDerivativeOrderbookResponse{} } +func (m *QueryFullDerivativeOrderbookResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFullDerivativeOrderbookResponse) ProtoMessage() {} +func (*QueryFullDerivativeOrderbookResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{125} +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFullDerivativeOrderbookResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFullDerivativeOrderbookResponse.Merge(m, src) +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFullDerivativeOrderbookResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFullDerivativeOrderbookResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFullDerivativeOrderbookResponse proto.InternalMessageInfo + +func (m *QueryFullDerivativeOrderbookResponse) GetBids() []*TrimmedLimitOrder { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryFullDerivativeOrderbookResponse) GetAsks() []*TrimmedLimitOrder { + if m != nil { + return m.Asks + } + return nil +} + +type TrimmedLimitOrder struct { + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // quantity of the order + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` +} + +func (m *TrimmedLimitOrder) Reset() { *m = TrimmedLimitOrder{} } +func (m *TrimmedLimitOrder) String() string { return proto.CompactTextString(m) } +func (*TrimmedLimitOrder) ProtoMessage() {} +func (*TrimmedLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{126} +} +func (m *TrimmedLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrimmedLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrimmedLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TrimmedLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrimmedLimitOrder.Merge(m, src) +} +func (m *TrimmedLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *TrimmedLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_TrimmedLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_TrimmedLimitOrder proto.InternalMessageInfo + +func (m *TrimmedLimitOrder) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *TrimmedLimitOrder) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +type QueryMarketAtomicExecutionFeeMultiplierRequest struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Reset() { + *m = QueryMarketAtomicExecutionFeeMultiplierRequest{} +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryMarketAtomicExecutionFeeMultiplierRequest) ProtoMessage() {} +func (*QueryMarketAtomicExecutionFeeMultiplierRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{127} +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierRequest.Merge(m, src) +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierRequest proto.InternalMessageInfo + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +type QueryMarketAtomicExecutionFeeMultiplierResponse struct { + Multiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=multiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"multiplier"` +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Reset() { + *m = QueryMarketAtomicExecutionFeeMultiplierResponse{} +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryMarketAtomicExecutionFeeMultiplierResponse) ProtoMessage() {} +func (*QueryMarketAtomicExecutionFeeMultiplierResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{128} +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierResponse.Merge(m, src) +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketAtomicExecutionFeeMultiplierResponse proto.InternalMessageInfo + +type QueryActiveStakeGrantRequest struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` +} + +func (m *QueryActiveStakeGrantRequest) Reset() { *m = QueryActiveStakeGrantRequest{} } +func (m *QueryActiveStakeGrantRequest) String() string { return proto.CompactTextString(m) } +func (*QueryActiveStakeGrantRequest) ProtoMessage() {} +func (*QueryActiveStakeGrantRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{129} +} +func (m *QueryActiveStakeGrantRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryActiveStakeGrantRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryActiveStakeGrantRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryActiveStakeGrantRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryActiveStakeGrantRequest.Merge(m, src) +} +func (m *QueryActiveStakeGrantRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryActiveStakeGrantRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryActiveStakeGrantRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryActiveStakeGrantRequest proto.InternalMessageInfo + +func (m *QueryActiveStakeGrantRequest) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +type QueryActiveStakeGrantResponse struct { + Grant *ActiveGrant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` + EffectiveGrant *EffectiveGrant `protobuf:"bytes,2,opt,name=effective_grant,json=effectiveGrant,proto3" json:"effective_grant,omitempty"` +} + +func (m *QueryActiveStakeGrantResponse) Reset() { *m = QueryActiveStakeGrantResponse{} } +func (m *QueryActiveStakeGrantResponse) String() string { return proto.CompactTextString(m) } +func (*QueryActiveStakeGrantResponse) ProtoMessage() {} +func (*QueryActiveStakeGrantResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{130} +} +func (m *QueryActiveStakeGrantResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryActiveStakeGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryActiveStakeGrantResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryActiveStakeGrantResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryActiveStakeGrantResponse.Merge(m, src) +} +func (m *QueryActiveStakeGrantResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryActiveStakeGrantResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryActiveStakeGrantResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryActiveStakeGrantResponse proto.InternalMessageInfo + +func (m *QueryActiveStakeGrantResponse) GetGrant() *ActiveGrant { + if m != nil { + return m.Grant + } + return nil +} + +func (m *QueryActiveStakeGrantResponse) GetEffectiveGrant() *EffectiveGrant { + if m != nil { + return m.EffectiveGrant + } + return nil +} + +type QueryGrantAuthorizationRequest struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` +} + +func (m *QueryGrantAuthorizationRequest) Reset() { *m = QueryGrantAuthorizationRequest{} } +func (m *QueryGrantAuthorizationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGrantAuthorizationRequest) ProtoMessage() {} +func (*QueryGrantAuthorizationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{131} +} +func (m *QueryGrantAuthorizationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantAuthorizationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGrantAuthorizationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantAuthorizationRequest.Merge(m, src) +} +func (m *QueryGrantAuthorizationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantAuthorizationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantAuthorizationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantAuthorizationRequest proto.InternalMessageInfo + +func (m *QueryGrantAuthorizationRequest) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +func (m *QueryGrantAuthorizationRequest) GetGrantee() string { + if m != nil { + return m.Grantee + } + return "" +} + +type QueryGrantAuthorizationResponse struct { + Amount cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` +} + +func (m *QueryGrantAuthorizationResponse) Reset() { *m = QueryGrantAuthorizationResponse{} } +func (m *QueryGrantAuthorizationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGrantAuthorizationResponse) ProtoMessage() {} +func (*QueryGrantAuthorizationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{132} +} +func (m *QueryGrantAuthorizationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantAuthorizationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGrantAuthorizationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantAuthorizationResponse.Merge(m, src) +} +func (m *QueryGrantAuthorizationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantAuthorizationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantAuthorizationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantAuthorizationResponse proto.InternalMessageInfo + +type QueryGrantAuthorizationsRequest struct { + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` +} + +func (m *QueryGrantAuthorizationsRequest) Reset() { *m = QueryGrantAuthorizationsRequest{} } +func (m *QueryGrantAuthorizationsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGrantAuthorizationsRequest) ProtoMessage() {} +func (*QueryGrantAuthorizationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{133} +} +func (m *QueryGrantAuthorizationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantAuthorizationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantAuthorizationsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGrantAuthorizationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantAuthorizationsRequest.Merge(m, src) +} +func (m *QueryGrantAuthorizationsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantAuthorizationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantAuthorizationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantAuthorizationsRequest proto.InternalMessageInfo + +func (m *QueryGrantAuthorizationsRequest) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +type QueryGrantAuthorizationsResponse struct { + TotalGrantAmount cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=total_grant_amount,json=totalGrantAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_grant_amount"` + Grants []*GrantAuthorization `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"` +} + +func (m *QueryGrantAuthorizationsResponse) Reset() { *m = QueryGrantAuthorizationsResponse{} } +func (m *QueryGrantAuthorizationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGrantAuthorizationsResponse) ProtoMessage() {} +func (*QueryGrantAuthorizationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_108a0f108cdd0cc4, []int{134} +} +func (m *QueryGrantAuthorizationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGrantAuthorizationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGrantAuthorizationsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGrantAuthorizationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGrantAuthorizationsResponse.Merge(m, src) +} +func (m *QueryGrantAuthorizationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGrantAuthorizationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGrantAuthorizationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGrantAuthorizationsResponse proto.InternalMessageInfo + +func (m *QueryGrantAuthorizationsResponse) GetGrants() []*GrantAuthorization { + if m != nil { + return m.Grants + } + return nil +} + +func init() { + proto.RegisterEnum("injective.exchange.v2.OrderSide", OrderSide_name, OrderSide_value) + proto.RegisterEnum("injective.exchange.v2.CancellationStrategy", CancellationStrategy_name, CancellationStrategy_value) + proto.RegisterType((*Subaccount)(nil), "injective.exchange.v2.Subaccount") + proto.RegisterType((*QuerySubaccountOrdersRequest)(nil), "injective.exchange.v2.QuerySubaccountOrdersRequest") + proto.RegisterType((*QuerySubaccountOrdersResponse)(nil), "injective.exchange.v2.QuerySubaccountOrdersResponse") + proto.RegisterType((*SubaccountOrderbookMetadataWithMarket)(nil), "injective.exchange.v2.SubaccountOrderbookMetadataWithMarket") + proto.RegisterType((*QueryExchangeParamsRequest)(nil), "injective.exchange.v2.QueryExchangeParamsRequest") + proto.RegisterType((*QueryExchangeParamsResponse)(nil), "injective.exchange.v2.QueryExchangeParamsResponse") + proto.RegisterType((*QuerySubaccountDepositsRequest)(nil), "injective.exchange.v2.QuerySubaccountDepositsRequest") + proto.RegisterType((*QuerySubaccountDepositsResponse)(nil), "injective.exchange.v2.QuerySubaccountDepositsResponse") + proto.RegisterMapType((map[string]*Deposit)(nil), "injective.exchange.v2.QuerySubaccountDepositsResponse.DepositsEntry") + proto.RegisterType((*QueryExchangeBalancesRequest)(nil), "injective.exchange.v2.QueryExchangeBalancesRequest") + proto.RegisterType((*QueryExchangeBalancesResponse)(nil), "injective.exchange.v2.QueryExchangeBalancesResponse") + proto.RegisterType((*QueryAggregateVolumeRequest)(nil), "injective.exchange.v2.QueryAggregateVolumeRequest") + proto.RegisterType((*QueryAggregateVolumeResponse)(nil), "injective.exchange.v2.QueryAggregateVolumeResponse") + proto.RegisterType((*QueryAggregateVolumesRequest)(nil), "injective.exchange.v2.QueryAggregateVolumesRequest") + proto.RegisterType((*QueryAggregateVolumesResponse)(nil), "injective.exchange.v2.QueryAggregateVolumesResponse") + proto.RegisterType((*QueryAggregateMarketVolumeRequest)(nil), "injective.exchange.v2.QueryAggregateMarketVolumeRequest") + proto.RegisterType((*QueryAggregateMarketVolumeResponse)(nil), "injective.exchange.v2.QueryAggregateMarketVolumeResponse") + proto.RegisterType((*QueryDenomDecimalRequest)(nil), "injective.exchange.v2.QueryDenomDecimalRequest") + proto.RegisterType((*QueryDenomDecimalResponse)(nil), "injective.exchange.v2.QueryDenomDecimalResponse") + proto.RegisterType((*QueryDenomDecimalsRequest)(nil), "injective.exchange.v2.QueryDenomDecimalsRequest") + proto.RegisterType((*QueryDenomDecimalsResponse)(nil), "injective.exchange.v2.QueryDenomDecimalsResponse") + proto.RegisterType((*QueryAggregateMarketVolumesRequest)(nil), "injective.exchange.v2.QueryAggregateMarketVolumesRequest") + proto.RegisterType((*QueryAggregateMarketVolumesResponse)(nil), "injective.exchange.v2.QueryAggregateMarketVolumesResponse") + proto.RegisterType((*QuerySubaccountDepositRequest)(nil), "injective.exchange.v2.QuerySubaccountDepositRequest") + proto.RegisterType((*QuerySubaccountDepositResponse)(nil), "injective.exchange.v2.QuerySubaccountDepositResponse") + proto.RegisterType((*QuerySpotMarketsRequest)(nil), "injective.exchange.v2.QuerySpotMarketsRequest") + proto.RegisterType((*QuerySpotMarketsResponse)(nil), "injective.exchange.v2.QuerySpotMarketsResponse") + proto.RegisterType((*QuerySpotMarketRequest)(nil), "injective.exchange.v2.QuerySpotMarketRequest") + proto.RegisterType((*QuerySpotMarketResponse)(nil), "injective.exchange.v2.QuerySpotMarketResponse") + proto.RegisterType((*QuerySpotOrderbookRequest)(nil), "injective.exchange.v2.QuerySpotOrderbookRequest") + proto.RegisterType((*QuerySpotOrderbookResponse)(nil), "injective.exchange.v2.QuerySpotOrderbookResponse") + proto.RegisterType((*FullSpotMarket)(nil), "injective.exchange.v2.FullSpotMarket") + proto.RegisterType((*QueryFullSpotMarketsRequest)(nil), "injective.exchange.v2.QueryFullSpotMarketsRequest") + proto.RegisterType((*QueryFullSpotMarketsResponse)(nil), "injective.exchange.v2.QueryFullSpotMarketsResponse") + proto.RegisterType((*QueryFullSpotMarketRequest)(nil), "injective.exchange.v2.QueryFullSpotMarketRequest") + proto.RegisterType((*QueryFullSpotMarketResponse)(nil), "injective.exchange.v2.QueryFullSpotMarketResponse") + proto.RegisterType((*QuerySpotOrdersByHashesRequest)(nil), "injective.exchange.v2.QuerySpotOrdersByHashesRequest") + proto.RegisterType((*QuerySpotOrdersByHashesResponse)(nil), "injective.exchange.v2.QuerySpotOrdersByHashesResponse") + proto.RegisterType((*QueryTraderSpotOrdersRequest)(nil), "injective.exchange.v2.QueryTraderSpotOrdersRequest") + proto.RegisterType((*QueryAccountAddressSpotOrdersRequest)(nil), "injective.exchange.v2.QueryAccountAddressSpotOrdersRequest") + proto.RegisterType((*TrimmedSpotLimitOrder)(nil), "injective.exchange.v2.TrimmedSpotLimitOrder") + proto.RegisterType((*QueryTraderSpotOrdersResponse)(nil), "injective.exchange.v2.QueryTraderSpotOrdersResponse") + proto.RegisterType((*QueryAccountAddressSpotOrdersResponse)(nil), "injective.exchange.v2.QueryAccountAddressSpotOrdersResponse") + proto.RegisterType((*QuerySpotMidPriceAndTOBRequest)(nil), "injective.exchange.v2.QuerySpotMidPriceAndTOBRequest") + proto.RegisterType((*QuerySpotMidPriceAndTOBResponse)(nil), "injective.exchange.v2.QuerySpotMidPriceAndTOBResponse") + proto.RegisterType((*QueryDerivativeMidPriceAndTOBRequest)(nil), "injective.exchange.v2.QueryDerivativeMidPriceAndTOBRequest") + proto.RegisterType((*QueryDerivativeMidPriceAndTOBResponse)(nil), "injective.exchange.v2.QueryDerivativeMidPriceAndTOBResponse") + proto.RegisterType((*QueryDerivativeOrderbookRequest)(nil), "injective.exchange.v2.QueryDerivativeOrderbookRequest") + proto.RegisterType((*QueryDerivativeOrderbookResponse)(nil), "injective.exchange.v2.QueryDerivativeOrderbookResponse") + proto.RegisterType((*QueryTraderSpotOrdersToCancelUpToAmountRequest)(nil), "injective.exchange.v2.QueryTraderSpotOrdersToCancelUpToAmountRequest") + proto.RegisterType((*QueryTraderDerivativeOrdersToCancelUpToAmountRequest)(nil), "injective.exchange.v2.QueryTraderDerivativeOrdersToCancelUpToAmountRequest") + proto.RegisterType((*QueryTraderDerivativeOrdersRequest)(nil), "injective.exchange.v2.QueryTraderDerivativeOrdersRequest") + proto.RegisterType((*QueryAccountAddressDerivativeOrdersRequest)(nil), "injective.exchange.v2.QueryAccountAddressDerivativeOrdersRequest") + proto.RegisterType((*TrimmedDerivativeLimitOrder)(nil), "injective.exchange.v2.TrimmedDerivativeLimitOrder") + proto.RegisterType((*QueryTraderDerivativeOrdersResponse)(nil), "injective.exchange.v2.QueryTraderDerivativeOrdersResponse") + proto.RegisterType((*QueryAccountAddressDerivativeOrdersResponse)(nil), "injective.exchange.v2.QueryAccountAddressDerivativeOrdersResponse") + proto.RegisterType((*QueryDerivativeOrdersByHashesRequest)(nil), "injective.exchange.v2.QueryDerivativeOrdersByHashesRequest") + proto.RegisterType((*QueryDerivativeOrdersByHashesResponse)(nil), "injective.exchange.v2.QueryDerivativeOrdersByHashesResponse") + proto.RegisterType((*QueryDerivativeMarketsRequest)(nil), "injective.exchange.v2.QueryDerivativeMarketsRequest") + proto.RegisterType((*PriceLevel)(nil), "injective.exchange.v2.PriceLevel") + proto.RegisterType((*PerpetualMarketState)(nil), "injective.exchange.v2.PerpetualMarketState") + proto.RegisterType((*FullDerivativeMarket)(nil), "injective.exchange.v2.FullDerivativeMarket") + proto.RegisterType((*QueryDerivativeMarketsResponse)(nil), "injective.exchange.v2.QueryDerivativeMarketsResponse") + proto.RegisterType((*QueryDerivativeMarketRequest)(nil), "injective.exchange.v2.QueryDerivativeMarketRequest") + proto.RegisterType((*QueryDerivativeMarketResponse)(nil), "injective.exchange.v2.QueryDerivativeMarketResponse") + proto.RegisterType((*QueryDerivativeMarketAddressRequest)(nil), "injective.exchange.v2.QueryDerivativeMarketAddressRequest") + proto.RegisterType((*QueryDerivativeMarketAddressResponse)(nil), "injective.exchange.v2.QueryDerivativeMarketAddressResponse") + proto.RegisterType((*QuerySubaccountTradeNonceRequest)(nil), "injective.exchange.v2.QuerySubaccountTradeNonceRequest") + proto.RegisterType((*QuerySubaccountPositionsRequest)(nil), "injective.exchange.v2.QuerySubaccountPositionsRequest") + proto.RegisterType((*QuerySubaccountPositionInMarketRequest)(nil), "injective.exchange.v2.QuerySubaccountPositionInMarketRequest") + proto.RegisterType((*QuerySubaccountEffectivePositionInMarketRequest)(nil), "injective.exchange.v2.QuerySubaccountEffectivePositionInMarketRequest") + proto.RegisterType((*QuerySubaccountOrderMetadataRequest)(nil), "injective.exchange.v2.QuerySubaccountOrderMetadataRequest") + proto.RegisterType((*QuerySubaccountPositionsResponse)(nil), "injective.exchange.v2.QuerySubaccountPositionsResponse") + proto.RegisterType((*QuerySubaccountPositionInMarketResponse)(nil), "injective.exchange.v2.QuerySubaccountPositionInMarketResponse") + proto.RegisterType((*EffectivePosition)(nil), "injective.exchange.v2.EffectivePosition") + proto.RegisterType((*QuerySubaccountEffectivePositionInMarketResponse)(nil), "injective.exchange.v2.QuerySubaccountEffectivePositionInMarketResponse") + proto.RegisterType((*QueryPerpetualMarketInfoRequest)(nil), "injective.exchange.v2.QueryPerpetualMarketInfoRequest") + proto.RegisterType((*QueryPerpetualMarketInfoResponse)(nil), "injective.exchange.v2.QueryPerpetualMarketInfoResponse") + proto.RegisterType((*QueryExpiryFuturesMarketInfoRequest)(nil), "injective.exchange.v2.QueryExpiryFuturesMarketInfoRequest") + proto.RegisterType((*QueryExpiryFuturesMarketInfoResponse)(nil), "injective.exchange.v2.QueryExpiryFuturesMarketInfoResponse") + proto.RegisterType((*QueryPerpetualMarketFundingRequest)(nil), "injective.exchange.v2.QueryPerpetualMarketFundingRequest") + proto.RegisterType((*QueryPerpetualMarketFundingResponse)(nil), "injective.exchange.v2.QueryPerpetualMarketFundingResponse") + proto.RegisterType((*QuerySubaccountOrderMetadataResponse)(nil), "injective.exchange.v2.QuerySubaccountOrderMetadataResponse") + proto.RegisterType((*QuerySubaccountTradeNonceResponse)(nil), "injective.exchange.v2.QuerySubaccountTradeNonceResponse") + proto.RegisterType((*QueryModuleStateRequest)(nil), "injective.exchange.v2.QueryModuleStateRequest") + proto.RegisterType((*QueryModuleStateResponse)(nil), "injective.exchange.v2.QueryModuleStateResponse") + proto.RegisterType((*QueryPositionsRequest)(nil), "injective.exchange.v2.QueryPositionsRequest") + proto.RegisterType((*QueryPositionsResponse)(nil), "injective.exchange.v2.QueryPositionsResponse") + proto.RegisterType((*QueryTradeRewardPointsRequest)(nil), "injective.exchange.v2.QueryTradeRewardPointsRequest") + proto.RegisterType((*QueryTradeRewardPointsResponse)(nil), "injective.exchange.v2.QueryTradeRewardPointsResponse") + proto.RegisterType((*QueryTradeRewardCampaignRequest)(nil), "injective.exchange.v2.QueryTradeRewardCampaignRequest") + proto.RegisterType((*QueryTradeRewardCampaignResponse)(nil), "injective.exchange.v2.QueryTradeRewardCampaignResponse") + proto.RegisterType((*QueryIsOptedOutOfRewardsRequest)(nil), "injective.exchange.v2.QueryIsOptedOutOfRewardsRequest") + proto.RegisterType((*QueryIsOptedOutOfRewardsResponse)(nil), "injective.exchange.v2.QueryIsOptedOutOfRewardsResponse") + proto.RegisterType((*QueryOptedOutOfRewardsAccountsRequest)(nil), "injective.exchange.v2.QueryOptedOutOfRewardsAccountsRequest") + proto.RegisterType((*QueryOptedOutOfRewardsAccountsResponse)(nil), "injective.exchange.v2.QueryOptedOutOfRewardsAccountsResponse") + proto.RegisterType((*QueryFeeDiscountAccountInfoRequest)(nil), "injective.exchange.v2.QueryFeeDiscountAccountInfoRequest") + proto.RegisterType((*QueryFeeDiscountAccountInfoResponse)(nil), "injective.exchange.v2.QueryFeeDiscountAccountInfoResponse") + proto.RegisterType((*QueryFeeDiscountScheduleRequest)(nil), "injective.exchange.v2.QueryFeeDiscountScheduleRequest") + proto.RegisterType((*QueryFeeDiscountScheduleResponse)(nil), "injective.exchange.v2.QueryFeeDiscountScheduleResponse") + proto.RegisterType((*QueryBalanceMismatchesRequest)(nil), "injective.exchange.v2.QueryBalanceMismatchesRequest") + proto.RegisterType((*BalanceMismatch)(nil), "injective.exchange.v2.BalanceMismatch") + proto.RegisterType((*QueryBalanceMismatchesResponse)(nil), "injective.exchange.v2.QueryBalanceMismatchesResponse") + proto.RegisterType((*QueryBalanceWithBalanceHoldsRequest)(nil), "injective.exchange.v2.QueryBalanceWithBalanceHoldsRequest") + proto.RegisterType((*BalanceWithMarginHold)(nil), "injective.exchange.v2.BalanceWithMarginHold") + proto.RegisterType((*QueryBalanceWithBalanceHoldsResponse)(nil), "injective.exchange.v2.QueryBalanceWithBalanceHoldsResponse") + proto.RegisterType((*QueryFeeDiscountTierStatisticsRequest)(nil), "injective.exchange.v2.QueryFeeDiscountTierStatisticsRequest") + proto.RegisterType((*TierStatistic)(nil), "injective.exchange.v2.TierStatistic") + proto.RegisterType((*QueryFeeDiscountTierStatisticsResponse)(nil), "injective.exchange.v2.QueryFeeDiscountTierStatisticsResponse") + proto.RegisterType((*MitoVaultInfosRequest)(nil), "injective.exchange.v2.MitoVaultInfosRequest") + proto.RegisterType((*MitoVaultInfosResponse)(nil), "injective.exchange.v2.MitoVaultInfosResponse") + proto.RegisterType((*QueryMarketIDFromVaultRequest)(nil), "injective.exchange.v2.QueryMarketIDFromVaultRequest") + proto.RegisterType((*QueryMarketIDFromVaultResponse)(nil), "injective.exchange.v2.QueryMarketIDFromVaultResponse") + proto.RegisterType((*QueryHistoricalTradeRecordsRequest)(nil), "injective.exchange.v2.QueryHistoricalTradeRecordsRequest") + proto.RegisterType((*QueryHistoricalTradeRecordsResponse)(nil), "injective.exchange.v2.QueryHistoricalTradeRecordsResponse") + proto.RegisterType((*TradeHistoryOptions)(nil), "injective.exchange.v2.TradeHistoryOptions") + proto.RegisterType((*QueryMarketVolatilityRequest)(nil), "injective.exchange.v2.QueryMarketVolatilityRequest") + proto.RegisterType((*QueryMarketVolatilityResponse)(nil), "injective.exchange.v2.QueryMarketVolatilityResponse") + proto.RegisterType((*QueryBinaryMarketsRequest)(nil), "injective.exchange.v2.QueryBinaryMarketsRequest") + proto.RegisterType((*QueryBinaryMarketsResponse)(nil), "injective.exchange.v2.QueryBinaryMarketsResponse") + proto.RegisterType((*QueryTraderDerivativeConditionalOrdersRequest)(nil), "injective.exchange.v2.QueryTraderDerivativeConditionalOrdersRequest") + proto.RegisterType((*TrimmedDerivativeConditionalOrder)(nil), "injective.exchange.v2.TrimmedDerivativeConditionalOrder") + proto.RegisterType((*QueryTraderDerivativeConditionalOrdersResponse)(nil), "injective.exchange.v2.QueryTraderDerivativeConditionalOrdersResponse") + proto.RegisterType((*QueryFullSpotOrderbookRequest)(nil), "injective.exchange.v2.QueryFullSpotOrderbookRequest") + proto.RegisterType((*QueryFullSpotOrderbookResponse)(nil), "injective.exchange.v2.QueryFullSpotOrderbookResponse") + proto.RegisterType((*QueryFullDerivativeOrderbookRequest)(nil), "injective.exchange.v2.QueryFullDerivativeOrderbookRequest") + proto.RegisterType((*QueryFullDerivativeOrderbookResponse)(nil), "injective.exchange.v2.QueryFullDerivativeOrderbookResponse") + proto.RegisterType((*TrimmedLimitOrder)(nil), "injective.exchange.v2.TrimmedLimitOrder") + proto.RegisterType((*QueryMarketAtomicExecutionFeeMultiplierRequest)(nil), "injective.exchange.v2.QueryMarketAtomicExecutionFeeMultiplierRequest") + proto.RegisterType((*QueryMarketAtomicExecutionFeeMultiplierResponse)(nil), "injective.exchange.v2.QueryMarketAtomicExecutionFeeMultiplierResponse") + proto.RegisterType((*QueryActiveStakeGrantRequest)(nil), "injective.exchange.v2.QueryActiveStakeGrantRequest") + proto.RegisterType((*QueryActiveStakeGrantResponse)(nil), "injective.exchange.v2.QueryActiveStakeGrantResponse") + proto.RegisterType((*QueryGrantAuthorizationRequest)(nil), "injective.exchange.v2.QueryGrantAuthorizationRequest") + proto.RegisterType((*QueryGrantAuthorizationResponse)(nil), "injective.exchange.v2.QueryGrantAuthorizationResponse") + proto.RegisterType((*QueryGrantAuthorizationsRequest)(nil), "injective.exchange.v2.QueryGrantAuthorizationsRequest") + proto.RegisterType((*QueryGrantAuthorizationsResponse)(nil), "injective.exchange.v2.QueryGrantAuthorizationsResponse") +} + +func init() { proto.RegisterFile("injective/exchange/v2/query.proto", fileDescriptor_108a0f108cdd0cc4) } + +var fileDescriptor_108a0f108cdd0cc4 = []byte{ + // 5989 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7d, 0x6b, 0x8c, 0x1c, 0x57, + 0x56, 0xb0, 0xab, 0xe7, 0xe1, 0x99, 0x33, 0x4f, 0xdf, 0x19, 0x8f, 0xc7, 0x9d, 0xf8, 0x55, 0x8e, + 0xd7, 0xaf, 0x78, 0xda, 0x1e, 0xdb, 0xf1, 0xdb, 0xce, 0x8c, 0xc7, 0x63, 0x3b, 0x19, 0xdb, 0x93, + 0xf6, 0x24, 0xd9, 0x2f, 0xdf, 0x92, 0xde, 0x9a, 0xee, 0x9a, 0x9e, 0x5a, 0x77, 0x77, 0xb5, 0xbb, + 0xaa, 0xc7, 0x1e, 0x2c, 0xff, 0x20, 0xc0, 0x6a, 0x15, 0x24, 0xc4, 0xe3, 0xc7, 0xfe, 0x08, 0xda, + 0x1f, 0xbb, 0x08, 0x09, 0x58, 0x01, 0x5a, 0x82, 0x22, 0x91, 0x45, 0x3c, 0x03, 0x91, 0x90, 0x20, + 0xab, 0x00, 0x1b, 0x21, 0x6d, 0x58, 0x12, 0x24, 0xc4, 0x4a, 0xb0, 0xfc, 0x47, 0x02, 0x54, 0xf7, + 0x9e, 0x7b, 0xbb, 0x5e, 0xf7, 0x56, 0xd5, 0xd8, 0x91, 0x03, 0xfc, 0x9a, 0xae, 0xaa, 0x7b, 0xce, + 0x3d, 0xaf, 0x7b, 0xce, 0xb9, 0x8f, 0x73, 0x07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 0xc7, 0x55, 0xc3, 0x6a, 0xe0, 0x22, 0xb6, 0xd3, 0xa1, 0xc2, 0x5d, 0x6f, 0x9a, 0x4e, 0x61, 0x6d, + 0x7a, 0xb9, 0x97, 0xfe, 0x7b, 0xd7, 0xe3, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xba, 0x03, + 0xc1, 0x0b, 0x77, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// 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. +type QueryClient interface { + L3DerivativeOrderBook(ctx context.Context, in *QueryFullDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryFullDerivativeOrderbookResponse, error) + L3SpotOrderBook(ctx context.Context, in *QueryFullSpotOrderbookRequest, opts ...grpc.CallOption) (*QueryFullSpotOrderbookResponse, error) + // Retrieves exchange params + QueryExchangeParams(ctx context.Context, in *QueryExchangeParamsRequest, opts ...grpc.CallOption) (*QueryExchangeParamsResponse, error) + // Retrieves a Subaccount's Deposits + SubaccountDeposits(ctx context.Context, in *QuerySubaccountDepositsRequest, opts ...grpc.CallOption) (*QuerySubaccountDepositsResponse, error) + // Retrieves a Subaccount's Deposits + SubaccountDeposit(ctx context.Context, in *QuerySubaccountDepositRequest, opts ...grpc.CallOption) (*QuerySubaccountDepositResponse, error) + // Retrieves all of the balances of all users on the exchange. + ExchangeBalances(ctx context.Context, in *QueryExchangeBalancesRequest, opts ...grpc.CallOption) (*QueryExchangeBalancesResponse, error) + // Retrieves the aggregate volumes for the specified account or subaccount + AggregateVolume(ctx context.Context, in *QueryAggregateVolumeRequest, opts ...grpc.CallOption) (*QueryAggregateVolumeResponse, error) + // Retrieves the aggregate volumes for specified accounts + AggregateVolumes(ctx context.Context, in *QueryAggregateVolumesRequest, opts ...grpc.CallOption) (*QueryAggregateVolumesResponse, error) + // Retrieves the aggregate volume for the specified market + AggregateMarketVolume(ctx context.Context, in *QueryAggregateMarketVolumeRequest, opts ...grpc.CallOption) (*QueryAggregateMarketVolumeResponse, error) + // Retrieves the aggregate market volumes for specified markets + AggregateMarketVolumes(ctx context.Context, in *QueryAggregateMarketVolumesRequest, opts ...grpc.CallOption) (*QueryAggregateMarketVolumesResponse, error) + // Retrieves the denom decimals for a denom. + DenomDecimal(ctx context.Context, in *QueryDenomDecimalRequest, opts ...grpc.CallOption) (*QueryDenomDecimalResponse, error) + // Retrieves the denom decimals for multiple denoms. Returns all denom + // decimals if unspecified. + DenomDecimals(ctx context.Context, in *QueryDenomDecimalsRequest, opts ...grpc.CallOption) (*QueryDenomDecimalsResponse, error) + // Retrieves a list of spot markets. + SpotMarkets(ctx context.Context, in *QuerySpotMarketsRequest, opts ...grpc.CallOption) (*QuerySpotMarketsResponse, error) + // Retrieves a spot market by ticker + SpotMarket(ctx context.Context, in *QuerySpotMarketRequest, opts ...grpc.CallOption) (*QuerySpotMarketResponse, error) + // Retrieves a list of spot markets with extra information. + FullSpotMarkets(ctx context.Context, in *QueryFullSpotMarketsRequest, opts ...grpc.CallOption) (*QueryFullSpotMarketsResponse, error) + // Retrieves a spot market with extra information. + FullSpotMarket(ctx context.Context, in *QueryFullSpotMarketRequest, opts ...grpc.CallOption) (*QueryFullSpotMarketResponse, error) + // Retrieves a spot market's orderbook by marketID + SpotOrderbook(ctx context.Context, in *QuerySpotOrderbookRequest, opts ...grpc.CallOption) (*QuerySpotOrderbookResponse, error) + // Retrieves a trader's spot orders + TraderSpotOrders(ctx context.Context, in *QueryTraderSpotOrdersRequest, opts ...grpc.CallOption) (*QueryTraderSpotOrdersResponse, error) + // Retrieves all account address spot orders + AccountAddressSpotOrders(ctx context.Context, in *QueryAccountAddressSpotOrdersRequest, opts ...grpc.CallOption) (*QueryAccountAddressSpotOrdersResponse, error) + // Retrieves spot orders corresponding to specified order hashes for a given + // subaccountID and marketID + SpotOrdersByHashes(ctx context.Context, in *QuerySpotOrdersByHashesRequest, opts ...grpc.CallOption) (*QuerySpotOrdersByHashesResponse, error) + // Retrieves subaccount's orders + SubaccountOrders(ctx context.Context, in *QuerySubaccountOrdersRequest, opts ...grpc.CallOption) (*QuerySubaccountOrdersResponse, error) + // Retrieves a trader's transient spot orders + TraderSpotTransientOrders(ctx context.Context, in *QueryTraderSpotOrdersRequest, opts ...grpc.CallOption) (*QueryTraderSpotOrdersResponse, error) + // Retrieves a spot market's mid-price + SpotMidPriceAndTOB(ctx context.Context, in *QuerySpotMidPriceAndTOBRequest, opts ...grpc.CallOption) (*QuerySpotMidPriceAndTOBResponse, error) + // Retrieves a derivative market's mid-price + DerivativeMidPriceAndTOB(ctx context.Context, in *QueryDerivativeMidPriceAndTOBRequest, opts ...grpc.CallOption) (*QueryDerivativeMidPriceAndTOBResponse, error) + // Retrieves a derivative market's orderbook by marketID + DerivativeOrderbook(ctx context.Context, in *QueryDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryDerivativeOrderbookResponse, error) + // Retrieves a trader's derivative orders + TraderDerivativeOrders(ctx context.Context, in *QueryTraderDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeOrdersResponse, error) + // Retrieves all account address derivative orders + AccountAddressDerivativeOrders(ctx context.Context, in *QueryAccountAddressDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryAccountAddressDerivativeOrdersResponse, error) + // Retrieves a trader's derivative orders + DerivativeOrdersByHashes(ctx context.Context, in *QueryDerivativeOrdersByHashesRequest, opts ...grpc.CallOption) (*QueryDerivativeOrdersByHashesResponse, error) + // Retrieves a trader's transient derivative orders + TraderDerivativeTransientOrders(ctx context.Context, in *QueryTraderDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeOrdersResponse, error) + // Retrieves a list of derivative markets. + DerivativeMarkets(ctx context.Context, in *QueryDerivativeMarketsRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketsResponse, error) + // Retrieves a derivative market by ticker + DerivativeMarket(ctx context.Context, in *QueryDerivativeMarketRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketResponse, error) + // Retrieves a derivative market's corresponding address for fees that + // contribute to the market's insurance fund + DerivativeMarketAddress(ctx context.Context, in *QueryDerivativeMarketAddressRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketAddressResponse, error) + // Retrieves a subaccount's trade nonce + SubaccountTradeNonce(ctx context.Context, in *QuerySubaccountTradeNonceRequest, opts ...grpc.CallOption) (*QuerySubaccountTradeNonceResponse, error) + // Retrieves the entire exchange module's state + ExchangeModuleState(ctx context.Context, in *QueryModuleStateRequest, opts ...grpc.CallOption) (*QueryModuleStateResponse, error) + // Retrieves the entire exchange module's positions + Positions(ctx context.Context, in *QueryPositionsRequest, opts ...grpc.CallOption) (*QueryPositionsResponse, error) + // Retrieves subaccount's positions + SubaccountPositions(ctx context.Context, in *QuerySubaccountPositionsRequest, opts ...grpc.CallOption) (*QuerySubaccountPositionsResponse, error) + // Retrieves subaccount's position in market + SubaccountPositionInMarket(ctx context.Context, in *QuerySubaccountPositionInMarketRequest, opts ...grpc.CallOption) (*QuerySubaccountPositionInMarketResponse, error) + // Retrieves subaccount's position in market + SubaccountEffectivePositionInMarket(ctx context.Context, in *QuerySubaccountEffectivePositionInMarketRequest, opts ...grpc.CallOption) (*QuerySubaccountEffectivePositionInMarketResponse, error) + // Retrieves perpetual market info + PerpetualMarketInfo(ctx context.Context, in *QueryPerpetualMarketInfoRequest, opts ...grpc.CallOption) (*QueryPerpetualMarketInfoResponse, error) + // Retrieves expiry market info + ExpiryFuturesMarketInfo(ctx context.Context, in *QueryExpiryFuturesMarketInfoRequest, opts ...grpc.CallOption) (*QueryExpiryFuturesMarketInfoResponse, error) + // Retrieves perpetual market funding + PerpetualMarketFunding(ctx context.Context, in *QueryPerpetualMarketFundingRequest, opts ...grpc.CallOption) (*QueryPerpetualMarketFundingResponse, error) + // Retrieves subaccount's order metadata + SubaccountOrderMetadata(ctx context.Context, in *QuerySubaccountOrderMetadataRequest, opts ...grpc.CallOption) (*QuerySubaccountOrderMetadataResponse, error) + // Retrieves the account and total trade rewards points + TradeRewardPoints(ctx context.Context, in *QueryTradeRewardPointsRequest, opts ...grpc.CallOption) (*QueryTradeRewardPointsResponse, error) + // Retrieves the pending account and total trade rewards points + PendingTradeRewardPoints(ctx context.Context, in *QueryTradeRewardPointsRequest, opts ...grpc.CallOption) (*QueryTradeRewardPointsResponse, error) + // Retrieves the trade reward campaign + TradeRewardCampaign(ctx context.Context, in *QueryTradeRewardCampaignRequest, opts ...grpc.CallOption) (*QueryTradeRewardCampaignResponse, error) + // Retrieves the account's fee discount info + FeeDiscountAccountInfo(ctx context.Context, in *QueryFeeDiscountAccountInfoRequest, opts ...grpc.CallOption) (*QueryFeeDiscountAccountInfoResponse, error) + // Retrieves the fee discount schedule + FeeDiscountSchedule(ctx context.Context, in *QueryFeeDiscountScheduleRequest, opts ...grpc.CallOption) (*QueryFeeDiscountScheduleResponse, error) + // Retrieves mismatches between available vs. total balance + BalanceMismatches(ctx context.Context, in *QueryBalanceMismatchesRequest, opts ...grpc.CallOption) (*QueryBalanceMismatchesResponse, error) + // Retrieves available and total balances with balance holds + BalanceWithBalanceHolds(ctx context.Context, in *QueryBalanceWithBalanceHoldsRequest, opts ...grpc.CallOption) (*QueryBalanceWithBalanceHoldsResponse, error) + // Retrieves fee discount tier stats + FeeDiscountTierStatistics(ctx context.Context, in *QueryFeeDiscountTierStatisticsRequest, opts ...grpc.CallOption) (*QueryFeeDiscountTierStatisticsResponse, error) + // Retrieves market making pool info + MitoVaultInfos(ctx context.Context, in *MitoVaultInfosRequest, opts ...grpc.CallOption) (*MitoVaultInfosResponse, error) + // QueryMarketIDFromVault returns the market ID for a given vault subaccount + // ID + QueryMarketIDFromVault(ctx context.Context, in *QueryMarketIDFromVaultRequest, opts ...grpc.CallOption) (*QueryMarketIDFromVaultResponse, error) + // Retrieves historical trade records for a given market ID + HistoricalTradeRecords(ctx context.Context, in *QueryHistoricalTradeRecordsRequest, opts ...grpc.CallOption) (*QueryHistoricalTradeRecordsResponse, error) + // Retrieves if the account is opted out of rewards + IsOptedOutOfRewards(ctx context.Context, in *QueryIsOptedOutOfRewardsRequest, opts ...grpc.CallOption) (*QueryIsOptedOutOfRewardsResponse, error) + // Retrieves all accounts opted out of rewards + OptedOutOfRewardsAccounts(ctx context.Context, in *QueryOptedOutOfRewardsAccountsRequest, opts ...grpc.CallOption) (*QueryOptedOutOfRewardsAccountsResponse, error) + // MarketVolatility computes the volatility for spot and derivative markets + // trading history. + MarketVolatility(ctx context.Context, in *QueryMarketVolatilityRequest, opts ...grpc.CallOption) (*QueryMarketVolatilityResponse, error) + // Retrieves a spot market's orderbook by marketID + BinaryOptionsMarkets(ctx context.Context, in *QueryBinaryMarketsRequest, opts ...grpc.CallOption) (*QueryBinaryMarketsResponse, error) + // Retrieves a trader's derivative conditional orders + TraderDerivativeConditionalOrders(ctx context.Context, in *QueryTraderDerivativeConditionalOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeConditionalOrdersResponse, error) + MarketAtomicExecutionFeeMultiplier(ctx context.Context, in *QueryMarketAtomicExecutionFeeMultiplierRequest, opts ...grpc.CallOption) (*QueryMarketAtomicExecutionFeeMultiplierResponse, error) + // Retrieves the active stake grant for a grantee + ActiveStakeGrant(ctx context.Context, in *QueryActiveStakeGrantRequest, opts ...grpc.CallOption) (*QueryActiveStakeGrantResponse, error) + // Retrieves the grant authorization amount for a granter and grantee + GrantAuthorization(ctx context.Context, in *QueryGrantAuthorizationRequest, opts ...grpc.CallOption) (*QueryGrantAuthorizationResponse, error) + // Retrieves the grant authorization amount for a granter and grantee + GrantAuthorizations(ctx context.Context, in *QueryGrantAuthorizationsRequest, opts ...grpc.CallOption) (*QueryGrantAuthorizationsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) L3DerivativeOrderBook(ctx context.Context, in *QueryFullDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryFullDerivativeOrderbookResponse, error) { + out := new(QueryFullDerivativeOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/L3DerivativeOrderBook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) L3SpotOrderBook(ctx context.Context, in *QueryFullSpotOrderbookRequest, opts ...grpc.CallOption) (*QueryFullSpotOrderbookResponse, error) { + out := new(QueryFullSpotOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/L3SpotOrderBook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryExchangeParams(ctx context.Context, in *QueryExchangeParamsRequest, opts ...grpc.CallOption) (*QueryExchangeParamsResponse, error) { + out := new(QueryExchangeParamsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/QueryExchangeParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountDeposits(ctx context.Context, in *QuerySubaccountDepositsRequest, opts ...grpc.CallOption) (*QuerySubaccountDepositsResponse, error) { + out := new(QuerySubaccountDepositsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountDeposit(ctx context.Context, in *QuerySubaccountDepositRequest, opts ...grpc.CallOption) (*QuerySubaccountDepositResponse, error) { + out := new(QuerySubaccountDepositResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountDeposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ExchangeBalances(ctx context.Context, in *QueryExchangeBalancesRequest, opts ...grpc.CallOption) (*QueryExchangeBalancesResponse, error) { + out := new(QueryExchangeBalancesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/ExchangeBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVolume(ctx context.Context, in *QueryAggregateVolumeRequest, opts ...grpc.CallOption) (*QueryAggregateVolumeResponse, error) { + out := new(QueryAggregateVolumeResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AggregateVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateVolumes(ctx context.Context, in *QueryAggregateVolumesRequest, opts ...grpc.CallOption) (*QueryAggregateVolumesResponse, error) { + out := new(QueryAggregateVolumesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AggregateVolumes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateMarketVolume(ctx context.Context, in *QueryAggregateMarketVolumeRequest, opts ...grpc.CallOption) (*QueryAggregateMarketVolumeResponse, error) { + out := new(QueryAggregateMarketVolumeResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AggregateMarketVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AggregateMarketVolumes(ctx context.Context, in *QueryAggregateMarketVolumesRequest, opts ...grpc.CallOption) (*QueryAggregateMarketVolumesResponse, error) { + out := new(QueryAggregateMarketVolumesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AggregateMarketVolumes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DenomDecimal(ctx context.Context, in *QueryDenomDecimalRequest, opts ...grpc.CallOption) (*QueryDenomDecimalResponse, error) { + out := new(QueryDenomDecimalResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DenomDecimal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DenomDecimals(ctx context.Context, in *QueryDenomDecimalsRequest, opts ...grpc.CallOption) (*QueryDenomDecimalsResponse, error) { + out := new(QueryDenomDecimalsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DenomDecimals", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SpotMarkets(ctx context.Context, in *QuerySpotMarketsRequest, opts ...grpc.CallOption) (*QuerySpotMarketsResponse, error) { + out := new(QuerySpotMarketsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SpotMarkets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SpotMarket(ctx context.Context, in *QuerySpotMarketRequest, opts ...grpc.CallOption) (*QuerySpotMarketResponse, error) { + out := new(QuerySpotMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SpotMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FullSpotMarkets(ctx context.Context, in *QueryFullSpotMarketsRequest, opts ...grpc.CallOption) (*QueryFullSpotMarketsResponse, error) { + out := new(QueryFullSpotMarketsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/FullSpotMarkets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FullSpotMarket(ctx context.Context, in *QueryFullSpotMarketRequest, opts ...grpc.CallOption) (*QueryFullSpotMarketResponse, error) { + out := new(QueryFullSpotMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/FullSpotMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SpotOrderbook(ctx context.Context, in *QuerySpotOrderbookRequest, opts ...grpc.CallOption) (*QuerySpotOrderbookResponse, error) { + out := new(QuerySpotOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SpotOrderbook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraderSpotOrders(ctx context.Context, in *QueryTraderSpotOrdersRequest, opts ...grpc.CallOption) (*QueryTraderSpotOrdersResponse, error) { + out := new(QueryTraderSpotOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TraderSpotOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AccountAddressSpotOrders(ctx context.Context, in *QueryAccountAddressSpotOrdersRequest, opts ...grpc.CallOption) (*QueryAccountAddressSpotOrdersResponse, error) { + out := new(QueryAccountAddressSpotOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AccountAddressSpotOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SpotOrdersByHashes(ctx context.Context, in *QuerySpotOrdersByHashesRequest, opts ...grpc.CallOption) (*QuerySpotOrdersByHashesResponse, error) { + out := new(QuerySpotOrdersByHashesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SpotOrdersByHashes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountOrders(ctx context.Context, in *QuerySubaccountOrdersRequest, opts ...grpc.CallOption) (*QuerySubaccountOrdersResponse, error) { + out := new(QuerySubaccountOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraderSpotTransientOrders(ctx context.Context, in *QueryTraderSpotOrdersRequest, opts ...grpc.CallOption) (*QueryTraderSpotOrdersResponse, error) { + out := new(QueryTraderSpotOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TraderSpotTransientOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SpotMidPriceAndTOB(ctx context.Context, in *QuerySpotMidPriceAndTOBRequest, opts ...grpc.CallOption) (*QuerySpotMidPriceAndTOBResponse, error) { + out := new(QuerySpotMidPriceAndTOBResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SpotMidPriceAndTOB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeMidPriceAndTOB(ctx context.Context, in *QueryDerivativeMidPriceAndTOBRequest, opts ...grpc.CallOption) (*QueryDerivativeMidPriceAndTOBResponse, error) { + out := new(QueryDerivativeMidPriceAndTOBResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeMidPriceAndTOB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeOrderbook(ctx context.Context, in *QueryDerivativeOrderbookRequest, opts ...grpc.CallOption) (*QueryDerivativeOrderbookResponse, error) { + out := new(QueryDerivativeOrderbookResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeOrderbook", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraderDerivativeOrders(ctx context.Context, in *QueryTraderDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeOrdersResponse, error) { + out := new(QueryTraderDerivativeOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TraderDerivativeOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AccountAddressDerivativeOrders(ctx context.Context, in *QueryAccountAddressDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryAccountAddressDerivativeOrdersResponse, error) { + out := new(QueryAccountAddressDerivativeOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/AccountAddressDerivativeOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeOrdersByHashes(ctx context.Context, in *QueryDerivativeOrdersByHashesRequest, opts ...grpc.CallOption) (*QueryDerivativeOrdersByHashesResponse, error) { + out := new(QueryDerivativeOrdersByHashesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeOrdersByHashes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraderDerivativeTransientOrders(ctx context.Context, in *QueryTraderDerivativeOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeOrdersResponse, error) { + out := new(QueryTraderDerivativeOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TraderDerivativeTransientOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeMarkets(ctx context.Context, in *QueryDerivativeMarketsRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketsResponse, error) { + out := new(QueryDerivativeMarketsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeMarkets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeMarket(ctx context.Context, in *QueryDerivativeMarketRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketResponse, error) { + out := new(QueryDerivativeMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) DerivativeMarketAddress(ctx context.Context, in *QueryDerivativeMarketAddressRequest, opts ...grpc.CallOption) (*QueryDerivativeMarketAddressResponse, error) { + out := new(QueryDerivativeMarketAddressResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/DerivativeMarketAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountTradeNonce(ctx context.Context, in *QuerySubaccountTradeNonceRequest, opts ...grpc.CallOption) (*QuerySubaccountTradeNonceResponse, error) { + out := new(QuerySubaccountTradeNonceResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountTradeNonce", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ExchangeModuleState(ctx context.Context, in *QueryModuleStateRequest, opts ...grpc.CallOption) (*QueryModuleStateResponse, error) { + out := new(QueryModuleStateResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/ExchangeModuleState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Positions(ctx context.Context, in *QueryPositionsRequest, opts ...grpc.CallOption) (*QueryPositionsResponse, error) { + out := new(QueryPositionsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/Positions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountPositions(ctx context.Context, in *QuerySubaccountPositionsRequest, opts ...grpc.CallOption) (*QuerySubaccountPositionsResponse, error) { + out := new(QuerySubaccountPositionsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountPositions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountPositionInMarket(ctx context.Context, in *QuerySubaccountPositionInMarketRequest, opts ...grpc.CallOption) (*QuerySubaccountPositionInMarketResponse, error) { + out := new(QuerySubaccountPositionInMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountPositionInMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountEffectivePositionInMarket(ctx context.Context, in *QuerySubaccountEffectivePositionInMarketRequest, opts ...grpc.CallOption) (*QuerySubaccountEffectivePositionInMarketResponse, error) { + out := new(QuerySubaccountEffectivePositionInMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountEffectivePositionInMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PerpetualMarketInfo(ctx context.Context, in *QueryPerpetualMarketInfoRequest, opts ...grpc.CallOption) (*QueryPerpetualMarketInfoResponse, error) { + out := new(QueryPerpetualMarketInfoResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/PerpetualMarketInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ExpiryFuturesMarketInfo(ctx context.Context, in *QueryExpiryFuturesMarketInfoRequest, opts ...grpc.CallOption) (*QueryExpiryFuturesMarketInfoResponse, error) { + out := new(QueryExpiryFuturesMarketInfoResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/ExpiryFuturesMarketInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PerpetualMarketFunding(ctx context.Context, in *QueryPerpetualMarketFundingRequest, opts ...grpc.CallOption) (*QueryPerpetualMarketFundingResponse, error) { + out := new(QueryPerpetualMarketFundingResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/PerpetualMarketFunding", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SubaccountOrderMetadata(ctx context.Context, in *QuerySubaccountOrderMetadataRequest, opts ...grpc.CallOption) (*QuerySubaccountOrderMetadataResponse, error) { + out := new(QuerySubaccountOrderMetadataResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/SubaccountOrderMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TradeRewardPoints(ctx context.Context, in *QueryTradeRewardPointsRequest, opts ...grpc.CallOption) (*QueryTradeRewardPointsResponse, error) { + out := new(QueryTradeRewardPointsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TradeRewardPoints", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PendingTradeRewardPoints(ctx context.Context, in *QueryTradeRewardPointsRequest, opts ...grpc.CallOption) (*QueryTradeRewardPointsResponse, error) { + out := new(QueryTradeRewardPointsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/PendingTradeRewardPoints", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TradeRewardCampaign(ctx context.Context, in *QueryTradeRewardCampaignRequest, opts ...grpc.CallOption) (*QueryTradeRewardCampaignResponse, error) { + out := new(QueryTradeRewardCampaignResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TradeRewardCampaign", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeeDiscountAccountInfo(ctx context.Context, in *QueryFeeDiscountAccountInfoRequest, opts ...grpc.CallOption) (*QueryFeeDiscountAccountInfoResponse, error) { + out := new(QueryFeeDiscountAccountInfoResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/FeeDiscountAccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeeDiscountSchedule(ctx context.Context, in *QueryFeeDiscountScheduleRequest, opts ...grpc.CallOption) (*QueryFeeDiscountScheduleResponse, error) { + out := new(QueryFeeDiscountScheduleResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/FeeDiscountSchedule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BalanceMismatches(ctx context.Context, in *QueryBalanceMismatchesRequest, opts ...grpc.CallOption) (*QueryBalanceMismatchesResponse, error) { + out := new(QueryBalanceMismatchesResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/BalanceMismatches", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BalanceWithBalanceHolds(ctx context.Context, in *QueryBalanceWithBalanceHoldsRequest, opts ...grpc.CallOption) (*QueryBalanceWithBalanceHoldsResponse, error) { + out := new(QueryBalanceWithBalanceHoldsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/BalanceWithBalanceHolds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) FeeDiscountTierStatistics(ctx context.Context, in *QueryFeeDiscountTierStatisticsRequest, opts ...grpc.CallOption) (*QueryFeeDiscountTierStatisticsResponse, error) { + out := new(QueryFeeDiscountTierStatisticsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/FeeDiscountTierStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MitoVaultInfos(ctx context.Context, in *MitoVaultInfosRequest, opts ...grpc.CallOption) (*MitoVaultInfosResponse, error) { + out := new(MitoVaultInfosResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/MitoVaultInfos", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryMarketIDFromVault(ctx context.Context, in *QueryMarketIDFromVaultRequest, opts ...grpc.CallOption) (*QueryMarketIDFromVaultResponse, error) { + out := new(QueryMarketIDFromVaultResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/QueryMarketIDFromVault", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) HistoricalTradeRecords(ctx context.Context, in *QueryHistoricalTradeRecordsRequest, opts ...grpc.CallOption) (*QueryHistoricalTradeRecordsResponse, error) { + out := new(QueryHistoricalTradeRecordsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/HistoricalTradeRecords", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) IsOptedOutOfRewards(ctx context.Context, in *QueryIsOptedOutOfRewardsRequest, opts ...grpc.CallOption) (*QueryIsOptedOutOfRewardsResponse, error) { + out := new(QueryIsOptedOutOfRewardsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/IsOptedOutOfRewards", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OptedOutOfRewardsAccounts(ctx context.Context, in *QueryOptedOutOfRewardsAccountsRequest, opts ...grpc.CallOption) (*QueryOptedOutOfRewardsAccountsResponse, error) { + out := new(QueryOptedOutOfRewardsAccountsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/OptedOutOfRewardsAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MarketVolatility(ctx context.Context, in *QueryMarketVolatilityRequest, opts ...grpc.CallOption) (*QueryMarketVolatilityResponse, error) { + out := new(QueryMarketVolatilityResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/MarketVolatility", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BinaryOptionsMarkets(ctx context.Context, in *QueryBinaryMarketsRequest, opts ...grpc.CallOption) (*QueryBinaryMarketsResponse, error) { + out := new(QueryBinaryMarketsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/BinaryOptionsMarkets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TraderDerivativeConditionalOrders(ctx context.Context, in *QueryTraderDerivativeConditionalOrdersRequest, opts ...grpc.CallOption) (*QueryTraderDerivativeConditionalOrdersResponse, error) { + out := new(QueryTraderDerivativeConditionalOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/TraderDerivativeConditionalOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) MarketAtomicExecutionFeeMultiplier(ctx context.Context, in *QueryMarketAtomicExecutionFeeMultiplierRequest, opts ...grpc.CallOption) (*QueryMarketAtomicExecutionFeeMultiplierResponse, error) { + out := new(QueryMarketAtomicExecutionFeeMultiplierResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/MarketAtomicExecutionFeeMultiplier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ActiveStakeGrant(ctx context.Context, in *QueryActiveStakeGrantRequest, opts ...grpc.CallOption) (*QueryActiveStakeGrantResponse, error) { + out := new(QueryActiveStakeGrantResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/ActiveStakeGrant", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GrantAuthorization(ctx context.Context, in *QueryGrantAuthorizationRequest, opts ...grpc.CallOption) (*QueryGrantAuthorizationResponse, error) { + out := new(QueryGrantAuthorizationResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/GrantAuthorization", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GrantAuthorizations(ctx context.Context, in *QueryGrantAuthorizationsRequest, opts ...grpc.CallOption) (*QueryGrantAuthorizationsResponse, error) { + out := new(QueryGrantAuthorizationsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Query/GrantAuthorizations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + L3DerivativeOrderBook(context.Context, *QueryFullDerivativeOrderbookRequest) (*QueryFullDerivativeOrderbookResponse, error) + L3SpotOrderBook(context.Context, *QueryFullSpotOrderbookRequest) (*QueryFullSpotOrderbookResponse, error) + // Retrieves exchange params + QueryExchangeParams(context.Context, *QueryExchangeParamsRequest) (*QueryExchangeParamsResponse, error) + // Retrieves a Subaccount's Deposits + SubaccountDeposits(context.Context, *QuerySubaccountDepositsRequest) (*QuerySubaccountDepositsResponse, error) + // Retrieves a Subaccount's Deposits + SubaccountDeposit(context.Context, *QuerySubaccountDepositRequest) (*QuerySubaccountDepositResponse, error) + // Retrieves all of the balances of all users on the exchange. + ExchangeBalances(context.Context, *QueryExchangeBalancesRequest) (*QueryExchangeBalancesResponse, error) + // Retrieves the aggregate volumes for the specified account or subaccount + AggregateVolume(context.Context, *QueryAggregateVolumeRequest) (*QueryAggregateVolumeResponse, error) + // Retrieves the aggregate volumes for specified accounts + AggregateVolumes(context.Context, *QueryAggregateVolumesRequest) (*QueryAggregateVolumesResponse, error) + // Retrieves the aggregate volume for the specified market + AggregateMarketVolume(context.Context, *QueryAggregateMarketVolumeRequest) (*QueryAggregateMarketVolumeResponse, error) + // Retrieves the aggregate market volumes for specified markets + AggregateMarketVolumes(context.Context, *QueryAggregateMarketVolumesRequest) (*QueryAggregateMarketVolumesResponse, error) + // Retrieves the denom decimals for a denom. + DenomDecimal(context.Context, *QueryDenomDecimalRequest) (*QueryDenomDecimalResponse, error) + // Retrieves the denom decimals for multiple denoms. Returns all denom + // decimals if unspecified. + DenomDecimals(context.Context, *QueryDenomDecimalsRequest) (*QueryDenomDecimalsResponse, error) + // Retrieves a list of spot markets. + SpotMarkets(context.Context, *QuerySpotMarketsRequest) (*QuerySpotMarketsResponse, error) + // Retrieves a spot market by ticker + SpotMarket(context.Context, *QuerySpotMarketRequest) (*QuerySpotMarketResponse, error) + // Retrieves a list of spot markets with extra information. + FullSpotMarkets(context.Context, *QueryFullSpotMarketsRequest) (*QueryFullSpotMarketsResponse, error) + // Retrieves a spot market with extra information. + FullSpotMarket(context.Context, *QueryFullSpotMarketRequest) (*QueryFullSpotMarketResponse, error) + // Retrieves a spot market's orderbook by marketID + SpotOrderbook(context.Context, *QuerySpotOrderbookRequest) (*QuerySpotOrderbookResponse, error) + // Retrieves a trader's spot orders + TraderSpotOrders(context.Context, *QueryTraderSpotOrdersRequest) (*QueryTraderSpotOrdersResponse, error) + // Retrieves all account address spot orders + AccountAddressSpotOrders(context.Context, *QueryAccountAddressSpotOrdersRequest) (*QueryAccountAddressSpotOrdersResponse, error) + // Retrieves spot orders corresponding to specified order hashes for a given + // subaccountID and marketID + SpotOrdersByHashes(context.Context, *QuerySpotOrdersByHashesRequest) (*QuerySpotOrdersByHashesResponse, error) + // Retrieves subaccount's orders + SubaccountOrders(context.Context, *QuerySubaccountOrdersRequest) (*QuerySubaccountOrdersResponse, error) + // Retrieves a trader's transient spot orders + TraderSpotTransientOrders(context.Context, *QueryTraderSpotOrdersRequest) (*QueryTraderSpotOrdersResponse, error) + // Retrieves a spot market's mid-price + SpotMidPriceAndTOB(context.Context, *QuerySpotMidPriceAndTOBRequest) (*QuerySpotMidPriceAndTOBResponse, error) + // Retrieves a derivative market's mid-price + DerivativeMidPriceAndTOB(context.Context, *QueryDerivativeMidPriceAndTOBRequest) (*QueryDerivativeMidPriceAndTOBResponse, error) + // Retrieves a derivative market's orderbook by marketID + DerivativeOrderbook(context.Context, *QueryDerivativeOrderbookRequest) (*QueryDerivativeOrderbookResponse, error) + // Retrieves a trader's derivative orders + TraderDerivativeOrders(context.Context, *QueryTraderDerivativeOrdersRequest) (*QueryTraderDerivativeOrdersResponse, error) + // Retrieves all account address derivative orders + AccountAddressDerivativeOrders(context.Context, *QueryAccountAddressDerivativeOrdersRequest) (*QueryAccountAddressDerivativeOrdersResponse, error) + // Retrieves a trader's derivative orders + DerivativeOrdersByHashes(context.Context, *QueryDerivativeOrdersByHashesRequest) (*QueryDerivativeOrdersByHashesResponse, error) + // Retrieves a trader's transient derivative orders + TraderDerivativeTransientOrders(context.Context, *QueryTraderDerivativeOrdersRequest) (*QueryTraderDerivativeOrdersResponse, error) + // Retrieves a list of derivative markets. + DerivativeMarkets(context.Context, *QueryDerivativeMarketsRequest) (*QueryDerivativeMarketsResponse, error) + // Retrieves a derivative market by ticker + DerivativeMarket(context.Context, *QueryDerivativeMarketRequest) (*QueryDerivativeMarketResponse, error) + // Retrieves a derivative market's corresponding address for fees that + // contribute to the market's insurance fund + DerivativeMarketAddress(context.Context, *QueryDerivativeMarketAddressRequest) (*QueryDerivativeMarketAddressResponse, error) + // Retrieves a subaccount's trade nonce + SubaccountTradeNonce(context.Context, *QuerySubaccountTradeNonceRequest) (*QuerySubaccountTradeNonceResponse, error) + // Retrieves the entire exchange module's state + ExchangeModuleState(context.Context, *QueryModuleStateRequest) (*QueryModuleStateResponse, error) + // Retrieves the entire exchange module's positions + Positions(context.Context, *QueryPositionsRequest) (*QueryPositionsResponse, error) + // Retrieves subaccount's positions + SubaccountPositions(context.Context, *QuerySubaccountPositionsRequest) (*QuerySubaccountPositionsResponse, error) + // Retrieves subaccount's position in market + SubaccountPositionInMarket(context.Context, *QuerySubaccountPositionInMarketRequest) (*QuerySubaccountPositionInMarketResponse, error) + // Retrieves subaccount's position in market + SubaccountEffectivePositionInMarket(context.Context, *QuerySubaccountEffectivePositionInMarketRequest) (*QuerySubaccountEffectivePositionInMarketResponse, error) + // Retrieves perpetual market info + PerpetualMarketInfo(context.Context, *QueryPerpetualMarketInfoRequest) (*QueryPerpetualMarketInfoResponse, error) + // Retrieves expiry market info + ExpiryFuturesMarketInfo(context.Context, *QueryExpiryFuturesMarketInfoRequest) (*QueryExpiryFuturesMarketInfoResponse, error) + // Retrieves perpetual market funding + PerpetualMarketFunding(context.Context, *QueryPerpetualMarketFundingRequest) (*QueryPerpetualMarketFundingResponse, error) + // Retrieves subaccount's order metadata + SubaccountOrderMetadata(context.Context, *QuerySubaccountOrderMetadataRequest) (*QuerySubaccountOrderMetadataResponse, error) + // Retrieves the account and total trade rewards points + TradeRewardPoints(context.Context, *QueryTradeRewardPointsRequest) (*QueryTradeRewardPointsResponse, error) + // Retrieves the pending account and total trade rewards points + PendingTradeRewardPoints(context.Context, *QueryTradeRewardPointsRequest) (*QueryTradeRewardPointsResponse, error) + // Retrieves the trade reward campaign + TradeRewardCampaign(context.Context, *QueryTradeRewardCampaignRequest) (*QueryTradeRewardCampaignResponse, error) + // Retrieves the account's fee discount info + FeeDiscountAccountInfo(context.Context, *QueryFeeDiscountAccountInfoRequest) (*QueryFeeDiscountAccountInfoResponse, error) + // Retrieves the fee discount schedule + FeeDiscountSchedule(context.Context, *QueryFeeDiscountScheduleRequest) (*QueryFeeDiscountScheduleResponse, error) + // Retrieves mismatches between available vs. total balance + BalanceMismatches(context.Context, *QueryBalanceMismatchesRequest) (*QueryBalanceMismatchesResponse, error) + // Retrieves available and total balances with balance holds + BalanceWithBalanceHolds(context.Context, *QueryBalanceWithBalanceHoldsRequest) (*QueryBalanceWithBalanceHoldsResponse, error) + // Retrieves fee discount tier stats + FeeDiscountTierStatistics(context.Context, *QueryFeeDiscountTierStatisticsRequest) (*QueryFeeDiscountTierStatisticsResponse, error) + // Retrieves market making pool info + MitoVaultInfos(context.Context, *MitoVaultInfosRequest) (*MitoVaultInfosResponse, error) + // QueryMarketIDFromVault returns the market ID for a given vault subaccount + // ID + QueryMarketIDFromVault(context.Context, *QueryMarketIDFromVaultRequest) (*QueryMarketIDFromVaultResponse, error) + // Retrieves historical trade records for a given market ID + HistoricalTradeRecords(context.Context, *QueryHistoricalTradeRecordsRequest) (*QueryHistoricalTradeRecordsResponse, error) + // Retrieves if the account is opted out of rewards + IsOptedOutOfRewards(context.Context, *QueryIsOptedOutOfRewardsRequest) (*QueryIsOptedOutOfRewardsResponse, error) + // Retrieves all accounts opted out of rewards + OptedOutOfRewardsAccounts(context.Context, *QueryOptedOutOfRewardsAccountsRequest) (*QueryOptedOutOfRewardsAccountsResponse, error) + // MarketVolatility computes the volatility for spot and derivative markets + // trading history. + MarketVolatility(context.Context, *QueryMarketVolatilityRequest) (*QueryMarketVolatilityResponse, error) + // Retrieves a spot market's orderbook by marketID + BinaryOptionsMarkets(context.Context, *QueryBinaryMarketsRequest) (*QueryBinaryMarketsResponse, error) + // Retrieves a trader's derivative conditional orders + TraderDerivativeConditionalOrders(context.Context, *QueryTraderDerivativeConditionalOrdersRequest) (*QueryTraderDerivativeConditionalOrdersResponse, error) + MarketAtomicExecutionFeeMultiplier(context.Context, *QueryMarketAtomicExecutionFeeMultiplierRequest) (*QueryMarketAtomicExecutionFeeMultiplierResponse, error) + // Retrieves the active stake grant for a grantee + ActiveStakeGrant(context.Context, *QueryActiveStakeGrantRequest) (*QueryActiveStakeGrantResponse, error) + // Retrieves the grant authorization amount for a granter and grantee + GrantAuthorization(context.Context, *QueryGrantAuthorizationRequest) (*QueryGrantAuthorizationResponse, error) + // Retrieves the grant authorization amount for a granter and grantee + GrantAuthorizations(context.Context, *QueryGrantAuthorizationsRequest) (*QueryGrantAuthorizationsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) L3DerivativeOrderBook(ctx context.Context, req *QueryFullDerivativeOrderbookRequest) (*QueryFullDerivativeOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method L3DerivativeOrderBook not implemented") +} +func (*UnimplementedQueryServer) L3SpotOrderBook(ctx context.Context, req *QueryFullSpotOrderbookRequest) (*QueryFullSpotOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method L3SpotOrderBook not implemented") +} +func (*UnimplementedQueryServer) QueryExchangeParams(ctx context.Context, req *QueryExchangeParamsRequest) (*QueryExchangeParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryExchangeParams not implemented") +} +func (*UnimplementedQueryServer) SubaccountDeposits(ctx context.Context, req *QuerySubaccountDepositsRequest) (*QuerySubaccountDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountDeposits not implemented") +} +func (*UnimplementedQueryServer) SubaccountDeposit(ctx context.Context, req *QuerySubaccountDepositRequest) (*QuerySubaccountDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountDeposit not implemented") +} +func (*UnimplementedQueryServer) ExchangeBalances(ctx context.Context, req *QueryExchangeBalancesRequest) (*QueryExchangeBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeBalances not implemented") +} +func (*UnimplementedQueryServer) AggregateVolume(ctx context.Context, req *QueryAggregateVolumeRequest) (*QueryAggregateVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVolume not implemented") +} +func (*UnimplementedQueryServer) AggregateVolumes(ctx context.Context, req *QueryAggregateVolumesRequest) (*QueryAggregateVolumesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateVolumes not implemented") +} +func (*UnimplementedQueryServer) AggregateMarketVolume(ctx context.Context, req *QueryAggregateMarketVolumeRequest) (*QueryAggregateMarketVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateMarketVolume not implemented") +} +func (*UnimplementedQueryServer) AggregateMarketVolumes(ctx context.Context, req *QueryAggregateMarketVolumesRequest) (*QueryAggregateMarketVolumesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateMarketVolumes not implemented") +} +func (*UnimplementedQueryServer) DenomDecimal(ctx context.Context, req *QueryDenomDecimalRequest) (*QueryDenomDecimalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomDecimal not implemented") +} +func (*UnimplementedQueryServer) DenomDecimals(ctx context.Context, req *QueryDenomDecimalsRequest) (*QueryDenomDecimalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomDecimals not implemented") +} +func (*UnimplementedQueryServer) SpotMarkets(ctx context.Context, req *QuerySpotMarketsRequest) (*QuerySpotMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotMarkets not implemented") +} +func (*UnimplementedQueryServer) SpotMarket(ctx context.Context, req *QuerySpotMarketRequest) (*QuerySpotMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotMarket not implemented") +} +func (*UnimplementedQueryServer) FullSpotMarkets(ctx context.Context, req *QueryFullSpotMarketsRequest) (*QueryFullSpotMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FullSpotMarkets not implemented") +} +func (*UnimplementedQueryServer) FullSpotMarket(ctx context.Context, req *QueryFullSpotMarketRequest) (*QueryFullSpotMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FullSpotMarket not implemented") +} +func (*UnimplementedQueryServer) SpotOrderbook(ctx context.Context, req *QuerySpotOrderbookRequest) (*QuerySpotOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotOrderbook not implemented") +} +func (*UnimplementedQueryServer) TraderSpotOrders(ctx context.Context, req *QueryTraderSpotOrdersRequest) (*QueryTraderSpotOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraderSpotOrders not implemented") +} +func (*UnimplementedQueryServer) AccountAddressSpotOrders(ctx context.Context, req *QueryAccountAddressSpotOrdersRequest) (*QueryAccountAddressSpotOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressSpotOrders not implemented") +} +func (*UnimplementedQueryServer) SpotOrdersByHashes(ctx context.Context, req *QuerySpotOrdersByHashesRequest) (*QuerySpotOrdersByHashesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotOrdersByHashes not implemented") +} +func (*UnimplementedQueryServer) SubaccountOrders(ctx context.Context, req *QuerySubaccountOrdersRequest) (*QuerySubaccountOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountOrders not implemented") +} +func (*UnimplementedQueryServer) TraderSpotTransientOrders(ctx context.Context, req *QueryTraderSpotOrdersRequest) (*QueryTraderSpotOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraderSpotTransientOrders not implemented") +} +func (*UnimplementedQueryServer) SpotMidPriceAndTOB(ctx context.Context, req *QuerySpotMidPriceAndTOBRequest) (*QuerySpotMidPriceAndTOBResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpotMidPriceAndTOB not implemented") +} +func (*UnimplementedQueryServer) DerivativeMidPriceAndTOB(ctx context.Context, req *QueryDerivativeMidPriceAndTOBRequest) (*QueryDerivativeMidPriceAndTOBResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeMidPriceAndTOB not implemented") +} +func (*UnimplementedQueryServer) DerivativeOrderbook(ctx context.Context, req *QueryDerivativeOrderbookRequest) (*QueryDerivativeOrderbookResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeOrderbook not implemented") +} +func (*UnimplementedQueryServer) TraderDerivativeOrders(ctx context.Context, req *QueryTraderDerivativeOrdersRequest) (*QueryTraderDerivativeOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraderDerivativeOrders not implemented") +} +func (*UnimplementedQueryServer) AccountAddressDerivativeOrders(ctx context.Context, req *QueryAccountAddressDerivativeOrdersRequest) (*QueryAccountAddressDerivativeOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AccountAddressDerivativeOrders not implemented") +} +func (*UnimplementedQueryServer) DerivativeOrdersByHashes(ctx context.Context, req *QueryDerivativeOrdersByHashesRequest) (*QueryDerivativeOrdersByHashesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeOrdersByHashes not implemented") +} +func (*UnimplementedQueryServer) TraderDerivativeTransientOrders(ctx context.Context, req *QueryTraderDerivativeOrdersRequest) (*QueryTraderDerivativeOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraderDerivativeTransientOrders not implemented") +} +func (*UnimplementedQueryServer) DerivativeMarkets(ctx context.Context, req *QueryDerivativeMarketsRequest) (*QueryDerivativeMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeMarkets not implemented") +} +func (*UnimplementedQueryServer) DerivativeMarket(ctx context.Context, req *QueryDerivativeMarketRequest) (*QueryDerivativeMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeMarket not implemented") +} +func (*UnimplementedQueryServer) DerivativeMarketAddress(ctx context.Context, req *QueryDerivativeMarketAddressRequest) (*QueryDerivativeMarketAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DerivativeMarketAddress not implemented") +} +func (*UnimplementedQueryServer) SubaccountTradeNonce(ctx context.Context, req *QuerySubaccountTradeNonceRequest) (*QuerySubaccountTradeNonceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountTradeNonce not implemented") +} +func (*UnimplementedQueryServer) ExchangeModuleState(ctx context.Context, req *QueryModuleStateRequest) (*QueryModuleStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeModuleState not implemented") +} +func (*UnimplementedQueryServer) Positions(ctx context.Context, req *QueryPositionsRequest) (*QueryPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Positions not implemented") +} +func (*UnimplementedQueryServer) SubaccountPositions(ctx context.Context, req *QuerySubaccountPositionsRequest) (*QuerySubaccountPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountPositions not implemented") +} +func (*UnimplementedQueryServer) SubaccountPositionInMarket(ctx context.Context, req *QuerySubaccountPositionInMarketRequest) (*QuerySubaccountPositionInMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountPositionInMarket not implemented") +} +func (*UnimplementedQueryServer) SubaccountEffectivePositionInMarket(ctx context.Context, req *QuerySubaccountEffectivePositionInMarketRequest) (*QuerySubaccountEffectivePositionInMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountEffectivePositionInMarket not implemented") +} +func (*UnimplementedQueryServer) PerpetualMarketInfo(ctx context.Context, req *QueryPerpetualMarketInfoRequest) (*QueryPerpetualMarketInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PerpetualMarketInfo not implemented") +} +func (*UnimplementedQueryServer) ExpiryFuturesMarketInfo(ctx context.Context, req *QueryExpiryFuturesMarketInfoRequest) (*QueryExpiryFuturesMarketInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExpiryFuturesMarketInfo not implemented") +} +func (*UnimplementedQueryServer) PerpetualMarketFunding(ctx context.Context, req *QueryPerpetualMarketFundingRequest) (*QueryPerpetualMarketFundingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PerpetualMarketFunding not implemented") +} +func (*UnimplementedQueryServer) SubaccountOrderMetadata(ctx context.Context, req *QuerySubaccountOrderMetadataRequest) (*QuerySubaccountOrderMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountOrderMetadata not implemented") +} +func (*UnimplementedQueryServer) TradeRewardPoints(ctx context.Context, req *QueryTradeRewardPointsRequest) (*QueryTradeRewardPointsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TradeRewardPoints not implemented") +} +func (*UnimplementedQueryServer) PendingTradeRewardPoints(ctx context.Context, req *QueryTradeRewardPointsRequest) (*QueryTradeRewardPointsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PendingTradeRewardPoints not implemented") +} +func (*UnimplementedQueryServer) TradeRewardCampaign(ctx context.Context, req *QueryTradeRewardCampaignRequest) (*QueryTradeRewardCampaignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TradeRewardCampaign not implemented") +} +func (*UnimplementedQueryServer) FeeDiscountAccountInfo(ctx context.Context, req *QueryFeeDiscountAccountInfoRequest) (*QueryFeeDiscountAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeeDiscountAccountInfo not implemented") +} +func (*UnimplementedQueryServer) FeeDiscountSchedule(ctx context.Context, req *QueryFeeDiscountScheduleRequest) (*QueryFeeDiscountScheduleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeeDiscountSchedule not implemented") +} +func (*UnimplementedQueryServer) BalanceMismatches(ctx context.Context, req *QueryBalanceMismatchesRequest) (*QueryBalanceMismatchesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BalanceMismatches not implemented") +} +func (*UnimplementedQueryServer) BalanceWithBalanceHolds(ctx context.Context, req *QueryBalanceWithBalanceHoldsRequest) (*QueryBalanceWithBalanceHoldsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BalanceWithBalanceHolds not implemented") +} +func (*UnimplementedQueryServer) FeeDiscountTierStatistics(ctx context.Context, req *QueryFeeDiscountTierStatisticsRequest) (*QueryFeeDiscountTierStatisticsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FeeDiscountTierStatistics not implemented") +} +func (*UnimplementedQueryServer) MitoVaultInfos(ctx context.Context, req *MitoVaultInfosRequest) (*MitoVaultInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MitoVaultInfos not implemented") +} +func (*UnimplementedQueryServer) QueryMarketIDFromVault(ctx context.Context, req *QueryMarketIDFromVaultRequest) (*QueryMarketIDFromVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryMarketIDFromVault not implemented") +} +func (*UnimplementedQueryServer) HistoricalTradeRecords(ctx context.Context, req *QueryHistoricalTradeRecordsRequest) (*QueryHistoricalTradeRecordsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HistoricalTradeRecords not implemented") +} +func (*UnimplementedQueryServer) IsOptedOutOfRewards(ctx context.Context, req *QueryIsOptedOutOfRewardsRequest) (*QueryIsOptedOutOfRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsOptedOutOfRewards not implemented") +} +func (*UnimplementedQueryServer) OptedOutOfRewardsAccounts(ctx context.Context, req *QueryOptedOutOfRewardsAccountsRequest) (*QueryOptedOutOfRewardsAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OptedOutOfRewardsAccounts not implemented") +} +func (*UnimplementedQueryServer) MarketVolatility(ctx context.Context, req *QueryMarketVolatilityRequest) (*QueryMarketVolatilityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MarketVolatility not implemented") +} +func (*UnimplementedQueryServer) BinaryOptionsMarkets(ctx context.Context, req *QueryBinaryMarketsRequest) (*QueryBinaryMarketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BinaryOptionsMarkets not implemented") +} +func (*UnimplementedQueryServer) TraderDerivativeConditionalOrders(ctx context.Context, req *QueryTraderDerivativeConditionalOrdersRequest) (*QueryTraderDerivativeConditionalOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraderDerivativeConditionalOrders not implemented") +} +func (*UnimplementedQueryServer) MarketAtomicExecutionFeeMultiplier(ctx context.Context, req *QueryMarketAtomicExecutionFeeMultiplierRequest) (*QueryMarketAtomicExecutionFeeMultiplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MarketAtomicExecutionFeeMultiplier not implemented") +} +func (*UnimplementedQueryServer) ActiveStakeGrant(ctx context.Context, req *QueryActiveStakeGrantRequest) (*QueryActiveStakeGrantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActiveStakeGrant not implemented") +} +func (*UnimplementedQueryServer) GrantAuthorization(ctx context.Context, req *QueryGrantAuthorizationRequest) (*QueryGrantAuthorizationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GrantAuthorization not implemented") +} +func (*UnimplementedQueryServer) GrantAuthorizations(ctx context.Context, req *QueryGrantAuthorizationsRequest) (*QueryGrantAuthorizationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GrantAuthorizations not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_L3DerivativeOrderBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullDerivativeOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).L3DerivativeOrderBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/L3DerivativeOrderBook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).L3DerivativeOrderBook(ctx, req.(*QueryFullDerivativeOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_L3SpotOrderBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullSpotOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).L3SpotOrderBook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/L3SpotOrderBook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).L3SpotOrderBook(ctx, req.(*QueryFullSpotOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryExchangeParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExchangeParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryExchangeParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/QueryExchangeParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryExchangeParams(ctx, req.(*QueryExchangeParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountDeposits(ctx, req.(*QuerySubaccountDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountDeposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountDeposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountDeposit(ctx, req.(*QuerySubaccountDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ExchangeBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExchangeBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExchangeBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/ExchangeBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExchangeBalances(ctx, req.(*QueryExchangeBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AggregateVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVolume(ctx, req.(*QueryAggregateVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateVolumes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateVolumesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateVolumes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AggregateVolumes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateVolumes(ctx, req.(*QueryAggregateVolumesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateMarketVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateMarketVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateMarketVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AggregateMarketVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateMarketVolume(ctx, req.(*QueryAggregateMarketVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AggregateMarketVolumes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAggregateMarketVolumesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AggregateMarketVolumes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AggregateMarketVolumes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AggregateMarketVolumes(ctx, req.(*QueryAggregateMarketVolumesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DenomDecimal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomDecimalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomDecimal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DenomDecimal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomDecimal(ctx, req.(*QueryDenomDecimalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DenomDecimals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomDecimalsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomDecimals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DenomDecimals", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomDecimals(ctx, req.(*QueryDenomDecimalsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotMarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SpotMarkets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotMarkets(ctx, req.(*QuerySpotMarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotMarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SpotMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotMarket(ctx, req.(*QuerySpotMarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FullSpotMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullSpotMarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FullSpotMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/FullSpotMarkets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FullSpotMarkets(ctx, req.(*QueryFullSpotMarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FullSpotMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFullSpotMarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FullSpotMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/FullSpotMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FullSpotMarket(ctx, req.(*QueryFullSpotMarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotOrderbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotOrderbook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SpotOrderbook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotOrderbook(ctx, req.(*QuerySpotOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraderSpotOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraderSpotOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraderSpotOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TraderSpotOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraderSpotOrders(ctx, req.(*QueryTraderSpotOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AccountAddressSpotOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressSpotOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressSpotOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AccountAddressSpotOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressSpotOrders(ctx, req.(*QueryAccountAddressSpotOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotOrdersByHashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotOrdersByHashesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotOrdersByHashes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SpotOrdersByHashes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotOrdersByHashes(ctx, req.(*QuerySpotOrdersByHashesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountOrders(ctx, req.(*QuerySubaccountOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraderSpotTransientOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraderSpotOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraderSpotTransientOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TraderSpotTransientOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraderSpotTransientOrders(ctx, req.(*QueryTraderSpotOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SpotMidPriceAndTOB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySpotMidPriceAndTOBRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SpotMidPriceAndTOB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SpotMidPriceAndTOB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SpotMidPriceAndTOB(ctx, req.(*QuerySpotMidPriceAndTOBRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeMidPriceAndTOB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeMidPriceAndTOBRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeMidPriceAndTOB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeMidPriceAndTOB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeMidPriceAndTOB(ctx, req.(*QueryDerivativeMidPriceAndTOBRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeOrderbook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeOrderbookRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeOrderbook(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeOrderbook", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeOrderbook(ctx, req.(*QueryDerivativeOrderbookRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraderDerivativeOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraderDerivativeOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraderDerivativeOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TraderDerivativeOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraderDerivativeOrders(ctx, req.(*QueryTraderDerivativeOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AccountAddressDerivativeOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountAddressDerivativeOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AccountAddressDerivativeOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/AccountAddressDerivativeOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AccountAddressDerivativeOrders(ctx, req.(*QueryAccountAddressDerivativeOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeOrdersByHashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeOrdersByHashesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeOrdersByHashes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeOrdersByHashes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeOrdersByHashes(ctx, req.(*QueryDerivativeOrdersByHashesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraderDerivativeTransientOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraderDerivativeOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraderDerivativeTransientOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TraderDerivativeTransientOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraderDerivativeTransientOrders(ctx, req.(*QueryTraderDerivativeOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeMarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeMarkets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeMarkets(ctx, req.(*QueryDerivativeMarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeMarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeMarket(ctx, req.(*QueryDerivativeMarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_DerivativeMarketAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDerivativeMarketAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DerivativeMarketAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/DerivativeMarketAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DerivativeMarketAddress(ctx, req.(*QueryDerivativeMarketAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountTradeNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountTradeNonceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountTradeNonce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountTradeNonce", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountTradeNonce(ctx, req.(*QuerySubaccountTradeNonceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ExchangeModuleState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExchangeModuleState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/ExchangeModuleState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExchangeModuleState(ctx, req.(*QueryModuleStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Positions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Positions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/Positions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Positions(ctx, req.(*QueryPositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountPositions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountPositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountPositions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountPositions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountPositions(ctx, req.(*QuerySubaccountPositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountPositionInMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountPositionInMarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountPositionInMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountPositionInMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountPositionInMarket(ctx, req.(*QuerySubaccountPositionInMarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountEffectivePositionInMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountEffectivePositionInMarketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountEffectivePositionInMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountEffectivePositionInMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountEffectivePositionInMarket(ctx, req.(*QuerySubaccountEffectivePositionInMarketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PerpetualMarketInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPerpetualMarketInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PerpetualMarketInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/PerpetualMarketInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PerpetualMarketInfo(ctx, req.(*QueryPerpetualMarketInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ExpiryFuturesMarketInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExpiryFuturesMarketInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExpiryFuturesMarketInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/ExpiryFuturesMarketInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExpiryFuturesMarketInfo(ctx, req.(*QueryExpiryFuturesMarketInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PerpetualMarketFunding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPerpetualMarketFundingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PerpetualMarketFunding(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/PerpetualMarketFunding", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PerpetualMarketFunding(ctx, req.(*QueryPerpetualMarketFundingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SubaccountOrderMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubaccountOrderMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SubaccountOrderMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/SubaccountOrderMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SubaccountOrderMetadata(ctx, req.(*QuerySubaccountOrderMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TradeRewardPoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTradeRewardPointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TradeRewardPoints(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TradeRewardPoints", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TradeRewardPoints(ctx, req.(*QueryTradeRewardPointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PendingTradeRewardPoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTradeRewardPointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PendingTradeRewardPoints(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/PendingTradeRewardPoints", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PendingTradeRewardPoints(ctx, req.(*QueryTradeRewardPointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TradeRewardCampaign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTradeRewardCampaignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TradeRewardCampaign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TradeRewardCampaign", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TradeRewardCampaign(ctx, req.(*QueryTradeRewardCampaignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeeDiscountAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeDiscountAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeeDiscountAccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/FeeDiscountAccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeeDiscountAccountInfo(ctx, req.(*QueryFeeDiscountAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeeDiscountSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeDiscountScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeeDiscountSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/FeeDiscountSchedule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeeDiscountSchedule(ctx, req.(*QueryFeeDiscountScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BalanceMismatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceMismatchesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BalanceMismatches(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/BalanceMismatches", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BalanceMismatches(ctx, req.(*QueryBalanceMismatchesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BalanceWithBalanceHolds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceWithBalanceHoldsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BalanceWithBalanceHolds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/BalanceWithBalanceHolds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BalanceWithBalanceHolds(ctx, req.(*QueryBalanceWithBalanceHoldsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_FeeDiscountTierStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeDiscountTierStatisticsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).FeeDiscountTierStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/FeeDiscountTierStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).FeeDiscountTierStatistics(ctx, req.(*QueryFeeDiscountTierStatisticsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MitoVaultInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MitoVaultInfosRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MitoVaultInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/MitoVaultInfos", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MitoVaultInfos(ctx, req.(*MitoVaultInfosRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryMarketIDFromVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMarketIDFromVaultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryMarketIDFromVault(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/QueryMarketIDFromVault", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryMarketIDFromVault(ctx, req.(*QueryMarketIDFromVaultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_HistoricalTradeRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHistoricalTradeRecordsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HistoricalTradeRecords(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/HistoricalTradeRecords", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HistoricalTradeRecords(ctx, req.(*QueryHistoricalTradeRecordsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_IsOptedOutOfRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIsOptedOutOfRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IsOptedOutOfRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/IsOptedOutOfRewards", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IsOptedOutOfRewards(ctx, req.(*QueryIsOptedOutOfRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OptedOutOfRewardsAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOptedOutOfRewardsAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OptedOutOfRewardsAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/OptedOutOfRewardsAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OptedOutOfRewardsAccounts(ctx, req.(*QueryOptedOutOfRewardsAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MarketVolatility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMarketVolatilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MarketVolatility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/MarketVolatility", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MarketVolatility(ctx, req.(*QueryMarketVolatilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_BinaryOptionsMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBinaryMarketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BinaryOptionsMarkets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/BinaryOptionsMarkets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BinaryOptionsMarkets(ctx, req.(*QueryBinaryMarketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TraderDerivativeConditionalOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraderDerivativeConditionalOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraderDerivativeConditionalOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/TraderDerivativeConditionalOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraderDerivativeConditionalOrders(ctx, req.(*QueryTraderDerivativeConditionalOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_MarketAtomicExecutionFeeMultiplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMarketAtomicExecutionFeeMultiplierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MarketAtomicExecutionFeeMultiplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/MarketAtomicExecutionFeeMultiplier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MarketAtomicExecutionFeeMultiplier(ctx, req.(*QueryMarketAtomicExecutionFeeMultiplierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ActiveStakeGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryActiveStakeGrantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ActiveStakeGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/ActiveStakeGrant", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ActiveStakeGrant(ctx, req.(*QueryActiveStakeGrantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GrantAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGrantAuthorizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GrantAuthorization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/GrantAuthorization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GrantAuthorization(ctx, req.(*QueryGrantAuthorizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GrantAuthorizations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGrantAuthorizationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GrantAuthorizations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Query/GrantAuthorizations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GrantAuthorizations(ctx, req.(*QueryGrantAuthorizationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "injective.exchange.v2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "L3DerivativeOrderBook", + Handler: _Query_L3DerivativeOrderBook_Handler, + }, + { + MethodName: "L3SpotOrderBook", + Handler: _Query_L3SpotOrderBook_Handler, + }, + { + MethodName: "QueryExchangeParams", + Handler: _Query_QueryExchangeParams_Handler, + }, + { + MethodName: "SubaccountDeposits", + Handler: _Query_SubaccountDeposits_Handler, + }, + { + MethodName: "SubaccountDeposit", + Handler: _Query_SubaccountDeposit_Handler, + }, + { + MethodName: "ExchangeBalances", + Handler: _Query_ExchangeBalances_Handler, + }, + { + MethodName: "AggregateVolume", + Handler: _Query_AggregateVolume_Handler, + }, + { + MethodName: "AggregateVolumes", + Handler: _Query_AggregateVolumes_Handler, + }, + { + MethodName: "AggregateMarketVolume", + Handler: _Query_AggregateMarketVolume_Handler, + }, + { + MethodName: "AggregateMarketVolumes", + Handler: _Query_AggregateMarketVolumes_Handler, + }, + { + MethodName: "DenomDecimal", + Handler: _Query_DenomDecimal_Handler, + }, + { + MethodName: "DenomDecimals", + Handler: _Query_DenomDecimals_Handler, + }, + { + MethodName: "SpotMarkets", + Handler: _Query_SpotMarkets_Handler, + }, + { + MethodName: "SpotMarket", + Handler: _Query_SpotMarket_Handler, + }, + { + MethodName: "FullSpotMarkets", + Handler: _Query_FullSpotMarkets_Handler, + }, + { + MethodName: "FullSpotMarket", + Handler: _Query_FullSpotMarket_Handler, + }, + { + MethodName: "SpotOrderbook", + Handler: _Query_SpotOrderbook_Handler, + }, + { + MethodName: "TraderSpotOrders", + Handler: _Query_TraderSpotOrders_Handler, + }, + { + MethodName: "AccountAddressSpotOrders", + Handler: _Query_AccountAddressSpotOrders_Handler, + }, + { + MethodName: "SpotOrdersByHashes", + Handler: _Query_SpotOrdersByHashes_Handler, + }, + { + MethodName: "SubaccountOrders", + Handler: _Query_SubaccountOrders_Handler, + }, + { + MethodName: "TraderSpotTransientOrders", + Handler: _Query_TraderSpotTransientOrders_Handler, + }, + { + MethodName: "SpotMidPriceAndTOB", + Handler: _Query_SpotMidPriceAndTOB_Handler, + }, + { + MethodName: "DerivativeMidPriceAndTOB", + Handler: _Query_DerivativeMidPriceAndTOB_Handler, + }, + { + MethodName: "DerivativeOrderbook", + Handler: _Query_DerivativeOrderbook_Handler, + }, + { + MethodName: "TraderDerivativeOrders", + Handler: _Query_TraderDerivativeOrders_Handler, + }, + { + MethodName: "AccountAddressDerivativeOrders", + Handler: _Query_AccountAddressDerivativeOrders_Handler, + }, + { + MethodName: "DerivativeOrdersByHashes", + Handler: _Query_DerivativeOrdersByHashes_Handler, + }, + { + MethodName: "TraderDerivativeTransientOrders", + Handler: _Query_TraderDerivativeTransientOrders_Handler, + }, + { + MethodName: "DerivativeMarkets", + Handler: _Query_DerivativeMarkets_Handler, + }, + { + MethodName: "DerivativeMarket", + Handler: _Query_DerivativeMarket_Handler, + }, + { + MethodName: "DerivativeMarketAddress", + Handler: _Query_DerivativeMarketAddress_Handler, + }, + { + MethodName: "SubaccountTradeNonce", + Handler: _Query_SubaccountTradeNonce_Handler, + }, + { + MethodName: "ExchangeModuleState", + Handler: _Query_ExchangeModuleState_Handler, + }, + { + MethodName: "Positions", + Handler: _Query_Positions_Handler, + }, + { + MethodName: "SubaccountPositions", + Handler: _Query_SubaccountPositions_Handler, + }, + { + MethodName: "SubaccountPositionInMarket", + Handler: _Query_SubaccountPositionInMarket_Handler, + }, + { + MethodName: "SubaccountEffectivePositionInMarket", + Handler: _Query_SubaccountEffectivePositionInMarket_Handler, + }, + { + MethodName: "PerpetualMarketInfo", + Handler: _Query_PerpetualMarketInfo_Handler, + }, + { + MethodName: "ExpiryFuturesMarketInfo", + Handler: _Query_ExpiryFuturesMarketInfo_Handler, + }, + { + MethodName: "PerpetualMarketFunding", + Handler: _Query_PerpetualMarketFunding_Handler, + }, + { + MethodName: "SubaccountOrderMetadata", + Handler: _Query_SubaccountOrderMetadata_Handler, + }, + { + MethodName: "TradeRewardPoints", + Handler: _Query_TradeRewardPoints_Handler, + }, + { + MethodName: "PendingTradeRewardPoints", + Handler: _Query_PendingTradeRewardPoints_Handler, + }, + { + MethodName: "TradeRewardCampaign", + Handler: _Query_TradeRewardCampaign_Handler, + }, + { + MethodName: "FeeDiscountAccountInfo", + Handler: _Query_FeeDiscountAccountInfo_Handler, + }, + { + MethodName: "FeeDiscountSchedule", + Handler: _Query_FeeDiscountSchedule_Handler, + }, + { + MethodName: "BalanceMismatches", + Handler: _Query_BalanceMismatches_Handler, + }, + { + MethodName: "BalanceWithBalanceHolds", + Handler: _Query_BalanceWithBalanceHolds_Handler, + }, + { + MethodName: "FeeDiscountTierStatistics", + Handler: _Query_FeeDiscountTierStatistics_Handler, + }, + { + MethodName: "MitoVaultInfos", + Handler: _Query_MitoVaultInfos_Handler, + }, + { + MethodName: "QueryMarketIDFromVault", + Handler: _Query_QueryMarketIDFromVault_Handler, + }, + { + MethodName: "HistoricalTradeRecords", + Handler: _Query_HistoricalTradeRecords_Handler, + }, + { + MethodName: "IsOptedOutOfRewards", + Handler: _Query_IsOptedOutOfRewards_Handler, + }, + { + MethodName: "OptedOutOfRewardsAccounts", + Handler: _Query_OptedOutOfRewardsAccounts_Handler, + }, + { + MethodName: "MarketVolatility", + Handler: _Query_MarketVolatility_Handler, + }, + { + MethodName: "BinaryOptionsMarkets", + Handler: _Query_BinaryOptionsMarkets_Handler, + }, + { + MethodName: "TraderDerivativeConditionalOrders", + Handler: _Query_TraderDerivativeConditionalOrders_Handler, + }, + { + MethodName: "MarketAtomicExecutionFeeMultiplier", + Handler: _Query_MarketAtomicExecutionFeeMultiplier_Handler, + }, + { + MethodName: "ActiveStakeGrant", + Handler: _Query_ActiveStakeGrant_Handler, + }, + { + MethodName: "GrantAuthorization", + Handler: _Query_GrantAuthorization_Handler, + }, + { + MethodName: "GrantAuthorizations", + Handler: _Query_GrantAuthorizations_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "injective/exchange/v2/query.proto", +} + +func (m *Subaccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Subaccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Subaccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SubaccountNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.SubaccountNonce)) + i-- + dAtA[i] = 0x10 + } + if len(m.Trader) > 0 { + i -= len(m.Trader) + copy(dAtA[i:], m.Trader) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Trader))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellOrders) > 0 { + for iNdEx := len(m.SellOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.BuyOrders) > 0 { + for iNdEx := len(m.BuyOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SubaccountOrderbookMetadataWithMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountOrderbookMetadataWithMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountOrderbookMetadataWithMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryExchangeParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryExchangeParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountDepositsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountDepositsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Subaccount != nil { + { + size, err := m.Subaccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountDepositsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountDepositsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposits) > 0 { + for k := range m.Deposits { + v := m.Deposits[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryExchangeBalancesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeBalancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryExchangeBalancesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExchangeBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExchangeBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVolumeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVolumeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVolumeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVolumeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVolumeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVolumeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggregateVolumes) > 0 { + for iNdEx := len(m.AggregateVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVolumesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVolumesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVolumesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Accounts[iNdEx]) + copy(dAtA[i:], m.Accounts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Accounts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateVolumesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateVolumesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateVolumesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggregateMarketVolumes) > 0 { + for iNdEx := len(m.AggregateMarketVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateMarketVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.AggregateAccountVolumes) > 0 { + for iNdEx := len(m.AggregateAccountVolumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AggregateAccountVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateMarketVolumeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateMarketVolumeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateMarketVolumeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateMarketVolumeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateMarketVolumeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateMarketVolumeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Volume.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryDenomDecimalRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDenomDecimalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomDecimalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomDecimalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDenomDecimalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomDecimalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Decimal != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Decimal)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomDecimalsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDenomDecimalsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomDecimalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denoms) > 0 { + for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Denoms[iNdEx]) + copy(dAtA[i:], m.Denoms[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denoms[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomDecimalsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDenomDecimalsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomDecimalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DenomDecimals) > 0 { + for iNdEx := len(m.DenomDecimals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomDecimals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateMarketVolumesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateMarketVolumesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateMarketVolumesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAggregateMarketVolumesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAggregateMarketVolumesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAggregateMarketVolumesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Volumes) > 0 { + for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountDepositRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountDepositRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Deposits != nil { + { + size, err := m.Deposits.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMarketsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMarketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMarketsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMarketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMarketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotOrderbookRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LimitCumulativeQuantity != nil { + { + size := m.LimitCumulativeQuantity.Size() + i -= size + if _, err := m.LimitCumulativeQuantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.LimitCumulativeNotional != nil { + { + size := m.LimitCumulativeNotional.Size() + i -= size + if _, err := m.LimitCumulativeNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.OrderSide != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.OrderSide)) + i-- + dAtA[i] = 0x18 + } + if m.Limit != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotOrderbookResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellsPriceLevel) > 0 { + for iNdEx := len(m.SellsPriceLevel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellsPriceLevel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.BuysPriceLevel) > 0 { + for iNdEx := len(m.BuysPriceLevel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuysPriceLevel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *FullSpotMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullSpotMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullSpotMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MidPriceAndTob != nil { + { + size, err := m.MidPriceAndTob.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotMarketsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotMarketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WithMidPriceAndTob { + i-- + if m.WithMidPriceAndTob { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotMarketsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotMarketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotMarketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotMarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WithMidPriceAndTob { + i-- + if m.WithMidPriceAndTob { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotOrdersByHashesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotOrdersByHashesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotOrdersByHashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHashes) > 0 { + for iNdEx := len(m.OrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OrderHashes[iNdEx]) + copy(dAtA[i:], m.OrderHashes[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHashes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotOrdersByHashesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotOrdersByHashesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotOrdersByHashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTraderSpotOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderSpotOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderSpotOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressSpotOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressSpotOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressSpotOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TrimmedSpotLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrimmedSpotLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrimmedSpotLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x32 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x2a + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size := m.Fillable.Size() + i -= size + if _, err := m.Fillable.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryTraderSpotOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderSpotOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderSpotOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressSpotOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressSpotOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressSpotOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMidPriceAndTOBRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMidPriceAndTOBRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMidPriceAndTOBRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySpotMidPriceAndTOBResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySpotMidPriceAndTOBResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpotMidPriceAndTOBResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BestSellPrice != nil { + { + size := m.BestSellPrice.Size() + i -= size + if _, err := m.BestSellPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.BestBuyPrice != nil { + { + size := m.BestBuyPrice.Size() + i -= size + if _, err := m.BestBuyPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MidPrice != nil { + { + size := m.MidPrice.Size() + i -= size + if _, err := m.MidPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMidPriceAndTOBRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMidPriceAndTOBRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMidPriceAndTOBRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMidPriceAndTOBResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMidPriceAndTOBResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMidPriceAndTOBResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BestSellPrice != nil { + { + size := m.BestSellPrice.Size() + i -= size + if _, err := m.BestSellPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.BestBuyPrice != nil { + { + size := m.BestBuyPrice.Size() + i -= size + if _, err := m.BestBuyPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MidPrice != nil { + { + size := m.MidPrice.Size() + i -= size + if _, err := m.MidPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeOrderbookRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LimitCumulativeNotional != nil { + { + size := m.LimitCumulativeNotional.Size() + i -= size + if _, err := m.LimitCumulativeNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Limit != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeOrderbookResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellsPriceLevel) > 0 { + for iNdEx := len(m.SellsPriceLevel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellsPriceLevel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.BuysPriceLevel) > 0 { + for iNdEx := len(m.BuysPriceLevel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuysPriceLevel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ReferencePrice != nil { + { + size := m.ReferencePrice.Size() + i -= size + if _, err := m.ReferencePrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Strategy != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Strategy)) + i-- + dAtA[i] = 0x28 + } + { + size := m.QuoteAmount.Size() + i -= size + if _, err := m.QuoteAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.BaseAmount.Size() + i -= size + if _, err := m.BaseAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ReferencePrice != nil { + { + size := m.ReferencePrice.Size() + i -= size + if _, err := m.ReferencePrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Strategy != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Strategy)) + i-- + dAtA[i] = 0x20 + } + { + size := m.QuoteAmount.Size() + i -= size + if _, err := m.QuoteAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTraderDerivativeOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderDerivativeOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderDerivativeOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TrimmedDerivativeLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrimmedDerivativeLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrimmedDerivativeLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x3a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x32 + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + { + size := m.Fillable.Size() + i -= size + if _, err := m.Fillable.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryTraderDerivativeOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderDerivativeOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderDerivativeOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountAddressDerivativeOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAccountAddressDerivativeOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountAddressDerivativeOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeOrdersByHashesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeOrdersByHashesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeOrdersByHashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OrderHashes) > 0 { + for iNdEx := len(m.OrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OrderHashes[iNdEx]) + copy(dAtA[i:], m.OrderHashes[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHashes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeOrdersByHashesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeOrdersByHashesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeOrdersByHashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMarketsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WithMidPriceAndTob { + i-- + if m.WithMidPriceAndTob { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PriceLevel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PriceLevel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PriceLevel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PerpetualMarketState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerpetualMarketState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerpetualMarketState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FundingInfo != nil { + { + size, err := m.FundingInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MarketInfo != nil { + { + size, err := m.MarketInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullDerivativeMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullDerivativeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullDerivativeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MidPriceAndTob != nil { + { + size, err := m.MidPriceAndTob.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.MarkPrice.Size() + i -= size + if _, err := m.MarkPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Info != nil { + { + size := m.Info.Size() + i -= size + if _, err := m.Info.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullDerivativeMarket_PerpetualInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullDerivativeMarket_PerpetualInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PerpetualInfo != nil { + { + size, err := m.PerpetualInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *FullDerivativeMarket_FuturesInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullDerivativeMarket_FuturesInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FuturesInfo != nil { + { + size, err := m.FuturesInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *QueryDerivativeMarketsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMarketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMarketAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDerivativeMarketAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryDerivativeMarketAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDerivativeMarketAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountTradeNonceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountTradeNonceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountTradeNonceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountPositionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountPositionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountPositionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountPositionInMarketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountPositionInMarketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountPositionInMarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountOrderMetadataRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountOrderMetadataRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountOrderMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountPositionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountPositionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + for iNdEx := len(m.State) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.State[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountPositionInMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountPositionInMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountPositionInMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != nil { + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EffectivePosition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EffectivePosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EffectivePosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.EffectiveMargin.Size() + i -= size + if _, err := m.EffectiveMargin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.EntryPrice.Size() + i -= size + if _, err := m.EntryPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.IsLong { + i-- + if m.IsLong { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountEffectivePositionInMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountEffectivePositionInMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountEffectivePositionInMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != nil { + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPerpetualMarketInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPerpetualMarketInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPerpetualMarketInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPerpetualMarketInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPerpetualMarketInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPerpetualMarketInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryExpiryFuturesMarketInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExpiryFuturesMarketInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExpiryFuturesMarketInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryExpiryFuturesMarketInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryExpiryFuturesMarketInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExpiryFuturesMarketInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryPerpetualMarketFundingRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPerpetualMarketFundingRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPerpetualMarketFundingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPerpetualMarketFundingResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPerpetualMarketFundingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPerpetualMarketFundingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountOrderMetadataResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountOrderMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountOrderMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Metadata) > 0 { + for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySubaccountTradeNonceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubaccountTradeNonceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubaccountTradeNonceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryModuleStateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryModuleStateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryModuleStateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryModuleStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != nil { + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPositionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPositionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPositionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryPositionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPositionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + for iNdEx := len(m.State) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.State[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTradeRewardPointsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTradeRewardPointsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTradeRewardPointsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PendingPoolTimestamp != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PendingPoolTimestamp)) + i-- + dAtA[i] = 0x10 + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Accounts[iNdEx]) + copy(dAtA[i:], m.Accounts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Accounts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTradeRewardPointsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTradeRewardPointsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTradeRewardPointsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccountTradeRewardPoints) > 0 { + for iNdEx := len(m.AccountTradeRewardPoints) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.AccountTradeRewardPoints[iNdEx].Size() + i -= size + if _, err := m.AccountTradeRewardPoints[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTradeRewardCampaignRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTradeRewardCampaignRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTradeRewardCampaignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTradeRewardCampaignResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTradeRewardCampaignResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTradeRewardCampaignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PendingTotalTradeRewardPoints) > 0 { + for iNdEx := len(m.PendingTotalTradeRewardPoints) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.PendingTotalTradeRewardPoints[iNdEx].Size() + i -= size + if _, err := m.PendingTotalTradeRewardPoints[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.PendingTradingRewardPoolCampaignSchedule) > 0 { + for iNdEx := len(m.PendingTradingRewardPoolCampaignSchedule) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingTradingRewardPoolCampaignSchedule[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + { + size := m.TotalTradeRewardPoints.Size() + i -= size + if _, err := m.TotalTradeRewardPoints.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.TradingRewardPoolCampaignSchedule) > 0 { + for iNdEx := len(m.TradingRewardPoolCampaignSchedule) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TradingRewardPoolCampaignSchedule[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.TradingRewardCampaignInfo != nil { + { + size, err := m.TradingRewardCampaignInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryIsOptedOutOfRewardsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryIsOptedOutOfRewardsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIsOptedOutOfRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryIsOptedOutOfRewardsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryIsOptedOutOfRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIsOptedOutOfRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsOptedOut { + i-- + if m.IsOptedOut { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryOptedOutOfRewardsAccountsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOptedOutOfRewardsAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOptedOutOfRewardsAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryOptedOutOfRewardsAccountsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryOptedOutOfRewardsAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOptedOutOfRewardsAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Accounts[iNdEx]) + copy(dAtA[i:], m.Accounts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Accounts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountAccountInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountAccountInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AccountTtl != nil { + { + size, err := m.AccountTtl.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.AccountInfo != nil { + { + size, err := m.AccountInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.TierLevel != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TierLevel)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountScheduleRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountScheduleRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountScheduleRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountScheduleResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountScheduleResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountScheduleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FeeDiscountSchedule != nil { + { + size, err := m.FeeDiscountSchedule.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceMismatchesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceMismatchesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceMismatchesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DustFactor != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.DustFactor)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BalanceMismatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceMismatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceMismatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Difference.Size() + i -= size + if _, err := m.Difference.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.ExpectedTotal.Size() + i -= size + if _, err := m.ExpectedTotal.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.BalanceHold.Size() + i -= size + if _, err := m.BalanceHold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Total.Size() + i -= size + if _, err := m.Total.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Available.Size() + i -= size + if _, err := m.Available.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceMismatchesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceMismatchesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceMismatchesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BalanceMismatches) > 0 { + for iNdEx := len(m.BalanceMismatches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BalanceMismatches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceWithBalanceHoldsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceWithBalanceHoldsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceWithBalanceHoldsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *BalanceWithMarginHold) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BalanceWithMarginHold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalanceWithMarginHold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.BalanceHold.Size() + i -= size + if _, err := m.BalanceHold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Total.Size() + i -= size + if _, err := m.Total.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Available.Size() + i -= size + if _, err := m.Available.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceWithBalanceHoldsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBalanceWithBalanceHoldsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceWithBalanceHoldsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BalanceWithBalanceHolds) > 0 { + for iNdEx := len(m.BalanceWithBalanceHolds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BalanceWithBalanceHolds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountTierStatisticsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountTierStatisticsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountTierStatisticsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *TierStatistic) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TierStatistic) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TierStatistic) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Count != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 + } + if m.Tier != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeDiscountTierStatisticsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFeeDiscountTierStatisticsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeDiscountTierStatisticsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Statistics) > 0 { + for iNdEx := len(m.Statistics) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Statistics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MitoVaultInfosRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MitoVaultInfosRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MitoVaultInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MitoVaultInfosResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MitoVaultInfosResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MitoVaultInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cw20Addresses) > 0 { + for iNdEx := len(m.Cw20Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Cw20Addresses[iNdEx]) + copy(dAtA[i:], m.Cw20Addresses[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cw20Addresses[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.SpotAddresses) > 0 { + for iNdEx := len(m.SpotAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpotAddresses[iNdEx]) + copy(dAtA[i:], m.SpotAddresses[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SpotAddresses[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DerivativeAddresses) > 0 { + for iNdEx := len(m.DerivativeAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DerivativeAddresses[iNdEx]) + copy(dAtA[i:], m.DerivativeAddresses[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DerivativeAddresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.MasterAddresses) > 0 { + for iNdEx := len(m.MasterAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MasterAddresses[iNdEx]) + copy(dAtA[i:], m.MasterAddresses[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MasterAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketIDFromVaultRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketIDFromVaultRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketIDFromVaultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VaultAddress) > 0 { + i -= len(m.VaultAddress) + copy(dAtA[i:], m.VaultAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VaultAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketIDFromVaultResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketIDFromVaultResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketIDFromVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryHistoricalTradeRecordsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHistoricalTradeRecordsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHistoricalTradeRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryHistoricalTradeRecordsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHistoricalTradeRecordsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHistoricalTradeRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TradeRecords) > 0 { + for iNdEx := len(m.TradeRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TradeRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TradeHistoryOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradeHistoryOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradeHistoryOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IncludeMetadata { + i-- + if m.IncludeMetadata { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.IncludeRawHistory { + i-- + if m.IncludeRawHistory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.MaxAge != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.MaxAge)) + i-- + dAtA[i] = 0x10 + } + if m.TradeGroupingSec != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TradeGroupingSec)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketVolatilityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketVolatilityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketVolatilityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TradeHistoryOptions != nil { + { + size, err := m.TradeHistoryOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketVolatilityResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketVolatilityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketVolatilityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RawHistory) > 0 { + for iNdEx := len(m.RawHistory) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RawHistory[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.HistoryMetadata != nil { + { + size, err := m.HistoryMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Volatility != nil { + { + size := m.Volatility.Size() + i -= size + if _, err := m.Volatility.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBinaryMarketsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBinaryMarketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBinaryMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBinaryMarketsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBinaryMarketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBinaryMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Markets) > 0 { + for iNdEx := len(m.Markets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Markets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TrimmedDerivativeConditionalOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrimmedDerivativeConditionalOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrimmedDerivativeConditionalOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x42 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x3a + } + if m.IsLimit { + i-- + if m.IsLimit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + { + size := m.TriggerPrice.Size() + i -= size + if _, err := m.TriggerPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryTraderDerivativeConditionalOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTraderDerivativeConditionalOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraderDerivativeConditionalOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotOrderbookRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullSpotOrderbookResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullSpotOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullSpotOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Asks) > 0 { + for iNdEx := len(m.Asks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Asks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFullDerivativeOrderbookRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullDerivativeOrderbookRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullDerivativeOrderbookRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFullDerivativeOrderbookResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryFullDerivativeOrderbookResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFullDerivativeOrderbookResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Asks) > 0 { + for iNdEx := len(m.Asks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Asks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TrimmedLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrimmedLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrimmedLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Multiplier.Size() + i -= size + if _, err := m.Multiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryActiveStakeGrantRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryActiveStakeGrantRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryActiveStakeGrantRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryActiveStakeGrantResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryActiveStakeGrantResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryActiveStakeGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EffectiveGrant != nil { + { + size, err := m.EffectiveGrant.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Grant != nil { + { + size, err := m.Grant.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGrantAuthorizationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGrantAuthorizationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0x12 + } + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGrantAuthorizationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGrantAuthorizationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGrantAuthorizationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGrantAuthorizationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantAuthorizationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGrantAuthorizationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGrantAuthorizationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGrantAuthorizationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grants) > 0 { + for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size := m.TotalGrantAmount.Size() + i -= size + if _, err := m.TotalGrantAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Subaccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Trader) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.SubaccountNonce != 0 { + n += 1 + sovQuery(uint64(m.SubaccountNonce)) + } + return n +} + +func (m *QuerySubaccountOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BuyOrders) > 0 { + for _, e := range m.BuyOrders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SellOrders) > 0 { + for _, e := range m.SellOrders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SubaccountOrderbookMetadataWithMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.IsBuy { + n += 2 + } + return n +} + +func (m *QueryExchangeParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryExchangeParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySubaccountDepositsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Subaccount != nil { + l = m.Subaccount.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountDepositsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deposits) > 0 { + for k, v := range m.Deposits { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovQuery(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + return n +} + +func (m *QueryExchangeBalancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryExchangeBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateVolumeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregateVolumeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AggregateVolumes) > 0 { + for _, e := range m.AggregateVolumes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateVolumesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, s := range m.Accounts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateVolumesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AggregateAccountVolumes) > 0 { + for _, e := range m.AggregateAccountVolumes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.AggregateMarketVolumes) > 0 { + for _, e := range m.AggregateMarketVolumes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateMarketVolumeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAggregateMarketVolumeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Volume.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDenomDecimalRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomDecimalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Decimal != 0 { + n += 1 + sovQuery(uint64(m.Decimal)) + } + return n +} + +func (m *QueryDenomDecimalsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Denoms) > 0 { + for _, s := range m.Denoms { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDenomDecimalsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DenomDecimals) > 0 { + for _, e := range m.DenomDecimals { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateMarketVolumesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAggregateMarketVolumesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySubaccountDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Deposits != nil { + l = m.Deposits.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotMarketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySpotMarketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Markets) > 0 { + for _, e := range m.Markets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySpotMarketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotOrderbookRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Limit != 0 { + n += 1 + sovQuery(uint64(m.Limit)) + } + if m.OrderSide != 0 { + n += 1 + sovQuery(uint64(m.OrderSide)) + } + if m.LimitCumulativeNotional != nil { + l = m.LimitCumulativeNotional.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.LimitCumulativeQuantity != nil { + l = m.LimitCumulativeQuantity.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotOrderbookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BuysPriceLevel) > 0 { + for _, e := range m.BuysPriceLevel { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SellsPriceLevel) > 0 { + for _, e := range m.SellsPriceLevel { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *FullSpotMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.MidPriceAndTob != nil { + l = m.MidPriceAndTob.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFullSpotMarketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.WithMidPriceAndTob { + n += 2 + } + return n +} + +func (m *QueryFullSpotMarketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Markets) > 0 { + for _, e := range m.Markets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFullSpotMarketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.WithMidPriceAndTob { + n += 2 + } + return n +} + +func (m *QueryFullSpotMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotOrdersByHashesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.OrderHashes) > 0 { + for _, s := range m.OrderHashes { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySpotOrdersByHashesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTraderSpotOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountAddressSpotOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TrimmedSpotLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Fillable.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.IsBuy { + n += 2 + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraderSpotOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAccountAddressSpotOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySpotMidPriceAndTOBRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpotMidPriceAndTOBResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MidPrice != nil { + l = m.MidPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BestBuyPrice != nil { + l = m.BestBuyPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BestSellPrice != nil { + l = m.BestSellPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeMidPriceAndTOBRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeMidPriceAndTOBResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MidPrice != nil { + l = m.MidPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BestBuyPrice != nil { + l = m.BestBuyPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BestSellPrice != nil { + l = m.BestSellPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeOrderbookRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Limit != 0 { + n += 1 + sovQuery(uint64(m.Limit)) + } + if m.LimitCumulativeNotional != nil { + l = m.LimitCumulativeNotional.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeOrderbookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BuysPriceLevel) > 0 { + for _, e := range m.BuysPriceLevel { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SellsPriceLevel) > 0 { + for _, e := range m.SellsPriceLevel { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.BaseAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.QuoteAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Strategy != 0 { + n += 1 + sovQuery(uint64(m.Strategy)) + } + if m.ReferencePrice != nil { + l = m.ReferencePrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.QuoteAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Strategy != 0 { + n += 1 + sovQuery(uint64(m.Strategy)) + } + if m.ReferencePrice != nil { + l = m.ReferencePrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraderDerivativeOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountAddressDerivativeOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TrimmedDerivativeLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Margin.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Fillable.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.IsBuy { + n += 2 + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraderDerivativeOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAccountAddressDerivativeOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDerivativeOrdersByHashesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.OrderHashes) > 0 { + for _, s := range m.OrderHashes { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDerivativeOrdersByHashesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDerivativeMarketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.WithMidPriceAndTob { + n += 2 + } + return n +} + +func (m *PriceLevel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *PerpetualMarketState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MarketInfo != nil { + l = m.MarketInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.FundingInfo != nil { + l = m.FundingInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *FullDerivativeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.Info != nil { + n += m.Info.Size() + } + l = m.MarkPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.MidPriceAndTob != nil { + l = m.MidPriceAndTob.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *FullDerivativeMarket_PerpetualInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PerpetualInfo != nil { + l = m.PerpetualInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} +func (m *FullDerivativeMarket_FuturesInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FuturesInfo != nil { + l = m.FuturesInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} +func (m *QueryDerivativeMarketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Markets) > 0 { + for _, e := range m.Markets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDerivativeMarketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeMarketAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDerivativeMarketAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountTradeNonceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountPositionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountPositionInMarketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountEffectivePositionInMarketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountOrderMetadataRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySubaccountPositionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.State) > 0 { + for _, e := range m.State { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySubaccountPositionInMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *EffectivePosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsLong { + n += 2 + } + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EntryPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EffectiveMargin.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySubaccountEffectivePositionInMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPerpetualMarketInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPerpetualMarketInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryExpiryFuturesMarketInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryExpiryFuturesMarketInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Info.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryPerpetualMarketFundingRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPerpetualMarketFundingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySubaccountOrderMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Metadata) > 0 { + for _, e := range m.Metadata { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySubaccountTradeNonceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + +func (m *QueryModuleStateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryModuleStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPositionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryPositionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.State) > 0 { + for _, e := range m.State { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTradeRewardPointsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, s := range m.Accounts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.PendingPoolTimestamp != 0 { + n += 1 + sovQuery(uint64(m.PendingPoolTimestamp)) + } + return n +} + +func (m *QueryTradeRewardPointsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AccountTradeRewardPoints) > 0 { + for _, e := range m.AccountTradeRewardPoints { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTradeRewardCampaignRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTradeRewardCampaignResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TradingRewardCampaignInfo != nil { + l = m.TradingRewardCampaignInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.TradingRewardPoolCampaignSchedule) > 0 { + for _, e := range m.TradingRewardPoolCampaignSchedule { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.TotalTradeRewardPoints.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.PendingTradingRewardPoolCampaignSchedule) > 0 { + for _, e := range m.PendingTradingRewardPoolCampaignSchedule { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.PendingTotalTradeRewardPoints) > 0 { + for _, e := range m.PendingTotalTradeRewardPoints { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryIsOptedOutOfRewardsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIsOptedOutOfRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsOptedOut { + n += 2 + } + return n +} + +func (m *QueryOptedOutOfRewardsAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryOptedOutOfRewardsAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, s := range m.Accounts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFeeDiscountAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeDiscountAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TierLevel != 0 { + n += 1 + sovQuery(uint64(m.TierLevel)) + } + if m.AccountInfo != nil { + l = m.AccountInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.AccountTtl != nil { + l = m.AccountTtl.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeDiscountScheduleRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryFeeDiscountScheduleResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FeeDiscountSchedule != nil { + l = m.FeeDiscountSchedule.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBalanceMismatchesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DustFactor != 0 { + n += 1 + sovQuery(uint64(m.DustFactor)) + } + return n +} + +func (m *BalanceMismatch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Available.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Total.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.BalanceHold.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.ExpectedTotal.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Difference.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBalanceMismatchesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BalanceMismatches) > 0 { + for _, e := range m.BalanceMismatches { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryBalanceWithBalanceHoldsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *BalanceWithMarginHold) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Available.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Total.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.BalanceHold.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBalanceWithBalanceHoldsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BalanceWithBalanceHolds) > 0 { + for _, e := range m.BalanceWithBalanceHolds { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFeeDiscountTierStatisticsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *TierStatistic) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + sovQuery(uint64(m.Tier)) + } + if m.Count != 0 { + n += 1 + sovQuery(uint64(m.Count)) + } + return n +} + +func (m *QueryFeeDiscountTierStatisticsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Statistics) > 0 { + for _, e := range m.Statistics { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *MitoVaultInfosRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MitoVaultInfosResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MasterAddresses) > 0 { + for _, s := range m.MasterAddresses { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DerivativeAddresses) > 0 { + for _, s := range m.DerivativeAddresses { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SpotAddresses) > 0 { + for _, s := range m.SpotAddresses { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Cw20Addresses) > 0 { + for _, s := range m.Cw20Addresses { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryMarketIDFromVaultRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.VaultAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketIDFromVaultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHistoricalTradeRecordsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHistoricalTradeRecordsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TradeRecords) > 0 { + for _, e := range m.TradeRecords { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *TradeHistoryOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TradeGroupingSec != 0 { + n += 1 + sovQuery(uint64(m.TradeGroupingSec)) + } + if m.MaxAge != 0 { + n += 1 + sovQuery(uint64(m.MaxAge)) + } + if m.IncludeRawHistory { + n += 2 + } + if m.IncludeMetadata { + n += 2 + } + return n +} + +func (m *QueryMarketVolatilityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.TradeHistoryOptions != nil { + l = m.TradeHistoryOptions.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketVolatilityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Volatility != nil { + l = m.Volatility.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.HistoryMetadata != nil { + l = m.HistoryMetadata.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.RawHistory) > 0 { + for _, e := range m.RawHistory { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryBinaryMarketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBinaryMarketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Markets) > 0 { + for _, e := range m.Markets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTraderDerivativeConditionalOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TrimmedDerivativeConditionalOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Margin.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.TriggerPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.IsBuy { + n += 2 + } + if m.IsLimit { + n += 2 + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTraderDerivativeConditionalOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFullSpotOrderbookRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFullSpotOrderbookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bids) > 0 { + for _, e := range m.Bids { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Asks) > 0 { + for _, e := range m.Asks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFullDerivativeOrderbookRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFullDerivativeOrderbookResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bids) > 0 { + for _, e := range m.Bids { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Asks) > 0 { + for _, e := range m.Asks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *TrimmedLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Multiplier.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryActiveStakeGrantRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryActiveStakeGrantResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Grant != nil { + l = m.Grant.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.EffectiveGrant != nil { + l = m.EffectiveGrant.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGrantAuthorizationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGrantAuthorizationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalGrantAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.Grants) > 0 { + for _, e := range m.Grants { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Subaccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subaccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subaccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trader", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Trader = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountNonce", wireType) + } + m.SubaccountNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SubaccountNonce |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyOrders = append(m.BuyOrders, &SubaccountOrderData{}) + if err := m.BuyOrders[len(m.BuyOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellOrders = append(m.SellOrders, &SubaccountOrderData{}) + if err := m.SellOrders[len(m.SellOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountOrderbookMetadataWithMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountOrderbookMetadataWithMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountOrderbookMetadataWithMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &SubaccountOrderbookMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExchangeParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExchangeParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountDepositsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountDepositsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subaccount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Subaccount == nil { + m.Subaccount = &Subaccount{} + } + if err := m.Subaccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountDepositsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountDepositsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deposits == nil { + m.Deposits = make(map[string]*Deposit) + } + var mapkey string + var mapvalue *Deposit + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthQuery + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthQuery + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Deposit{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Deposits[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExchangeBalancesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeBalancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExchangeBalancesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExchangeBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExchangeBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, Balance{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVolumeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVolumeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVolumeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVolumeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVolumeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVolumeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateVolumes = append(m.AggregateVolumes, &MarketVolume{}) + if err := m.AggregateVolumes[len(m.AggregateVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVolumesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVolumesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVolumesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateVolumesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateVolumesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateVolumesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateAccountVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateAccountVolumes = append(m.AggregateAccountVolumes, &AggregateAccountVolumeRecord{}) + if err := m.AggregateAccountVolumes[len(m.AggregateAccountVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateMarketVolumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregateMarketVolumes = append(m.AggregateMarketVolumes, &MarketVolume{}) + if err := m.AggregateMarketVolumes[len(m.AggregateMarketVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateMarketVolumeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateMarketVolumeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateMarketVolumeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateMarketVolumeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateMarketVolumeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateMarketVolumeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDenomDecimalRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDenomDecimalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomDecimalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDenomDecimalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDenomDecimalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomDecimalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType) + } + m.Decimal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDenomDecimalsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDenomDecimalsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomDecimalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDenomDecimalsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDenomDecimalsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomDecimalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomDecimals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomDecimals = append(m.DenomDecimals, DenomDecimals{}) + if err := m.DenomDecimals[len(m.DenomDecimals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateMarketVolumesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateMarketVolumesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateMarketVolumesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAggregateMarketVolumesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAggregateMarketVolumesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAggregateMarketVolumesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, &MarketVolume{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountDepositRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountDepositResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deposits == nil { + m.Deposits = &Deposit{} + } + if err := m.Deposits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMarketsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMarketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMarketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMarketsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Markets = append(m.Markets, &SpotMarket{}) + if err := m.Markets[len(m.Markets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMarketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMarketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMarketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &SpotMarket{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderSide", wireType) + } + m.OrderSide = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderSide |= OrderSide(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitCumulativeNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.LimitCumulativeNotional = &v + if err := m.LimitCumulativeNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitCumulativeQuantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.LimitCumulativeQuantity = &v + if err := m.LimitCumulativeQuantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuysPriceLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuysPriceLevel = append(m.BuysPriceLevel, &Level{}) + if err := m.BuysPriceLevel[len(m.BuysPriceLevel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellsPriceLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellsPriceLevel = append(m.SellsPriceLevel, &Level{}) + if err := m.SellsPriceLevel[len(m.SellsPriceLevel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullSpotMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullSpotMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullSpotMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &SpotMarket{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MidPriceAndTob", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MidPriceAndTob == nil { + m.MidPriceAndTob = &MidPriceAndTOB{} + } + if err := m.MidPriceAndTob.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotMarketsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotMarketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotMarketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithMidPriceAndTob", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithMidPriceAndTob = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotMarketsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Markets = append(m.Markets, &FullSpotMarket{}) + if err := m.Markets[len(m.Markets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotMarketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotMarketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotMarketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithMidPriceAndTob", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithMidPriceAndTob = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &FullSpotMarket{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotOrdersByHashesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotOrdersByHashesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotOrdersByHashesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHashes = append(m.OrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotOrdersByHashesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotOrdersByHashesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotOrdersByHashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedSpotLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderSpotOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderSpotOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderSpotOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressSpotOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressSpotOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressSpotOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrimmedSpotLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrimmedSpotLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrimmedSpotLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fillable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fillable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderSpotOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderSpotOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderSpotOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedSpotLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressSpotOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressSpotOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressSpotOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedSpotLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMidPriceAndTOBRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMidPriceAndTOBRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMidPriceAndTOBRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpotMidPriceAndTOBResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpotMidPriceAndTOBResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpotMidPriceAndTOBResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MidPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MidPrice = &v + if err := m.MidPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestBuyPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestBuyPrice = &v + if err := m.BestBuyPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestSellPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestSellPrice = &v + if err := m.BestSellPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMidPriceAndTOBRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMidPriceAndTOBRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMidPriceAndTOBRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMidPriceAndTOBResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMidPriceAndTOBResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMidPriceAndTOBResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MidPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.MidPrice = &v + if err := m.MidPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestBuyPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestBuyPrice = &v + if err := m.BestBuyPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BestSellPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.BestSellPrice = &v + if err := m.BestSellPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitCumulativeNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.LimitCumulativeNotional = &v + if err := m.LimitCumulativeNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuysPriceLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuysPriceLevel = append(m.BuysPriceLevel, &Level{}) + if err := m.BuysPriceLevel[len(m.BuysPriceLevel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellsPriceLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellsPriceLevel = append(m.SellsPriceLevel, &Level{}) + if err := m.SellsPriceLevel[len(m.SellsPriceLevel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderSpotOrdersToCancelUpToAmountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderSpotOrdersToCancelUpToAmountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderSpotOrdersToCancelUpToAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BaseAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.QuoteAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + m.Strategy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Strategy |= CancellationStrategy(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferencePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.ReferencePrice = &v + if err := m.ReferencePrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderDerivativeOrdersToCancelUpToAmountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersToCancelUpToAmountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersToCancelUpToAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.QuoteAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + m.Strategy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Strategy |= CancellationStrategy(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferencePrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.ReferencePrice = &v + if err := m.ReferencePrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderDerivativeOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressDerivativeOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressDerivativeOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressDerivativeOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrimmedDerivativeLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrimmedDerivativeLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrimmedDerivativeLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fillable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fillable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderDerivativeOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderDerivativeOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedDerivativeLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAccountAddressDerivativeOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAccountAddressDerivativeOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountAddressDerivativeOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedDerivativeLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeOrdersByHashesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeOrdersByHashesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeOrdersByHashesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHashes = append(m.OrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeOrdersByHashesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeOrdersByHashesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeOrdersByHashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedDerivativeLimitOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithMidPriceAndTob", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithMidPriceAndTob = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriceLevel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PriceLevel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriceLevel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerpetualMarketState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerpetualMarketState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerpetualMarketState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MarketInfo == nil { + m.MarketInfo = &PerpetualMarketInfo{} + } + if err := m.MarketInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FundingInfo == nil { + m.FundingInfo = &PerpetualMarketFunding{} + } + if err := m.FundingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullDerivativeMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullDerivativeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullDerivativeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &DerivativeMarket{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerpetualInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PerpetualMarketState{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Info = &FullDerivativeMarket_PerpetualInfo{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FuturesInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ExpiryFuturesMarketInfo{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Info = &FullDerivativeMarket_FuturesInfo{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarkPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MarkPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MidPriceAndTob", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MidPriceAndTob == nil { + m.MidPriceAndTob = &MidPriceAndTOB{} + } + if err := m.MidPriceAndTob.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Markets = append(m.Markets, &FullDerivativeMarket{}) + if err := m.Markets[len(m.Markets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &FullDerivativeMarket{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDerivativeMarketAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryDerivativeMarketAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDerivativeMarketAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountTradeNonceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountTradeNonceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountTradeNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountPositionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountPositionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountPositionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountPositionInMarketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountPositionInMarketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountPositionInMarketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountEffectivePositionInMarketRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountEffectivePositionInMarketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountEffectivePositionInMarketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountOrderMetadataRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountOrderMetadataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountOrderMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountPositionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountPositionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountPositionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = append(m.State, DerivativePosition{}) + if err := m.State[len(m.State)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountPositionInMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountPositionInMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountPositionInMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &Position{} + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EffectivePosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EffectivePosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EffectivePosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLong", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLong = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EntryPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveMargin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EffectiveMargin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountEffectivePositionInMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountEffectivePositionInMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountEffectivePositionInMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &EffectivePosition{} + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPerpetualMarketInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPerpetualMarketInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPerpetualMarketInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPerpetualMarketInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPerpetualMarketInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPerpetualMarketInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExpiryFuturesMarketInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExpiryFuturesMarketInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExpiryFuturesMarketInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryExpiryFuturesMarketInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryExpiryFuturesMarketInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExpiryFuturesMarketInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPerpetualMarketFundingRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPerpetualMarketFundingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPerpetualMarketFundingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPerpetualMarketFundingResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPerpetualMarketFundingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPerpetualMarketFundingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountOrderMetadataResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountOrderMetadataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountOrderMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = append(m.Metadata, SubaccountOrderbookMetadataWithMarket{}) + if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubaccountTradeNonceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubaccountTradeNonceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubaccountTradeNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryModuleStateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryModuleStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryModuleStateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryModuleStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &GenesisState{} + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPositionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPositionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPositionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPositionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPositionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPositionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = append(m.State, DerivativePosition{}) + if err := m.State[len(m.State)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTradeRewardPointsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTradeRewardPointsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTradeRewardPointsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingPoolTimestamp", wireType) + } + m.PendingPoolTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PendingPoolTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTradeRewardPointsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTradeRewardPointsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTradeRewardPointsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountTradeRewardPoints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.AccountTradeRewardPoints = append(m.AccountTradeRewardPoints, v) + if err := m.AccountTradeRewardPoints[len(m.AccountTradeRewardPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTradeRewardCampaignRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTradeRewardCampaignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTradeRewardCampaignRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTradeRewardCampaignResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTradeRewardCampaignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTradeRewardCampaignResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardCampaignInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TradingRewardCampaignInfo == nil { + m.TradingRewardCampaignInfo = &TradingRewardCampaignInfo{} + } + if err := m.TradingRewardCampaignInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradingRewardPoolCampaignSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradingRewardPoolCampaignSchedule = append(m.TradingRewardPoolCampaignSchedule, &CampaignRewardPool{}) + if err := m.TradingRewardPoolCampaignSchedule[len(m.TradingRewardPoolCampaignSchedule)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalTradeRewardPoints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalTradeRewardPoints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTradingRewardPoolCampaignSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingTradingRewardPoolCampaignSchedule = append(m.PendingTradingRewardPoolCampaignSchedule, &CampaignRewardPool{}) + if err := m.PendingTradingRewardPoolCampaignSchedule[len(m.PendingTradingRewardPoolCampaignSchedule)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTotalTradeRewardPoints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.PendingTotalTradeRewardPoints = append(m.PendingTotalTradeRewardPoints, v) + if err := m.PendingTotalTradeRewardPoints[len(m.PendingTotalTradeRewardPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIsOptedOutOfRewardsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIsOptedOutOfRewardsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIsOptedOutOfRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIsOptedOutOfRewardsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIsOptedOutOfRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIsOptedOutOfRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsOptedOut", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsOptedOut = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOptedOutOfRewardsAccountsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOptedOutOfRewardsAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOptedOutOfRewardsAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOptedOutOfRewardsAccountsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryOptedOutOfRewardsAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOptedOutOfRewardsAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountAccountInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountAccountInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TierLevel", wireType) + } + m.TierLevel = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TierLevel |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AccountInfo == nil { + m.AccountInfo = &FeeDiscountTierInfo{} + } + if err := m.AccountInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountTtl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AccountTtl == nil { + m.AccountTtl = &FeeDiscountTierTTL{} + } + if err := m.AccountTtl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountScheduleRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountScheduleRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountScheduleRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountScheduleResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountScheduleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountScheduleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeDiscountSchedule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeDiscountSchedule == nil { + m.FeeDiscountSchedule = &FeeDiscountSchedule{} + } + if err := m.FeeDiscountSchedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceMismatchesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceMismatchesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceMismatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DustFactor", wireType) + } + m.DustFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DustFactor |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceMismatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BalanceMismatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceMismatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Available.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Total.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BalanceHold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BalanceHold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpectedTotal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExpectedTotal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Difference", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Difference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceMismatchesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceMismatchesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceMismatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BalanceMismatches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BalanceMismatches = append(m.BalanceMismatches, &BalanceMismatch{}) + if err := m.BalanceMismatches[len(m.BalanceMismatches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceWithBalanceHoldsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceWithBalanceHoldsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceWithBalanceHoldsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceWithMarginHold) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BalanceWithMarginHold: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceWithMarginHold: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Available.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Total.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BalanceHold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BalanceHold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceWithBalanceHoldsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBalanceWithBalanceHoldsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceWithBalanceHoldsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BalanceWithBalanceHolds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BalanceWithBalanceHolds = append(m.BalanceWithBalanceHolds, &BalanceWithMarginHold{}) + if err := m.BalanceWithBalanceHolds[len(m.BalanceWithBalanceHolds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountTierStatisticsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountTierStatisticsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountTierStatisticsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TierStatistic) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TierStatistic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TierStatistic: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeDiscountTierStatisticsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFeeDiscountTierStatisticsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeDiscountTierStatisticsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Statistics = append(m.Statistics, &TierStatistic{}) + if err := m.Statistics[len(m.Statistics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MitoVaultInfosRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MitoVaultInfosRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MitoVaultInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MitoVaultInfosResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MitoVaultInfosResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MitoVaultInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MasterAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MasterAddresses = append(m.MasterAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeAddresses = append(m.DerivativeAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotAddresses = append(m.SpotAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cw20Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cw20Addresses = append(m.Cw20Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketIDFromVaultRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketIDFromVaultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketIDFromVaultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VaultAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketIDFromVaultResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketIDFromVaultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketIDFromVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHistoricalTradeRecordsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHistoricalTradeRecordsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHistoricalTradeRecordsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHistoricalTradeRecordsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHistoricalTradeRecordsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHistoricalTradeRecordsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeRecords", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradeRecords = append(m.TradeRecords, &TradeRecords{}) + if err := m.TradeRecords[len(m.TradeRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradeHistoryOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradeHistoryOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradeHistoryOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeGroupingSec", wireType) + } + m.TradeGroupingSec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TradeGroupingSec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) + } + m.MaxAge = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxAge |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeRawHistory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeRawHistory = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeMetadata", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeMetadata = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketVolatilityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketVolatilityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketVolatilityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeHistoryOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TradeHistoryOptions == nil { + m.TradeHistoryOptions = &TradeHistoryOptions{} + } + if err := m.TradeHistoryOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketVolatilityResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketVolatilityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketVolatilityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volatility", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.Volatility = &v + if err := m.Volatility.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoryMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HistoryMetadata == nil { + m.HistoryMetadata = &types.MetadataStatistics{} + } + if err := m.HistoryMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawHistory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RawHistory = append(m.RawHistory, &TradeRecord{}) + if err := m.RawHistory[len(m.RawHistory)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBinaryMarketsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBinaryMarketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBinaryMarketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBinaryMarketsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBinaryMarketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBinaryMarketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Markets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Markets = append(m.Markets, &BinaryOptionsMarket{}) + if err := m.Markets[len(m.Markets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderDerivativeConditionalOrdersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderDerivativeConditionalOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderDerivativeConditionalOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrimmedDerivativeConditionalOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrimmedDerivativeConditionalOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrimmedDerivativeConditionalOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TriggerPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TriggerPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLimit", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLimit = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraderDerivativeConditionalOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTraderDerivativeConditionalOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraderDerivativeConditionalOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, &TrimmedDerivativeConditionalOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullSpotOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullSpotOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullSpotOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bids = append(m.Bids, &TrimmedLimitOrder{}) + if err := m.Bids[len(m.Bids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asks = append(m.Asks, &TrimmedLimitOrder{}) + if err := m.Asks[len(m.Asks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullDerivativeOrderbookRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFullDerivativeOrderbookResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFullDerivativeOrderbookResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bids = append(m.Bids, &TrimmedLimitOrder{}) + if err := m.Bids[len(m.Bids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asks = append(m.Asks, &TrimmedLimitOrder{}) + if err := m.Asks[len(m.Asks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrimmedLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrimmedLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrimmedLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketAtomicExecutionFeeMultiplierRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketAtomicExecutionFeeMultiplierRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketAtomicExecutionFeeMultiplierRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMarketAtomicExecutionFeeMultiplierResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMarketAtomicExecutionFeeMultiplierResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketAtomicExecutionFeeMultiplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Multiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Multiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryActiveStakeGrantRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryActiveStakeGrantRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryActiveStakeGrantRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryActiveStakeGrantResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryActiveStakeGrantResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryActiveStakeGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grant", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Grant == nil { + m.Grant = &ActiveGrant{} + } + if err := m.Grant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveGrant", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EffectiveGrant == nil { + m.EffectiveGrant = &EffectiveGrant{} + } + if err := m.EffectiveGrant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGrantAuthorizationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGrantAuthorizationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantAuthorizationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGrantAuthorizationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGrantAuthorizationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantAuthorizationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGrantAuthorizationsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGrantAuthorizationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantAuthorizationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGrantAuthorizationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGrantAuthorizationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGrantAuthorizationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalGrantAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalGrantAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grants = append(m.Grants, &GrantAuthorization{}) + if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/spot_orders.go b/chain/exchange/types/v2/spot_orders.go new file mode 100644 index 00000000..edc40d2c --- /dev/null +++ b/chain/exchange/types/v2/spot_orders.go @@ -0,0 +1,280 @@ +package v2 + +import ( + "cosmossdk.io/errors" + "cosmossdk.io/math" + "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" +) + +var _ types.IOrderInfo = &OrderInfo{} + +func (m *SpotOrder) ToSpotMarketOrder(sender sdk.AccAddress, balanceHold math.LegacyDec, orderHash common.Hash) *SpotMarketOrder { + if m.OrderInfo.FeeRecipient == "" { + m.OrderInfo.FeeRecipient = sender.String() + } + return &SpotMarketOrder{ + OrderInfo: m.OrderInfo, + BalanceHold: balanceHold, + OrderHash: orderHash.Bytes(), + OrderType: m.OrderType, + TriggerPrice: m.TriggerPrice, + } +} + +func (m *SpotLimitOrder) ToStandardized() *TrimmedLimitOrder { + return &TrimmedLimitOrder{ + Price: m.OrderInfo.Price, + Quantity: m.OrderInfo.Quantity, + OrderHash: common.BytesToHash(m.OrderHash).Hex(), + SubaccountId: m.OrderInfo.SubaccountId, + } +} + +func (m *SpotOrder) GetNewSpotLimitOrder(sender sdk.AccAddress, orderHash common.Hash) *SpotLimitOrder { + if m.OrderInfo.FeeRecipient == "" { + m.OrderInfo.FeeRecipient = sender.String() + } + return &SpotLimitOrder{ + OrderInfo: m.OrderInfo, + OrderType: m.OrderType, + Fillable: m.OrderInfo.Quantity, + TriggerPrice: m.TriggerPrice, + OrderHash: orderHash.Bytes(), + } +} + +func (m *SpotOrder) SubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} + +func (m *SpotOrder) IsFromDefaultSubaccount() bool { + return m.OrderInfo.IsFromDefaultSubaccount() +} + +func (m *SpotLimitOrder) IsFromDefaultSubaccount() bool { + return m.OrderInfo.IsFromDefaultSubaccount() +} + +func (m *SpotLimitOrder) Cid() string { + return m.OrderInfo.GetCid() +} + +func (o *SpotMarketOrder) Cid() string { + return o.OrderInfo.GetCid() +} + +func (m *SpotLimitOrder) SubaccountID() common.Hash { + return m.OrderInfo.SubaccountID() +} + +func (o *SpotMarketOrder) SubaccountID() common.Hash { + return o.OrderInfo.SubaccountID() +} + +func (o *SpotMarketOrder) IsFromDefaultSubaccount() bool { + return o.OrderInfo.IsFromDefaultSubaccount() +} + +func (o *SpotMarketOrder) SdkAccAddress() sdk.AccAddress { + return o.SubaccountID().Bytes()[:common.AddressLength] +} + +func NewV1SpotLimitOrderFromV2(market SpotMarket, order SpotLimitOrder) types.SpotLimitOrder { + v1OrderInfo := NewV1OrderInfoFromV2(&market, order.OrderInfo) + v1Order := types.SpotLimitOrder{ + OrderInfo: v1OrderInfo, + OrderType: types.OrderType(order.OrderType), + Fillable: market.QuantityToChainFormat(order.Fillable), + OrderHash: order.OrderHash, + } + + if order.TriggerPrice != nil { + chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) + v1Order.TriggerPrice = &chainFormatTriggerPrice + } + + return v1Order +} + +func NewV2SpotOrderFromV1(market MarketInterface, order types.SpotOrder) *SpotOrder { + v2OrderInfo := NewV2OrderInfoFromV1(market, order.OrderInfo) + v2Order := SpotOrder{ + MarketId: order.MarketId, + OrderInfo: *v2OrderInfo, + OrderType: OrderType(order.OrderType), + } + + if order.TriggerPrice != nil && !order.TriggerPrice.IsNil() { + humanPrice := market.PriceFromChainFormat(*order.TriggerPrice) + v2Order.TriggerPrice = &humanPrice + } + + return &v2Order +} + +func (m *SpotLimitOrder) SdkAccAddress() sdk.AccAddress { + return m.SubaccountID().Bytes()[:common.AddressLength] +} + +func (m *SpotLimitOrder) FeeRecipient() common.Address { + return m.OrderInfo.FeeRecipientAddress() +} + +func (o *SpotMarketOrder) FeeRecipient() common.Address { + return o.OrderInfo.FeeRecipientAddress() +} + +func (m *SpotOrder) CheckTickSize(minPriceTickSize, minQuantityTickSize math.LegacyDec) error { + if types.BreachesMinimumTickSize(m.OrderInfo.Price, minPriceTickSize) { + return errors.Wrapf(types.ErrInvalidPrice, "price %s must be a multiple of the minimum price tick size %s", m.OrderInfo.Price.String(), minPriceTickSize.String()) + } + if types.BreachesMinimumTickSize(m.OrderInfo.Quantity, minQuantityTickSize) { + return errors.Wrapf(types.ErrInvalidQuantity, "quantity %s must be a multiple of the minimum quantity tick size %s", m.OrderInfo.Quantity.String(), minQuantityTickSize.String()) + } + return nil +} + +func (m *SpotOrder) CheckNotional(minNotional math.LegacyDec) error { + orderNotional := m.GetQuantity().Mul(m.GetPrice()) + if !minNotional.IsNil() && orderNotional.LT(minNotional) { + return errors.Wrapf(types.ErrInvalidNotional, "order notional (%s) is less than the minimum notional for the market (%s)", orderNotional.String(), minNotional.String()) + } + return nil +} + +func (m *SpotOrder) IsBuy() bool { + return m.OrderType.IsBuy() +} + +func (m *SpotOrder) Cid() string { + return m.OrderInfo.Cid +} + +func (m *SpotLimitOrder) IsBuy() bool { + return m.OrderType.IsBuy() +} + +func (m *SpotLimitOrder) Hash() common.Hash { + return common.BytesToHash(m.OrderHash) +} + +func (m *SpotMarketOrder) Hash() common.Hash { + return common.BytesToHash(m.OrderHash) +} + +func (m *SpotOrder) IsConditional() bool { + return m.OrderType.IsConditional() +} + +func (m *SpotLimitOrder) IsConditional() bool { + return m.OrderType.IsConditional() +} + +func (o *SpotMarketOrder) IsConditional() bool { + return o.OrderType.IsConditional() +} + +func (m *SpotLimitOrder) GetUnfilledNotional() math.LegacyDec { + return m.Fillable.Mul(m.OrderInfo.Price) +} +func (m *SpotLimitOrder) GetUnfilledFeeAmount(fee math.LegacyDec) math.LegacyDec { + return m.GetUnfilledNotional().Mul(fee) +} + +func (m *SpotOrder) GetBalanceHoldAndMarginDenom(market *SpotMarket) (math.LegacyDec, string) { + var denom string + var balanceHold math.LegacyDec + if m.IsBuy() { + denom = market.QuoteDenom + if m.OrderType.IsPostOnly() { + // for a PO limit buy in the ETH/USDT market, denom is USDT and balanceHold is (1 + makerFee)*(price * quantity) + balanceHold = m.OrderInfo.GetNotional() + if market.MakerFeeRate.IsPositive() { + balanceHold = balanceHold.Add(m.OrderInfo.GetFeeAmount(market.MakerFeeRate)) + } + } else { + // for a normal limit buy in the ETH/USDT market, denom is USDT and balanceHold is (1 + takerFee)*(price * quantity) + balanceHold = m.OrderInfo.GetNotional().Add(m.OrderInfo.GetFeeAmount(market.TakerFeeRate)) + } + } else { + // for a limit sell in the ETH/USDT market, denom is ETH and balanceHold is just quantity + denom = market.BaseDenom + balanceHold = m.OrderInfo.Quantity + } + + return balanceHold, denom +} + +func (m *SpotLimitOrder) GetUnfilledMarginHoldAndMarginDenom(market *SpotMarket, isTransient bool) (balanceHold math.LegacyDec, denom string) { + if m.IsBuy() { + var tradeFeeRate math.LegacyDec + + if isTransient { + tradeFeeRate = market.TakerFeeRate + } else { + tradeFeeRate = math.LegacyMaxDec(math.LegacyZeroDec(), market.MakerFeeRate) + } + + // for a resting limit buy in the ETH/USDT market, denom is USDT and fillable amount is BalanceHold is (1 + makerFee)*(price * quantity) since (takerFee - makerFee) is already refunded + denom = market.QuoteDenom + balanceHold = m.GetUnfilledNotional().Add(m.GetUnfilledFeeAmount(tradeFeeRate)) + } else { + // for a limit sell in the ETH/USDT market, denom is ETH and balanceHold is just quantity + denom = market.BaseDenom + balanceHold = m.Fillable + } + + return balanceHold, denom +} + +func (m *SpotOrder) GetMarginDenom(market *SpotMarket) string { + var denom string + if m.IsBuy() { + // for a market buy in the ETH/USDT market, margin denom is USDT + denom = market.QuoteDenom + } else { + // for a market buy in the ETH/USDT market, margin denom is ETH + denom = market.BaseDenom + } + return denom +} + +// GetMarketOrderBalanceHold calculates the balance hold for the market order. +func (m *SpotOrder) GetMarketOrderBalanceHold(feeRate, bestPrice math.LegacyDec) math.LegacyDec { + var balanceHold math.LegacyDec + + if m.IsBuy() { + // required margin for best sell price = bestPrice * quantity * (1 + feeRate) + requiredMarginForBestPrice := bestPrice.Mul(m.OrderInfo.Quantity).Mul(math.LegacyOneDec().Add(feeRate)) + requiredMarginForWorstPrice := m.OrderInfo.Price.Mul(m.OrderInfo.Quantity).Mul(math.LegacyOneDec().Add(feeRate)) + requiredMargin := math.LegacyMaxDec(requiredMarginForBestPrice, requiredMarginForWorstPrice) + balanceHold = requiredMargin + } else { + // required margin for market sells just equals the quantity being sold + balanceHold = m.OrderInfo.Quantity + } + return balanceHold +} + +func (m *SpotLimitOrder) ToTrimmed() *TrimmedSpotLimitOrder { + return &TrimmedSpotLimitOrder{ + Price: m.OrderInfo.Price, + Quantity: m.OrderInfo.Quantity, + Fillable: m.Fillable, + IsBuy: m.IsBuy(), + OrderHash: common.BytesToHash(m.OrderHash).Hex(), + Cid: m.Cid(), + } +} + +// ComputeOrderHash computes the order hash for given spot limit order +func (m *SpotOrder) ComputeOrderHash(nonce uint32) (common.Hash, error) { + triggerPrice := "" + if m.TriggerPrice != nil { + triggerPrice = m.TriggerPrice.String() + } + + return types.ComputeSpotOrderHash(m.MarketId, string(m.OrderType), triggerPrice, &m.OrderInfo, nonce) +} diff --git a/chain/exchange/types/v2/stake_grants.go b/chain/exchange/types/v2/stake_grants.go new file mode 100644 index 00000000..81f17a86 --- /dev/null +++ b/chain/exchange/types/v2/stake_grants.go @@ -0,0 +1,21 @@ +package v2 + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func NewActiveGrant(granter sdk.AccAddress, amount math.Int) *ActiveGrant { + return &ActiveGrant{ + Granter: granter.String(), + Amount: amount, + } +} + +func NewEffectiveGrant(granter string, amount math.Int, isValid bool) *EffectiveGrant { + return &EffectiveGrant{ + Granter: granter, + NetGrantedStake: amount, + IsValid: isValid, + } +} diff --git a/chain/exchange/types/subaccount.go b/chain/exchange/types/v2/subaccount.go similarity index 65% rename from chain/exchange/types/subaccount.go rename to chain/exchange/types/v2/subaccount.go index fb59981b..a4abf9c2 100644 --- a/chain/exchange/types/subaccount.go +++ b/chain/exchange/types/v2/subaccount.go @@ -1,8 +1,6 @@ -package types +package v2 import ( - "fmt" - "cosmossdk.io/math" ) @@ -34,25 +32,6 @@ func (o *SubaccountOrder) IsVanilla() bool { return !o.IsReduceOnly } -func (m *SubaccountOrderbookMetadata) AssertValid() { - errStr := "" - if m.AggregateVanillaQuantity.IsNegative() { - errStr += "m.AggregateVanillaQuantity is negative with " + m.AggregateVanillaQuantity.String() + "\n" - } - if m.AggregateReduceOnlyQuantity.IsNegative() { - errStr += "m.AggregateReduceOnlyQuantity is negative with " + m.AggregateReduceOnlyQuantity.String() + "\n" - } - if m.VanillaLimitOrderCount > 20 { - errStr += fmt.Sprintf("m.AggregateVanillaQuantity is GT 20 %d\n", m.VanillaLimitOrderCount) - } - if m.ReduceOnlyLimitOrderCount > 20 { - errStr += fmt.Sprintf("m.ReduceOnlyLimitOrderCount is GT 20 %d\n", m.ReduceOnlyLimitOrderCount) - } - if errStr != "" { - panic(errStr) - } -} - func (m *SubaccountOrderbookMetadata) ApplyDelta(d *SubaccountOrderbookMetadata) { if !d.AggregateReduceOnlyQuantity.IsZero() { m.AggregateReduceOnlyQuantity = m.AggregateReduceOnlyQuantity.Add(d.AggregateReduceOnlyQuantity) diff --git a/chain/exchange/types/v2/tx.pb.go b/chain/exchange/types/v2/tx.pb.go new file mode 100644 index 00000000..6b05885c --- /dev/null +++ b/chain/exchange/types/v2/tx.pb.go @@ -0,0 +1,21719 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/exchange/v2/tx.proto + +package v2 + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + types1 "github.com/InjectiveLabs/sdk-go/chain/oracle/types" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/cosmos-sdk/x/distribution/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type MsgUpdateSpotMarket struct { + // current admin address of the associated market + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // id of the market to be updated + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // (optional) updated ticker value + NewTicker string `protobuf:"bytes,3,opt,name=new_ticker,json=newTicker,proto3" json:"new_ticker,omitempty"` + // (optional) updated min price tick size value + NewMinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=new_min_price_tick_size,json=newMinPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_price_tick_size"` + // (optional) updated min quantity tick size value + NewMinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=new_min_quantity_tick_size,json=newMinQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_quantity_tick_size"` + // (optional) updated min notional + NewMinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=new_min_notional,json=newMinNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_notional"` +} + +func (m *MsgUpdateSpotMarket) Reset() { *m = MsgUpdateSpotMarket{} } +func (m *MsgUpdateSpotMarket) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateSpotMarket) ProtoMessage() {} +func (*MsgUpdateSpotMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{0} +} +func (m *MsgUpdateSpotMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateSpotMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateSpotMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateSpotMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateSpotMarket.Merge(m, src) +} +func (m *MsgUpdateSpotMarket) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateSpotMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateSpotMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateSpotMarket proto.InternalMessageInfo + +func (m *MsgUpdateSpotMarket) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *MsgUpdateSpotMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MsgUpdateSpotMarket) GetNewTicker() string { + if m != nil { + return m.NewTicker + } + return "" +} + +type MsgUpdateSpotMarketResponse struct { +} + +func (m *MsgUpdateSpotMarketResponse) Reset() { *m = MsgUpdateSpotMarketResponse{} } +func (m *MsgUpdateSpotMarketResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateSpotMarketResponse) ProtoMessage() {} +func (*MsgUpdateSpotMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{1} +} +func (m *MsgUpdateSpotMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateSpotMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateSpotMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateSpotMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateSpotMarketResponse.Merge(m, src) +} +func (m *MsgUpdateSpotMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateSpotMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateSpotMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateSpotMarketResponse proto.InternalMessageInfo + +type MsgUpdateDerivativeMarket struct { + // current admin address of the associated market + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // id of the market to be updated + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // (optional) updated value for ticker + NewTicker string `protobuf:"bytes,3,opt,name=new_ticker,json=newTicker,proto3" json:"new_ticker,omitempty"` + // (optional) updated value for min_price_tick_size + NewMinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=new_min_price_tick_size,json=newMinPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_price_tick_size"` + // (optional) updated value min_quantity_tick_size + NewMinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=new_min_quantity_tick_size,json=newMinQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_quantity_tick_size"` + // (optional) updated min notional + NewMinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=new_min_notional,json=newMinNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_min_notional"` + // (optional) updated value for initial_margin_ratio + NewInitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=new_initial_margin_ratio,json=newInitialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_initial_margin_ratio"` + // (optional) updated value for maintenance_margin_ratio + NewMaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=new_maintenance_margin_ratio,json=newMaintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"new_maintenance_margin_ratio"` +} + +func (m *MsgUpdateDerivativeMarket) Reset() { *m = MsgUpdateDerivativeMarket{} } +func (m *MsgUpdateDerivativeMarket) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDerivativeMarket) ProtoMessage() {} +func (*MsgUpdateDerivativeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{2} +} +func (m *MsgUpdateDerivativeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDerivativeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDerivativeMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateDerivativeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDerivativeMarket.Merge(m, src) +} +func (m *MsgUpdateDerivativeMarket) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDerivativeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDerivativeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDerivativeMarket proto.InternalMessageInfo + +type MsgUpdateDerivativeMarketResponse struct { +} + +func (m *MsgUpdateDerivativeMarketResponse) Reset() { *m = MsgUpdateDerivativeMarketResponse{} } +func (m *MsgUpdateDerivativeMarketResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDerivativeMarketResponse) ProtoMessage() {} +func (*MsgUpdateDerivativeMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{3} +} +func (m *MsgUpdateDerivativeMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDerivativeMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDerivativeMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateDerivativeMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDerivativeMarketResponse.Merge(m, src) +} +func (m *MsgUpdateDerivativeMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDerivativeMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDerivativeMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDerivativeMarketResponse proto.InternalMessageInfo + +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the exchange parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{4} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{5} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgDeposit defines a SDK message for transferring coins from the sender's +// bank balance into the subaccount's exchange deposits +type MsgDeposit struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin + // will be deposited to the sender's default subaccount address. + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } +func (m *MsgDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgDeposit) ProtoMessage() {} +func (*MsgDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{6} +} +func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeposit.Merge(m, src) +} +func (m *MsgDeposit) XXX_Size() int { + return m.Size() +} +func (m *MsgDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo + +// MsgDepositResponse defines the Msg/Deposit response type. +type MsgDepositResponse struct { +} + +func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } +func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositResponse) ProtoMessage() {} +func (*MsgDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{7} +} +func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositResponse.Merge(m, src) +} +func (m *MsgDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo + +// MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's +// deposits to the user's bank balance +type MsgWithdraw struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // bytes32 subaccount ID to withdraw funds from + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } +func (m *MsgWithdraw) String() string { return proto.CompactTextString(m) } +func (*MsgWithdraw) ProtoMessage() {} +func (*MsgWithdraw) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{8} +} +func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdraw.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdraw) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdraw.Merge(m, src) +} +func (m *MsgWithdraw) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdraw) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdraw.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdraw proto.InternalMessageInfo + +// MsgWithdraw defines the Msg/Withdraw response type. +type MsgWithdrawResponse struct { +} + +func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} } +func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawResponse) ProtoMessage() {} +func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{9} +} +func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawResponse.Merge(m, src) +} +func (m *MsgWithdrawResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo + +// MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit +// order. +type MsgCreateSpotLimitOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateSpotLimitOrder) Reset() { *m = MsgCreateSpotLimitOrder{} } +func (m *MsgCreateSpotLimitOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateSpotLimitOrder) ProtoMessage() {} +func (*MsgCreateSpotLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{10} +} +func (m *MsgCreateSpotLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateSpotLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateSpotLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateSpotLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateSpotLimitOrder.Merge(m, src) +} +func (m *MsgCreateSpotLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateSpotLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateSpotLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateSpotLimitOrder proto.InternalMessageInfo + +// MsgCreateSpotLimitOrderResponse defines the Msg/CreateSpotOrder response +// type. +type MsgCreateSpotLimitOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateSpotLimitOrderResponse) Reset() { *m = MsgCreateSpotLimitOrderResponse{} } +func (m *MsgCreateSpotLimitOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateSpotLimitOrderResponse) ProtoMessage() {} +func (*MsgCreateSpotLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{11} +} +func (m *MsgCreateSpotLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateSpotLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateSpotLimitOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateSpotLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateSpotLimitOrderResponse.Merge(m, src) +} +func (m *MsgCreateSpotLimitOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateSpotLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateSpotLimitOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateSpotLimitOrderResponse proto.InternalMessageInfo + +// MsgBatchCreateSpotLimitOrders defines a SDK message for creating a new batch +// of spot limit orders. +type MsgBatchCreateSpotLimitOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Orders []SpotOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders"` +} + +func (m *MsgBatchCreateSpotLimitOrders) Reset() { *m = MsgBatchCreateSpotLimitOrders{} } +func (m *MsgBatchCreateSpotLimitOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCreateSpotLimitOrders) ProtoMessage() {} +func (*MsgBatchCreateSpotLimitOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{12} +} +func (m *MsgBatchCreateSpotLimitOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCreateSpotLimitOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCreateSpotLimitOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCreateSpotLimitOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCreateSpotLimitOrders.Merge(m, src) +} +func (m *MsgBatchCreateSpotLimitOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCreateSpotLimitOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCreateSpotLimitOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCreateSpotLimitOrders proto.InternalMessageInfo + +// MsgBatchCreateSpotLimitOrdersResponse defines the +// Msg/BatchCreateSpotLimitOrders response type. +type MsgBatchCreateSpotLimitOrdersResponse struct { + OrderHashes []string `protobuf:"bytes,1,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` + CreatedOrdersCids []string `protobuf:"bytes,2,rep,name=created_orders_cids,json=createdOrdersCids,proto3" json:"created_orders_cids,omitempty"` + FailedOrdersCids []string `protobuf:"bytes,3,rep,name=failed_orders_cids,json=failedOrdersCids,proto3" json:"failed_orders_cids,omitempty"` +} + +func (m *MsgBatchCreateSpotLimitOrdersResponse) Reset() { *m = MsgBatchCreateSpotLimitOrdersResponse{} } +func (m *MsgBatchCreateSpotLimitOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCreateSpotLimitOrdersResponse) ProtoMessage() {} +func (*MsgBatchCreateSpotLimitOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{13} +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse.Merge(m, src) +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCreateSpotLimitOrdersResponse proto.InternalMessageInfo + +// MsgInstantSpotMarketLaunch defines a SDK message for creating a new spot +// market by paying listing fee without governance +type MsgInstantSpotMarketLaunch struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Ticker for the spot market. + Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the base currency + BaseDenom string `protobuf:"bytes,3,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + // type of coin to use as the quote currency + QuoteDenom string `protobuf:"bytes,4,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // min_price_tick_size defines the minimum tick size of the order's price + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` + // base token decimals + BaseDecimals uint32 `protobuf:"varint,8,opt,name=base_decimals,json=baseDecimals,proto3" json:"base_decimals,omitempty"` + // quote token decimals + QuoteDecimals uint32 `protobuf:"varint,9,opt,name=quote_decimals,json=quoteDecimals,proto3" json:"quote_decimals,omitempty"` +} + +func (m *MsgInstantSpotMarketLaunch) Reset() { *m = MsgInstantSpotMarketLaunch{} } +func (m *MsgInstantSpotMarketLaunch) String() string { return proto.CompactTextString(m) } +func (*MsgInstantSpotMarketLaunch) ProtoMessage() {} +func (*MsgInstantSpotMarketLaunch) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{14} +} +func (m *MsgInstantSpotMarketLaunch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantSpotMarketLaunch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantSpotMarketLaunch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantSpotMarketLaunch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantSpotMarketLaunch.Merge(m, src) +} +func (m *MsgInstantSpotMarketLaunch) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantSpotMarketLaunch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantSpotMarketLaunch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantSpotMarketLaunch proto.InternalMessageInfo + +// MsgInstantSpotMarketLaunchResponse defines the Msg/InstantSpotMarketLaunch +// response type. +type MsgInstantSpotMarketLaunchResponse struct { +} + +func (m *MsgInstantSpotMarketLaunchResponse) Reset() { *m = MsgInstantSpotMarketLaunchResponse{} } +func (m *MsgInstantSpotMarketLaunchResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInstantSpotMarketLaunchResponse) ProtoMessage() {} +func (*MsgInstantSpotMarketLaunchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{15} +} +func (m *MsgInstantSpotMarketLaunchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantSpotMarketLaunchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantSpotMarketLaunchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantSpotMarketLaunchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantSpotMarketLaunchResponse.Merge(m, src) +} +func (m *MsgInstantSpotMarketLaunchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantSpotMarketLaunchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantSpotMarketLaunchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantSpotMarketLaunchResponse proto.InternalMessageInfo + +// MsgInstantPerpetualMarketLaunch defines a SDK message for creating a new +// perpetual futures market by paying listing fee without governance +type MsgInstantPerpetualMarketLaunch struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Ticker for the derivative market. + Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the base currency + QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,4,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,5,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,6,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Oracle type + OracleType types1.OracleType `protobuf:"varint,7,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // maker_fee_rate defines the trade fee rate for makers on the perpetual + // market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the trade fee rate for takers on the perpetual + // market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // initial_margin_ratio defines the initial margin ratio for the perpetual + // market + InitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio"` + // maintenance_margin_ratio defines the maintenance margin ratio for the + // perpetual market + MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` +} + +func (m *MsgInstantPerpetualMarketLaunch) Reset() { *m = MsgInstantPerpetualMarketLaunch{} } +func (m *MsgInstantPerpetualMarketLaunch) String() string { return proto.CompactTextString(m) } +func (*MsgInstantPerpetualMarketLaunch) ProtoMessage() {} +func (*MsgInstantPerpetualMarketLaunch) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{16} +} +func (m *MsgInstantPerpetualMarketLaunch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantPerpetualMarketLaunch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantPerpetualMarketLaunch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantPerpetualMarketLaunch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantPerpetualMarketLaunch.Merge(m, src) +} +func (m *MsgInstantPerpetualMarketLaunch) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantPerpetualMarketLaunch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantPerpetualMarketLaunch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantPerpetualMarketLaunch proto.InternalMessageInfo + +// MsgInstantPerpetualMarketLaunchResponse defines the +// Msg/InstantPerpetualMarketLaunchResponse response type. +type MsgInstantPerpetualMarketLaunchResponse struct { +} + +func (m *MsgInstantPerpetualMarketLaunchResponse) Reset() { + *m = MsgInstantPerpetualMarketLaunchResponse{} +} +func (m *MsgInstantPerpetualMarketLaunchResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInstantPerpetualMarketLaunchResponse) ProtoMessage() {} +func (*MsgInstantPerpetualMarketLaunchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{17} +} +func (m *MsgInstantPerpetualMarketLaunchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantPerpetualMarketLaunchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantPerpetualMarketLaunchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantPerpetualMarketLaunchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantPerpetualMarketLaunchResponse.Merge(m, src) +} +func (m *MsgInstantPerpetualMarketLaunchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantPerpetualMarketLaunchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantPerpetualMarketLaunchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantPerpetualMarketLaunchResponse proto.InternalMessageInfo + +// MsgInstantBinaryOptionsMarketLaunch defines a SDK message for creating a new +// perpetual futures market by paying listing fee without governance +type MsgInstantBinaryOptionsMarketLaunch struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Ticker for the derivative contract. + Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` + // Oracle symbol + OracleSymbol string `protobuf:"bytes,3,opt,name=oracle_symbol,json=oracleSymbol,proto3" json:"oracle_symbol,omitempty"` + // Oracle Provider + OracleProvider string `protobuf:"bytes,4,opt,name=oracle_provider,json=oracleProvider,proto3" json:"oracle_provider,omitempty"` + // Oracle type + OracleType types1.OracleType `protobuf:"varint,5,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,6,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // maker_fee_rate defines the trade fee rate for makers on the perpetual + // market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the trade fee rate for takers on the perpetual + // market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // expiration timestamp + ExpirationTimestamp int64 `protobuf:"varint,9,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration timestamp + SettlementTimestamp int64 `protobuf:"varint,10,opt,name=settlement_timestamp,json=settlementTimestamp,proto3" json:"settlement_timestamp,omitempty"` + // admin of the market + Admin string `protobuf:"bytes,11,opt,name=admin,proto3" json:"admin,omitempty"` + // Address of the quote currency denomination for the binary options contract + QuoteDenom string `protobuf:"bytes,12,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // min_price_tick_size defines the minimum tick size that the price and margin + // required for orders in the market + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the quantity + // required for orders in the market + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` +} + +func (m *MsgInstantBinaryOptionsMarketLaunch) Reset() { *m = MsgInstantBinaryOptionsMarketLaunch{} } +func (m *MsgInstantBinaryOptionsMarketLaunch) String() string { return proto.CompactTextString(m) } +func (*MsgInstantBinaryOptionsMarketLaunch) ProtoMessage() {} +func (*MsgInstantBinaryOptionsMarketLaunch) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{18} +} +func (m *MsgInstantBinaryOptionsMarketLaunch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantBinaryOptionsMarketLaunch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantBinaryOptionsMarketLaunch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunch.Merge(m, src) +} +func (m *MsgInstantBinaryOptionsMarketLaunch) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantBinaryOptionsMarketLaunch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunch proto.InternalMessageInfo + +// MsgInstantBinaryOptionsMarketLaunchResponse defines the +// Msg/InstantBinaryOptionsMarketLaunchResponse response type. +type MsgInstantBinaryOptionsMarketLaunchResponse struct { +} + +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) Reset() { + *m = MsgInstantBinaryOptionsMarketLaunchResponse{} +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgInstantBinaryOptionsMarketLaunchResponse) ProtoMessage() {} +func (*MsgInstantBinaryOptionsMarketLaunchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{19} +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunchResponse.Merge(m, src) +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantBinaryOptionsMarketLaunchResponse proto.InternalMessageInfo + +// MsgInstantExpiryFuturesMarketLaunch defines a SDK message for creating a new +// expiry futures market by paying listing fee without governance +type MsgInstantExpiryFuturesMarketLaunch struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Ticker for the derivative market. + Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` + // type of coin to use as the quote currency + QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + // Oracle base currency + OracleBase string `protobuf:"bytes,4,opt,name=oracle_base,json=oracleBase,proto3" json:"oracle_base,omitempty"` + // Oracle quote currency + OracleQuote string `protobuf:"bytes,5,opt,name=oracle_quote,json=oracleQuote,proto3" json:"oracle_quote,omitempty"` + // Oracle type + OracleType types1.OracleType `protobuf:"varint,6,opt,name=oracle_type,json=oracleType,proto3,enum=injective.oracle.v1beta1.OracleType" json:"oracle_type,omitempty"` + // Scale factor for oracle prices. + OracleScaleFactor uint32 `protobuf:"varint,7,opt,name=oracle_scale_factor,json=oracleScaleFactor,proto3" json:"oracle_scale_factor,omitempty"` + // Expiration time of the market + Expiry int64 `protobuf:"varint,8,opt,name=expiry,proto3" json:"expiry,omitempty"` + // maker_fee_rate defines the trade fee rate for makers on the expiry futures + // market + MakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=maker_fee_rate,json=makerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maker_fee_rate"` + // taker_fee_rate defines the trade fee rate for takers on the expiry futures + // market + TakerFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=taker_fee_rate,json=takerFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee_rate"` + // initial_margin_ratio defines the initial margin ratio for the derivative + // market + InitialMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=initial_margin_ratio,json=initialMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_margin_ratio"` + // maintenance_margin_ratio defines the maintenance margin ratio for the + // derivative market + MaintenanceMarginRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=maintenance_margin_ratio,json=maintenanceMarginRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maintenance_margin_ratio"` + // min_price_tick_size defines the minimum tick size of the order's price and + // margin + MinPriceTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_price_tick_size,json=minPriceTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price_tick_size"` + // min_quantity_tick_size defines the minimum tick size of the order's + // quantity + MinQuantityTickSize cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=min_quantity_tick_size,json=minQuantityTickSize,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_quantity_tick_size"` + // min_notional defines the minimum notional (in quote asset) required for + // orders in the market + MinNotional cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=min_notional,json=minNotional,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_notional"` +} + +func (m *MsgInstantExpiryFuturesMarketLaunch) Reset() { *m = MsgInstantExpiryFuturesMarketLaunch{} } +func (m *MsgInstantExpiryFuturesMarketLaunch) String() string { return proto.CompactTextString(m) } +func (*MsgInstantExpiryFuturesMarketLaunch) ProtoMessage() {} +func (*MsgInstantExpiryFuturesMarketLaunch) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{20} +} +func (m *MsgInstantExpiryFuturesMarketLaunch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantExpiryFuturesMarketLaunch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantExpiryFuturesMarketLaunch) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunch.Merge(m, src) +} +func (m *MsgInstantExpiryFuturesMarketLaunch) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantExpiryFuturesMarketLaunch) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunch.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunch proto.InternalMessageInfo + +// MsgInstantExpiryFuturesMarketLaunchResponse defines the +// Msg/InstantExpiryFuturesMarketLaunch response type. +type MsgInstantExpiryFuturesMarketLaunchResponse struct { +} + +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) Reset() { + *m = MsgInstantExpiryFuturesMarketLaunchResponse{} +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgInstantExpiryFuturesMarketLaunchResponse) ProtoMessage() {} +func (*MsgInstantExpiryFuturesMarketLaunchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{21} +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunchResponse.Merge(m, src) +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInstantExpiryFuturesMarketLaunchResponse proto.InternalMessageInfo + +// MsgCreateSpotMarketOrder defines a SDK message for creating a new spot market +// order. +type MsgCreateSpotMarketOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order SpotOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateSpotMarketOrder) Reset() { *m = MsgCreateSpotMarketOrder{} } +func (m *MsgCreateSpotMarketOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateSpotMarketOrder) ProtoMessage() {} +func (*MsgCreateSpotMarketOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{22} +} +func (m *MsgCreateSpotMarketOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateSpotMarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateSpotMarketOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateSpotMarketOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateSpotMarketOrder.Merge(m, src) +} +func (m *MsgCreateSpotMarketOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateSpotMarketOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateSpotMarketOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateSpotMarketOrder proto.InternalMessageInfo + +// MsgCreateSpotMarketOrderResponse defines the Msg/CreateSpotMarketLimitOrder +// response type. +type MsgCreateSpotMarketOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Results *SpotMarketOrderResults `protobuf:"bytes,2,opt,name=results,proto3" json:"results,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateSpotMarketOrderResponse) Reset() { *m = MsgCreateSpotMarketOrderResponse{} } +func (m *MsgCreateSpotMarketOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateSpotMarketOrderResponse) ProtoMessage() {} +func (*MsgCreateSpotMarketOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{23} +} +func (m *MsgCreateSpotMarketOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateSpotMarketOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateSpotMarketOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateSpotMarketOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateSpotMarketOrderResponse.Merge(m, src) +} +func (m *MsgCreateSpotMarketOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateSpotMarketOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateSpotMarketOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateSpotMarketOrderResponse proto.InternalMessageInfo + +type SpotMarketOrderResults struct { + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` +} + +func (m *SpotMarketOrderResults) Reset() { *m = SpotMarketOrderResults{} } +func (m *SpotMarketOrderResults) String() string { return proto.CompactTextString(m) } +func (*SpotMarketOrderResults) ProtoMessage() {} +func (*SpotMarketOrderResults) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{24} +} +func (m *SpotMarketOrderResults) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotMarketOrderResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotMarketOrderResults.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotMarketOrderResults) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotMarketOrderResults.Merge(m, src) +} +func (m *SpotMarketOrderResults) XXX_Size() int { + return m.Size() +} +func (m *SpotMarketOrderResults) XXX_DiscardUnknown() { + xxx_messageInfo_SpotMarketOrderResults.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotMarketOrderResults proto.InternalMessageInfo + +// A Cosmos-SDK MsgCreateDerivativeLimitOrder +type MsgCreateDerivativeLimitOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateDerivativeLimitOrder) Reset() { *m = MsgCreateDerivativeLimitOrder{} } +func (m *MsgCreateDerivativeLimitOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDerivativeLimitOrder) ProtoMessage() {} +func (*MsgCreateDerivativeLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{25} +} +func (m *MsgCreateDerivativeLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDerivativeLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDerivativeLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDerivativeLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDerivativeLimitOrder.Merge(m, src) +} +func (m *MsgCreateDerivativeLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDerivativeLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDerivativeLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDerivativeLimitOrder proto.InternalMessageInfo + +// MsgCreateDerivativeLimitOrderResponse defines the +// Msg/CreateDerivativeMarketOrder response type. +type MsgCreateDerivativeLimitOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateDerivativeLimitOrderResponse) Reset() { *m = MsgCreateDerivativeLimitOrderResponse{} } +func (m *MsgCreateDerivativeLimitOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDerivativeLimitOrderResponse) ProtoMessage() {} +func (*MsgCreateDerivativeLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{26} +} +func (m *MsgCreateDerivativeLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDerivativeLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDerivativeLimitOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDerivativeLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDerivativeLimitOrderResponse.Merge(m, src) +} +func (m *MsgCreateDerivativeLimitOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDerivativeLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDerivativeLimitOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDerivativeLimitOrderResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgCreateBinaryOptionsLimitOrder +type MsgCreateBinaryOptionsLimitOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateBinaryOptionsLimitOrder) Reset() { *m = MsgCreateBinaryOptionsLimitOrder{} } +func (m *MsgCreateBinaryOptionsLimitOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBinaryOptionsLimitOrder) ProtoMessage() {} +func (*MsgCreateBinaryOptionsLimitOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{27} +} +func (m *MsgCreateBinaryOptionsLimitOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBinaryOptionsLimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBinaryOptionsLimitOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateBinaryOptionsLimitOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBinaryOptionsLimitOrder.Merge(m, src) +} +func (m *MsgCreateBinaryOptionsLimitOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBinaryOptionsLimitOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBinaryOptionsLimitOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBinaryOptionsLimitOrder proto.InternalMessageInfo + +// MsgCreateBinaryOptionsLimitOrderResponse defines the +// Msg/CreateBinaryOptionsLimitOrder response type. +type MsgCreateBinaryOptionsLimitOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateBinaryOptionsLimitOrderResponse) Reset() { + *m = MsgCreateBinaryOptionsLimitOrderResponse{} +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBinaryOptionsLimitOrderResponse) ProtoMessage() {} +func (*MsgCreateBinaryOptionsLimitOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{28} +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBinaryOptionsLimitOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBinaryOptionsLimitOrderResponse.Merge(m, src) +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBinaryOptionsLimitOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBinaryOptionsLimitOrderResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgBatchCreateDerivativeLimitOrders +type MsgBatchCreateDerivativeLimitOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Orders []DerivativeOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders"` +} + +func (m *MsgBatchCreateDerivativeLimitOrders) Reset() { *m = MsgBatchCreateDerivativeLimitOrders{} } +func (m *MsgBatchCreateDerivativeLimitOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCreateDerivativeLimitOrders) ProtoMessage() {} +func (*MsgBatchCreateDerivativeLimitOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{29} +} +func (m *MsgBatchCreateDerivativeLimitOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCreateDerivativeLimitOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCreateDerivativeLimitOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCreateDerivativeLimitOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCreateDerivativeLimitOrders.Merge(m, src) +} +func (m *MsgBatchCreateDerivativeLimitOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCreateDerivativeLimitOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCreateDerivativeLimitOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCreateDerivativeLimitOrders proto.InternalMessageInfo + +// MsgBatchCreateDerivativeLimitOrdersResponse defines the +// Msg/BatchCreateDerivativeLimitOrders response type. +type MsgBatchCreateDerivativeLimitOrdersResponse struct { + OrderHashes []string `protobuf:"bytes,1,rep,name=order_hashes,json=orderHashes,proto3" json:"order_hashes,omitempty"` + CreatedOrdersCids []string `protobuf:"bytes,2,rep,name=created_orders_cids,json=createdOrdersCids,proto3" json:"created_orders_cids,omitempty"` + FailedOrdersCids []string `protobuf:"bytes,3,rep,name=failed_orders_cids,json=failedOrdersCids,proto3" json:"failed_orders_cids,omitempty"` +} + +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) Reset() { + *m = MsgBatchCreateDerivativeLimitOrdersResponse{} +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgBatchCreateDerivativeLimitOrdersResponse) ProtoMessage() {} +func (*MsgBatchCreateDerivativeLimitOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{30} +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCreateDerivativeLimitOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCreateDerivativeLimitOrdersResponse.Merge(m, src) +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCreateDerivativeLimitOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCreateDerivativeLimitOrdersResponse proto.InternalMessageInfo + +// MsgCancelSpotOrder defines the Msg/CancelSpotOrder response type. +type MsgCancelSpotOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCancelSpotOrder) Reset() { *m = MsgCancelSpotOrder{} } +func (m *MsgCancelSpotOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSpotOrder) ProtoMessage() {} +func (*MsgCancelSpotOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{31} +} +func (m *MsgCancelSpotOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSpotOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSpotOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelSpotOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSpotOrder.Merge(m, src) +} +func (m *MsgCancelSpotOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSpotOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSpotOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelSpotOrder proto.InternalMessageInfo + +// MsgCancelSpotOrderResponse defines the Msg/CancelSpotOrder response type. +type MsgCancelSpotOrderResponse struct { +} + +func (m *MsgCancelSpotOrderResponse) Reset() { *m = MsgCancelSpotOrderResponse{} } +func (m *MsgCancelSpotOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSpotOrderResponse) ProtoMessage() {} +func (*MsgCancelSpotOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{32} +} +func (m *MsgCancelSpotOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSpotOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSpotOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelSpotOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSpotOrderResponse.Merge(m, src) +} +func (m *MsgCancelSpotOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSpotOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSpotOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelSpotOrderResponse proto.InternalMessageInfo + +// MsgBatchCancelSpotOrders defines the Msg/BatchCancelSpotOrders response type. +type MsgBatchCancelSpotOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Data []OrderData `protobuf:"bytes,2,rep,name=data,proto3" json:"data"` +} + +func (m *MsgBatchCancelSpotOrders) Reset() { *m = MsgBatchCancelSpotOrders{} } +func (m *MsgBatchCancelSpotOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCancelSpotOrders) ProtoMessage() {} +func (*MsgBatchCancelSpotOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{33} +} +func (m *MsgBatchCancelSpotOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelSpotOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelSpotOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelSpotOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelSpotOrders.Merge(m, src) +} +func (m *MsgBatchCancelSpotOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelSpotOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelSpotOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelSpotOrders proto.InternalMessageInfo + +// MsgBatchCancelSpotOrdersResponse defines the Msg/BatchCancelSpotOrders +// response type. +type MsgBatchCancelSpotOrdersResponse struct { + Success []bool `protobuf:"varint,1,rep,packed,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgBatchCancelSpotOrdersResponse) Reset() { *m = MsgBatchCancelSpotOrdersResponse{} } +func (m *MsgBatchCancelSpotOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCancelSpotOrdersResponse) ProtoMessage() {} +func (*MsgBatchCancelSpotOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{34} +} +func (m *MsgBatchCancelSpotOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelSpotOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelSpotOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelSpotOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelSpotOrdersResponse.Merge(m, src) +} +func (m *MsgBatchCancelSpotOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelSpotOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelSpotOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelSpotOrdersResponse proto.InternalMessageInfo + +// MsgBatchCancelBinaryOptionsOrders defines the +// Msg/BatchCancelBinaryOptionsOrders response type. +type MsgBatchCancelBinaryOptionsOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Data []OrderData `protobuf:"bytes,2,rep,name=data,proto3" json:"data"` +} + +func (m *MsgBatchCancelBinaryOptionsOrders) Reset() { *m = MsgBatchCancelBinaryOptionsOrders{} } +func (m *MsgBatchCancelBinaryOptionsOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCancelBinaryOptionsOrders) ProtoMessage() {} +func (*MsgBatchCancelBinaryOptionsOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{35} +} +func (m *MsgBatchCancelBinaryOptionsOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelBinaryOptionsOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelBinaryOptionsOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelBinaryOptionsOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelBinaryOptionsOrders.Merge(m, src) +} +func (m *MsgBatchCancelBinaryOptionsOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelBinaryOptionsOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelBinaryOptionsOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelBinaryOptionsOrders proto.InternalMessageInfo + +// BatchCancelBinaryOptionsOrdersResponse defines the +// Msg/BatchCancelBinaryOptionsOrders response type. +type MsgBatchCancelBinaryOptionsOrdersResponse struct { + Success []bool `protobuf:"varint,1,rep,packed,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) Reset() { + *m = MsgBatchCancelBinaryOptionsOrdersResponse{} +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgBatchCancelBinaryOptionsOrdersResponse) ProtoMessage() {} +func (*MsgBatchCancelBinaryOptionsOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{36} +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse.Merge(m, src) +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelBinaryOptionsOrdersResponse proto.InternalMessageInfo + +// MsgBatchUpdateOrders defines the Msg/BatchUpdateOrders response type. +type MsgBatchUpdateOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // subaccount_id only used for the spot_market_ids_to_cancel_all and + // derivative_market_ids_to_cancel_all. + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + SpotMarketIdsToCancelAll []string `protobuf:"bytes,3,rep,name=spot_market_ids_to_cancel_all,json=spotMarketIdsToCancelAll,proto3" json:"spot_market_ids_to_cancel_all,omitempty"` + DerivativeMarketIdsToCancelAll []string `protobuf:"bytes,4,rep,name=derivative_market_ids_to_cancel_all,json=derivativeMarketIdsToCancelAll,proto3" json:"derivative_market_ids_to_cancel_all,omitempty"` + SpotOrdersToCancel []*OrderData `protobuf:"bytes,5,rep,name=spot_orders_to_cancel,json=spotOrdersToCancel,proto3" json:"spot_orders_to_cancel,omitempty"` + DerivativeOrdersToCancel []*OrderData `protobuf:"bytes,6,rep,name=derivative_orders_to_cancel,json=derivativeOrdersToCancel,proto3" json:"derivative_orders_to_cancel,omitempty"` + SpotOrdersToCreate []*SpotOrder `protobuf:"bytes,7,rep,name=spot_orders_to_create,json=spotOrdersToCreate,proto3" json:"spot_orders_to_create,omitempty"` + DerivativeOrdersToCreate []*DerivativeOrder `protobuf:"bytes,8,rep,name=derivative_orders_to_create,json=derivativeOrdersToCreate,proto3" json:"derivative_orders_to_create,omitempty"` + BinaryOptionsOrdersToCancel []*OrderData `protobuf:"bytes,9,rep,name=binary_options_orders_to_cancel,json=binaryOptionsOrdersToCancel,proto3" json:"binary_options_orders_to_cancel,omitempty"` + BinaryOptionsMarketIdsToCancelAll []string `protobuf:"bytes,10,rep,name=binary_options_market_ids_to_cancel_all,json=binaryOptionsMarketIdsToCancelAll,proto3" json:"binary_options_market_ids_to_cancel_all,omitempty"` + BinaryOptionsOrdersToCreate []*DerivativeOrder `protobuf:"bytes,11,rep,name=binary_options_orders_to_create,json=binaryOptionsOrdersToCreate,proto3" json:"binary_options_orders_to_create,omitempty"` +} + +func (m *MsgBatchUpdateOrders) Reset() { *m = MsgBatchUpdateOrders{} } +func (m *MsgBatchUpdateOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchUpdateOrders) ProtoMessage() {} +func (*MsgBatchUpdateOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{37} +} +func (m *MsgBatchUpdateOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchUpdateOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchUpdateOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchUpdateOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchUpdateOrders.Merge(m, src) +} +func (m *MsgBatchUpdateOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchUpdateOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchUpdateOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchUpdateOrders proto.InternalMessageInfo + +// MsgBatchUpdateOrdersResponse defines the Msg/BatchUpdateOrders response type. +type MsgBatchUpdateOrdersResponse struct { + SpotCancelSuccess []bool `protobuf:"varint,1,rep,packed,name=spot_cancel_success,json=spotCancelSuccess,proto3" json:"spot_cancel_success,omitempty"` + DerivativeCancelSuccess []bool `protobuf:"varint,2,rep,packed,name=derivative_cancel_success,json=derivativeCancelSuccess,proto3" json:"derivative_cancel_success,omitempty"` + SpotOrderHashes []string `protobuf:"bytes,3,rep,name=spot_order_hashes,json=spotOrderHashes,proto3" json:"spot_order_hashes,omitempty"` + DerivativeOrderHashes []string `protobuf:"bytes,4,rep,name=derivative_order_hashes,json=derivativeOrderHashes,proto3" json:"derivative_order_hashes,omitempty"` + BinaryOptionsCancelSuccess []bool `protobuf:"varint,5,rep,packed,name=binary_options_cancel_success,json=binaryOptionsCancelSuccess,proto3" json:"binary_options_cancel_success,omitempty"` + BinaryOptionsOrderHashes []string `protobuf:"bytes,6,rep,name=binary_options_order_hashes,json=binaryOptionsOrderHashes,proto3" json:"binary_options_order_hashes,omitempty"` + CreatedSpotOrdersCids []string `protobuf:"bytes,7,rep,name=created_spot_orders_cids,json=createdSpotOrdersCids,proto3" json:"created_spot_orders_cids,omitempty"` + FailedSpotOrdersCids []string `protobuf:"bytes,8,rep,name=failed_spot_orders_cids,json=failedSpotOrdersCids,proto3" json:"failed_spot_orders_cids,omitempty"` + CreatedDerivativeOrdersCids []string `protobuf:"bytes,9,rep,name=created_derivative_orders_cids,json=createdDerivativeOrdersCids,proto3" json:"created_derivative_orders_cids,omitempty"` + FailedDerivativeOrdersCids []string `protobuf:"bytes,10,rep,name=failed_derivative_orders_cids,json=failedDerivativeOrdersCids,proto3" json:"failed_derivative_orders_cids,omitempty"` + CreatedBinaryOptionsOrdersCids []string `protobuf:"bytes,11,rep,name=created_binary_options_orders_cids,json=createdBinaryOptionsOrdersCids,proto3" json:"created_binary_options_orders_cids,omitempty"` + FailedBinaryOptionsOrdersCids []string `protobuf:"bytes,12,rep,name=failed_binary_options_orders_cids,json=failedBinaryOptionsOrdersCids,proto3" json:"failed_binary_options_orders_cids,omitempty"` +} + +func (m *MsgBatchUpdateOrdersResponse) Reset() { *m = MsgBatchUpdateOrdersResponse{} } +func (m *MsgBatchUpdateOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBatchUpdateOrdersResponse) ProtoMessage() {} +func (*MsgBatchUpdateOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{38} +} +func (m *MsgBatchUpdateOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchUpdateOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchUpdateOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchUpdateOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchUpdateOrdersResponse.Merge(m, src) +} +func (m *MsgBatchUpdateOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchUpdateOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchUpdateOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchUpdateOrdersResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgCreateDerivativeMarketOrder +type MsgCreateDerivativeMarketOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateDerivativeMarketOrder) Reset() { *m = MsgCreateDerivativeMarketOrder{} } +func (m *MsgCreateDerivativeMarketOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDerivativeMarketOrder) ProtoMessage() {} +func (*MsgCreateDerivativeMarketOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{39} +} +func (m *MsgCreateDerivativeMarketOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDerivativeMarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDerivativeMarketOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDerivativeMarketOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDerivativeMarketOrder.Merge(m, src) +} +func (m *MsgCreateDerivativeMarketOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDerivativeMarketOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDerivativeMarketOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDerivativeMarketOrder proto.InternalMessageInfo + +// MsgCreateDerivativeMarketOrderResponse defines the +// Msg/CreateDerivativeMarketOrder response type. +type MsgCreateDerivativeMarketOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Results *DerivativeMarketOrderResults `protobuf:"bytes,2,opt,name=results,proto3" json:"results,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateDerivativeMarketOrderResponse) Reset() { + *m = MsgCreateDerivativeMarketOrderResponse{} +} +func (m *MsgCreateDerivativeMarketOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDerivativeMarketOrderResponse) ProtoMessage() {} +func (*MsgCreateDerivativeMarketOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{40} +} +func (m *MsgCreateDerivativeMarketOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDerivativeMarketOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDerivativeMarketOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDerivativeMarketOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDerivativeMarketOrderResponse.Merge(m, src) +} +func (m *MsgCreateDerivativeMarketOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDerivativeMarketOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDerivativeMarketOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDerivativeMarketOrderResponse proto.InternalMessageInfo + +type DerivativeMarketOrderResults struct { + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + PositionDelta PositionDelta `protobuf:"bytes,4,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta"` + Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` +} + +func (m *DerivativeMarketOrderResults) Reset() { *m = DerivativeMarketOrderResults{} } +func (m *DerivativeMarketOrderResults) String() string { return proto.CompactTextString(m) } +func (*DerivativeMarketOrderResults) ProtoMessage() {} +func (*DerivativeMarketOrderResults) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{41} +} +func (m *DerivativeMarketOrderResults) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeMarketOrderResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeMarketOrderResults.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeMarketOrderResults) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeMarketOrderResults.Merge(m, src) +} +func (m *DerivativeMarketOrderResults) XXX_Size() int { + return m.Size() +} +func (m *DerivativeMarketOrderResults) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeMarketOrderResults.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeMarketOrderResults proto.InternalMessageInfo + +// A Cosmos-SDK MsgCreateBinaryOptionsMarketOrder +type MsgCreateBinaryOptionsMarketOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Order DerivativeOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *MsgCreateBinaryOptionsMarketOrder) Reset() { *m = MsgCreateBinaryOptionsMarketOrder{} } +func (m *MsgCreateBinaryOptionsMarketOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBinaryOptionsMarketOrder) ProtoMessage() {} +func (*MsgCreateBinaryOptionsMarketOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{42} +} +func (m *MsgCreateBinaryOptionsMarketOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBinaryOptionsMarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBinaryOptionsMarketOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateBinaryOptionsMarketOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBinaryOptionsMarketOrder.Merge(m, src) +} +func (m *MsgCreateBinaryOptionsMarketOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBinaryOptionsMarketOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBinaryOptionsMarketOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBinaryOptionsMarketOrder proto.InternalMessageInfo + +// MsgCreateBinaryOptionsMarketOrderResponse defines the +// Msg/CreateBinaryOptionsMarketOrder response type. +type MsgCreateBinaryOptionsMarketOrderResponse struct { + OrderHash string `protobuf:"bytes,1,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Results *DerivativeMarketOrderResults `protobuf:"bytes,2,opt,name=results,proto3" json:"results,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCreateBinaryOptionsMarketOrderResponse) Reset() { + *m = MsgCreateBinaryOptionsMarketOrderResponse{} +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgCreateBinaryOptionsMarketOrderResponse) ProtoMessage() {} +func (*MsgCreateBinaryOptionsMarketOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{43} +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse.Merge(m, src) +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBinaryOptionsMarketOrderResponse proto.InternalMessageInfo + +// MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. +type MsgCancelDerivativeOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCancelDerivativeOrder) Reset() { *m = MsgCancelDerivativeOrder{} } +func (m *MsgCancelDerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCancelDerivativeOrder) ProtoMessage() {} +func (*MsgCancelDerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{44} +} +func (m *MsgCancelDerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelDerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelDerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelDerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelDerivativeOrder.Merge(m, src) +} +func (m *MsgCancelDerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelDerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelDerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelDerivativeOrder proto.InternalMessageInfo + +// MsgCancelDerivativeOrderResponse defines the +// Msg/CancelDerivativeOrderResponse response type. +type MsgCancelDerivativeOrderResponse struct { +} + +func (m *MsgCancelDerivativeOrderResponse) Reset() { *m = MsgCancelDerivativeOrderResponse{} } +func (m *MsgCancelDerivativeOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelDerivativeOrderResponse) ProtoMessage() {} +func (*MsgCancelDerivativeOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{45} +} +func (m *MsgCancelDerivativeOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelDerivativeOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelDerivativeOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelDerivativeOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelDerivativeOrderResponse.Merge(m, src) +} +func (m *MsgCancelDerivativeOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelDerivativeOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelDerivativeOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelDerivativeOrderResponse proto.InternalMessageInfo + +// MsgCancelBinaryOptionsOrder defines the Msg/CancelBinaryOptionsOrder response +// type. +type MsgCancelBinaryOptionsOrder struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,3,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + OrderHash string `protobuf:"bytes,4,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderMask int32 `protobuf:"varint,5,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MsgCancelBinaryOptionsOrder) Reset() { *m = MsgCancelBinaryOptionsOrder{} } +func (m *MsgCancelBinaryOptionsOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCancelBinaryOptionsOrder) ProtoMessage() {} +func (*MsgCancelBinaryOptionsOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{46} +} +func (m *MsgCancelBinaryOptionsOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelBinaryOptionsOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelBinaryOptionsOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelBinaryOptionsOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelBinaryOptionsOrder.Merge(m, src) +} +func (m *MsgCancelBinaryOptionsOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelBinaryOptionsOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelBinaryOptionsOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelBinaryOptionsOrder proto.InternalMessageInfo + +// MsgCancelBinaryOptionsOrderResponse defines the +// Msg/CancelBinaryOptionsOrderResponse response type. +type MsgCancelBinaryOptionsOrderResponse struct { +} + +func (m *MsgCancelBinaryOptionsOrderResponse) Reset() { *m = MsgCancelBinaryOptionsOrderResponse{} } +func (m *MsgCancelBinaryOptionsOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelBinaryOptionsOrderResponse) ProtoMessage() {} +func (*MsgCancelBinaryOptionsOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{47} +} +func (m *MsgCancelBinaryOptionsOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelBinaryOptionsOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelBinaryOptionsOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse.Merge(m, src) +} +func (m *MsgCancelBinaryOptionsOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelBinaryOptionsOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelBinaryOptionsOrderResponse proto.InternalMessageInfo + +type OrderData struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + OrderHash string `protobuf:"bytes,3,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderMask int32 `protobuf:"varint,4,opt,name=order_mask,json=orderMask,proto3" json:"order_mask,omitempty"` + Cid string `protobuf:"bytes,5,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *OrderData) Reset() { *m = OrderData{} } +func (m *OrderData) String() string { return proto.CompactTextString(m) } +func (*OrderData) ProtoMessage() {} +func (*OrderData) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{48} +} +func (m *OrderData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderData) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderData.Merge(m, src) +} +func (m *OrderData) XXX_Size() int { + return m.Size() +} +func (m *OrderData) XXX_DiscardUnknown() { + xxx_messageInfo_OrderData.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderData proto.InternalMessageInfo + +func (m *OrderData) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *OrderData) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *OrderData) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *OrderData) GetOrderMask() int32 { + if m != nil { + return m.OrderMask + } + return 0 +} + +func (m *OrderData) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +// MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders +// response type. +type MsgBatchCancelDerivativeOrders struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Data []OrderData `protobuf:"bytes,2,rep,name=data,proto3" json:"data"` +} + +func (m *MsgBatchCancelDerivativeOrders) Reset() { *m = MsgBatchCancelDerivativeOrders{} } +func (m *MsgBatchCancelDerivativeOrders) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCancelDerivativeOrders) ProtoMessage() {} +func (*MsgBatchCancelDerivativeOrders) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{49} +} +func (m *MsgBatchCancelDerivativeOrders) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelDerivativeOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelDerivativeOrders.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelDerivativeOrders) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelDerivativeOrders.Merge(m, src) +} +func (m *MsgBatchCancelDerivativeOrders) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelDerivativeOrders) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelDerivativeOrders.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelDerivativeOrders proto.InternalMessageInfo + +// MsgBatchCancelDerivativeOrdersResponse defines the +// Msg/CancelDerivativeOrderResponse response type. +type MsgBatchCancelDerivativeOrdersResponse struct { + Success []bool `protobuf:"varint,1,rep,packed,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgBatchCancelDerivativeOrdersResponse) Reset() { + *m = MsgBatchCancelDerivativeOrdersResponse{} +} +func (m *MsgBatchCancelDerivativeOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBatchCancelDerivativeOrdersResponse) ProtoMessage() {} +func (*MsgBatchCancelDerivativeOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{50} +} +func (m *MsgBatchCancelDerivativeOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBatchCancelDerivativeOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBatchCancelDerivativeOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse.Merge(m, src) +} +func (m *MsgBatchCancelDerivativeOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBatchCancelDerivativeOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBatchCancelDerivativeOrdersResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgSubaccountTransfer +type MsgSubaccountTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgSubaccountTransfer) Reset() { *m = MsgSubaccountTransfer{} } +func (m *MsgSubaccountTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgSubaccountTransfer) ProtoMessage() {} +func (*MsgSubaccountTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{51} +} +func (m *MsgSubaccountTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubaccountTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubaccountTransfer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubaccountTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubaccountTransfer.Merge(m, src) +} +func (m *MsgSubaccountTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgSubaccountTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubaccountTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubaccountTransfer proto.InternalMessageInfo + +func (m *MsgSubaccountTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgSubaccountTransfer) GetSourceSubaccountId() string { + if m != nil { + return m.SourceSubaccountId + } + return "" +} + +func (m *MsgSubaccountTransfer) GetDestinationSubaccountId() string { + if m != nil { + return m.DestinationSubaccountId + } + return "" +} + +func (m *MsgSubaccountTransfer) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// MsgSubaccountTransferResponse defines the Msg/SubaccountTransfer response +// type. +type MsgSubaccountTransferResponse struct { +} + +func (m *MsgSubaccountTransferResponse) Reset() { *m = MsgSubaccountTransferResponse{} } +func (m *MsgSubaccountTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubaccountTransferResponse) ProtoMessage() {} +func (*MsgSubaccountTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{52} +} +func (m *MsgSubaccountTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubaccountTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubaccountTransferResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubaccountTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubaccountTransferResponse.Merge(m, src) +} +func (m *MsgSubaccountTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubaccountTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubaccountTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubaccountTransferResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgExternalTransfer +type MsgExternalTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgExternalTransfer) Reset() { *m = MsgExternalTransfer{} } +func (m *MsgExternalTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgExternalTransfer) ProtoMessage() {} +func (*MsgExternalTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{53} +} +func (m *MsgExternalTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExternalTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExternalTransfer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExternalTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExternalTransfer.Merge(m, src) +} +func (m *MsgExternalTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgExternalTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExternalTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExternalTransfer proto.InternalMessageInfo + +func (m *MsgExternalTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgExternalTransfer) GetSourceSubaccountId() string { + if m != nil { + return m.SourceSubaccountId + } + return "" +} + +func (m *MsgExternalTransfer) GetDestinationSubaccountId() string { + if m != nil { + return m.DestinationSubaccountId + } + return "" +} + +func (m *MsgExternalTransfer) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// MsgExternalTransferResponse defines the Msg/ExternalTransfer response type. +type MsgExternalTransferResponse struct { +} + +func (m *MsgExternalTransferResponse) Reset() { *m = MsgExternalTransferResponse{} } +func (m *MsgExternalTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExternalTransferResponse) ProtoMessage() {} +func (*MsgExternalTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{54} +} +func (m *MsgExternalTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExternalTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExternalTransferResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExternalTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExternalTransferResponse.Merge(m, src) +} +func (m *MsgExternalTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExternalTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExternalTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExternalTransferResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgLiquidatePosition +type MsgLiquidatePosition struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // optional order to provide for liquidation + Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` +} + +func (m *MsgLiquidatePosition) Reset() { *m = MsgLiquidatePosition{} } +func (m *MsgLiquidatePosition) String() string { return proto.CompactTextString(m) } +func (*MsgLiquidatePosition) ProtoMessage() {} +func (*MsgLiquidatePosition) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{55} +} +func (m *MsgLiquidatePosition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLiquidatePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLiquidatePosition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLiquidatePosition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLiquidatePosition.Merge(m, src) +} +func (m *MsgLiquidatePosition) XXX_Size() int { + return m.Size() +} +func (m *MsgLiquidatePosition) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLiquidatePosition.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLiquidatePosition proto.InternalMessageInfo + +func (m *MsgLiquidatePosition) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgLiquidatePosition) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *MsgLiquidatePosition) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MsgLiquidatePosition) GetOrder() *DerivativeOrder { + if m != nil { + return m.Order + } + return nil +} + +// MsgLiquidatePositionResponse defines the Msg/LiquidatePosition response type. +type MsgLiquidatePositionResponse struct { +} + +func (m *MsgLiquidatePositionResponse) Reset() { *m = MsgLiquidatePositionResponse{} } +func (m *MsgLiquidatePositionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLiquidatePositionResponse) ProtoMessage() {} +func (*MsgLiquidatePositionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{56} +} +func (m *MsgLiquidatePositionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLiquidatePositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLiquidatePositionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgLiquidatePositionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLiquidatePositionResponse.Merge(m, src) +} +func (m *MsgLiquidatePositionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLiquidatePositionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLiquidatePositionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLiquidatePositionResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgEmergencySettleMarket +type MsgEmergencySettleMarket struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` +} + +func (m *MsgEmergencySettleMarket) Reset() { *m = MsgEmergencySettleMarket{} } +func (m *MsgEmergencySettleMarket) String() string { return proto.CompactTextString(m) } +func (*MsgEmergencySettleMarket) ProtoMessage() {} +func (*MsgEmergencySettleMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{57} +} +func (m *MsgEmergencySettleMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEmergencySettleMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEmergencySettleMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEmergencySettleMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEmergencySettleMarket.Merge(m, src) +} +func (m *MsgEmergencySettleMarket) XXX_Size() int { + return m.Size() +} +func (m *MsgEmergencySettleMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEmergencySettleMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEmergencySettleMarket proto.InternalMessageInfo + +func (m *MsgEmergencySettleMarket) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgEmergencySettleMarket) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *MsgEmergencySettleMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// MsgEmergencySettleMarketResponse defines the Msg/EmergencySettleMarket +// response type. +type MsgEmergencySettleMarketResponse struct { +} + +func (m *MsgEmergencySettleMarketResponse) Reset() { *m = MsgEmergencySettleMarketResponse{} } +func (m *MsgEmergencySettleMarketResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEmergencySettleMarketResponse) ProtoMessage() {} +func (*MsgEmergencySettleMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{58} +} +func (m *MsgEmergencySettleMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEmergencySettleMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEmergencySettleMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEmergencySettleMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEmergencySettleMarketResponse.Merge(m, src) +} +func (m *MsgEmergencySettleMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEmergencySettleMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEmergencySettleMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEmergencySettleMarketResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgIncreasePositionMargin +type MsgIncreasePositionMargin struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to add to the position + Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` +} + +func (m *MsgIncreasePositionMargin) Reset() { *m = MsgIncreasePositionMargin{} } +func (m *MsgIncreasePositionMargin) String() string { return proto.CompactTextString(m) } +func (*MsgIncreasePositionMargin) ProtoMessage() {} +func (*MsgIncreasePositionMargin) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{59} +} +func (m *MsgIncreasePositionMargin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgIncreasePositionMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgIncreasePositionMargin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgIncreasePositionMargin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgIncreasePositionMargin.Merge(m, src) +} +func (m *MsgIncreasePositionMargin) XXX_Size() int { + return m.Size() +} +func (m *MsgIncreasePositionMargin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgIncreasePositionMargin.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgIncreasePositionMargin proto.InternalMessageInfo + +func (m *MsgIncreasePositionMargin) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgIncreasePositionMargin) GetSourceSubaccountId() string { + if m != nil { + return m.SourceSubaccountId + } + return "" +} + +func (m *MsgIncreasePositionMargin) GetDestinationSubaccountId() string { + if m != nil { + return m.DestinationSubaccountId + } + return "" +} + +func (m *MsgIncreasePositionMargin) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// MsgIncreasePositionMarginResponse defines the Msg/IncreasePositionMargin +// response type. +type MsgIncreasePositionMarginResponse struct { +} + +func (m *MsgIncreasePositionMarginResponse) Reset() { *m = MsgIncreasePositionMarginResponse{} } +func (m *MsgIncreasePositionMarginResponse) String() string { return proto.CompactTextString(m) } +func (*MsgIncreasePositionMarginResponse) ProtoMessage() {} +func (*MsgIncreasePositionMarginResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{60} +} +func (m *MsgIncreasePositionMarginResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgIncreasePositionMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgIncreasePositionMarginResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgIncreasePositionMarginResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgIncreasePositionMarginResponse.Merge(m, src) +} +func (m *MsgIncreasePositionMarginResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgIncreasePositionMarginResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgIncreasePositionMarginResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgIncreasePositionMarginResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgDecreasePositionMargin +type MsgDecreasePositionMargin struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourceSubaccountId string `protobuf:"bytes,2,opt,name=source_subaccount_id,json=sourceSubaccountId,proto3" json:"source_subaccount_id,omitempty"` + DestinationSubaccountId string `protobuf:"bytes,3,opt,name=destination_subaccount_id,json=destinationSubaccountId,proto3" json:"destination_subaccount_id,omitempty"` + MarketId string `protobuf:"bytes,4,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // amount defines the amount of margin to withdraw from the position + Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"` +} + +func (m *MsgDecreasePositionMargin) Reset() { *m = MsgDecreasePositionMargin{} } +func (m *MsgDecreasePositionMargin) String() string { return proto.CompactTextString(m) } +func (*MsgDecreasePositionMargin) ProtoMessage() {} +func (*MsgDecreasePositionMargin) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{61} +} +func (m *MsgDecreasePositionMargin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDecreasePositionMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDecreasePositionMargin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDecreasePositionMargin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDecreasePositionMargin.Merge(m, src) +} +func (m *MsgDecreasePositionMargin) XXX_Size() int { + return m.Size() +} +func (m *MsgDecreasePositionMargin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDecreasePositionMargin.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDecreasePositionMargin proto.InternalMessageInfo + +func (m *MsgDecreasePositionMargin) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgDecreasePositionMargin) GetSourceSubaccountId() string { + if m != nil { + return m.SourceSubaccountId + } + return "" +} + +func (m *MsgDecreasePositionMargin) GetDestinationSubaccountId() string { + if m != nil { + return m.DestinationSubaccountId + } + return "" +} + +func (m *MsgDecreasePositionMargin) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +// MsgDecreasePositionMarginResponse defines the Msg/MsgDecreasePositionMargin +// response type. +type MsgDecreasePositionMarginResponse struct { +} + +func (m *MsgDecreasePositionMarginResponse) Reset() { *m = MsgDecreasePositionMarginResponse{} } +func (m *MsgDecreasePositionMarginResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDecreasePositionMarginResponse) ProtoMessage() {} +func (*MsgDecreasePositionMarginResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{62} +} +func (m *MsgDecreasePositionMarginResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDecreasePositionMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDecreasePositionMarginResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDecreasePositionMarginResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDecreasePositionMarginResponse.Merge(m, src) +} +func (m *MsgDecreasePositionMarginResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDecreasePositionMarginResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDecreasePositionMarginResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDecreasePositionMarginResponse proto.InternalMessageInfo + +// MsgPrivilegedExecuteContract defines the Msg/Exec message type +type MsgPrivilegedExecuteContract struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // funds defines the user's bank coins used to fund the execution (e.g. + // 100inj). + Funds string `protobuf:"bytes,2,opt,name=funds,proto3" json:"funds,omitempty"` + // contract_address defines the contract address to execute + ContractAddress string `protobuf:"bytes,3,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // data defines the call data used when executing the contract + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *MsgPrivilegedExecuteContract) Reset() { *m = MsgPrivilegedExecuteContract{} } +func (m *MsgPrivilegedExecuteContract) String() string { return proto.CompactTextString(m) } +func (*MsgPrivilegedExecuteContract) ProtoMessage() {} +func (*MsgPrivilegedExecuteContract) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{63} +} +func (m *MsgPrivilegedExecuteContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPrivilegedExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPrivilegedExecuteContract.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgPrivilegedExecuteContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPrivilegedExecuteContract.Merge(m, src) +} +func (m *MsgPrivilegedExecuteContract) XXX_Size() int { + return m.Size() +} +func (m *MsgPrivilegedExecuteContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPrivilegedExecuteContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPrivilegedExecuteContract proto.InternalMessageInfo + +// MsgPrivilegedExecuteContractResponse defines the Msg/Exec response type. +type MsgPrivilegedExecuteContractResponse struct { + FundsDiff github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=funds_diff,json=fundsDiff,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds_diff"` +} + +func (m *MsgPrivilegedExecuteContractResponse) Reset() { *m = MsgPrivilegedExecuteContractResponse{} } +func (m *MsgPrivilegedExecuteContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPrivilegedExecuteContractResponse) ProtoMessage() {} +func (*MsgPrivilegedExecuteContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{64} +} +func (m *MsgPrivilegedExecuteContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPrivilegedExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPrivilegedExecuteContractResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgPrivilegedExecuteContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPrivilegedExecuteContractResponse.Merge(m, src) +} +func (m *MsgPrivilegedExecuteContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPrivilegedExecuteContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPrivilegedExecuteContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPrivilegedExecuteContractResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgRewardsOptOut +type MsgRewardsOptOut struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgRewardsOptOut) Reset() { *m = MsgRewardsOptOut{} } +func (m *MsgRewardsOptOut) String() string { return proto.CompactTextString(m) } +func (*MsgRewardsOptOut) ProtoMessage() {} +func (*MsgRewardsOptOut) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{65} +} +func (m *MsgRewardsOptOut) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRewardsOptOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRewardsOptOut.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRewardsOptOut) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRewardsOptOut.Merge(m, src) +} +func (m *MsgRewardsOptOut) XXX_Size() int { + return m.Size() +} +func (m *MsgRewardsOptOut) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRewardsOptOut.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRewardsOptOut proto.InternalMessageInfo + +// MsgRewardsOptOutResponse defines the Msg/RewardsOptOut response type. +type MsgRewardsOptOutResponse struct { +} + +func (m *MsgRewardsOptOutResponse) Reset() { *m = MsgRewardsOptOutResponse{} } +func (m *MsgRewardsOptOutResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRewardsOptOutResponse) ProtoMessage() {} +func (*MsgRewardsOptOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{66} +} +func (m *MsgRewardsOptOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRewardsOptOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRewardsOptOutResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRewardsOptOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRewardsOptOutResponse.Merge(m, src) +} +func (m *MsgRewardsOptOutResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRewardsOptOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRewardsOptOutResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRewardsOptOutResponse proto.InternalMessageInfo + +// A Cosmos-SDK MsgReclaimLockedFunds +type MsgReclaimLockedFunds struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + LockedAccountPubKey []byte `protobuf:"bytes,2,opt,name=lockedAccountPubKey,proto3" json:"lockedAccountPubKey,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *MsgReclaimLockedFunds) Reset() { *m = MsgReclaimLockedFunds{} } +func (m *MsgReclaimLockedFunds) String() string { return proto.CompactTextString(m) } +func (*MsgReclaimLockedFunds) ProtoMessage() {} +func (*MsgReclaimLockedFunds) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{67} +} +func (m *MsgReclaimLockedFunds) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReclaimLockedFunds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReclaimLockedFunds.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgReclaimLockedFunds) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReclaimLockedFunds.Merge(m, src) +} +func (m *MsgReclaimLockedFunds) XXX_Size() int { + return m.Size() +} +func (m *MsgReclaimLockedFunds) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReclaimLockedFunds.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReclaimLockedFunds proto.InternalMessageInfo + +func (m *MsgReclaimLockedFunds) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgReclaimLockedFunds) GetLockedAccountPubKey() []byte { + if m != nil { + return m.LockedAccountPubKey + } + return nil +} + +func (m *MsgReclaimLockedFunds) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +// MsgReclaimLockedFundsResponse defines the Msg/ReclaimLockedFunds response +// type. +type MsgReclaimLockedFundsResponse struct { +} + +func (m *MsgReclaimLockedFundsResponse) Reset() { *m = MsgReclaimLockedFundsResponse{} } +func (m *MsgReclaimLockedFundsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgReclaimLockedFundsResponse) ProtoMessage() {} +func (*MsgReclaimLockedFundsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{68} +} +func (m *MsgReclaimLockedFundsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReclaimLockedFundsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReclaimLockedFundsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgReclaimLockedFundsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReclaimLockedFundsResponse.Merge(m, src) +} +func (m *MsgReclaimLockedFundsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgReclaimLockedFundsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReclaimLockedFundsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReclaimLockedFundsResponse proto.InternalMessageInfo + +// MsgSignData defines an arbitrary, general-purpose, off-chain message +type MsgSignData struct { + // Signer is the sdk.AccAddress of the message signer + Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=Signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer"` + // Data represents the raw bytes of the content that is signed (text, json, + // etc) + Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"data"` +} + +func (m *MsgSignData) Reset() { *m = MsgSignData{} } +func (m *MsgSignData) String() string { return proto.CompactTextString(m) } +func (*MsgSignData) ProtoMessage() {} +func (*MsgSignData) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{69} +} +func (m *MsgSignData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSignData) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignData.Merge(m, src) +} +func (m *MsgSignData) XXX_Size() int { + return m.Size() +} +func (m *MsgSignData) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignData.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignData proto.InternalMessageInfo + +func (m *MsgSignData) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Signer + } + return nil +} + +func (m *MsgSignData) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// MsgSignDoc defines an arbitrary, general-purpose, off-chain message +type MsgSignDoc struct { + SignType string `protobuf:"bytes,1,opt,name=sign_type,json=signType,proto3" json:"type"` + Value MsgSignData `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` +} + +func (m *MsgSignDoc) Reset() { *m = MsgSignDoc{} } +func (m *MsgSignDoc) String() string { return proto.CompactTextString(m) } +func (*MsgSignDoc) ProtoMessage() {} +func (*MsgSignDoc) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{70} +} +func (m *MsgSignDoc) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignDoc.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSignDoc) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignDoc.Merge(m, src) +} +func (m *MsgSignDoc) XXX_Size() int { + return m.Size() +} +func (m *MsgSignDoc) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignDoc.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignDoc proto.InternalMessageInfo + +func (m *MsgSignDoc) GetSignType() string { + if m != nil { + return m.SignType + } + return "" +} + +func (m *MsgSignDoc) GetValue() MsgSignData { + if m != nil { + return m.Value + } + return MsgSignData{} +} + +// MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the +// market +type MsgAdminUpdateBinaryOptionsMarket struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // new price at which market will be settled + SettlementPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=settlement_price,json=settlementPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"settlement_price,omitempty"` + // expiration timestamp + ExpirationTimestamp int64 `protobuf:"varint,4,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"` + // expiration timestamp + SettlementTimestamp int64 `protobuf:"varint,5,opt,name=settlement_timestamp,json=settlementTimestamp,proto3" json:"settlement_timestamp,omitempty"` + // Status of the market + Status MarketStatus `protobuf:"varint,6,opt,name=status,proto3,enum=injective.exchange.v2.MarketStatus" json:"status,omitempty"` +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) Reset() { *m = MsgAdminUpdateBinaryOptionsMarket{} } +func (m *MsgAdminUpdateBinaryOptionsMarket) String() string { return proto.CompactTextString(m) } +func (*MsgAdminUpdateBinaryOptionsMarket) ProtoMessage() {} +func (*MsgAdminUpdateBinaryOptionsMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{71} +} +func (m *MsgAdminUpdateBinaryOptionsMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAdminUpdateBinaryOptionsMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAdminUpdateBinaryOptionsMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarket.Merge(m, src) +} +func (m *MsgAdminUpdateBinaryOptionsMarket) XXX_Size() int { + return m.Size() +} +func (m *MsgAdminUpdateBinaryOptionsMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarket proto.InternalMessageInfo + +func (m *MsgAdminUpdateBinaryOptionsMarket) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) GetExpirationTimestamp() int64 { + if m != nil { + return m.ExpirationTimestamp + } + return 0 +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) GetSettlementTimestamp() int64 { + if m != nil { + return m.SettlementTimestamp + } + return 0 +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) GetStatus() MarketStatus { + if m != nil { + return m.Status + } + return MarketStatus_Unspecified +} + +// MsgAdminUpdateBinaryOptionsMarketResponse is the response for +// AdminUpdateBinaryOptionsMarket rpc method +type MsgAdminUpdateBinaryOptionsMarketResponse struct { +} + +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) Reset() { + *m = MsgAdminUpdateBinaryOptionsMarketResponse{} +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgAdminUpdateBinaryOptionsMarketResponse) ProtoMessage() {} +func (*MsgAdminUpdateBinaryOptionsMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{72} +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarketResponse.Merge(m, src) +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAdminUpdateBinaryOptionsMarketResponse proto.InternalMessageInfo + +// MsgAuthorizeStakeGrants grants stakes to grantees. +type MsgAuthorizeStakeGrants struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Grants []*GrantAuthorization `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"` +} + +func (m *MsgAuthorizeStakeGrants) Reset() { *m = MsgAuthorizeStakeGrants{} } +func (m *MsgAuthorizeStakeGrants) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeStakeGrants) ProtoMessage() {} +func (*MsgAuthorizeStakeGrants) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{73} +} +func (m *MsgAuthorizeStakeGrants) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorizeStakeGrants) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorizeStakeGrants.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAuthorizeStakeGrants) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeStakeGrants.Merge(m, src) +} +func (m *MsgAuthorizeStakeGrants) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorizeStakeGrants) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeStakeGrants.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorizeStakeGrants proto.InternalMessageInfo + +func (m *MsgAuthorizeStakeGrants) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgAuthorizeStakeGrants) GetGrants() []*GrantAuthorization { + if m != nil { + return m.Grants + } + return nil +} + +type MsgAuthorizeStakeGrantsResponse struct { +} + +func (m *MsgAuthorizeStakeGrantsResponse) Reset() { *m = MsgAuthorizeStakeGrantsResponse{} } +func (m *MsgAuthorizeStakeGrantsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeStakeGrantsResponse) ProtoMessage() {} +func (*MsgAuthorizeStakeGrantsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{74} +} +func (m *MsgAuthorizeStakeGrantsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorizeStakeGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorizeStakeGrantsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAuthorizeStakeGrantsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeStakeGrantsResponse.Merge(m, src) +} +func (m *MsgAuthorizeStakeGrantsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorizeStakeGrantsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeStakeGrantsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorizeStakeGrantsResponse proto.InternalMessageInfo + +// MsgActivateStakeGrant allows a grantee to activate a stake grant. +type MsgActivateStakeGrant struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Granter string `protobuf:"bytes,2,opt,name=granter,proto3" json:"granter,omitempty"` +} + +func (m *MsgActivateStakeGrant) Reset() { *m = MsgActivateStakeGrant{} } +func (m *MsgActivateStakeGrant) String() string { return proto.CompactTextString(m) } +func (*MsgActivateStakeGrant) ProtoMessage() {} +func (*MsgActivateStakeGrant) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{75} +} +func (m *MsgActivateStakeGrant) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgActivateStakeGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgActivateStakeGrant.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgActivateStakeGrant) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateStakeGrant.Merge(m, src) +} +func (m *MsgActivateStakeGrant) XXX_Size() int { + return m.Size() +} +func (m *MsgActivateStakeGrant) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateStakeGrant.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgActivateStakeGrant proto.InternalMessageInfo + +func (m *MsgActivateStakeGrant) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgActivateStakeGrant) GetGranter() string { + if m != nil { + return m.Granter + } + return "" +} + +type MsgActivateStakeGrantResponse struct { +} + +func (m *MsgActivateStakeGrantResponse) Reset() { *m = MsgActivateStakeGrantResponse{} } +func (m *MsgActivateStakeGrantResponse) String() string { return proto.CompactTextString(m) } +func (*MsgActivateStakeGrantResponse) ProtoMessage() {} +func (*MsgActivateStakeGrantResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7c861fb1c14863a5, []int{76} +} +func (m *MsgActivateStakeGrantResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgActivateStakeGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgActivateStakeGrantResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgActivateStakeGrantResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateStakeGrantResponse.Merge(m, src) +} +func (m *MsgActivateStakeGrantResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgActivateStakeGrantResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateStakeGrantResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgActivateStakeGrantResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateSpotMarket)(nil), "injective.exchange.v2.MsgUpdateSpotMarket") + proto.RegisterType((*MsgUpdateSpotMarketResponse)(nil), "injective.exchange.v2.MsgUpdateSpotMarketResponse") + proto.RegisterType((*MsgUpdateDerivativeMarket)(nil), "injective.exchange.v2.MsgUpdateDerivativeMarket") + proto.RegisterType((*MsgUpdateDerivativeMarketResponse)(nil), "injective.exchange.v2.MsgUpdateDerivativeMarketResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "injective.exchange.v2.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "injective.exchange.v2.MsgUpdateParamsResponse") + proto.RegisterType((*MsgDeposit)(nil), "injective.exchange.v2.MsgDeposit") + proto.RegisterType((*MsgDepositResponse)(nil), "injective.exchange.v2.MsgDepositResponse") + proto.RegisterType((*MsgWithdraw)(nil), "injective.exchange.v2.MsgWithdraw") + proto.RegisterType((*MsgWithdrawResponse)(nil), "injective.exchange.v2.MsgWithdrawResponse") + proto.RegisterType((*MsgCreateSpotLimitOrder)(nil), "injective.exchange.v2.MsgCreateSpotLimitOrder") + proto.RegisterType((*MsgCreateSpotLimitOrderResponse)(nil), "injective.exchange.v2.MsgCreateSpotLimitOrderResponse") + proto.RegisterType((*MsgBatchCreateSpotLimitOrders)(nil), "injective.exchange.v2.MsgBatchCreateSpotLimitOrders") + proto.RegisterType((*MsgBatchCreateSpotLimitOrdersResponse)(nil), "injective.exchange.v2.MsgBatchCreateSpotLimitOrdersResponse") + proto.RegisterType((*MsgInstantSpotMarketLaunch)(nil), "injective.exchange.v2.MsgInstantSpotMarketLaunch") + proto.RegisterType((*MsgInstantSpotMarketLaunchResponse)(nil), "injective.exchange.v2.MsgInstantSpotMarketLaunchResponse") + proto.RegisterType((*MsgInstantPerpetualMarketLaunch)(nil), "injective.exchange.v2.MsgInstantPerpetualMarketLaunch") + proto.RegisterType((*MsgInstantPerpetualMarketLaunchResponse)(nil), "injective.exchange.v2.MsgInstantPerpetualMarketLaunchResponse") + proto.RegisterType((*MsgInstantBinaryOptionsMarketLaunch)(nil), "injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch") + proto.RegisterType((*MsgInstantBinaryOptionsMarketLaunchResponse)(nil), "injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunchResponse") + proto.RegisterType((*MsgInstantExpiryFuturesMarketLaunch)(nil), "injective.exchange.v2.MsgInstantExpiryFuturesMarketLaunch") + proto.RegisterType((*MsgInstantExpiryFuturesMarketLaunchResponse)(nil), "injective.exchange.v2.MsgInstantExpiryFuturesMarketLaunchResponse") + proto.RegisterType((*MsgCreateSpotMarketOrder)(nil), "injective.exchange.v2.MsgCreateSpotMarketOrder") + proto.RegisterType((*MsgCreateSpotMarketOrderResponse)(nil), "injective.exchange.v2.MsgCreateSpotMarketOrderResponse") + proto.RegisterType((*SpotMarketOrderResults)(nil), "injective.exchange.v2.SpotMarketOrderResults") + proto.RegisterType((*MsgCreateDerivativeLimitOrder)(nil), "injective.exchange.v2.MsgCreateDerivativeLimitOrder") + proto.RegisterType((*MsgCreateDerivativeLimitOrderResponse)(nil), "injective.exchange.v2.MsgCreateDerivativeLimitOrderResponse") + proto.RegisterType((*MsgCreateBinaryOptionsLimitOrder)(nil), "injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder") + proto.RegisterType((*MsgCreateBinaryOptionsLimitOrderResponse)(nil), "injective.exchange.v2.MsgCreateBinaryOptionsLimitOrderResponse") + proto.RegisterType((*MsgBatchCreateDerivativeLimitOrders)(nil), "injective.exchange.v2.MsgBatchCreateDerivativeLimitOrders") + proto.RegisterType((*MsgBatchCreateDerivativeLimitOrdersResponse)(nil), "injective.exchange.v2.MsgBatchCreateDerivativeLimitOrdersResponse") + proto.RegisterType((*MsgCancelSpotOrder)(nil), "injective.exchange.v2.MsgCancelSpotOrder") + proto.RegisterType((*MsgCancelSpotOrderResponse)(nil), "injective.exchange.v2.MsgCancelSpotOrderResponse") + proto.RegisterType((*MsgBatchCancelSpotOrders)(nil), "injective.exchange.v2.MsgBatchCancelSpotOrders") + proto.RegisterType((*MsgBatchCancelSpotOrdersResponse)(nil), "injective.exchange.v2.MsgBatchCancelSpotOrdersResponse") + proto.RegisterType((*MsgBatchCancelBinaryOptionsOrders)(nil), "injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders") + proto.RegisterType((*MsgBatchCancelBinaryOptionsOrdersResponse)(nil), "injective.exchange.v2.MsgBatchCancelBinaryOptionsOrdersResponse") + proto.RegisterType((*MsgBatchUpdateOrders)(nil), "injective.exchange.v2.MsgBatchUpdateOrders") + proto.RegisterType((*MsgBatchUpdateOrdersResponse)(nil), "injective.exchange.v2.MsgBatchUpdateOrdersResponse") + proto.RegisterType((*MsgCreateDerivativeMarketOrder)(nil), "injective.exchange.v2.MsgCreateDerivativeMarketOrder") + proto.RegisterType((*MsgCreateDerivativeMarketOrderResponse)(nil), "injective.exchange.v2.MsgCreateDerivativeMarketOrderResponse") + proto.RegisterType((*DerivativeMarketOrderResults)(nil), "injective.exchange.v2.DerivativeMarketOrderResults") + proto.RegisterType((*MsgCreateBinaryOptionsMarketOrder)(nil), "injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder") + proto.RegisterType((*MsgCreateBinaryOptionsMarketOrderResponse)(nil), "injective.exchange.v2.MsgCreateBinaryOptionsMarketOrderResponse") + proto.RegisterType((*MsgCancelDerivativeOrder)(nil), "injective.exchange.v2.MsgCancelDerivativeOrder") + proto.RegisterType((*MsgCancelDerivativeOrderResponse)(nil), "injective.exchange.v2.MsgCancelDerivativeOrderResponse") + proto.RegisterType((*MsgCancelBinaryOptionsOrder)(nil), "injective.exchange.v2.MsgCancelBinaryOptionsOrder") + proto.RegisterType((*MsgCancelBinaryOptionsOrderResponse)(nil), "injective.exchange.v2.MsgCancelBinaryOptionsOrderResponse") + proto.RegisterType((*OrderData)(nil), "injective.exchange.v2.OrderData") + proto.RegisterType((*MsgBatchCancelDerivativeOrders)(nil), "injective.exchange.v2.MsgBatchCancelDerivativeOrders") + proto.RegisterType((*MsgBatchCancelDerivativeOrdersResponse)(nil), "injective.exchange.v2.MsgBatchCancelDerivativeOrdersResponse") + proto.RegisterType((*MsgSubaccountTransfer)(nil), "injective.exchange.v2.MsgSubaccountTransfer") + proto.RegisterType((*MsgSubaccountTransferResponse)(nil), "injective.exchange.v2.MsgSubaccountTransferResponse") + proto.RegisterType((*MsgExternalTransfer)(nil), "injective.exchange.v2.MsgExternalTransfer") + proto.RegisterType((*MsgExternalTransferResponse)(nil), "injective.exchange.v2.MsgExternalTransferResponse") + proto.RegisterType((*MsgLiquidatePosition)(nil), "injective.exchange.v2.MsgLiquidatePosition") + proto.RegisterType((*MsgLiquidatePositionResponse)(nil), "injective.exchange.v2.MsgLiquidatePositionResponse") + proto.RegisterType((*MsgEmergencySettleMarket)(nil), "injective.exchange.v2.MsgEmergencySettleMarket") + proto.RegisterType((*MsgEmergencySettleMarketResponse)(nil), "injective.exchange.v2.MsgEmergencySettleMarketResponse") + proto.RegisterType((*MsgIncreasePositionMargin)(nil), "injective.exchange.v2.MsgIncreasePositionMargin") + proto.RegisterType((*MsgIncreasePositionMarginResponse)(nil), "injective.exchange.v2.MsgIncreasePositionMarginResponse") + proto.RegisterType((*MsgDecreasePositionMargin)(nil), "injective.exchange.v2.MsgDecreasePositionMargin") + proto.RegisterType((*MsgDecreasePositionMarginResponse)(nil), "injective.exchange.v2.MsgDecreasePositionMarginResponse") + proto.RegisterType((*MsgPrivilegedExecuteContract)(nil), "injective.exchange.v2.MsgPrivilegedExecuteContract") + proto.RegisterType((*MsgPrivilegedExecuteContractResponse)(nil), "injective.exchange.v2.MsgPrivilegedExecuteContractResponse") + proto.RegisterType((*MsgRewardsOptOut)(nil), "injective.exchange.v2.MsgRewardsOptOut") + proto.RegisterType((*MsgRewardsOptOutResponse)(nil), "injective.exchange.v2.MsgRewardsOptOutResponse") + proto.RegisterType((*MsgReclaimLockedFunds)(nil), "injective.exchange.v2.MsgReclaimLockedFunds") + proto.RegisterType((*MsgReclaimLockedFundsResponse)(nil), "injective.exchange.v2.MsgReclaimLockedFundsResponse") + proto.RegisterType((*MsgSignData)(nil), "injective.exchange.v2.MsgSignData") + proto.RegisterType((*MsgSignDoc)(nil), "injective.exchange.v2.MsgSignDoc") + proto.RegisterType((*MsgAdminUpdateBinaryOptionsMarket)(nil), "injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket") + proto.RegisterType((*MsgAdminUpdateBinaryOptionsMarketResponse)(nil), "injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarketResponse") + proto.RegisterType((*MsgAuthorizeStakeGrants)(nil), "injective.exchange.v2.MsgAuthorizeStakeGrants") + proto.RegisterType((*MsgAuthorizeStakeGrantsResponse)(nil), "injective.exchange.v2.MsgAuthorizeStakeGrantsResponse") + proto.RegisterType((*MsgActivateStakeGrant)(nil), "injective.exchange.v2.MsgActivateStakeGrant") + proto.RegisterType((*MsgActivateStakeGrantResponse)(nil), "injective.exchange.v2.MsgActivateStakeGrantResponse") +} + +func init() { proto.RegisterFile("injective/exchange/v2/tx.proto", fileDescriptor_7c861fb1c14863a5) } + +var fileDescriptor_7c861fb1c14863a5 = []byte{ + // 3979 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0x5b, 0x68, 0x1c, 0xd7, + 0xd9, 0x1e, 0xad, 0xb4, 0x92, 0x3e, 0x5d, 0x2c, 0x8f, 0x24, 0x6b, 0xb5, 0xba, 0x59, 0x23, 0xdf, + 0x2f, 0xbb, 0x96, 0x12, 0x3b, 0xf6, 0x3a, 0x76, 0x22, 0x59, 0xf6, 0x1f, 0xfd, 0xb1, 0x62, 0x7b, + 0xe5, 0x90, 0x3f, 0x21, 0x61, 0x19, 0xcd, 0x1e, 0xad, 0x26, 0xda, 0x9d, 0xd9, 0xcc, 0xcc, 0xca, + 0x56, 0x1e, 0x7e, 0x92, 0x50, 0x1a, 0x37, 0xa5, 0x10, 0x28, 0x14, 0x0a, 0x2d, 0x84, 0x96, 0xb6, + 0xf4, 0x02, 0x4d, 0xda, 0x42, 0x53, 0x4a, 0xe9, 0x53, 0x21, 0xf4, 0x29, 0x2d, 0x2d, 0x94, 0x3e, + 0xb8, 0x25, 0x7e, 0x48, 0x49, 0xa1, 0xaf, 0x85, 0xf6, 0xa5, 0xcc, 0x39, 0x67, 0x66, 0xe7, 0x72, + 0xce, 0xcc, 0xac, 0x22, 0x25, 0x4e, 0xc9, 0x8b, 0xad, 0x39, 0xdf, 0xe5, 0x7c, 0xdf, 0x77, 0xbe, + 0xcb, 0x39, 0xdf, 0x9c, 0x59, 0x98, 0x54, 0xb5, 0x17, 0x91, 0x62, 0xa9, 0x9b, 0x28, 0x8f, 0xee, + 0x28, 0xeb, 0xb2, 0x56, 0x41, 0xf9, 0xcd, 0xb9, 0xbc, 0x75, 0x27, 0x57, 0x37, 0x74, 0x4b, 0x17, + 0x87, 0x5d, 0x78, 0xce, 0x81, 0xe7, 0x36, 0xe7, 0xb2, 0x93, 0x8a, 0x6e, 0xd6, 0x74, 0x33, 0xbf, + 0x2a, 0x9b, 0x28, 0xbf, 0x39, 0xbb, 0x8a, 0x2c, 0x79, 0x36, 0xaf, 0xe8, 0xaa, 0x46, 0xc8, 0xb2, + 0x39, 0x0a, 0x2f, 0xab, 0xa6, 0x65, 0xa8, 0xab, 0x0d, 0x4b, 0xd5, 0x35, 0x17, 0xcf, 0x3b, 0x48, + 0xf1, 0x47, 0x28, 0x7e, 0xcd, 0xac, 0xe4, 0x37, 0x67, 0xed, 0xff, 0x28, 0x60, 0x94, 0x00, 0x4a, + 0xf8, 0x29, 0x4f, 0x1e, 0x28, 0x68, 0xa8, 0xa2, 0x57, 0x74, 0x32, 0x6e, 0xff, 0x45, 0x47, 0x0f, + 0xb2, 0x15, 0x72, 0x85, 0x27, 0x58, 0xd3, 0x6c, 0x2c, 0xdd, 0x28, 0x23, 0x83, 0xa2, 0x48, 0x6c, + 0x94, 0x9a, 0x6c, 0x6c, 0x20, 0x8b, 0xe2, 0x1c, 0x6a, 0xe2, 0xe8, 0x86, 0xac, 0x54, 0x9b, 0xb6, + 0x20, 0x8f, 0x14, 0x6d, 0x9f, 0x5c, 0x53, 0x35, 0x3d, 0x8f, 0xff, 0x25, 0x43, 0xd2, 0xb7, 0x53, + 0x30, 0xb8, 0x6c, 0x56, 0x9e, 0xae, 0x97, 0x65, 0x0b, 0xad, 0xd4, 0x75, 0x6b, 0x19, 0xf3, 0x15, + 0x87, 0xa0, 0x43, 0x2e, 0xd7, 0x54, 0x2d, 0x23, 0x1c, 0x10, 0x8e, 0x76, 0x17, 0xc9, 0x83, 0x38, + 0x06, 0xdd, 0x64, 0xde, 0x92, 0x5a, 0xce, 0xb4, 0x61, 0x48, 0x17, 0x19, 0x58, 0x2a, 0x8b, 0x13, + 0x00, 0x1a, 0xba, 0x5d, 0xb2, 0x54, 0x65, 0x03, 0x19, 0x99, 0x14, 0x86, 0x76, 0x6b, 0xe8, 0xf6, + 0x2d, 0x3c, 0x20, 0x3e, 0x0b, 0x23, 0x36, 0xb8, 0xa6, 0x6a, 0xa5, 0xba, 0xa1, 0x2a, 0x08, 0x23, + 0x96, 0x4c, 0xf5, 0x65, 0x94, 0x69, 0xb7, 0x71, 0x17, 0x66, 0xde, 0xbb, 0x37, 0xb5, 0xe7, 0xcf, + 0xf7, 0xa6, 0xc6, 0x88, 0x75, 0xcd, 0xf2, 0x46, 0x4e, 0xd5, 0xf3, 0x35, 0xd9, 0x5a, 0xcf, 0x5d, + 0x43, 0x15, 0x59, 0xd9, 0x5a, 0x44, 0x4a, 0x71, 0x50, 0x43, 0xb7, 0x97, 0x55, 0xed, 0x86, 0xcd, + 0xc1, 0x66, 0xbc, 0xa2, 0xbe, 0x8c, 0xc4, 0x12, 0x64, 0x1d, 0xd6, 0x2f, 0x35, 0x64, 0xcd, 0x52, + 0xad, 0x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, 0xdc, 0x1b, 0x08, 0xf8, 0x92, 0x11, + 0xa5, 0x01, 0x31, 0x59, 0xcf, 0x36, 0x4c, 0xc6, 0xd1, 0x03, 0x33, 0x2c, 0xcc, 0x32, 0x92, 0xc6, + 0x44, 0x28, 0x69, 0x78, 0xa3, 0x57, 0xba, 0x9b, 0x86, 0x71, 0x16, 0xc0, 0xcd, 0x0d, 0x39, 0x18, + 0xc4, 0x1e, 0x45, 0x6d, 0xe0, 0xcf, 0x13, 0xfb, 0x6c, 0x10, 0xcd, 0xb0, 0x04, 0x20, 0x16, 0x60, + 0xd4, 0xe3, 0x26, 0x01, 0xaa, 0x36, 0x4c, 0x35, 0xd2, 0x44, 0xf0, 0xd3, 0x1e, 0x87, 0x7d, 0x4d, + 0xef, 0x75, 0xea, 0x3b, 0xc9, 0x00, 0x7b, 0x5d, 0x8f, 0xa4, 0x35, 0xfe, 0x2c, 0x8c, 0x04, 0xdd, + 0xd1, 0xa1, 0x20, 0xc1, 0x3e, 0x1c, 0x70, 0x2e, 0x4a, 0x37, 0x0f, 0x13, 0x81, 0x75, 0x09, 0xc8, + 0xd8, 0x81, 0x65, 0xcc, 0xfa, 0xec, 0xec, 0x17, 0xf3, 0x22, 0x8c, 0xb1, 0x96, 0xd6, 0x99, 0x3e, + 0x4d, 0x52, 0x56, 0x78, 0xa1, 0xa8, 0x04, 0x8f, 0x40, 0xc6, 0xd9, 0x9d, 0x78, 0x63, 0x15, 0xef, + 0x39, 0x3a, 0x89, 0xe8, 0x14, 0xde, 0xac, 0x5a, 0x78, 0x9b, 0x72, 0x06, 0x46, 0xe8, 0x36, 0x25, + 0x44, 0xd7, 0x85, 0xe9, 0x86, 0x08, 0x38, 0x40, 0x76, 0x19, 0x26, 0x9d, 0xf9, 0xc2, 0x01, 0x8c, + 0xa9, 0xbb, 0x31, 0xf5, 0x18, 0xc5, 0x0a, 0x38, 0x1e, 0x61, 0x32, 0x0f, 0x13, 0x74, 0x6e, 0x0e, + 0x0f, 0x12, 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d, 0x30, 0x29, 0xbc, 0xff, 0xc1, 0xa4, 0xf0, 0xd7, 0x0f, + 0x26, 0x85, 0x37, 0xef, 0x4f, 0xee, 0x79, 0xff, 0xfe, 0xe4, 0x9e, 0x3f, 0xdd, 0x9f, 0xdc, 0xf3, + 0xdc, 0x4d, 0x4f, 0xcf, 0x79, 0xc9, 0x99, 0xe0, 0x9a, 0xbc, 0x6a, 0xe6, 0xdd, 0xe9, 0x4e, 0x29, + 0xba, 0x81, 0xbc, 0x8f, 0xeb, 0xb2, 0xaa, 0xe5, 0x6b, 0x7a, 0xb9, 0x51, 0x45, 0x66, 0xf3, 0xb7, + 0xff, 0x70, 0x7f, 0x3a, 0xbf, 0x39, 0xb7, 0x9a, 0xc6, 0xbf, 0xe0, 0xf7, 0xd0, 0x7f, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xd3, 0x7d, 0x4f, 0xf1, 0x3b, 0x51, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// 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. +type MsgClient interface { + // Deposit defines a method for transferring coins from the sender's bank + // balance into the subaccount's exchange deposits + Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) + // Withdraw defines a method for withdrawing coins from a subaccount's + // deposits to the user's bank balance + Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) + // InstantSpotMarketLaunch defines method for creating a spot market by paying + // listing fee without governance + InstantSpotMarketLaunch(ctx context.Context, in *MsgInstantSpotMarketLaunch, opts ...grpc.CallOption) (*MsgInstantSpotMarketLaunchResponse, error) + // InstantPerpetualMarketLaunch defines a method for creating a new perpetual + // futures market by paying listing fee without governance + InstantPerpetualMarketLaunch(ctx context.Context, in *MsgInstantPerpetualMarketLaunch, opts ...grpc.CallOption) (*MsgInstantPerpetualMarketLaunchResponse, error) + // InstantExpiryFuturesMarketLaunch defines a method for creating a new expiry + // futures market by paying listing fee without governance + InstantExpiryFuturesMarketLaunch(ctx context.Context, in *MsgInstantExpiryFuturesMarketLaunch, opts ...grpc.CallOption) (*MsgInstantExpiryFuturesMarketLaunchResponse, error) + // CreateSpotLimitOrder defines a method for creating a new spot limit order. + CreateSpotLimitOrder(ctx context.Context, in *MsgCreateSpotLimitOrder, opts ...grpc.CallOption) (*MsgCreateSpotLimitOrderResponse, error) + // BatchCreateSpotLimitOrder defines a method for creating a new batch of spot + // limit orders. + BatchCreateSpotLimitOrders(ctx context.Context, in *MsgBatchCreateSpotLimitOrders, opts ...grpc.CallOption) (*MsgBatchCreateSpotLimitOrdersResponse, error) + // CreateSpotMarketOrder defines a method for creating a new spot market + // order. + CreateSpotMarketOrder(ctx context.Context, in *MsgCreateSpotMarketOrder, opts ...grpc.CallOption) (*MsgCreateSpotMarketOrderResponse, error) + // MsgCancelSpotOrder defines a method for cancelling a spot order. + CancelSpotOrder(ctx context.Context, in *MsgCancelSpotOrder, opts ...grpc.CallOption) (*MsgCancelSpotOrderResponse, error) + // BatchCancelSpotOrders defines a method for cancelling a batch of spot + // orders in a given market. + BatchCancelSpotOrders(ctx context.Context, in *MsgBatchCancelSpotOrders, opts ...grpc.CallOption) (*MsgBatchCancelSpotOrdersResponse, error) + // BatchUpdateOrders defines a method for updating a batch of orders. + BatchUpdateOrders(ctx context.Context, in *MsgBatchUpdateOrders, opts ...grpc.CallOption) (*MsgBatchUpdateOrdersResponse, error) + // PrivilegedExecuteContract defines a method for executing a Cosmwasm + // contract from the exchange module with privileged capabilities. + PrivilegedExecuteContract(ctx context.Context, in *MsgPrivilegedExecuteContract, opts ...grpc.CallOption) (*MsgPrivilegedExecuteContractResponse, error) + // CreateDerivativeLimitOrder defines a method for creating a new derivative + // limit order. + CreateDerivativeLimitOrder(ctx context.Context, in *MsgCreateDerivativeLimitOrder, opts ...grpc.CallOption) (*MsgCreateDerivativeLimitOrderResponse, error) + // BatchCreateDerivativeLimitOrders defines a method for creating a new batch + // of derivative limit orders. + BatchCreateDerivativeLimitOrders(ctx context.Context, in *MsgBatchCreateDerivativeLimitOrders, opts ...grpc.CallOption) (*MsgBatchCreateDerivativeLimitOrdersResponse, error) + // MsgCreateDerivativeLimitOrder defines a method for creating a new + // derivative market order. + CreateDerivativeMarketOrder(ctx context.Context, in *MsgCreateDerivativeMarketOrder, opts ...grpc.CallOption) (*MsgCreateDerivativeMarketOrderResponse, error) + // MsgCancelDerivativeOrder defines a method for cancelling a derivative + // order. + CancelDerivativeOrder(ctx context.Context, in *MsgCancelDerivativeOrder, opts ...grpc.CallOption) (*MsgCancelDerivativeOrderResponse, error) + // MsgBatchCancelDerivativeOrders defines a method for cancelling a batch of + // derivative limit orders. + BatchCancelDerivativeOrders(ctx context.Context, in *MsgBatchCancelDerivativeOrders, opts ...grpc.CallOption) (*MsgBatchCancelDerivativeOrdersResponse, error) + // InstantBinaryOptionsMarketLaunch defines method for creating a binary + // options market by paying listing fee without governance + InstantBinaryOptionsMarketLaunch(ctx context.Context, in *MsgInstantBinaryOptionsMarketLaunch, opts ...grpc.CallOption) (*MsgInstantBinaryOptionsMarketLaunchResponse, error) + // CreateBinaryOptionsLimitOrder defines a method for creating a new binary + // options limit order. + CreateBinaryOptionsLimitOrder(ctx context.Context, in *MsgCreateBinaryOptionsLimitOrder, opts ...grpc.CallOption) (*MsgCreateBinaryOptionsLimitOrderResponse, error) + // CreateBinaryOptionsMarketOrder defines a method for creating a new binary + // options market order. + CreateBinaryOptionsMarketOrder(ctx context.Context, in *MsgCreateBinaryOptionsMarketOrder, opts ...grpc.CallOption) (*MsgCreateBinaryOptionsMarketOrderResponse, error) + // MsgCancelBinaryOptionsOrder defines a method for cancelling a binary + // options order. + CancelBinaryOptionsOrder(ctx context.Context, in *MsgCancelBinaryOptionsOrder, opts ...grpc.CallOption) (*MsgCancelBinaryOptionsOrderResponse, error) + // BatchCancelBinaryOptionsOrders defines a method for cancelling a batch of + // binary options limit orders. + BatchCancelBinaryOptionsOrders(ctx context.Context, in *MsgBatchCancelBinaryOptionsOrders, opts ...grpc.CallOption) (*MsgBatchCancelBinaryOptionsOrdersResponse, error) + // SubaccountTransfer defines a method for transfer between subaccounts + SubaccountTransfer(ctx context.Context, in *MsgSubaccountTransfer, opts ...grpc.CallOption) (*MsgSubaccountTransferResponse, error) + // ExternalTransfer defines a method for transfer between external accounts + ExternalTransfer(ctx context.Context, in *MsgExternalTransfer, opts ...grpc.CallOption) (*MsgExternalTransferResponse, error) + // LiquidatePosition defines a method for liquidating a position + LiquidatePosition(ctx context.Context, in *MsgLiquidatePosition, opts ...grpc.CallOption) (*MsgLiquidatePositionResponse, error) + // EmergencySettleMarket defines a method for emergency settling a market + EmergencySettleMarket(ctx context.Context, in *MsgEmergencySettleMarket, opts ...grpc.CallOption) (*MsgEmergencySettleMarketResponse, error) + // IncreasePositionMargin defines a method for increasing margin of a position + IncreasePositionMargin(ctx context.Context, in *MsgIncreasePositionMargin, opts ...grpc.CallOption) (*MsgIncreasePositionMarginResponse, error) + // DecreasePositionMargin defines a method for decreasing margin of a position + DecreasePositionMargin(ctx context.Context, in *MsgDecreasePositionMargin, opts ...grpc.CallOption) (*MsgDecreasePositionMarginResponse, error) + // RewardsOptOut defines a method for opting out of rewards + RewardsOptOut(ctx context.Context, in *MsgRewardsOptOut, opts ...grpc.CallOption) (*MsgRewardsOptOutResponse, error) + // AdminUpdateBinaryOptionsMarket defines method for updating a binary options + // market by admin + AdminUpdateBinaryOptionsMarket(ctx context.Context, in *MsgAdminUpdateBinaryOptionsMarket, opts ...grpc.CallOption) (*MsgAdminUpdateBinaryOptionsMarketResponse, error) + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // UpdateSpotMarket modifies certain spot market fields (admin only) + UpdateSpotMarket(ctx context.Context, in *MsgUpdateSpotMarket, opts ...grpc.CallOption) (*MsgUpdateSpotMarketResponse, error) + // UpdateDerivativeMarket modifies certain derivative market fields (admin + // only) + UpdateDerivativeMarket(ctx context.Context, in *MsgUpdateDerivativeMarket, opts ...grpc.CallOption) (*MsgUpdateDerivativeMarketResponse, error) + AuthorizeStakeGrants(ctx context.Context, in *MsgAuthorizeStakeGrants, opts ...grpc.CallOption) (*MsgAuthorizeStakeGrantsResponse, error) + ActivateStakeGrant(ctx context.Context, in *MsgActivateStakeGrant, opts ...grpc.CallOption) (*MsgActivateStakeGrantResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { + out := new(MsgDepositResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/Deposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) { + out := new(MsgWithdrawResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/Withdraw", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InstantSpotMarketLaunch(ctx context.Context, in *MsgInstantSpotMarketLaunch, opts ...grpc.CallOption) (*MsgInstantSpotMarketLaunchResponse, error) { + out := new(MsgInstantSpotMarketLaunchResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/InstantSpotMarketLaunch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InstantPerpetualMarketLaunch(ctx context.Context, in *MsgInstantPerpetualMarketLaunch, opts ...grpc.CallOption) (*MsgInstantPerpetualMarketLaunchResponse, error) { + out := new(MsgInstantPerpetualMarketLaunchResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/InstantPerpetualMarketLaunch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InstantExpiryFuturesMarketLaunch(ctx context.Context, in *MsgInstantExpiryFuturesMarketLaunch, opts ...grpc.CallOption) (*MsgInstantExpiryFuturesMarketLaunchResponse, error) { + out := new(MsgInstantExpiryFuturesMarketLaunchResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/InstantExpiryFuturesMarketLaunch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateSpotLimitOrder(ctx context.Context, in *MsgCreateSpotLimitOrder, opts ...grpc.CallOption) (*MsgCreateSpotLimitOrderResponse, error) { + out := new(MsgCreateSpotLimitOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateSpotLimitOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchCreateSpotLimitOrders(ctx context.Context, in *MsgBatchCreateSpotLimitOrders, opts ...grpc.CallOption) (*MsgBatchCreateSpotLimitOrdersResponse, error) { + out := new(MsgBatchCreateSpotLimitOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchCreateSpotLimitOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateSpotMarketOrder(ctx context.Context, in *MsgCreateSpotMarketOrder, opts ...grpc.CallOption) (*MsgCreateSpotMarketOrderResponse, error) { + out := new(MsgCreateSpotMarketOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateSpotMarketOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelSpotOrder(ctx context.Context, in *MsgCancelSpotOrder, opts ...grpc.CallOption) (*MsgCancelSpotOrderResponse, error) { + out := new(MsgCancelSpotOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CancelSpotOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchCancelSpotOrders(ctx context.Context, in *MsgBatchCancelSpotOrders, opts ...grpc.CallOption) (*MsgBatchCancelSpotOrdersResponse, error) { + out := new(MsgBatchCancelSpotOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchCancelSpotOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchUpdateOrders(ctx context.Context, in *MsgBatchUpdateOrders, opts ...grpc.CallOption) (*MsgBatchUpdateOrdersResponse, error) { + out := new(MsgBatchUpdateOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchUpdateOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PrivilegedExecuteContract(ctx context.Context, in *MsgPrivilegedExecuteContract, opts ...grpc.CallOption) (*MsgPrivilegedExecuteContractResponse, error) { + out := new(MsgPrivilegedExecuteContractResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/PrivilegedExecuteContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateDerivativeLimitOrder(ctx context.Context, in *MsgCreateDerivativeLimitOrder, opts ...grpc.CallOption) (*MsgCreateDerivativeLimitOrderResponse, error) { + out := new(MsgCreateDerivativeLimitOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateDerivativeLimitOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchCreateDerivativeLimitOrders(ctx context.Context, in *MsgBatchCreateDerivativeLimitOrders, opts ...grpc.CallOption) (*MsgBatchCreateDerivativeLimitOrdersResponse, error) { + out := new(MsgBatchCreateDerivativeLimitOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchCreateDerivativeLimitOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateDerivativeMarketOrder(ctx context.Context, in *MsgCreateDerivativeMarketOrder, opts ...grpc.CallOption) (*MsgCreateDerivativeMarketOrderResponse, error) { + out := new(MsgCreateDerivativeMarketOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateDerivativeMarketOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelDerivativeOrder(ctx context.Context, in *MsgCancelDerivativeOrder, opts ...grpc.CallOption) (*MsgCancelDerivativeOrderResponse, error) { + out := new(MsgCancelDerivativeOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CancelDerivativeOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchCancelDerivativeOrders(ctx context.Context, in *MsgBatchCancelDerivativeOrders, opts ...grpc.CallOption) (*MsgBatchCancelDerivativeOrdersResponse, error) { + out := new(MsgBatchCancelDerivativeOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchCancelDerivativeOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InstantBinaryOptionsMarketLaunch(ctx context.Context, in *MsgInstantBinaryOptionsMarketLaunch, opts ...grpc.CallOption) (*MsgInstantBinaryOptionsMarketLaunchResponse, error) { + out := new(MsgInstantBinaryOptionsMarketLaunchResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/InstantBinaryOptionsMarketLaunch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateBinaryOptionsLimitOrder(ctx context.Context, in *MsgCreateBinaryOptionsLimitOrder, opts ...grpc.CallOption) (*MsgCreateBinaryOptionsLimitOrderResponse, error) { + out := new(MsgCreateBinaryOptionsLimitOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateBinaryOptionsLimitOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateBinaryOptionsMarketOrder(ctx context.Context, in *MsgCreateBinaryOptionsMarketOrder, opts ...grpc.CallOption) (*MsgCreateBinaryOptionsMarketOrderResponse, error) { + out := new(MsgCreateBinaryOptionsMarketOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CreateBinaryOptionsMarketOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelBinaryOptionsOrder(ctx context.Context, in *MsgCancelBinaryOptionsOrder, opts ...grpc.CallOption) (*MsgCancelBinaryOptionsOrderResponse, error) { + out := new(MsgCancelBinaryOptionsOrderResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/CancelBinaryOptionsOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BatchCancelBinaryOptionsOrders(ctx context.Context, in *MsgBatchCancelBinaryOptionsOrders, opts ...grpc.CallOption) (*MsgBatchCancelBinaryOptionsOrdersResponse, error) { + out := new(MsgBatchCancelBinaryOptionsOrdersResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/BatchCancelBinaryOptionsOrders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubaccountTransfer(ctx context.Context, in *MsgSubaccountTransfer, opts ...grpc.CallOption) (*MsgSubaccountTransferResponse, error) { + out := new(MsgSubaccountTransferResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/SubaccountTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExternalTransfer(ctx context.Context, in *MsgExternalTransfer, opts ...grpc.CallOption) (*MsgExternalTransferResponse, error) { + out := new(MsgExternalTransferResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/ExternalTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LiquidatePosition(ctx context.Context, in *MsgLiquidatePosition, opts ...grpc.CallOption) (*MsgLiquidatePositionResponse, error) { + out := new(MsgLiquidatePositionResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/LiquidatePosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EmergencySettleMarket(ctx context.Context, in *MsgEmergencySettleMarket, opts ...grpc.CallOption) (*MsgEmergencySettleMarketResponse, error) { + out := new(MsgEmergencySettleMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/EmergencySettleMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) IncreasePositionMargin(ctx context.Context, in *MsgIncreasePositionMargin, opts ...grpc.CallOption) (*MsgIncreasePositionMarginResponse, error) { + out := new(MsgIncreasePositionMarginResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/IncreasePositionMargin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DecreasePositionMargin(ctx context.Context, in *MsgDecreasePositionMargin, opts ...grpc.CallOption) (*MsgDecreasePositionMarginResponse, error) { + out := new(MsgDecreasePositionMarginResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/DecreasePositionMargin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RewardsOptOut(ctx context.Context, in *MsgRewardsOptOut, opts ...grpc.CallOption) (*MsgRewardsOptOutResponse, error) { + out := new(MsgRewardsOptOutResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/RewardsOptOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AdminUpdateBinaryOptionsMarket(ctx context.Context, in *MsgAdminUpdateBinaryOptionsMarket, opts ...grpc.CallOption) (*MsgAdminUpdateBinaryOptionsMarketResponse, error) { + out := new(MsgAdminUpdateBinaryOptionsMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/AdminUpdateBinaryOptionsMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateSpotMarket(ctx context.Context, in *MsgUpdateSpotMarket, opts ...grpc.CallOption) (*MsgUpdateSpotMarketResponse, error) { + out := new(MsgUpdateSpotMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/UpdateSpotMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateDerivativeMarket(ctx context.Context, in *MsgUpdateDerivativeMarket, opts ...grpc.CallOption) (*MsgUpdateDerivativeMarketResponse, error) { + out := new(MsgUpdateDerivativeMarketResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/UpdateDerivativeMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AuthorizeStakeGrants(ctx context.Context, in *MsgAuthorizeStakeGrants, opts ...grpc.CallOption) (*MsgAuthorizeStakeGrantsResponse, error) { + out := new(MsgAuthorizeStakeGrantsResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/AuthorizeStakeGrants", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ActivateStakeGrant(ctx context.Context, in *MsgActivateStakeGrant, opts ...grpc.CallOption) (*MsgActivateStakeGrantResponse, error) { + out := new(MsgActivateStakeGrantResponse) + err := c.cc.Invoke(ctx, "/injective.exchange.v2.Msg/ActivateStakeGrant", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Deposit defines a method for transferring coins from the sender's bank + // balance into the subaccount's exchange deposits + Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) + // Withdraw defines a method for withdrawing coins from a subaccount's + // deposits to the user's bank balance + Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) + // InstantSpotMarketLaunch defines method for creating a spot market by paying + // listing fee without governance + InstantSpotMarketLaunch(context.Context, *MsgInstantSpotMarketLaunch) (*MsgInstantSpotMarketLaunchResponse, error) + // InstantPerpetualMarketLaunch defines a method for creating a new perpetual + // futures market by paying listing fee without governance + InstantPerpetualMarketLaunch(context.Context, *MsgInstantPerpetualMarketLaunch) (*MsgInstantPerpetualMarketLaunchResponse, error) + // InstantExpiryFuturesMarketLaunch defines a method for creating a new expiry + // futures market by paying listing fee without governance + InstantExpiryFuturesMarketLaunch(context.Context, *MsgInstantExpiryFuturesMarketLaunch) (*MsgInstantExpiryFuturesMarketLaunchResponse, error) + // CreateSpotLimitOrder defines a method for creating a new spot limit order. + CreateSpotLimitOrder(context.Context, *MsgCreateSpotLimitOrder) (*MsgCreateSpotLimitOrderResponse, error) + // BatchCreateSpotLimitOrder defines a method for creating a new batch of spot + // limit orders. + BatchCreateSpotLimitOrders(context.Context, *MsgBatchCreateSpotLimitOrders) (*MsgBatchCreateSpotLimitOrdersResponse, error) + // CreateSpotMarketOrder defines a method for creating a new spot market + // order. + CreateSpotMarketOrder(context.Context, *MsgCreateSpotMarketOrder) (*MsgCreateSpotMarketOrderResponse, error) + // MsgCancelSpotOrder defines a method for cancelling a spot order. + CancelSpotOrder(context.Context, *MsgCancelSpotOrder) (*MsgCancelSpotOrderResponse, error) + // BatchCancelSpotOrders defines a method for cancelling a batch of spot + // orders in a given market. + BatchCancelSpotOrders(context.Context, *MsgBatchCancelSpotOrders) (*MsgBatchCancelSpotOrdersResponse, error) + // BatchUpdateOrders defines a method for updating a batch of orders. + BatchUpdateOrders(context.Context, *MsgBatchUpdateOrders) (*MsgBatchUpdateOrdersResponse, error) + // PrivilegedExecuteContract defines a method for executing a Cosmwasm + // contract from the exchange module with privileged capabilities. + PrivilegedExecuteContract(context.Context, *MsgPrivilegedExecuteContract) (*MsgPrivilegedExecuteContractResponse, error) + // CreateDerivativeLimitOrder defines a method for creating a new derivative + // limit order. + CreateDerivativeLimitOrder(context.Context, *MsgCreateDerivativeLimitOrder) (*MsgCreateDerivativeLimitOrderResponse, error) + // BatchCreateDerivativeLimitOrders defines a method for creating a new batch + // of derivative limit orders. + BatchCreateDerivativeLimitOrders(context.Context, *MsgBatchCreateDerivativeLimitOrders) (*MsgBatchCreateDerivativeLimitOrdersResponse, error) + // MsgCreateDerivativeLimitOrder defines a method for creating a new + // derivative market order. + CreateDerivativeMarketOrder(context.Context, *MsgCreateDerivativeMarketOrder) (*MsgCreateDerivativeMarketOrderResponse, error) + // MsgCancelDerivativeOrder defines a method for cancelling a derivative + // order. + CancelDerivativeOrder(context.Context, *MsgCancelDerivativeOrder) (*MsgCancelDerivativeOrderResponse, error) + // MsgBatchCancelDerivativeOrders defines a method for cancelling a batch of + // derivative limit orders. + BatchCancelDerivativeOrders(context.Context, *MsgBatchCancelDerivativeOrders) (*MsgBatchCancelDerivativeOrdersResponse, error) + // InstantBinaryOptionsMarketLaunch defines method for creating a binary + // options market by paying listing fee without governance + InstantBinaryOptionsMarketLaunch(context.Context, *MsgInstantBinaryOptionsMarketLaunch) (*MsgInstantBinaryOptionsMarketLaunchResponse, error) + // CreateBinaryOptionsLimitOrder defines a method for creating a new binary + // options limit order. + CreateBinaryOptionsLimitOrder(context.Context, *MsgCreateBinaryOptionsLimitOrder) (*MsgCreateBinaryOptionsLimitOrderResponse, error) + // CreateBinaryOptionsMarketOrder defines a method for creating a new binary + // options market order. + CreateBinaryOptionsMarketOrder(context.Context, *MsgCreateBinaryOptionsMarketOrder) (*MsgCreateBinaryOptionsMarketOrderResponse, error) + // MsgCancelBinaryOptionsOrder defines a method for cancelling a binary + // options order. + CancelBinaryOptionsOrder(context.Context, *MsgCancelBinaryOptionsOrder) (*MsgCancelBinaryOptionsOrderResponse, error) + // BatchCancelBinaryOptionsOrders defines a method for cancelling a batch of + // binary options limit orders. + BatchCancelBinaryOptionsOrders(context.Context, *MsgBatchCancelBinaryOptionsOrders) (*MsgBatchCancelBinaryOptionsOrdersResponse, error) + // SubaccountTransfer defines a method for transfer between subaccounts + SubaccountTransfer(context.Context, *MsgSubaccountTransfer) (*MsgSubaccountTransferResponse, error) + // ExternalTransfer defines a method for transfer between external accounts + ExternalTransfer(context.Context, *MsgExternalTransfer) (*MsgExternalTransferResponse, error) + // LiquidatePosition defines a method for liquidating a position + LiquidatePosition(context.Context, *MsgLiquidatePosition) (*MsgLiquidatePositionResponse, error) + // EmergencySettleMarket defines a method for emergency settling a market + EmergencySettleMarket(context.Context, *MsgEmergencySettleMarket) (*MsgEmergencySettleMarketResponse, error) + // IncreasePositionMargin defines a method for increasing margin of a position + IncreasePositionMargin(context.Context, *MsgIncreasePositionMargin) (*MsgIncreasePositionMarginResponse, error) + // DecreasePositionMargin defines a method for decreasing margin of a position + DecreasePositionMargin(context.Context, *MsgDecreasePositionMargin) (*MsgDecreasePositionMarginResponse, error) + // RewardsOptOut defines a method for opting out of rewards + RewardsOptOut(context.Context, *MsgRewardsOptOut) (*MsgRewardsOptOutResponse, error) + // AdminUpdateBinaryOptionsMarket defines method for updating a binary options + // market by admin + AdminUpdateBinaryOptionsMarket(context.Context, *MsgAdminUpdateBinaryOptionsMarket) (*MsgAdminUpdateBinaryOptionsMarketResponse, error) + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // UpdateSpotMarket modifies certain spot market fields (admin only) + UpdateSpotMarket(context.Context, *MsgUpdateSpotMarket) (*MsgUpdateSpotMarketResponse, error) + // UpdateDerivativeMarket modifies certain derivative market fields (admin + // only) + UpdateDerivativeMarket(context.Context, *MsgUpdateDerivativeMarket) (*MsgUpdateDerivativeMarketResponse, error) + AuthorizeStakeGrants(context.Context, *MsgAuthorizeStakeGrants) (*MsgAuthorizeStakeGrantsResponse, error) + ActivateStakeGrant(context.Context, *MsgActivateStakeGrant) (*MsgActivateStakeGrantResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} +func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +} +func (*UnimplementedMsgServer) InstantSpotMarketLaunch(ctx context.Context, req *MsgInstantSpotMarketLaunch) (*MsgInstantSpotMarketLaunchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstantSpotMarketLaunch not implemented") +} +func (*UnimplementedMsgServer) InstantPerpetualMarketLaunch(ctx context.Context, req *MsgInstantPerpetualMarketLaunch) (*MsgInstantPerpetualMarketLaunchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstantPerpetualMarketLaunch not implemented") +} +func (*UnimplementedMsgServer) InstantExpiryFuturesMarketLaunch(ctx context.Context, req *MsgInstantExpiryFuturesMarketLaunch) (*MsgInstantExpiryFuturesMarketLaunchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstantExpiryFuturesMarketLaunch not implemented") +} +func (*UnimplementedMsgServer) CreateSpotLimitOrder(ctx context.Context, req *MsgCreateSpotLimitOrder) (*MsgCreateSpotLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSpotLimitOrder not implemented") +} +func (*UnimplementedMsgServer) BatchCreateSpotLimitOrders(ctx context.Context, req *MsgBatchCreateSpotLimitOrders) (*MsgBatchCreateSpotLimitOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateSpotLimitOrders not implemented") +} +func (*UnimplementedMsgServer) CreateSpotMarketOrder(ctx context.Context, req *MsgCreateSpotMarketOrder) (*MsgCreateSpotMarketOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSpotMarketOrder not implemented") +} +func (*UnimplementedMsgServer) CancelSpotOrder(ctx context.Context, req *MsgCancelSpotOrder) (*MsgCancelSpotOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelSpotOrder not implemented") +} +func (*UnimplementedMsgServer) BatchCancelSpotOrders(ctx context.Context, req *MsgBatchCancelSpotOrders) (*MsgBatchCancelSpotOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCancelSpotOrders not implemented") +} +func (*UnimplementedMsgServer) BatchUpdateOrders(ctx context.Context, req *MsgBatchUpdateOrders) (*MsgBatchUpdateOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateOrders not implemented") +} +func (*UnimplementedMsgServer) PrivilegedExecuteContract(ctx context.Context, req *MsgPrivilegedExecuteContract) (*MsgPrivilegedExecuteContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PrivilegedExecuteContract not implemented") +} +func (*UnimplementedMsgServer) CreateDerivativeLimitOrder(ctx context.Context, req *MsgCreateDerivativeLimitOrder) (*MsgCreateDerivativeLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDerivativeLimitOrder not implemented") +} +func (*UnimplementedMsgServer) BatchCreateDerivativeLimitOrders(ctx context.Context, req *MsgBatchCreateDerivativeLimitOrders) (*MsgBatchCreateDerivativeLimitOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateDerivativeLimitOrders not implemented") +} +func (*UnimplementedMsgServer) CreateDerivativeMarketOrder(ctx context.Context, req *MsgCreateDerivativeMarketOrder) (*MsgCreateDerivativeMarketOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDerivativeMarketOrder not implemented") +} +func (*UnimplementedMsgServer) CancelDerivativeOrder(ctx context.Context, req *MsgCancelDerivativeOrder) (*MsgCancelDerivativeOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelDerivativeOrder not implemented") +} +func (*UnimplementedMsgServer) BatchCancelDerivativeOrders(ctx context.Context, req *MsgBatchCancelDerivativeOrders) (*MsgBatchCancelDerivativeOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCancelDerivativeOrders not implemented") +} +func (*UnimplementedMsgServer) InstantBinaryOptionsMarketLaunch(ctx context.Context, req *MsgInstantBinaryOptionsMarketLaunch) (*MsgInstantBinaryOptionsMarketLaunchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstantBinaryOptionsMarketLaunch not implemented") +} +func (*UnimplementedMsgServer) CreateBinaryOptionsLimitOrder(ctx context.Context, req *MsgCreateBinaryOptionsLimitOrder) (*MsgCreateBinaryOptionsLimitOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBinaryOptionsLimitOrder not implemented") +} +func (*UnimplementedMsgServer) CreateBinaryOptionsMarketOrder(ctx context.Context, req *MsgCreateBinaryOptionsMarketOrder) (*MsgCreateBinaryOptionsMarketOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBinaryOptionsMarketOrder not implemented") +} +func (*UnimplementedMsgServer) CancelBinaryOptionsOrder(ctx context.Context, req *MsgCancelBinaryOptionsOrder) (*MsgCancelBinaryOptionsOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelBinaryOptionsOrder not implemented") +} +func (*UnimplementedMsgServer) BatchCancelBinaryOptionsOrders(ctx context.Context, req *MsgBatchCancelBinaryOptionsOrders) (*MsgBatchCancelBinaryOptionsOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCancelBinaryOptionsOrders not implemented") +} +func (*UnimplementedMsgServer) SubaccountTransfer(ctx context.Context, req *MsgSubaccountTransfer) (*MsgSubaccountTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubaccountTransfer not implemented") +} +func (*UnimplementedMsgServer) ExternalTransfer(ctx context.Context, req *MsgExternalTransfer) (*MsgExternalTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExternalTransfer not implemented") +} +func (*UnimplementedMsgServer) LiquidatePosition(ctx context.Context, req *MsgLiquidatePosition) (*MsgLiquidatePositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LiquidatePosition not implemented") +} +func (*UnimplementedMsgServer) EmergencySettleMarket(ctx context.Context, req *MsgEmergencySettleMarket) (*MsgEmergencySettleMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EmergencySettleMarket not implemented") +} +func (*UnimplementedMsgServer) IncreasePositionMargin(ctx context.Context, req *MsgIncreasePositionMargin) (*MsgIncreasePositionMarginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IncreasePositionMargin not implemented") +} +func (*UnimplementedMsgServer) DecreasePositionMargin(ctx context.Context, req *MsgDecreasePositionMargin) (*MsgDecreasePositionMarginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DecreasePositionMargin not implemented") +} +func (*UnimplementedMsgServer) RewardsOptOut(ctx context.Context, req *MsgRewardsOptOut) (*MsgRewardsOptOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardsOptOut not implemented") +} +func (*UnimplementedMsgServer) AdminUpdateBinaryOptionsMarket(ctx context.Context, req *MsgAdminUpdateBinaryOptionsMarket) (*MsgAdminUpdateBinaryOptionsMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AdminUpdateBinaryOptionsMarket not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UpdateSpotMarket(ctx context.Context, req *MsgUpdateSpotMarket) (*MsgUpdateSpotMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSpotMarket not implemented") +} +func (*UnimplementedMsgServer) UpdateDerivativeMarket(ctx context.Context, req *MsgUpdateDerivativeMarket) (*MsgUpdateDerivativeMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDerivativeMarket not implemented") +} +func (*UnimplementedMsgServer) AuthorizeStakeGrants(ctx context.Context, req *MsgAuthorizeStakeGrants) (*MsgAuthorizeStakeGrantsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizeStakeGrants not implemented") +} +func (*UnimplementedMsgServer) ActivateStakeGrant(ctx context.Context, req *MsgActivateStakeGrant) (*MsgActivateStakeGrantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActivateStakeGrant not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeposit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/Deposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdraw) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Withdraw(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/Withdraw", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Withdraw(ctx, req.(*MsgWithdraw)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InstantSpotMarketLaunch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInstantSpotMarketLaunch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InstantSpotMarketLaunch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/InstantSpotMarketLaunch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InstantSpotMarketLaunch(ctx, req.(*MsgInstantSpotMarketLaunch)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InstantPerpetualMarketLaunch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInstantPerpetualMarketLaunch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InstantPerpetualMarketLaunch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/InstantPerpetualMarketLaunch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InstantPerpetualMarketLaunch(ctx, req.(*MsgInstantPerpetualMarketLaunch)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InstantExpiryFuturesMarketLaunch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInstantExpiryFuturesMarketLaunch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InstantExpiryFuturesMarketLaunch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/InstantExpiryFuturesMarketLaunch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InstantExpiryFuturesMarketLaunch(ctx, req.(*MsgInstantExpiryFuturesMarketLaunch)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateSpotLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateSpotLimitOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateSpotLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateSpotLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateSpotLimitOrder(ctx, req.(*MsgCreateSpotLimitOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchCreateSpotLimitOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchCreateSpotLimitOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchCreateSpotLimitOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchCreateSpotLimitOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchCreateSpotLimitOrders(ctx, req.(*MsgBatchCreateSpotLimitOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateSpotMarketOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateSpotMarketOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateSpotMarketOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateSpotMarketOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateSpotMarketOrder(ctx, req.(*MsgCreateSpotMarketOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelSpotOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelSpotOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelSpotOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CancelSpotOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelSpotOrder(ctx, req.(*MsgCancelSpotOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchCancelSpotOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchCancelSpotOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchCancelSpotOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchCancelSpotOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchCancelSpotOrders(ctx, req.(*MsgBatchCancelSpotOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchUpdateOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchUpdateOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchUpdateOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchUpdateOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchUpdateOrders(ctx, req.(*MsgBatchUpdateOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PrivilegedExecuteContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPrivilegedExecuteContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PrivilegedExecuteContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/PrivilegedExecuteContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PrivilegedExecuteContract(ctx, req.(*MsgPrivilegedExecuteContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateDerivativeLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDerivativeLimitOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDerivativeLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateDerivativeLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDerivativeLimitOrder(ctx, req.(*MsgCreateDerivativeLimitOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchCreateDerivativeLimitOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchCreateDerivativeLimitOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchCreateDerivativeLimitOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchCreateDerivativeLimitOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchCreateDerivativeLimitOrders(ctx, req.(*MsgBatchCreateDerivativeLimitOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateDerivativeMarketOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDerivativeMarketOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDerivativeMarketOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateDerivativeMarketOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDerivativeMarketOrder(ctx, req.(*MsgCreateDerivativeMarketOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelDerivativeOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelDerivativeOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelDerivativeOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CancelDerivativeOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelDerivativeOrder(ctx, req.(*MsgCancelDerivativeOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchCancelDerivativeOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchCancelDerivativeOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchCancelDerivativeOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchCancelDerivativeOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchCancelDerivativeOrders(ctx, req.(*MsgBatchCancelDerivativeOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InstantBinaryOptionsMarketLaunch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInstantBinaryOptionsMarketLaunch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InstantBinaryOptionsMarketLaunch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/InstantBinaryOptionsMarketLaunch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InstantBinaryOptionsMarketLaunch(ctx, req.(*MsgInstantBinaryOptionsMarketLaunch)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateBinaryOptionsLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBinaryOptionsLimitOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBinaryOptionsLimitOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateBinaryOptionsLimitOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBinaryOptionsLimitOrder(ctx, req.(*MsgCreateBinaryOptionsLimitOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateBinaryOptionsMarketOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBinaryOptionsMarketOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBinaryOptionsMarketOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CreateBinaryOptionsMarketOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBinaryOptionsMarketOrder(ctx, req.(*MsgCreateBinaryOptionsMarketOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelBinaryOptionsOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelBinaryOptionsOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelBinaryOptionsOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/CancelBinaryOptionsOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelBinaryOptionsOrder(ctx, req.(*MsgCancelBinaryOptionsOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BatchCancelBinaryOptionsOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBatchCancelBinaryOptionsOrders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BatchCancelBinaryOptionsOrders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/BatchCancelBinaryOptionsOrders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BatchCancelBinaryOptionsOrders(ctx, req.(*MsgBatchCancelBinaryOptionsOrders)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubaccountTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubaccountTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubaccountTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/SubaccountTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubaccountTransfer(ctx, req.(*MsgSubaccountTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExternalTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExternalTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExternalTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/ExternalTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExternalTransfer(ctx, req.(*MsgExternalTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LiquidatePosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLiquidatePosition) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LiquidatePosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/LiquidatePosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LiquidatePosition(ctx, req.(*MsgLiquidatePosition)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EmergencySettleMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEmergencySettleMarket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EmergencySettleMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/EmergencySettleMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EmergencySettleMarket(ctx, req.(*MsgEmergencySettleMarket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_IncreasePositionMargin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgIncreasePositionMargin) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).IncreasePositionMargin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/IncreasePositionMargin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).IncreasePositionMargin(ctx, req.(*MsgIncreasePositionMargin)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DecreasePositionMargin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDecreasePositionMargin) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DecreasePositionMargin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/DecreasePositionMargin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DecreasePositionMargin(ctx, req.(*MsgDecreasePositionMargin)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RewardsOptOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRewardsOptOut) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RewardsOptOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/RewardsOptOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RewardsOptOut(ctx, req.(*MsgRewardsOptOut)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AdminUpdateBinaryOptionsMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAdminUpdateBinaryOptionsMarket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AdminUpdateBinaryOptionsMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/AdminUpdateBinaryOptionsMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AdminUpdateBinaryOptionsMarket(ctx, req.(*MsgAdminUpdateBinaryOptionsMarket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateSpotMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateSpotMarket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateSpotMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/UpdateSpotMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateSpotMarket(ctx, req.(*MsgUpdateSpotMarket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateDerivativeMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDerivativeMarket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDerivativeMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/UpdateDerivativeMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDerivativeMarket(ctx, req.(*MsgUpdateDerivativeMarket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AuthorizeStakeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthorizeStakeGrants) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AuthorizeStakeGrants(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/AuthorizeStakeGrants", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AuthorizeStakeGrants(ctx, req.(*MsgAuthorizeStakeGrants)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ActivateStakeGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivateStakeGrant) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ActivateStakeGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.exchange.v2.Msg/ActivateStakeGrant", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ActivateStakeGrant(ctx, req.(*MsgActivateStakeGrant)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "injective.exchange.v2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Deposit", + Handler: _Msg_Deposit_Handler, + }, + { + MethodName: "Withdraw", + Handler: _Msg_Withdraw_Handler, + }, + { + MethodName: "InstantSpotMarketLaunch", + Handler: _Msg_InstantSpotMarketLaunch_Handler, + }, + { + MethodName: "InstantPerpetualMarketLaunch", + Handler: _Msg_InstantPerpetualMarketLaunch_Handler, + }, + { + MethodName: "InstantExpiryFuturesMarketLaunch", + Handler: _Msg_InstantExpiryFuturesMarketLaunch_Handler, + }, + { + MethodName: "CreateSpotLimitOrder", + Handler: _Msg_CreateSpotLimitOrder_Handler, + }, + { + MethodName: "BatchCreateSpotLimitOrders", + Handler: _Msg_BatchCreateSpotLimitOrders_Handler, + }, + { + MethodName: "CreateSpotMarketOrder", + Handler: _Msg_CreateSpotMarketOrder_Handler, + }, + { + MethodName: "CancelSpotOrder", + Handler: _Msg_CancelSpotOrder_Handler, + }, + { + MethodName: "BatchCancelSpotOrders", + Handler: _Msg_BatchCancelSpotOrders_Handler, + }, + { + MethodName: "BatchUpdateOrders", + Handler: _Msg_BatchUpdateOrders_Handler, + }, + { + MethodName: "PrivilegedExecuteContract", + Handler: _Msg_PrivilegedExecuteContract_Handler, + }, + { + MethodName: "CreateDerivativeLimitOrder", + Handler: _Msg_CreateDerivativeLimitOrder_Handler, + }, + { + MethodName: "BatchCreateDerivativeLimitOrders", + Handler: _Msg_BatchCreateDerivativeLimitOrders_Handler, + }, + { + MethodName: "CreateDerivativeMarketOrder", + Handler: _Msg_CreateDerivativeMarketOrder_Handler, + }, + { + MethodName: "CancelDerivativeOrder", + Handler: _Msg_CancelDerivativeOrder_Handler, + }, + { + MethodName: "BatchCancelDerivativeOrders", + Handler: _Msg_BatchCancelDerivativeOrders_Handler, + }, + { + MethodName: "InstantBinaryOptionsMarketLaunch", + Handler: _Msg_InstantBinaryOptionsMarketLaunch_Handler, + }, + { + MethodName: "CreateBinaryOptionsLimitOrder", + Handler: _Msg_CreateBinaryOptionsLimitOrder_Handler, + }, + { + MethodName: "CreateBinaryOptionsMarketOrder", + Handler: _Msg_CreateBinaryOptionsMarketOrder_Handler, + }, + { + MethodName: "CancelBinaryOptionsOrder", + Handler: _Msg_CancelBinaryOptionsOrder_Handler, + }, + { + MethodName: "BatchCancelBinaryOptionsOrders", + Handler: _Msg_BatchCancelBinaryOptionsOrders_Handler, + }, + { + MethodName: "SubaccountTransfer", + Handler: _Msg_SubaccountTransfer_Handler, + }, + { + MethodName: "ExternalTransfer", + Handler: _Msg_ExternalTransfer_Handler, + }, + { + MethodName: "LiquidatePosition", + Handler: _Msg_LiquidatePosition_Handler, + }, + { + MethodName: "EmergencySettleMarket", + Handler: _Msg_EmergencySettleMarket_Handler, + }, + { + MethodName: "IncreasePositionMargin", + Handler: _Msg_IncreasePositionMargin_Handler, + }, + { + MethodName: "DecreasePositionMargin", + Handler: _Msg_DecreasePositionMargin_Handler, + }, + { + MethodName: "RewardsOptOut", + Handler: _Msg_RewardsOptOut_Handler, + }, + { + MethodName: "AdminUpdateBinaryOptionsMarket", + Handler: _Msg_AdminUpdateBinaryOptionsMarket_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateSpotMarket", + Handler: _Msg_UpdateSpotMarket_Handler, + }, + { + MethodName: "UpdateDerivativeMarket", + Handler: _Msg_UpdateDerivativeMarket_Handler, + }, + { + MethodName: "AuthorizeStakeGrants", + Handler: _Msg_AuthorizeStakeGrants_Handler, + }, + { + MethodName: "ActivateStakeGrant", + Handler: _Msg_ActivateStakeGrant_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "injective/exchange/v2/tx.proto", +} + +func (m *MsgUpdateSpotMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateSpotMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateSpotMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NewMinNotional.Size() + i -= size + if _, err := m.NewMinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.NewMinQuantityTickSize.Size() + i -= size + if _, err := m.NewMinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.NewMinPriceTickSize.Size() + i -= size + if _, err := m.NewMinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.NewTicker) > 0 { + i -= len(m.NewTicker) + copy(dAtA[i:], m.NewTicker) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewTicker))) + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateSpotMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateSpotMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateSpotMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDerivativeMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateDerivativeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDerivativeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NewMaintenanceMarginRatio.Size() + i -= size + if _, err := m.NewMaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.NewInitialMarginRatio.Size() + i -= size + if _, err := m.NewInitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.NewMinNotional.Size() + i -= size + if _, err := m.NewMinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.NewMinQuantityTickSize.Size() + i -= size + if _, err := m.NewMinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.NewMinPriceTickSize.Size() + i -= size + if _, err := m.NewMinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.NewTicker) > 0 { + i -= len(m.NewTicker) + copy(dAtA[i:], m.NewTicker) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewTicker))) + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDerivativeMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateDerivativeMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDerivativeMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateSpotLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateSpotLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateSpotLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateSpotLimitOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateSpotLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateSpotLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCreateSpotLimitOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCreateSpotLimitOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCreateSpotLimitOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCreateSpotLimitOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCreateSpotLimitOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCreateSpotLimitOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FailedOrdersCids) > 0 { + for iNdEx := len(m.FailedOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FailedOrdersCids[iNdEx]) + copy(dAtA[i:], m.FailedOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FailedOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.CreatedOrdersCids) > 0 { + for iNdEx := len(m.CreatedOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CreatedOrdersCids[iNdEx]) + copy(dAtA[i:], m.CreatedOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.CreatedOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.OrderHashes) > 0 { + for iNdEx := len(m.OrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OrderHashes[iNdEx]) + copy(dAtA[i:], m.OrderHashes[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHashes[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgInstantSpotMarketLaunch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantSpotMarketLaunch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantSpotMarketLaunch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QuoteDecimals != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.QuoteDecimals)) + i-- + dAtA[i] = 0x48 + } + if m.BaseDecimals != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BaseDecimals)) + i-- + dAtA[i] = 0x40 + } + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInstantSpotMarketLaunchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantSpotMarketLaunchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantSpotMarketLaunchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInstantPerpetualMarketLaunch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantPerpetualMarketLaunch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantPerpetualMarketLaunch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if m.OracleType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x38 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x30 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x2a + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0x22 + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInstantPerpetualMarketLaunchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantPerpetualMarketLaunchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantPerpetualMarketLaunchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInstantBinaryOptionsMarketLaunch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantBinaryOptionsMarketLaunch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantBinaryOptionsMarketLaunch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x62 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x5a + } + if m.SettlementTimestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.SettlementTimestamp)) + i-- + dAtA[i] = 0x50 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x48 + } + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if m.OracleScaleFactor != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x30 + } + if m.OracleType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x28 + } + if len(m.OracleProvider) > 0 { + i -= len(m.OracleProvider) + copy(dAtA[i:], m.OracleProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleProvider))) + i-- + dAtA[i] = 0x22 + } + if len(m.OracleSymbol) > 0 { + i -= len(m.OracleSymbol) + copy(dAtA[i:], m.OracleSymbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleSymbol))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInstantExpiryFuturesMarketLaunch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantExpiryFuturesMarketLaunch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantExpiryFuturesMarketLaunch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.MinNotional.Size() + i -= size + if _, err := m.MinNotional.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + { + size := m.MinQuantityTickSize.Size() + i -= size + if _, err := m.MinQuantityTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size := m.MinPriceTickSize.Size() + i -= size + if _, err := m.MinPriceTickSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.MaintenanceMarginRatio.Size() + i -= size + if _, err := m.MaintenanceMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.InitialMarginRatio.Size() + i -= size + if _, err := m.InitialMarginRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.TakerFeeRate.Size() + i -= size + if _, err := m.TakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.MakerFeeRate.Size() + i -= size + if _, err := m.MakerFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if m.Expiry != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Expiry)) + i-- + dAtA[i] = 0x40 + } + if m.OracleScaleFactor != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleScaleFactor)) + i-- + dAtA[i] = 0x38 + } + if m.OracleType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OracleType)) + i-- + dAtA[i] = 0x30 + } + if len(m.OracleQuote) > 0 { + i -= len(m.OracleQuote) + copy(dAtA[i:], m.OracleQuote) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleQuote))) + i-- + dAtA[i] = 0x2a + } + if len(m.OracleBase) > 0 { + i -= len(m.OracleBase) + copy(dAtA[i:], m.OracleBase) + i = encodeVarintTx(dAtA, i, uint64(len(m.OracleBase))) + i-- + dAtA[i] = 0x22 + } + if len(m.QuoteDenom) > 0 { + i -= len(m.QuoteDenom) + copy(dAtA[i:], m.QuoteDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.QuoteDenom))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ticker) > 0 { + i -= len(m.Ticker) + copy(dAtA[i:], m.Ticker) + i = encodeVarintTx(dAtA, i, uint64(len(m.Ticker))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateSpotMarketOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateSpotMarketOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateSpotMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateSpotMarketOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateSpotMarketOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateSpotMarketOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if m.Results != nil { + { + size, err := m.Results.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotMarketOrderResults) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotMarketOrderResults) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotMarketOrderResults) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateDerivativeLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDerivativeLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDerivativeLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateDerivativeLimitOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDerivativeLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDerivativeLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateBinaryOptionsLimitOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateBinaryOptionsLimitOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBinaryOptionsLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateBinaryOptionsLimitOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateBinaryOptionsLimitOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBinaryOptionsLimitOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCreateDerivativeLimitOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCreateDerivativeLimitOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCreateDerivativeLimitOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FailedOrdersCids) > 0 { + for iNdEx := len(m.FailedOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FailedOrdersCids[iNdEx]) + copy(dAtA[i:], m.FailedOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FailedOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.CreatedOrdersCids) > 0 { + for iNdEx := len(m.CreatedOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CreatedOrdersCids[iNdEx]) + copy(dAtA[i:], m.CreatedOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.CreatedOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.OrderHashes) > 0 { + for iNdEx := len(m.OrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OrderHashes[iNdEx]) + copy(dAtA[i:], m.OrderHashes[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHashes[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelSpotOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelSpotOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSpotOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x2a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelSpotOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelSpotOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSpotOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelSpotOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelSpotOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelSpotOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelSpotOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelSpotOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelSpotOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + for iNdEx := len(m.Success) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.Success[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelBinaryOptionsOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelBinaryOptionsOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelBinaryOptionsOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + for iNdEx := len(m.Success) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.Success[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchUpdateOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchUpdateOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchUpdateOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BinaryOptionsOrdersToCreate) > 0 { + for iNdEx := len(m.BinaryOptionsOrdersToCreate) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BinaryOptionsOrdersToCreate[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.BinaryOptionsMarketIdsToCancelAll) > 0 { + for iNdEx := len(m.BinaryOptionsMarketIdsToCancelAll) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BinaryOptionsMarketIdsToCancelAll[iNdEx]) + copy(dAtA[i:], m.BinaryOptionsMarketIdsToCancelAll[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.BinaryOptionsMarketIdsToCancelAll[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.BinaryOptionsOrdersToCancel) > 0 { + for iNdEx := len(m.BinaryOptionsOrdersToCancel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BinaryOptionsOrdersToCancel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.DerivativeOrdersToCreate) > 0 { + for iNdEx := len(m.DerivativeOrdersToCreate) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeOrdersToCreate[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.SpotOrdersToCreate) > 0 { + for iNdEx := len(m.SpotOrdersToCreate) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotOrdersToCreate[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.DerivativeOrdersToCancel) > 0 { + for iNdEx := len(m.DerivativeOrdersToCancel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeOrdersToCancel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.SpotOrdersToCancel) > 0 { + for iNdEx := len(m.SpotOrdersToCancel) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotOrdersToCancel[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.DerivativeMarketIdsToCancelAll) > 0 { + for iNdEx := len(m.DerivativeMarketIdsToCancelAll) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DerivativeMarketIdsToCancelAll[iNdEx]) + copy(dAtA[i:], m.DerivativeMarketIdsToCancelAll[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.DerivativeMarketIdsToCancelAll[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.SpotMarketIdsToCancelAll) > 0 { + for iNdEx := len(m.SpotMarketIdsToCancelAll) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpotMarketIdsToCancelAll[iNdEx]) + copy(dAtA[i:], m.SpotMarketIdsToCancelAll[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.SpotMarketIdsToCancelAll[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchUpdateOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchUpdateOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchUpdateOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FailedBinaryOptionsOrdersCids) > 0 { + for iNdEx := len(m.FailedBinaryOptionsOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FailedBinaryOptionsOrdersCids[iNdEx]) + copy(dAtA[i:], m.FailedBinaryOptionsOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FailedBinaryOptionsOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if len(m.CreatedBinaryOptionsOrdersCids) > 0 { + for iNdEx := len(m.CreatedBinaryOptionsOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CreatedBinaryOptionsOrdersCids[iNdEx]) + copy(dAtA[i:], m.CreatedBinaryOptionsOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.CreatedBinaryOptionsOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.FailedDerivativeOrdersCids) > 0 { + for iNdEx := len(m.FailedDerivativeOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FailedDerivativeOrdersCids[iNdEx]) + copy(dAtA[i:], m.FailedDerivativeOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FailedDerivativeOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.CreatedDerivativeOrdersCids) > 0 { + for iNdEx := len(m.CreatedDerivativeOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CreatedDerivativeOrdersCids[iNdEx]) + copy(dAtA[i:], m.CreatedDerivativeOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.CreatedDerivativeOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.FailedSpotOrdersCids) > 0 { + for iNdEx := len(m.FailedSpotOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FailedSpotOrdersCids[iNdEx]) + copy(dAtA[i:], m.FailedSpotOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FailedSpotOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.CreatedSpotOrdersCids) > 0 { + for iNdEx := len(m.CreatedSpotOrdersCids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CreatedSpotOrdersCids[iNdEx]) + copy(dAtA[i:], m.CreatedSpotOrdersCids[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.CreatedSpotOrdersCids[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.BinaryOptionsOrderHashes) > 0 { + for iNdEx := len(m.BinaryOptionsOrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.BinaryOptionsOrderHashes[iNdEx]) + copy(dAtA[i:], m.BinaryOptionsOrderHashes[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.BinaryOptionsOrderHashes[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.BinaryOptionsCancelSuccess) > 0 { + for iNdEx := len(m.BinaryOptionsCancelSuccess) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.BinaryOptionsCancelSuccess[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.BinaryOptionsCancelSuccess))) + i-- + dAtA[i] = 0x2a + } + if len(m.DerivativeOrderHashes) > 0 { + for iNdEx := len(m.DerivativeOrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DerivativeOrderHashes[iNdEx]) + copy(dAtA[i:], m.DerivativeOrderHashes[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.DerivativeOrderHashes[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.SpotOrderHashes) > 0 { + for iNdEx := len(m.SpotOrderHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpotOrderHashes[iNdEx]) + copy(dAtA[i:], m.SpotOrderHashes[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.SpotOrderHashes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.DerivativeCancelSuccess) > 0 { + for iNdEx := len(m.DerivativeCancelSuccess) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.DerivativeCancelSuccess[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.DerivativeCancelSuccess))) + i-- + dAtA[i] = 0x12 + } + if len(m.SpotCancelSuccess) > 0 { + for iNdEx := len(m.SpotCancelSuccess) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.SpotCancelSuccess[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.SpotCancelSuccess))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateDerivativeMarketOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDerivativeMarketOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDerivativeMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateDerivativeMarketOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDerivativeMarketOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDerivativeMarketOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if m.Results != nil { + { + size, err := m.Results.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeMarketOrderResults) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeMarketOrderResults) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeMarketOrderResults) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Payout.Size() + i -= size + if _, err := m.Payout.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.PositionDelta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateBinaryOptionsMarketOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateBinaryOptionsMarketOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBinaryOptionsMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateBinaryOptionsMarketOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateBinaryOptionsMarketOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBinaryOptionsMarketOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if m.Results != nil { + { + size, err := m.Results.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelDerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelDerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelDerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x32 + } + if m.OrderMask != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OrderMask)) + i-- + dAtA[i] = 0x28 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelDerivativeOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelDerivativeOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelDerivativeOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelBinaryOptionsOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelBinaryOptionsOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelBinaryOptionsOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x32 + } + if m.OrderMask != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OrderMask)) + i-- + dAtA[i] = 0x28 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelBinaryOptionsOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelBinaryOptionsOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelBinaryOptionsOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *OrderData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x2a + } + if m.OrderMask != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OrderMask)) + i-- + dAtA[i] = 0x20 + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelDerivativeOrders) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelDerivativeOrders) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelDerivativeOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBatchCancelDerivativeOrdersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgBatchCancelDerivativeOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBatchCancelDerivativeOrdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Success) > 0 { + for iNdEx := len(m.Success) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.Success[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarintTx(dAtA, i, uint64(len(m.Success))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubaccountTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubaccountTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubaccountTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.DestinationSubaccountId) > 0 { + i -= len(m.DestinationSubaccountId) + copy(dAtA[i:], m.DestinationSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationSubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceSubaccountId) > 0 { + i -= len(m.SourceSubaccountId) + copy(dAtA[i:], m.SourceSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceSubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubaccountTransferResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubaccountTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubaccountTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExternalTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgExternalTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExternalTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.DestinationSubaccountId) > 0 { + i -= len(m.DestinationSubaccountId) + copy(dAtA[i:], m.DestinationSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationSubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceSubaccountId) > 0 { + i -= len(m.SourceSubaccountId) + copy(dAtA[i:], m.SourceSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceSubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExternalTransferResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgExternalTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExternalTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgLiquidatePosition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLiquidatePosition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLiquidatePosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Order != nil { + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLiquidatePositionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgLiquidatePositionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLiquidatePositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEmergencySettleMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEmergencySettleMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEmergencySettleMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEmergencySettleMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEmergencySettleMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEmergencySettleMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgIncreasePositionMargin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgIncreasePositionMargin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgIncreasePositionMargin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x22 + } + if len(m.DestinationSubaccountId) > 0 { + i -= len(m.DestinationSubaccountId) + copy(dAtA[i:], m.DestinationSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationSubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceSubaccountId) > 0 { + i -= len(m.SourceSubaccountId) + copy(dAtA[i:], m.SourceSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceSubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgIncreasePositionMarginResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgIncreasePositionMarginResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgIncreasePositionMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDecreasePositionMargin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDecreasePositionMargin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDecreasePositionMargin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x22 + } + if len(m.DestinationSubaccountId) > 0 { + i -= len(m.DestinationSubaccountId) + copy(dAtA[i:], m.DestinationSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationSubaccountId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceSubaccountId) > 0 { + i -= len(m.SourceSubaccountId) + copy(dAtA[i:], m.SourceSubaccountId) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceSubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDecreasePositionMarginResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDecreasePositionMarginResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDecreasePositionMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPrivilegedExecuteContract) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgPrivilegedExecuteContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPrivilegedExecuteContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.Funds) > 0 { + i -= len(m.Funds) + copy(dAtA[i:], m.Funds) + i = encodeVarintTx(dAtA, i, uint64(len(m.Funds))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPrivilegedExecuteContractResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgPrivilegedExecuteContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPrivilegedExecuteContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FundsDiff) > 0 { + for iNdEx := len(m.FundsDiff) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FundsDiff[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgRewardsOptOut) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRewardsOptOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRewardsOptOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRewardsOptOutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRewardsOptOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRewardsOptOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgReclaimLockedFunds) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgReclaimLockedFunds) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReclaimLockedFunds) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + if len(m.LockedAccountPubKey) > 0 { + i -= len(m.LockedAccountPubKey) + copy(dAtA[i:], m.LockedAccountPubKey) + i = encodeVarintTx(dAtA, i, uint64(len(m.LockedAccountPubKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgReclaimLockedFundsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgReclaimLockedFundsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReclaimLockedFundsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSignData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSignData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSignDoc) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSignDoc) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.SignType) > 0 { + i -= len(m.SignType) + copy(dAtA[i:], m.SignType) + i = encodeVarintTx(dAtA, i, uint64(len(m.SignType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + if m.SettlementTimestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.SettlementTimestamp)) + i-- + dAtA[i] = 0x28 + } + if m.ExpirationTimestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ExpirationTimestamp)) + i-- + dAtA[i] = 0x20 + } + if m.SettlementPrice != nil { + { + size := m.SettlementPrice.Size() + i -= size + if _, err := m.SettlementPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAuthorizeStakeGrants) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAuthorizeStakeGrants) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthorizeStakeGrants) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Grants) > 0 { + for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAuthorizeStakeGrantsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAuthorizeStakeGrantsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthorizeStakeGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgActivateStakeGrant) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgActivateStakeGrant) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgActivateStakeGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Granter) > 0 { + i -= len(m.Granter) + copy(dAtA[i:], m.Granter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgActivateStakeGrantResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgActivateStakeGrantResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgActivateStakeGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateSpotMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewTicker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.NewMinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewMinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewMinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateSpotMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateDerivativeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.NewTicker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.NewMinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewMinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewMinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewInitialMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.NewMaintenanceMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateDerivativeMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdraw) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgWithdrawResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateSpotLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateSpotLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgBatchCreateSpotLimitOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchCreateSpotLimitOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OrderHashes) > 0 { + for _, s := range m.OrderHashes { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CreatedOrdersCids) > 0 { + for _, s := range m.CreatedOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.FailedOrdersCids) > 0 { + for _, s := range m.FailedOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgInstantSpotMarketLaunch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + if m.BaseDecimals != 0 { + n += 1 + sovTx(uint64(m.BaseDecimals)) + } + if m.QuoteDecimals != 0 { + n += 1 + sovTx(uint64(m.QuoteDecimals)) + } + return n +} + +func (m *MsgInstantSpotMarketLaunchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInstantPerpetualMarketLaunch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovTx(uint64(m.OracleScaleFactor)) + } + if m.OracleType != 0 { + n += 1 + sovTx(uint64(m.OracleType)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.InitialMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgInstantPerpetualMarketLaunchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInstantBinaryOptionsMarketLaunch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleSymbol) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovTx(uint64(m.OracleType)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovTx(uint64(m.OracleScaleFactor)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + if m.ExpirationTimestamp != 0 { + n += 1 + sovTx(uint64(m.ExpirationTimestamp)) + } + if m.SettlementTimestamp != 0 { + n += 1 + sovTx(uint64(m.SettlementTimestamp)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.MinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInstantExpiryFuturesMarketLaunch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Ticker) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovTx(uint64(m.OracleType)) + } + if m.OracleScaleFactor != 0 { + n += 1 + sovTx(uint64(m.OracleScaleFactor)) + } + if m.Expiry != 0 { + n += 1 + sovTx(uint64(m.Expiry)) + } + l = m.MakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.TakerFeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.InitialMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MaintenanceMarginRatio.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinPriceTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinQuantityTickSize.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.MinNotional.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateSpotMarketOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateSpotMarketOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Results != nil { + l = m.Results.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *SpotMarketOrderResults) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Fee.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateDerivativeLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateDerivativeLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateBinaryOptionsLimitOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateBinaryOptionsLimitOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgBatchCreateDerivativeLimitOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OrderHashes) > 0 { + for _, s := range m.OrderHashes { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CreatedOrdersCids) > 0 { + for _, s := range m.CreatedOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.FailedOrdersCids) > 0 { + for _, s := range m.FailedOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCancelSpotOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCancelSpotOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgBatchCancelSpotOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchCancelSpotOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Success) > 0 { + n += 1 + sovTx(uint64(len(m.Success))) + len(m.Success)*1 + } + return n +} + +func (m *MsgBatchCancelBinaryOptionsOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Success) > 0 { + n += 1 + sovTx(uint64(len(m.Success))) + len(m.Success)*1 + } + return n +} + +func (m *MsgBatchUpdateOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.SpotMarketIdsToCancelAll) > 0 { + for _, s := range m.SpotMarketIdsToCancelAll { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.DerivativeMarketIdsToCancelAll) > 0 { + for _, s := range m.DerivativeMarketIdsToCancelAll { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.SpotOrdersToCancel) > 0 { + for _, e := range m.SpotOrdersToCancel { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.DerivativeOrdersToCancel) > 0 { + for _, e := range m.DerivativeOrdersToCancel { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.SpotOrdersToCreate) > 0 { + for _, e := range m.SpotOrdersToCreate { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.DerivativeOrdersToCreate) > 0 { + for _, e := range m.DerivativeOrdersToCreate { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.BinaryOptionsOrdersToCancel) > 0 { + for _, e := range m.BinaryOptionsOrdersToCancel { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.BinaryOptionsMarketIdsToCancelAll) > 0 { + for _, s := range m.BinaryOptionsMarketIdsToCancelAll { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.BinaryOptionsOrdersToCreate) > 0 { + for _, e := range m.BinaryOptionsOrdersToCreate { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchUpdateOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpotCancelSuccess) > 0 { + n += 1 + sovTx(uint64(len(m.SpotCancelSuccess))) + len(m.SpotCancelSuccess)*1 + } + if len(m.DerivativeCancelSuccess) > 0 { + n += 1 + sovTx(uint64(len(m.DerivativeCancelSuccess))) + len(m.DerivativeCancelSuccess)*1 + } + if len(m.SpotOrderHashes) > 0 { + for _, s := range m.SpotOrderHashes { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.DerivativeOrderHashes) > 0 { + for _, s := range m.DerivativeOrderHashes { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.BinaryOptionsCancelSuccess) > 0 { + n += 1 + sovTx(uint64(len(m.BinaryOptionsCancelSuccess))) + len(m.BinaryOptionsCancelSuccess)*1 + } + if len(m.BinaryOptionsOrderHashes) > 0 { + for _, s := range m.BinaryOptionsOrderHashes { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CreatedSpotOrdersCids) > 0 { + for _, s := range m.CreatedSpotOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.FailedSpotOrdersCids) > 0 { + for _, s := range m.FailedSpotOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CreatedDerivativeOrdersCids) > 0 { + for _, s := range m.CreatedDerivativeOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.FailedDerivativeOrdersCids) > 0 { + for _, s := range m.FailedDerivativeOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.CreatedBinaryOptionsOrdersCids) > 0 { + for _, s := range m.CreatedBinaryOptionsOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.FailedBinaryOptionsOrdersCids) > 0 { + for _, s := range m.FailedBinaryOptionsOrdersCids { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCreateDerivativeMarketOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateDerivativeMarketOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Results != nil { + l = m.Results.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *DerivativeMarketOrderResults) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Fee.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.PositionDelta.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Payout.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateBinaryOptionsMarketOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateBinaryOptionsMarketOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Results != nil { + l = m.Results.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCancelDerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OrderMask != 0 { + n += 1 + sovTx(uint64(m.OrderMask)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCancelDerivativeOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelBinaryOptionsOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OrderMask != 0 { + n += 1 + sovTx(uint64(m.OrderMask)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCancelBinaryOptionsOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *OrderData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.OrderMask != 0 { + n += 1 + sovTx(uint64(m.OrderMask)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgBatchCancelDerivativeOrders) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBatchCancelDerivativeOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Success) > 0 { + n += 1 + sovTx(uint64(len(m.Success))) + len(m.Success)*1 + } + return n +} + +func (m *MsgSubaccountTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourceSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSubaccountTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExternalTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourceSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExternalTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgLiquidatePosition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Order != nil { + l = m.Order.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgLiquidatePositionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEmergencySettleMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgEmergencySettleMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgIncreasePositionMargin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourceSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgIncreasePositionMarginResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDecreasePositionMargin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourceSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationSubaccountId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgDecreasePositionMarginResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPrivilegedExecuteContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Funds) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgPrivilegedExecuteContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FundsDiff) > 0 { + for _, e := range m.FundsDiff { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRewardsOptOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRewardsOptOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgReclaimLockedFunds) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.LockedAccountPubKey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgReclaimLockedFundsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSignData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSignDoc) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SignType) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgAdminUpdateBinaryOptionsMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.SettlementPrice != nil { + l = m.SettlementPrice.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.ExpirationTimestamp != 0 { + n += 1 + sovTx(uint64(m.ExpirationTimestamp)) + } + if m.SettlementTimestamp != 0 { + n += 1 + sovTx(uint64(m.SettlementTimestamp)) + } + if m.Status != 0 { + n += 1 + sovTx(uint64(m.Status)) + } + return n +} + +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAuthorizeStakeGrants) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Grants) > 0 { + for _, e := range m.Grants { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgAuthorizeStakeGrantsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgActivateStakeGrant) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Granter) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgActivateStakeGrantResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateSpotMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateSpotMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateSpotMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewTicker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewTicker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateSpotMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateSpotMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateSpotMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDerivativeMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateDerivativeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDerivativeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewTicker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewTicker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewInitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewInitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewMaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewMaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDerivativeMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateDerivativeMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDerivativeMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateSpotLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateSpotLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateSpotLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateSpotLimitOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateSpotLimitOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateSpotLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCreateSpotLimitOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCreateSpotLimitOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCreateSpotLimitOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, SpotOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCreateSpotLimitOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCreateSpotLimitOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCreateSpotLimitOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHashes = append(m.OrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatedOrdersCids = append(m.CreatedOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedOrdersCids = append(m.FailedOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantSpotMarketLaunch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantSpotMarketLaunch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantSpotMarketLaunch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDecimals", wireType) + } + m.BaseDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BaseDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDecimals", wireType) + } + m.QuoteDecimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuoteDecimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantSpotMarketLaunchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantSpotMarketLaunchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantSpotMarketLaunchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantPerpetualMarketLaunch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantPerpetualMarketLaunch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantPerpetualMarketLaunch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types1.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantPerpetualMarketLaunchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantPerpetualMarketLaunchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantPerpetualMarketLaunchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantBinaryOptionsMarketLaunch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantBinaryOptionsMarketLaunch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantBinaryOptionsMarketLaunch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleSymbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleSymbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types1.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementTimestamp", wireType) + } + m.SettlementTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettlementTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantBinaryOptionsMarketLaunchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantBinaryOptionsMarketLaunchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantBinaryOptionsMarketLaunchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantExpiryFuturesMarketLaunch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantExpiryFuturesMarketLaunch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantExpiryFuturesMarketLaunch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ticker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ticker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuoteDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleQuote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleQuote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleType", wireType) + } + m.OracleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleType |= types1.OracleType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleScaleFactor", wireType) + } + m.OracleScaleFactor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OracleScaleFactor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + m.Expiry = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Expiry |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TakerFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaintenanceMarginRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaintenanceMarginRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPriceTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinPriceTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinQuantityTickSize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinQuantityTickSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinNotional", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinNotional.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInstantExpiryFuturesMarketLaunchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInstantExpiryFuturesMarketLaunchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInstantExpiryFuturesMarketLaunchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateSpotMarketOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateSpotMarketOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateSpotMarketOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateSpotMarketOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateSpotMarketOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateSpotMarketOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Results == nil { + m.Results = &SpotMarketOrderResults{} + } + if err := m.Results.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotMarketOrderResults) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotMarketOrderResults: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotMarketOrderResults: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDerivativeLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDerivativeLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDerivativeLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDerivativeLimitOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDerivativeLimitOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDerivativeLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBinaryOptionsLimitOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsLimitOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsLimitOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBinaryOptionsLimitOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsLimitOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsLimitOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCreateDerivativeLimitOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCreateDerivativeLimitOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCreateDerivativeLimitOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Orders = append(m.Orders, DerivativeOrder{}) + if err := m.Orders[len(m.Orders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCreateDerivativeLimitOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCreateDerivativeLimitOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCreateDerivativeLimitOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHashes = append(m.OrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatedOrdersCids = append(m.CreatedOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedOrdersCids = append(m.FailedOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelSpotOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelSpotOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelSpotOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelSpotOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelSpotOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelSpotOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelSpotOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelSpotOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelSpotOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, OrderData{}) + if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelSpotOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelSpotOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelSpotOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Success) == 0 { + m.Success = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelBinaryOptionsOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelBinaryOptionsOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelBinaryOptionsOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, OrderData{}) + if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelBinaryOptionsOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelBinaryOptionsOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelBinaryOptionsOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Success) == 0 { + m.Success = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchUpdateOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchUpdateOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchUpdateOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotMarketIdsToCancelAll", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotMarketIdsToCancelAll = append(m.SpotMarketIdsToCancelAll, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeMarketIdsToCancelAll", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeMarketIdsToCancelAll = append(m.DerivativeMarketIdsToCancelAll, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrdersToCancel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrdersToCancel = append(m.SpotOrdersToCancel, &OrderData{}) + if err := m.SpotOrdersToCancel[len(m.SpotOrdersToCancel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrdersToCancel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrdersToCancel = append(m.DerivativeOrdersToCancel, &OrderData{}) + if err := m.DerivativeOrdersToCancel[len(m.DerivativeOrdersToCancel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrdersToCreate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrdersToCreate = append(m.SpotOrdersToCreate, &SpotOrder{}) + if err := m.SpotOrdersToCreate[len(m.SpotOrdersToCreate)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrdersToCreate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrdersToCreate = append(m.DerivativeOrdersToCreate, &DerivativeOrder{}) + if err := m.DerivativeOrdersToCreate[len(m.DerivativeOrdersToCreate)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsOrdersToCancel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsOrdersToCancel = append(m.BinaryOptionsOrdersToCancel, &OrderData{}) + if err := m.BinaryOptionsOrdersToCancel[len(m.BinaryOptionsOrdersToCancel)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsMarketIdsToCancelAll", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsMarketIdsToCancelAll = append(m.BinaryOptionsMarketIdsToCancelAll, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsOrdersToCreate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsOrdersToCreate = append(m.BinaryOptionsOrdersToCreate, &DerivativeOrder{}) + if err := m.BinaryOptionsOrdersToCreate[len(m.BinaryOptionsOrdersToCreate)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchUpdateOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchUpdateOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchUpdateOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SpotCancelSuccess = append(m.SpotCancelSuccess, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.SpotCancelSuccess) == 0 { + m.SpotCancelSuccess = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SpotCancelSuccess = append(m.SpotCancelSuccess, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SpotCancelSuccess", wireType) + } + case 2: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DerivativeCancelSuccess = append(m.DerivativeCancelSuccess, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.DerivativeCancelSuccess) == 0 { + m.DerivativeCancelSuccess = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DerivativeCancelSuccess = append(m.DerivativeCancelSuccess, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeCancelSuccess", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrderHashes = append(m.SpotOrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrderHashes = append(m.DerivativeOrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BinaryOptionsCancelSuccess = append(m.BinaryOptionsCancelSuccess, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.BinaryOptionsCancelSuccess) == 0 { + m.BinaryOptionsCancelSuccess = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BinaryOptionsCancelSuccess = append(m.BinaryOptionsCancelSuccess, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsCancelSuccess", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryOptionsOrderHashes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryOptionsOrderHashes = append(m.BinaryOptionsOrderHashes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedSpotOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatedSpotOrdersCids = append(m.CreatedSpotOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedSpotOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedSpotOrdersCids = append(m.FailedSpotOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedDerivativeOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatedDerivativeOrdersCids = append(m.CreatedDerivativeOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedDerivativeOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedDerivativeOrdersCids = append(m.FailedDerivativeOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedBinaryOptionsOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreatedBinaryOptionsOrdersCids = append(m.CreatedBinaryOptionsOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedBinaryOptionsOrdersCids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FailedBinaryOptionsOrdersCids = append(m.FailedBinaryOptionsOrdersCids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDerivativeMarketOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDerivativeMarketOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDerivativeMarketOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDerivativeMarketOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDerivativeMarketOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDerivativeMarketOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Results == nil { + m.Results = &DerivativeMarketOrderResults{} + } + if err := m.Results.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeMarketOrderResults) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeMarketOrderResults: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeMarketOrderResults: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionDelta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PositionDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Payout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBinaryOptionsMarketOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsMarketOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsMarketOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBinaryOptionsMarketOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsMarketOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBinaryOptionsMarketOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Results == nil { + m.Results = &DerivativeMarketOrderResults{} + } + if err := m.Results.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelDerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelDerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelDerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderMask", wireType) + } + m.OrderMask = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderMask |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelDerivativeOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelDerivativeOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelDerivativeOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelBinaryOptionsOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelBinaryOptionsOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelBinaryOptionsOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderMask", wireType) + } + m.OrderMask = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderMask |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelBinaryOptionsOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelBinaryOptionsOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelBinaryOptionsOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderMask", wireType) + } + m.OrderMask = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderMask |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelDerivativeOrders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelDerivativeOrders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelDerivativeOrders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data, OrderData{}) + if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBatchCancelDerivativeOrdersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBatchCancelDerivativeOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBatchCancelDerivativeOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Success) == 0 { + m.Success = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = append(m.Success, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubaccountTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubaccountTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubaccountTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubaccountTransferResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubaccountTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubaccountTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExternalTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExternalTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExternalTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExternalTransferResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExternalTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExternalTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLiquidatePosition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLiquidatePosition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLiquidatePosition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Order == nil { + m.Order = &DerivativeOrder{} + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLiquidatePositionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLiquidatePositionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLiquidatePositionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEmergencySettleMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEmergencySettleMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEmergencySettleMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEmergencySettleMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEmergencySettleMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEmergencySettleMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgIncreasePositionMargin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgIncreasePositionMargin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgIncreasePositionMargin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgIncreasePositionMarginResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgIncreasePositionMarginResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgIncreasePositionMarginResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDecreasePositionMargin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDecreasePositionMargin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDecreasePositionMargin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationSubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDecreasePositionMarginResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDecreasePositionMarginResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDecreasePositionMarginResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPrivilegedExecuteContract) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPrivilegedExecuteContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPrivilegedExecuteContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Funds = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPrivilegedExecuteContractResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPrivilegedExecuteContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPrivilegedExecuteContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundsDiff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FundsDiff = append(m.FundsDiff, types.Coin{}) + if err := m.FundsDiff[len(m.FundsDiff)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRewardsOptOut) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRewardsOptOut: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRewardsOptOut: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRewardsOptOutResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRewardsOptOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRewardsOptOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgReclaimLockedFunds) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgReclaimLockedFunds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReclaimLockedFunds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LockedAccountPubKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LockedAccountPubKey = append(m.LockedAccountPubKey[:0], dAtA[iNdEx:postIndex]...) + if m.LockedAccountPubKey == nil { + m.LockedAccountPubKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgReclaimLockedFundsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgReclaimLockedFundsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReclaimLockedFundsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSignData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) + if m.Signer == nil { + m.Signer = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignDoc) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSignDoc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignDoc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAdminUpdateBinaryOptionsMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAdminUpdateBinaryOptionsMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAdminUpdateBinaryOptionsMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.LegacyDec + m.SettlementPrice = &v + if err := m.SettlementPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTimestamp", wireType) + } + m.ExpirationTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementTimestamp", wireType) + } + m.SettlementTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettlementTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= MarketStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAdminUpdateBinaryOptionsMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAdminUpdateBinaryOptionsMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAdminUpdateBinaryOptionsMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAuthorizeStakeGrants) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAuthorizeStakeGrants: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAuthorizeStakeGrants: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grants = append(m.Grants, &GrantAuthorization{}) + if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAuthorizeStakeGrantsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAuthorizeStakeGrantsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAuthorizeStakeGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgActivateStakeGrant) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgActivateStakeGrant: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgActivateStakeGrant: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Granter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgActivateStakeGrantResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgActivateStakeGrantResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgActivateStakeGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/exchange/types/v2/volume_record.go b/chain/exchange/types/v2/volume_record.go new file mode 100644 index 00000000..f39e7c76 --- /dev/null +++ b/chain/exchange/types/v2/volume_record.go @@ -0,0 +1,64 @@ +package v2 + +import ( + "cosmossdk.io/math" +) + +func NewVolumeRecord(makerVolume, takerVolume math.LegacyDec) VolumeRecord { + return VolumeRecord{ + MakerVolume: makerVolume, + TakerVolume: takerVolume, + } +} + +func NewZeroVolumeRecord() VolumeRecord { + return NewVolumeRecord(math.LegacyZeroDec(), math.LegacyZeroDec()) +} + +func (v VolumeRecord) Add(record VolumeRecord) VolumeRecord { + if v.MakerVolume.IsNil() { + v.MakerVolume = math.LegacyZeroDec() + } + + if v.TakerVolume.IsNil() { + v.TakerVolume = math.LegacyZeroDec() + } + + if record.IsZero() { + return v + } + + newMakerVolume := v.MakerVolume + newTakerVolume := v.TakerVolume + + if !record.MakerVolume.IsNil() && !record.MakerVolume.IsZero() { + newMakerVolume = v.MakerVolume.Add(record.MakerVolume) + } + if !record.TakerVolume.IsNil() && !record.TakerVolume.IsZero() { + newTakerVolume = v.TakerVolume.Add(record.TakerVolume) + } + + return NewVolumeRecord(newMakerVolume, newTakerVolume) +} + +func (v *VolumeRecord) IsZero() bool { + return (v.TakerVolume.IsNil() || v.TakerVolume.IsZero()) && (v.MakerVolume.IsNil() || v.MakerVolume.IsZero()) +} + +func (v *VolumeRecord) Total() math.LegacyDec { + totalVolume := math.LegacyZeroDec() + if !v.TakerVolume.IsNil() { + totalVolume = totalVolume.Add(v.TakerVolume) + } + if !v.MakerVolume.IsNil() { + totalVolume = totalVolume.Add(v.MakerVolume) + } + return totalVolume +} + +func NewVolumeWithSingleType(volume math.LegacyDec, isMaker bool) VolumeRecord { + if isMaker { + return NewVolumeRecord(volume, math.LegacyZeroDec()) + } + return NewVolumeRecord(math.LegacyZeroDec(), volume) +} diff --git a/chain/exchange/types/versions.go b/chain/exchange/types/versions.go new file mode 100644 index 00000000..5826dc28 --- /dev/null +++ b/chain/exchange/types/versions.go @@ -0,0 +1,8 @@ +package types + +type ExchangeTypeVersion int + +const ( + ExchangeTypeVersionV1 ExchangeTypeVersion = iota + 1 + ExchangeTypeVersionV2 +) diff --git a/chain/exchange/types/wasm_trades.go b/chain/exchange/types/wasm_trades.go index b98311c5..ee6912e1 100644 --- a/chain/exchange/types/wasm_trades.go +++ b/chain/exchange/types/wasm_trades.go @@ -74,12 +74,3 @@ func (t *SyntheticTrade) Validate() error { return nil } - -func (t *SyntheticTrade) ToPositionDelta() *PositionDelta { - return &PositionDelta{ - IsLong: t.IsBuy, - ExecutionQuantity: t.Quantity, - ExecutionMargin: t.Margin, - ExecutionPrice: t.Price, - } -} diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index be31fd77..b7488ea1 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - types "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + v2 "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -364,9 +364,9 @@ func (m *OrderbookUpdate) GetOrderbook() *Orderbook { } type Orderbook struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - BuyLevels []*types.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` - SellLevels []*types.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyLevels []*v2.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + SellLevels []*v2.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` } func (m *Orderbook) Reset() { *m = Orderbook{} } @@ -409,14 +409,14 @@ func (m *Orderbook) GetMarketId() string { return "" } -func (m *Orderbook) GetBuyLevels() []*types.Level { +func (m *Orderbook) GetBuyLevels() []*v2.Level { if m != nil { return m.BuyLevels } return nil } -func (m *Orderbook) GetSellLevels() []*types.Level { +func (m *Orderbook) GetSellLevels() []*v2.Level { if m != nil { return m.SellLevels } @@ -528,8 +528,8 @@ func (m *SubaccountDeposits) GetDeposits() []SubaccountDeposit { } type SubaccountDeposit struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Deposit types.Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Deposit v2.Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit"` } func (m *SubaccountDeposit) Reset() { *m = SubaccountDeposit{} } @@ -572,16 +572,16 @@ func (m *SubaccountDeposit) GetDenom() string { return "" } -func (m *SubaccountDeposit) GetDeposit() types.Deposit { +func (m *SubaccountDeposit) GetDeposit() v2.Deposit { if m != nil { return m.Deposit } - return types.Deposit{} + return v2.Deposit{} } type SpotOrderUpdate struct { Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v1beta1.OrderUpdateStatus" json:"status,omitempty"` - OrderHash []byte `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` Order *SpotOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } @@ -626,11 +626,11 @@ func (m *SpotOrderUpdate) GetStatus() OrderUpdateStatus { return OrderUpdateStatus_Unspecified } -func (m *SpotOrderUpdate) GetOrderHash() []byte { +func (m *SpotOrderUpdate) GetOrderHash() string { if m != nil { return m.OrderHash } - return nil + return "" } func (m *SpotOrderUpdate) GetCid() string { @@ -648,8 +648,8 @@ func (m *SpotOrderUpdate) GetOrder() *SpotOrder { } type SpotOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order types.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order v2.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *SpotOrder) Reset() { *m = SpotOrder{} } @@ -692,16 +692,16 @@ func (m *SpotOrder) GetMarketId() string { return "" } -func (m *SpotOrder) GetOrder() types.SpotLimitOrder { +func (m *SpotOrder) GetOrder() v2.SpotLimitOrder { if m != nil { return m.Order } - return types.SpotLimitOrder{} + return v2.SpotLimitOrder{} } type DerivativeOrderUpdate struct { Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v1beta1.OrderUpdateStatus" json:"status,omitempty"` - OrderHash []byte `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` } @@ -746,11 +746,11 @@ func (m *DerivativeOrderUpdate) GetStatus() OrderUpdateStatus { return OrderUpdateStatus_Unspecified } -func (m *DerivativeOrderUpdate) GetOrderHash() []byte { +func (m *DerivativeOrderUpdate) GetOrderHash() string { if m != nil { return m.OrderHash } - return nil + return "" } func (m *DerivativeOrderUpdate) GetCid() string { @@ -768,9 +768,9 @@ func (m *DerivativeOrderUpdate) GetOrder() *DerivativeOrder { } type DerivativeOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order types.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` - IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order v2.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` } func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } @@ -813,11 +813,11 @@ func (m *DerivativeOrder) GetMarketId() string { return "" } -func (m *DerivativeOrder) GetOrder() types.DerivativeLimitOrder { +func (m *DerivativeOrder) GetOrder() v2.DerivativeLimitOrder { if m != nil { return m.Order } - return types.DerivativeLimitOrder{} + return v2.DerivativeLimitOrder{} } func (m *DerivativeOrder) GetIsMarket() bool { @@ -953,7 +953,7 @@ type SpotTrade struct { // bytes32 subaccount ID that executed the trade SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` - OrderHash []byte `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` @@ -1020,11 +1020,11 @@ func (m *SpotTrade) GetSubaccountId() string { return "" } -func (m *SpotTrade) GetOrderHash() []byte { +func (m *SpotTrade) GetOrderHash() string { if m != nil { return m.OrderHash } - return nil + return "" } func (m *SpotTrade) GetFeeRecipientAddress() string { @@ -1053,7 +1053,7 @@ type DerivativeTrade struct { IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - PositionDelta *types.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + PositionDelta *v2.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` @@ -1123,7 +1123,7 @@ func (m *DerivativeTrade) GetSubaccountId() string { return "" } -func (m *DerivativeTrade) GetPositionDelta() *types.PositionDelta { +func (m *DerivativeTrade) GetPositionDelta() *v2.PositionDelta { if m != nil { return m.PositionDelta } @@ -1521,110 +1521,111 @@ func init() { } var fileDescriptor_e23b7dcfb2fbc9c7 = []byte{ - // 1640 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0xdb, 0xc6, - 0x16, 0xb6, 0x2c, 0x5b, 0x16, 0x8f, 0x64, 0x5b, 0x9e, 0x38, 0x06, 0xe3, 0xdc, 0x6b, 0x27, 0x74, - 0x72, 0x63, 0xe7, 0x47, 0x72, 0x7c, 0x71, 0x81, 0x5b, 0x74, 0x91, 0x44, 0x76, 0x83, 0x38, 0x70, - 0xd0, 0x80, 0x76, 0x5a, 0x20, 0x68, 0x4a, 0x50, 0xe4, 0x48, 0x9a, 0x4a, 0x22, 0x65, 0x0e, 0x69, - 0x44, 0x4f, 0xd0, 0xae, 0x8a, 0x6c, 0xbb, 0xec, 0xb6, 0x8b, 0x3e, 0x44, 0xbb, 0xc9, 0xaa, 0xc8, - 0xb2, 0x28, 0x8a, 0xb4, 0x48, 0x5e, 0xa4, 0x98, 0x1f, 0x52, 0x24, 0x25, 0x4b, 0x72, 0x9a, 0x22, - 0x2b, 0x91, 0xa3, 0x73, 0xbe, 0x6f, 0xce, 0x99, 0x39, 0xdf, 0x1c, 0x0e, 0x5c, 0x21, 0xce, 0x57, - 0xd8, 0xf2, 0xc9, 0x09, 0xae, 0x50, 0xdf, 0xc3, 0x66, 0xa7, 0x72, 0x72, 0xbb, 0x86, 0x7d, 0xf3, - 0x76, 0xe5, 0x38, 0xc0, 0x5e, 0xaf, 0xdc, 0xf5, 0x5c, 0xdf, 0x45, 0x6a, 0x64, 0x55, 0x16, 0x56, - 0x65, 0x69, 0xb5, 0xba, 0x66, 0xb9, 0xb4, 0xe3, 0xd2, 0x4a, 0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x7a, 0x38, 0xfe, 0xda, 0x34, 0x89, 0x13, 0x5e, - 0x23, 0xf3, 0x6f, 0x88, 0x5a, 0x8e, 0xdf, 0xcd, 0xfe, 0xf7, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x78, 0x25, 0xda, 0xad, 0x67, 0x16, 0x00, 0x00, + // 1650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6e, 0xdb, 0x46, + 0x16, 0xb6, 0x2c, 0x5b, 0x16, 0x8f, 0xfc, 0x23, 0x4f, 0x1c, 0x83, 0x71, 0xb2, 0x72, 0x42, 0x3b, + 0xbb, 0xce, 0x3a, 0x91, 0x12, 0x2f, 0x16, 0xd8, 0x45, 0xb0, 0x9b, 0xb5, 0xe2, 0x4d, 0xe3, 0xd4, + 0x41, 0x03, 0xda, 0x69, 0x81, 0xa0, 0x29, 0x41, 0x91, 0x23, 0x69, 0x2a, 0x89, 0x94, 0x39, 0xa4, + 0x10, 0x3d, 0x41, 0x7b, 0x55, 0xe4, 0xa2, 0x2f, 0x50, 0xa0, 0x57, 0x7d, 0x8c, 0xf6, 0x26, 0x57, + 0x45, 0xee, 0x5a, 0xf4, 0x22, 0x2d, 0x92, 0x17, 0x29, 0xe6, 0x87, 0x14, 0xa9, 0x7f, 0xa7, 0x29, + 0x8a, 0x5e, 0x89, 0x1c, 0x9d, 0xf3, 0x7d, 0x73, 0xce, 0xcc, 0xf9, 0xe6, 0x70, 0x60, 0x9b, 0x38, + 0x9f, 0x62, 0xcb, 0x27, 0x1d, 0x5c, 0xa2, 0xbe, 0x87, 0xcd, 0x56, 0xa9, 0x73, 0xab, 0x82, 0x7d, + 0xf3, 0x56, 0xe9, 0x34, 0xc0, 0x5e, 0xb7, 0xd8, 0xf6, 0x5c, 0xdf, 0x45, 0x6a, 0x64, 0x55, 0x14, + 0x56, 0x45, 0x69, 0xb5, 0x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, + 0x53, 0x98, 0x79, 0x72, 0x10, 0xfb, 0x1a, 0x38, 0x0c, 0xf1, 0x8e, 0xcc, 0x0a, 0x2d, 0x45, 0xe8, + 0x37, 0x2c, 0xd7, 0xc3, 0xf1, 0xd7, 0xba, 0x49, 0x9c, 0xf0, 0x06, 0x99, 0x7f, 0x2f, 0x54, 0x32, + 0xfc, 0xf6, 0xf5, 0x1f, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xfa, 0xa8, 0x0c, 0x62, 0x16, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4698,7 +4699,7 @@ func (m *Orderbook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BuyLevels = append(m.BuyLevels, &types.Level{}) + m.BuyLevels = append(m.BuyLevels, &v2.Level{}) if err := m.BuyLevels[len(m.BuyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4732,7 +4733,7 @@ func (m *Orderbook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SellLevels = append(m.SellLevels, &types.Level{}) + m.SellLevels = append(m.SellLevels, &v2.Level{}) if err := m.SellLevels[len(m.SellLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4848,7 +4849,7 @@ func (m *BankBalance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Balances = append(m.Balances, types1.Coin{}) + m.Balances = append(m.Balances, types.Coin{}) if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5157,7 +5158,7 @@ func (m *SpotOrderUpdate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5167,25 +5168,23 @@ func (m *SpotOrderUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) - if m.OrderHash == nil { - m.OrderHash = []byte{} - } + m.OrderHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5443,7 +5442,7 @@ func (m *DerivativeOrderUpdate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5453,25 +5452,23 @@ func (m *DerivativeOrderUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) - if m.OrderHash == nil { - m.OrderHash = []byte{} - } + m.OrderHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -6366,7 +6363,7 @@ func (m *SpotTrade) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6376,25 +6373,23 @@ func (m *SpotTrade) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.OrderHash = append(m.OrderHash[:0], dAtA[iNdEx:postIndex]...) - if m.OrderHash == nil { - m.OrderHash = []byte{} - } + m.OrderHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 9: if wireType != 2 { @@ -6688,7 +6683,7 @@ func (m *DerivativeTrade) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.PositionDelta == nil { - m.PositionDelta = &types.PositionDelta{} + m.PositionDelta = &v2.PositionDelta{} } if err := m.PositionDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/chain/tokenfactory/types/msgs.go b/chain/tokenfactory/types/msgs.go index c3a62338..1b22d4f3 100644 --- a/chain/tokenfactory/types/msgs.go +++ b/chain/tokenfactory/types/msgs.go @@ -104,7 +104,11 @@ func (m MsgMint) ValidateBasic() error { return errors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) } - if !m.Amount.IsValid() || m.Amount.Amount.Equal(math.ZeroInt()) { + err = m.Amount.Validate() + if err != nil { + return err + } + if m.Amount.Amount.Equal(math.ZeroInt()) { return errors.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) } diff --git a/chain/types/gas.go b/chain/types/gas.go index b14660de..03e2392a 100644 --- a/chain/types/gas.go +++ b/chain/types/gas.go @@ -57,7 +57,7 @@ func (g *infiniteGasMeter) ConsumeGas(amount storetypes.Gas, descriptor string) // RefundGas will deduct the given amount from the gas consumed. If the amount is greater than the // gas consumed, the function will panic. // -// Use case: This functionality enables refunding gas to the trasaction or block gas pools so that +// Use case: This functionality enables refunding gas to the transaction or block gas pools so that // EVM-compatible chains can fully support the go-ethereum StateDb interface. // See https://github.com/cosmos/cosmos-sdk/pull/9403 for reference. func (g *infiniteGasMeter) RefundGas(amount storetypes.Gas, descriptor string) { diff --git a/chain/wasmx/types/util.go b/chain/wasmx/types/util.go index 49eb4491..4b374f2a 100644 --- a/chain/wasmx/types/util.go +++ b/chain/wasmx/types/util.go @@ -6,12 +6,14 @@ import ( ) func IsAllowed(accessConfig types.AccessConfig, actor sdktypes.AccAddress) bool { - if accessConfig.Permission == types.AccessTypeAnyOfAddresses { + switch accessConfig.Permission { + case types.AccessTypeAnyOfAddresses: for _, v := range accessConfig.Addresses { if v == actor.String() { return true } } + return false } return false } diff --git a/client/chain/chain.go b/client/chain/chain.go index e6231a07..a87a3551 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -13,43 +13,38 @@ import ( "sync/atomic" "time" - permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - - "github.com/cosmos/cosmos-sdk/types/query" - - "google.golang.org/grpc/credentials/insecure" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" - tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" - "github.com/InjectiveLabs/sdk-go/client/common" log "github.com/InjectiveLabs/suplog" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authztypes "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/gogoproto/proto" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ibcchanneltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" "github.com/shopspring/decimal" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" - ethcommon "github.com/ethereum/go-ethereum/common" + exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" + chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "github.com/InjectiveLabs/sdk-go/client/common" ) type OrderbookType string @@ -120,24 +115,33 @@ type ChainClient interface { DefaultSubaccount(acc sdk.AccAddress) ethcommon.Hash Subaccount(account sdk.AccAddress, index int) ethcommon.Hash + // Deprecated: use GetSubAccountNonceV2 instead GetSubAccountNonce(ctx context.Context, subaccountId ethcommon.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) + // Deprecated: use GetFeeDiscountInfoV2 instead GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) UpdateSubaccountNonceFromChain() error SynchronizeSubaccountNonce(subaccountId ethcommon.Hash) error - ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, derivativeOrders []exchangetypes.DerivativeOrder, subaccountId ethcommon.Hash) (OrderHashes, error) + ComputeOrderHashes(spotOrders []exchangev2types.SpotOrder, derivativeOrders []exchangev2types.DerivativeOrder, subaccountId ethcommon.Hash) (OrderHashes, error) - SpotOrder(defaultSubaccountID ethcommon.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder + // Deprecated: use CreateSpotOrderV2 instead CreateSpotOrder(defaultSubaccountID ethcommon.Hash, d *SpotOrderData, marketsAssistant MarketsAssistant) *exchangetypes.SpotOrder - DerivativeOrder(defaultSubaccountID ethcommon.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder + // Deprecated: use CreateDerivativeOrderV2 instead CreateDerivativeOrder(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder + // Deprecated: use OrderCancelV2 instead OrderCancel(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangetypes.OrderData + CreateSpotOrderV2(defaultSubaccountID ethcommon.Hash, d *SpotOrderData) *exchangev2types.SpotOrder + CreateDerivativeOrderV2(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData) *exchangev2types.DerivativeOrder + OrderCancelV2(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangev2types.OrderData + GetGasFee() (string, error) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) StreamEventOrderFailWithWebsocket(sender string, websocket *rpchttp.HTTP, failEventCh chan map[string]uint) + // Deprecated: use the chain stream instead StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIDs []string, orderbookCh chan exchangetypes.Orderbook) + // Deprecated: use the chain stream instead StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIDs []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) @@ -182,62 +186,180 @@ type ChainClient interface { FetchCommunityPool(ctx context.Context) (*distributiontypes.QueryCommunityPoolResponse, error) // chain exchange module + + // Deprecated: use FetchSubaccountDepositsV2 instead FetchSubaccountDeposits(ctx context.Context, subaccountID string) (*exchangetypes.QuerySubaccountDepositsResponse, error) + // Deprecated: use FetchSubaccountDepositV2 instead FetchSubaccountDeposit(ctx context.Context, subaccountId string, denom string) (*exchangetypes.QuerySubaccountDepositResponse, error) + // Deprecated: use FetchExchangeBalancesV2 instead FetchExchangeBalances(ctx context.Context) (*exchangetypes.QueryExchangeBalancesResponse, error) + // Deprecated: use FetchAggregateVolumeV2 instead FetchAggregateVolume(ctx context.Context, account string) (*exchangetypes.QueryAggregateVolumeResponse, error) + // Deprecated: use FetchAggregateVolumesV2 instead FetchAggregateVolumes(ctx context.Context, accounts []string, marketIDs []string) (*exchangetypes.QueryAggregateVolumesResponse, error) + // Deprecated: use FetchAggregateMarketVolumeV2 instead FetchAggregateMarketVolume(ctx context.Context, marketId string) (*exchangetypes.QueryAggregateMarketVolumeResponse, error) + // Deprecated: use FetchAggregateMarketVolumesV2 instead FetchAggregateMarketVolumes(ctx context.Context, marketIDs []string) (*exchangetypes.QueryAggregateMarketVolumesResponse, error) + // Deprecated: use FetchDenomDecimalV2 instead FetchDenomDecimal(ctx context.Context, denom string) (*exchangetypes.QueryDenomDecimalResponse, error) + // Deprecated: use FetchDenomDecimalsV2 instead FetchDenomDecimals(ctx context.Context, denoms []string) (*exchangetypes.QueryDenomDecimalsResponse, error) + // Deprecated: use FetchChainSpotMarketsV2 instead FetchChainSpotMarkets(ctx context.Context, status string, marketIDs []string) (*exchangetypes.QuerySpotMarketsResponse, error) + // Deprecated: use FetchChainSpotMarketV2 instead FetchChainSpotMarket(ctx context.Context, marketId string) (*exchangetypes.QuerySpotMarketResponse, error) + // Deprecated: use FetchChainFullSpotMarketsV2 instead FetchChainFullSpotMarkets(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangetypes.QueryFullSpotMarketsResponse, error) + // Deprecated: use FetchChainFullSpotMarketV2 instead FetchChainFullSpotMarket(ctx context.Context, marketId string, withMidPriceAndTob bool) (*exchangetypes.QueryFullSpotMarketResponse, error) + // Deprecated: use FetchChainSpotOrderbookV2 instead FetchChainSpotOrderbook(ctx context.Context, marketId string, limit uint64, orderSide exchangetypes.OrderSide, limitCumulativeNotional sdkmath.LegacyDec, limitCumulativeQuantity sdkmath.LegacyDec) (*exchangetypes.QuerySpotOrderbookResponse, error) + // Deprecated: use FetchChainTraderSpotOrdersV2 instead FetchChainTraderSpotOrders(ctx context.Context, marketId string, subaccountId string) (*exchangetypes.QueryTraderSpotOrdersResponse, error) + // Deprecated: use FetchChainAccountAddressSpotOrdersV2 instead FetchChainAccountAddressSpotOrders(ctx context.Context, marketId string, address string) (*exchangetypes.QueryAccountAddressSpotOrdersResponse, error) + // Deprecated: use FetchChainSpotOrdersByHashesV2 instead FetchChainSpotOrdersByHashes(ctx context.Context, marketId string, subaccountId string, orderHashes []string) (*exchangetypes.QuerySpotOrdersByHashesResponse, error) + // Deprecated: use FetchChainSubaccountOrdersV2 instead FetchChainSubaccountOrders(ctx context.Context, subaccountId string, marketId string) (*exchangetypes.QuerySubaccountOrdersResponse, error) + // Deprecated: use FetchChainTraderSpotTransientOrdersV2 instead FetchChainTraderSpotTransientOrders(ctx context.Context, marketId string, subaccountId string) (*exchangetypes.QueryTraderSpotOrdersResponse, error) + // Deprecated: use FetchSpotMidPriceAndTOBV2 instead FetchSpotMidPriceAndTOB(ctx context.Context, marketId string) (*exchangetypes.QuerySpotMidPriceAndTOBResponse, error) + // Deprecated: use FetchDerivativeMidPriceAndTOBV2 instead FetchDerivativeMidPriceAndTOB(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMidPriceAndTOBResponse, error) + // Deprecated: use FetchChainDerivativeOrderbookV2 instead FetchChainDerivativeOrderbook(ctx context.Context, marketId string, limit uint64, limitCumulativeNotional sdkmath.LegacyDec) (*exchangetypes.QueryDerivativeOrderbookResponse, error) + // Deprecated: use FetchChainTraderDerivativeOrdersV2 instead FetchChainTraderDerivativeOrders(ctx context.Context, marketId string, subaccountId string) (*exchangetypes.QueryTraderDerivativeOrdersResponse, error) + // Deprecated: use FetchChainAccountAddressDerivativeOrdersV2 instead FetchChainAccountAddressDerivativeOrders(ctx context.Context, marketId string, address string) (*exchangetypes.QueryAccountAddressDerivativeOrdersResponse, error) + // Deprecated: use FetchChainDerivativeOrdersByHashesV2 instead FetchChainDerivativeOrdersByHashes(ctx context.Context, marketId string, subaccountId string, orderHashes []string) (*exchangetypes.QueryDerivativeOrdersByHashesResponse, error) + // Deprecated: use FetchChainTraderDerivativeTransientOrdersV2 instead FetchChainTraderDerivativeTransientOrders(ctx context.Context, marketId string, subaccountId string) (*exchangetypes.QueryTraderDerivativeOrdersResponse, error) + // Deprecated: use FetchChainDerivativeMarketV2 instead FetchChainDerivativeMarkets(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangetypes.QueryDerivativeMarketsResponse, error) + // Deprecated: use FetchChainDerivativeMarketV2 instead FetchChainDerivativeMarket(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMarketResponse, error) + // Deprecated: use FetchDerivativeMarketAddressV2 instead FetchDerivativeMarketAddress(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMarketAddressResponse, error) + // Deprecated: use FetchSubaccountTradeNonceV2 instead FetchSubaccountTradeNonce(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) + // Deprecated: use FetchChainPositionsV2 instead FetchChainPositions(ctx context.Context) (*exchangetypes.QueryPositionsResponse, error) + // Deprecated: use FetchChainSubaccountPositionsV2 instead FetchChainSubaccountPositions(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountPositionsResponse, error) + // Deprecated: use FetchChainSubaccountPositionInMarketV2 instead FetchChainSubaccountPositionInMarket(ctx context.Context, subaccountId string, marketId string) (*exchangetypes.QuerySubaccountPositionInMarketResponse, error) + // Deprecated: use FetchChainSubaccountEffectivePositionInMarketV2 instead FetchChainSubaccountEffectivePositionInMarket(ctx context.Context, subaccountId string, marketId string) (*exchangetypes.QuerySubaccountEffectivePositionInMarketResponse, error) + // Deprecated: use FetchChainPerpetualMarketInfoV2 instead FetchChainPerpetualMarketInfo(ctx context.Context, marketId string) (*exchangetypes.QueryPerpetualMarketInfoResponse, error) + // Deprecated: use FetchChainExpiryFuturesMarketInfoV2 instead FetchChainExpiryFuturesMarketInfo(ctx context.Context, marketId string) (*exchangetypes.QueryExpiryFuturesMarketInfoResponse, error) + // Deprecated: use FetchChainPerpetualMarketFundingV2 instead FetchChainPerpetualMarketFunding(ctx context.Context, marketId string) (*exchangetypes.QueryPerpetualMarketFundingResponse, error) + // Deprecated: use FetchSubaccountOrderMetadataV2 instead FetchSubaccountOrderMetadata(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountOrderMetadataResponse, error) + // Deprecated: use FetchTradeRewardPointsV2 instead FetchTradeRewardPoints(ctx context.Context, accounts []string) (*exchangetypes.QueryTradeRewardPointsResponse, error) + // Deprecated: use FetchPendingTradeRewardPointsV2 instead FetchPendingTradeRewardPoints(ctx context.Context, accounts []string) (*exchangetypes.QueryTradeRewardPointsResponse, error) + // Deprecated: use FetchFeeDiscountAccountInfoV2 instead FetchFeeDiscountAccountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) + // Deprecated: use FetchTradeRewardCampaignV2 instead FetchTradeRewardCampaign(ctx context.Context) (*exchangetypes.QueryTradeRewardCampaignResponse, error) + // Deprecated: use FetchFeeDiscountScheduleV2 instead FetchFeeDiscountSchedule(ctx context.Context) (*exchangetypes.QueryFeeDiscountScheduleResponse, error) + // Deprecated: use FetchBalanceMismatchesV2 instead FetchBalanceMismatches(ctx context.Context, dustFactor int64) (*exchangetypes.QueryBalanceMismatchesResponse, error) + // Deprecated: use FetchBalanceWithBalanceHoldsV2 instead FetchBalanceWithBalanceHolds(ctx context.Context) (*exchangetypes.QueryBalanceWithBalanceHoldsResponse, error) + // Deprecated: use FetchFeeDiscountTierStatisticsV2 instead FetchFeeDiscountTierStatistics(ctx context.Context) (*exchangetypes.QueryFeeDiscountTierStatisticsResponse, error) + // Deprecated: use FetchMitoVaultInfosV2 instead FetchMitoVaultInfos(ctx context.Context) (*exchangetypes.MitoVaultInfosResponse, error) + // Deprecated: use FetchMarketIDFromVaultV2 instead FetchMarketIDFromVault(ctx context.Context, vaultAddress string) (*exchangetypes.QueryMarketIDFromVaultResponse, error) + // Deprecated: use FetchHistoricalTradeRecordsV2 instead FetchHistoricalTradeRecords(ctx context.Context, marketId string) (*exchangetypes.QueryHistoricalTradeRecordsResponse, error) + // Deprecated: use FetchIsOptedOutOfRewardsV2 instead FetchIsOptedOutOfRewards(ctx context.Context, account string) (*exchangetypes.QueryIsOptedOutOfRewardsResponse, error) + // Deprecated: use FetchOptedOutOfRewardsAccountsV2 instead FetchOptedOutOfRewardsAccounts(ctx context.Context) (*exchangetypes.QueryOptedOutOfRewardsAccountsResponse, error) + // Deprecated: use FetchMarketVolatilityV2 instead FetchMarketVolatility(ctx context.Context, marketId string, tradeHistoryOptions *exchangetypes.TradeHistoryOptions) (*exchangetypes.QueryMarketVolatilityResponse, error) + // Deprecated: use FetchChainBinaryOptionsMarketsV2 instead FetchChainBinaryOptionsMarkets(ctx context.Context, status string) (*exchangetypes.QueryBinaryMarketsResponse, error) + // Deprecated: use FetchTraderDerivativeConditionalOrdersV2 instead FetchTraderDerivativeConditionalOrders(ctx context.Context, subaccountId string, marketId string) (*exchangetypes.QueryTraderDerivativeConditionalOrdersResponse, error) + // Deprecated: use FetchMarketAtomicExecutionFeeMultiplierV2 instead FetchMarketAtomicExecutionFeeMultiplier(ctx context.Context, marketId string) (*exchangetypes.QueryMarketAtomicExecutionFeeMultiplierResponse, error) + // chain exchange v2 module + FetchSubaccountDepositsV2(ctx context.Context, subaccountID string) (*exchangev2types.QuerySubaccountDepositsResponse, error) + FetchSubaccountDepositV2(ctx context.Context, subaccountId string, denom string) (*exchangev2types.QuerySubaccountDepositResponse, error) + FetchExchangeBalancesV2(ctx context.Context) (*exchangev2types.QueryExchangeBalancesResponse, error) + FetchAggregateVolumeV2(ctx context.Context, account string) (*exchangev2types.QueryAggregateVolumeResponse, error) + FetchAggregateVolumesV2(ctx context.Context, accounts []string, marketIDs []string) (*exchangev2types.QueryAggregateVolumesResponse, error) + FetchAggregateMarketVolumeV2(ctx context.Context, marketId string) (*exchangev2types.QueryAggregateMarketVolumeResponse, error) + FetchAggregateMarketVolumesV2(ctx context.Context, marketIDs []string) (*exchangev2types.QueryAggregateMarketVolumesResponse, error) + FetchDenomDecimalV2(ctx context.Context, denom string) (*exchangev2types.QueryDenomDecimalResponse, error) + FetchDenomDecimalsV2(ctx context.Context, denoms []string) (*exchangev2types.QueryDenomDecimalsResponse, error) + FetchChainSpotMarketsV2(ctx context.Context, status string, marketIDs []string) (*exchangev2types.QuerySpotMarketsResponse, error) + FetchChainSpotMarketV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMarketResponse, error) + FetchChainFullSpotMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketsResponse, error) + FetchChainFullSpotMarketV2(ctx context.Context, marketId string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketResponse, error) + FetchChainSpotOrderbookV2(ctx context.Context, marketId string, limit uint64, orderSide exchangev2types.OrderSide, limitCumulativeNotional sdkmath.LegacyDec, limitCumulativeQuantity sdkmath.LegacyDec) (*exchangev2types.QuerySpotOrderbookResponse, error) + FetchChainTraderSpotOrdersV2(ctx context.Context, marketId string, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) + FetchChainAccountAddressSpotOrdersV2(ctx context.Context, marketId string, address string) (*exchangev2types.QueryAccountAddressSpotOrdersResponse, error) + FetchChainSpotOrdersByHashesV2(ctx context.Context, marketId string, subaccountId string, orderHashes []string) (*exchangev2types.QuerySpotOrdersByHashesResponse, error) + FetchChainSubaccountOrdersV2(ctx context.Context, subaccountId string, marketId string) (*exchangev2types.QuerySubaccountOrdersResponse, error) + FetchChainTraderSpotTransientOrdersV2(ctx context.Context, marketId string, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) + FetchSpotMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMidPriceAndTOBResponse, error) + FetchDerivativeMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMidPriceAndTOBResponse, error) + FetchChainDerivativeOrderbookV2(ctx context.Context, marketId string, limit uint64, limitCumulativeNotional sdkmath.LegacyDec) (*exchangev2types.QueryDerivativeOrderbookResponse, error) + FetchChainTraderDerivativeOrdersV2(ctx context.Context, marketId string, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) + FetchChainAccountAddressDerivativeOrdersV2(ctx context.Context, marketId string, address string) (*exchangev2types.QueryAccountAddressDerivativeOrdersResponse, error) + FetchChainDerivativeOrdersByHashesV2(ctx context.Context, marketId string, subaccountId string, orderHashes []string) (*exchangev2types.QueryDerivativeOrdersByHashesResponse, error) + FetchChainTraderDerivativeTransientOrdersV2(ctx context.Context, marketId string, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) + FetchChainDerivativeMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryDerivativeMarketsResponse, error) + FetchChainDerivativeMarketV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketResponse, error) + FetchDerivativeMarketAddressV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketAddressResponse, error) + FetchSubaccountTradeNonceV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountTradeNonceResponse, error) + FetchChainPositionsV2(ctx context.Context) (*exchangev2types.QueryPositionsResponse, error) + FetchChainSubaccountPositionsV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountPositionsResponse, error) + FetchChainSubaccountPositionInMarketV2(ctx context.Context, subaccountId string, marketId string) (*exchangev2types.QuerySubaccountPositionInMarketResponse, error) + FetchChainSubaccountEffectivePositionInMarketV2(ctx context.Context, subaccountId string, marketId string) (*exchangev2types.QuerySubaccountEffectivePositionInMarketResponse, error) + FetchChainPerpetualMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketInfoResponse, error) + FetchChainExpiryFuturesMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryExpiryFuturesMarketInfoResponse, error) + FetchChainPerpetualMarketFundingV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketFundingResponse, error) + FetchSubaccountOrderMetadataV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountOrderMetadataResponse, error) + FetchTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) + FetchPendingTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) + FetchFeeDiscountAccountInfoV2(ctx context.Context, account string) (*exchangev2types.QueryFeeDiscountAccountInfoResponse, error) + FetchTradeRewardCampaignV2(ctx context.Context) (*exchangev2types.QueryTradeRewardCampaignResponse, error) + FetchFeeDiscountScheduleV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountScheduleResponse, error) + FetchBalanceMismatchesV2(ctx context.Context, dustFactor int64) (*exchangev2types.QueryBalanceMismatchesResponse, error) + FetchBalanceWithBalanceHoldsV2(ctx context.Context) (*exchangev2types.QueryBalanceWithBalanceHoldsResponse, error) + FetchFeeDiscountTierStatisticsV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountTierStatisticsResponse, error) + FetchMitoVaultInfosV2(ctx context.Context) (*exchangev2types.MitoVaultInfosResponse, error) + FetchMarketIDFromVaultV2(ctx context.Context, vaultAddress string) (*exchangev2types.QueryMarketIDFromVaultResponse, error) + FetchHistoricalTradeRecordsV2(ctx context.Context, marketId string) (*exchangev2types.QueryHistoricalTradeRecordsResponse, error) + FetchIsOptedOutOfRewardsV2(ctx context.Context, account string) (*exchangev2types.QueryIsOptedOutOfRewardsResponse, error) + FetchOptedOutOfRewardsAccountsV2(ctx context.Context) (*exchangev2types.QueryOptedOutOfRewardsAccountsResponse, error) + FetchMarketVolatilityV2(ctx context.Context, marketId string, tradeHistoryOptions *exchangev2types.TradeHistoryOptions) (*exchangev2types.QueryMarketVolatilityResponse, error) + FetchChainBinaryOptionsMarketsV2(ctx context.Context, status string) (*exchangev2types.QueryBinaryMarketsResponse, error) + FetchTraderDerivativeConditionalOrdersV2(ctx context.Context, subaccountId string, marketId string) (*exchangev2types.QueryTraderDerivativeConditionalOrdersResponse, error) + FetchMarketAtomicExecutionFeeMultiplierV2(ctx context.Context, marketId string) (*exchangev2types.QueryMarketAtomicExecutionFeeMultiplierResponse, error) + FetchActiveStakeGrantV2(ctx context.Context, grantee string) (*exchangev2types.QueryActiveStakeGrantResponse, error) + FetchGrantAuthorizationV2(ctx context.Context, granter, grantee string) (*exchangev2types.QueryGrantAuthorizationResponse, error) + FetchGrantAuthorizationsV2(ctx context.Context, granter string) (*exchangev2types.QueryGrantAuthorizationsResponse, error) + FetchL3DerivativeOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullDerivativeOrderbookResponse, error) + FetchL3SpotOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullSpotOrderbookResponse, error) + // Tendermint module FetchNodeInfo(ctx context.Context) (*cmtservice.GetNodeInfoResponse, error) FetchSyncing(ctx context.Context) (*cmtservice.GetSyncingResponse, error) @@ -298,6 +420,8 @@ type ChainClient interface { Close() } +var _ ChainClient = &chainClient{} + type chainClient struct { ctx client.Context network common.Network @@ -329,6 +453,7 @@ type chainClient struct { chainStreamClient chainstreamtypes.StreamClient distributionQueryClient distributiontypes.QueryClient exchangeQueryClient exchangetypes.QueryClient + exchangeV2QueryClient exchangev2types.QueryClient ibcChannelQueryClient ibcchanneltypes.QueryClient ibcClientQueryClient ibcclienttypes.QueryClient ibcConnectionQueryClient ibcconnectiontypes.QueryClient @@ -430,6 +555,7 @@ func NewChainClient( chainStreamClient: chainstreamtypes.NewStreamClient(chainStreamConn), distributionQueryClient: distributiontypes.NewQueryClient(conn), exchangeQueryClient: exchangetypes.NewQueryClient(conn), + exchangeV2QueryClient: exchangev2types.NewQueryClient(conn), ibcChannelQueryClient: ibcchanneltypes.NewQueryClient(conn), ibcClientQueryClient: ibcclienttypes.NewQueryClient(conn), ibcConnectionQueryClient: ibcconnectiontypes.NewQueryClient(conn), @@ -463,6 +589,7 @@ func NewChainClient( return cc, nil } + func (c *chainClient) syncNonce() { num, seq, err := c.txFactory.AccountRetriever().GetAccountNumberSequence(c.ctx, c.ctx.GetFromAddress()) if err != nil { @@ -709,15 +836,6 @@ func (c *chainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRes return res, nil } -func (c *chainClient) GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) { - req := &exchangetypes.QueryFeeDiscountAccountInfoRequest{ - Account: account, - } - res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.FeeDiscountAccountInfo, req) - - return res, err -} - func (c *chainClient) SimulateMsg(clientCtx client.Context, msgs ...sdk.Msg) (*txtypes.SimulateResponse, error) { c.txFactory = c.txFactory.WithSequence(c.accSeq) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) @@ -1065,6 +1183,7 @@ func (c *chainClient) Subaccount(account sdk.AccAddress, index int) ethcommon.Ha return ethcommon.HexToHash(subaccountId) } +// Deprecated: use GetSubAccountNonceV2 instead func (c *chainClient) GetSubAccountNonce(ctx context.Context, subaccountId ethcommon.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) { req := &exchangetypes.QuerySubaccountTradeNonceRequest{SubaccountId: subaccountId.String()} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.SubaccountTradeNonce, req) @@ -1072,16 +1191,33 @@ func (c *chainClient) GetSubAccountNonce(ctx context.Context, subaccountId ethco return res, err } -// Deprecated: Use CreateSpotOrder instead -func (c *chainClient) SpotOrder(defaultSubaccountID ethcommon.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder { - assistant, err := NewMarketsAssistant(network.Name) - if err != nil { - panic(err) +// Deprecated: use GetFeeDiscountInfoV2 instead +func (c *chainClient) GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) { + req := &exchangetypes.QueryFeeDiscountAccountInfoRequest{ + Account: account, } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.FeeDiscountAccountInfo, req) + + return res, err +} - return c.CreateSpotOrder(defaultSubaccountID, d, assistant) +func (c *chainClient) GetSubAccountNonceV2(ctx context.Context, subaccountId ethcommon.Hash) (*exchangev2types.QuerySubaccountTradeNonceResponse, error) { + req := &exchangev2types.QuerySubaccountTradeNonceRequest{SubaccountId: subaccountId.String()} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountTradeNonce, req) + + return res, err } +func (c *chainClient) GetFeeDiscountInfoV2(ctx context.Context, account string) (*exchangev2types.QueryFeeDiscountAccountInfoResponse, error) { + req := &exchangev2types.QueryFeeDiscountAccountInfoRequest{ + Account: account, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FeeDiscountAccountInfo, req) + + return res, err +} + +// Deprecated: use CreateSpotOrderV2 instead func (c *chainClient) CreateSpotOrder(defaultSubaccountID ethcommon.Hash, d *SpotOrderData, marketsAssistant MarketsAssistant) *exchangetypes.SpotOrder { market, isPresent := marketsAssistant.AllSpotMarkets()[d.MarketId] @@ -1094,7 +1230,7 @@ func (c *chainClient) CreateSpotOrder(defaultSubaccountID ethcommon.Hash, d *Spo return &exchangetypes.SpotOrder{ MarketId: d.MarketId, - OrderType: d.OrderType, + OrderType: exchangetypes.OrderType(d.OrderType), OrderInfo: exchangetypes.OrderInfo{ SubaccountId: defaultSubaccountID.Hex(), FeeRecipient: d.FeeRecipient, @@ -1105,17 +1241,7 @@ func (c *chainClient) CreateSpotOrder(defaultSubaccountID ethcommon.Hash, d *Spo } } -// Deprecated: Use CreateDerivativeOrder instead -func (c *chainClient) DerivativeOrder(defaultSubaccountID ethcommon.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder { - - assistant, err := NewMarketsAssistant(network.Name) - if err != nil { - panic(err) - } - - return c.CreateDerivativeOrder(defaultSubaccountID, d, assistant) -} - +// Deprecated: use CreateDerivativeOrderV2 instead func (c *chainClient) CreateDerivativeOrder(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder { market, isPresent := marketAssistant.AllDerivativeMarkets()[d.MarketId] if !isPresent { @@ -1132,7 +1258,7 @@ func (c *chainClient) CreateDerivativeOrder(defaultSubaccountID ethcommon.Hash, return &exchangetypes.DerivativeOrder{ MarketId: d.MarketId, - OrderType: d.OrderType, + OrderType: exchangetypes.OrderType(d.OrderType), Margin: orderMargin, OrderInfo: exchangetypes.OrderInfo{ SubaccountId: defaultSubaccountID.Hex(), @@ -1144,6 +1270,7 @@ func (c *chainClient) CreateDerivativeOrder(defaultSubaccountID ethcommon.Hash, } } +// Deprecated: use OrderCancelV2 instead func (c *chainClient) OrderCancel(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangetypes.OrderData { return &exchangetypes.OrderData{ MarketId: d.MarketId, @@ -1153,6 +1280,50 @@ func (c *chainClient) OrderCancel(defaultSubaccountID ethcommon.Hash, d *OrderCa } } +func (c *chainClient) CreateSpotOrderV2(defaultSubaccountID ethcommon.Hash, d *SpotOrderData) *exchangev2types.SpotOrder { + return &exchangev2types.SpotOrder{ + MarketId: d.MarketId, + OrderType: d.OrderType, + OrderInfo: exchangev2types.OrderInfo{ + SubaccountId: defaultSubaccountID.Hex(), + FeeRecipient: d.FeeRecipient, + Price: sdkmath.LegacyMustNewDecFromStr(d.Price.String()), + Quantity: sdkmath.LegacyMustNewDecFromStr(d.Quantity.String()), + Cid: d.Cid, + }, + } +} + +func (c *chainClient) CreateDerivativeOrderV2(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData) *exchangev2types.DerivativeOrder { + orderMargin := sdkmath.LegacyMustNewDecFromStr("0") + + if !d.IsReduceOnly { + orderMargin = sdkmath.LegacyMustNewDecFromStr(d.Quantity.Mul(d.Price).Div(d.Leverage).String()) + } + + return &exchangev2types.DerivativeOrder{ + MarketId: d.MarketId, + OrderType: d.OrderType, + Margin: orderMargin, + OrderInfo: exchangev2types.OrderInfo{ + SubaccountId: defaultSubaccountID.Hex(), + FeeRecipient: d.FeeRecipient, + Price: sdkmath.LegacyMustNewDecFromStr(d.Price.String()), + Quantity: sdkmath.LegacyMustNewDecFromStr(d.Quantity.String()), + Cid: d.Cid, + }, + } +} + +func (c *chainClient) OrderCancelV2(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangev2types.OrderData { + return &exchangev2types.OrderData{ + MarketId: d.MarketId, + OrderHash: d.OrderHash, + SubaccountId: defaultSubaccountID.Hex(), + Cid: d.Cid, + } +} + func (c *chainClient) GetAuthzGrants(ctx context.Context, req authztypes.QueryGrantsRequest) (*authztypes.QueryGrantsResponse, error) { res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.authzQueryClient.Grants, &req) @@ -1178,19 +1349,19 @@ func (c *chainClient) BuildGenericAuthz(granter, grantee, msgtype string, expire type ExchangeAuthz string var ( - CreateSpotLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateSpotLimitOrderAuthz{})) - CreateSpotMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateSpotMarketOrderAuthz{})) - BatchCreateSpotLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCreateSpotLimitOrdersAuthz{})) - CancelSpotOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CancelSpotOrderAuthz{})) - BatchCancelSpotOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCancelSpotOrdersAuthz{})) - - CreateDerivativeLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateDerivativeLimitOrderAuthz{})) - CreateDerivativeMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateDerivativeMarketOrderAuthz{})) - BatchCreateDerivativeLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCreateDerivativeLimitOrdersAuthz{})) - CancelDerivativeOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CancelDerivativeOrderAuthz{})) - BatchCancelDerivativeOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCancelDerivativeOrdersAuthz{})) - - BatchUpdateOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchUpdateOrdersAuthz{})) + CreateSpotLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CreateSpotLimitOrderAuthz{})) + CreateSpotMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CreateSpotMarketOrderAuthz{})) + BatchCreateSpotLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.BatchCreateSpotLimitOrdersAuthz{})) + CancelSpotOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CancelSpotOrderAuthz{})) + BatchCancelSpotOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.BatchCancelSpotOrdersAuthz{})) + + CreateDerivativeLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CreateDerivativeLimitOrderAuthz{})) + CreateDerivativeMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CreateDerivativeMarketOrderAuthz{})) + BatchCreateDerivativeLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.BatchCreateDerivativeLimitOrdersAuthz{})) + CancelDerivativeOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.CancelDerivativeOrderAuthz{})) + BatchCancelDerivativeOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.BatchCancelDerivativeOrdersAuthz{})) + + BatchUpdateOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangev2types.BatchUpdateOrdersAuthz{})) ) func (c *chainClient) BuildExchangeAuthz(granter, grantee string, authzType ExchangeAuthz, subaccountId string, markets []string, expireIn time.Time) *authztypes.MsgGrant { @@ -1202,62 +1373,62 @@ func (c *chainClient) BuildExchangeAuthz(granter, grantee string, authzType Exch switch authzType { // spot msgs case CreateSpotLimitOrderAuthz: - typedAuthz := &exchangetypes.CreateSpotLimitOrderAuthz{ + typedAuthz := &exchangev2types.CreateSpotLimitOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case CreateSpotMarketOrderAuthz: - typedAuthz := &exchangetypes.CreateSpotMarketOrderAuthz{ + typedAuthz := &exchangev2types.CreateSpotMarketOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case BatchCreateSpotLimitOrdersAuthz: - typedAuthz := &exchangetypes.BatchCreateSpotLimitOrdersAuthz{ + typedAuthz := &exchangev2types.BatchCreateSpotLimitOrdersAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case CancelSpotOrderAuthz: - typedAuthz := &exchangetypes.CancelSpotOrderAuthz{ + typedAuthz := &exchangev2types.CancelSpotOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case BatchCancelSpotOrdersAuthz: - typedAuthz := &exchangetypes.BatchCancelSpotOrdersAuthz{ + typedAuthz := &exchangev2types.BatchCancelSpotOrdersAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() // derivative msgs case CreateDerivativeLimitOrderAuthz: - typedAuthz := &exchangetypes.CreateDerivativeLimitOrderAuthz{ + typedAuthz := &exchangev2types.CreateDerivativeLimitOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case CreateDerivativeMarketOrderAuthz: - typedAuthz := &exchangetypes.CreateDerivativeMarketOrderAuthz{ + typedAuthz := &exchangev2types.CreateDerivativeMarketOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case BatchCreateDerivativeLimitOrdersAuthz: - typedAuthz := &exchangetypes.BatchCreateDerivativeLimitOrdersAuthz{ + typedAuthz := &exchangev2types.BatchCreateDerivativeLimitOrdersAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case CancelDerivativeOrderAuthz: - typedAuthz := &exchangetypes.CancelDerivativeOrderAuthz{ + typedAuthz := &exchangev2types.CancelDerivativeOrderAuthz{ SubaccountId: subaccountId, MarketIds: markets, } typedAuthzBytes, _ = typedAuthz.Marshal() case BatchCancelDerivativeOrdersAuthz: - typedAuthz := &exchangetypes.BatchCancelDerivativeOrdersAuthz{ + typedAuthz := &exchangev2types.BatchCancelDerivativeOrdersAuthz{ SubaccountId: subaccountId, MarketIds: markets, } @@ -1295,7 +1466,7 @@ func (c *chainClient) BuildExchangeBatchUpdateOrdersAuthz( if c.ofacChecker.IsBlacklisted(granter) { panic("Address is in the OFAC list") // panics should generally be avoided, but otherwise function signature should be changed } - typedAuthz := &exchangetypes.BatchUpdateOrdersAuthz{ + typedAuthz := &exchangev2types.BatchUpdateOrdersAuthz{ SubaccountId: subaccountId, SpotMarkets: spotMarkets, DerivativeMarkets: derivativeMarkets, @@ -1374,6 +1545,7 @@ func (c *chainClient) StreamEventOrderFailWithWebsocket(sender string, websocket } } +// Deprecated: use the chain stream instead func (c *chainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIDs []string, orderbookCh chan exchangetypes.Orderbook) { var cometbftClient *rpchttp.HTTP var err error @@ -1400,6 +1572,7 @@ func (c *chainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, m } +// Deprecated: use the chain stream instead func (c *chainClient) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIDs []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) { filter := fmt.Sprintf("tm.event='NewBlock' AND %s EXISTS", orderbookType) eventCh, err := websocket.Subscribe(context.Background(), "OrderbookUpdate", filter, 10000) @@ -1611,7 +1784,7 @@ func (c *chainClient) FetchTokenfactoryModuleState(ctx context.Context) (*tokenf } type DerivativeOrderData struct { - OrderType exchangetypes.OrderType + OrderType exchangev2types.OrderType Price decimal.Decimal Quantity decimal.Decimal Leverage decimal.Decimal @@ -1622,7 +1795,7 @@ type DerivativeOrderData struct { } type SpotOrderData struct { - OrderType exchangetypes.OrderType + OrderType exchangev2types.OrderType Price decimal.Decimal Quantity decimal.Decimal FeeRecipient string @@ -1721,6 +1894,8 @@ func (c *chainClient) FetchCommunityPool(ctx context.Context) (*distributiontype } // Chain exchange module + +// Deprecated: use FetchSubaccountDepositsV2 instead func (c *chainClient) FetchSubaccountDeposits(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountDepositsResponse, error) { req := &exchangetypes.QuerySubaccountDepositsRequest{ SubaccountId: subaccountId, @@ -1730,6 +1905,7 @@ func (c *chainClient) FetchSubaccountDeposits(ctx context.Context, subaccountId return res, err } +// Deprecated: use FetchSubaccountDepositV2 instead func (c *chainClient) FetchSubaccountDeposit(ctx context.Context, subaccountId, denom string) (*exchangetypes.QuerySubaccountDepositResponse, error) { req := &exchangetypes.QuerySubaccountDepositRequest{ SubaccountId: subaccountId, @@ -1740,6 +1916,7 @@ func (c *chainClient) FetchSubaccountDeposit(ctx context.Context, subaccountId, return res, err } +// Deprecated: use FetchExchangeBalancesV2 instead func (c *chainClient) FetchExchangeBalances(ctx context.Context) (*exchangetypes.QueryExchangeBalancesResponse, error) { req := &exchangetypes.QueryExchangeBalancesRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.ExchangeBalances, req) @@ -1747,6 +1924,7 @@ func (c *chainClient) FetchExchangeBalances(ctx context.Context) (*exchangetypes return res, err } +// Deprecated: use FetchAggregateVolumeV2 instead func (c *chainClient) FetchAggregateVolume(ctx context.Context, account string) (*exchangetypes.QueryAggregateVolumeResponse, error) { req := &exchangetypes.QueryAggregateVolumeRequest{ Account: account, @@ -1756,6 +1934,7 @@ func (c *chainClient) FetchAggregateVolume(ctx context.Context, account string) return res, err } +// Deprecated: use FetchAggregateVolumesV2 instead func (c *chainClient) FetchAggregateVolumes(ctx context.Context, accounts, marketIDs []string) (*exchangetypes.QueryAggregateVolumesResponse, error) { req := &exchangetypes.QueryAggregateVolumesRequest{ Accounts: accounts, @@ -1766,6 +1945,7 @@ func (c *chainClient) FetchAggregateVolumes(ctx context.Context, accounts, marke return res, err } +// Deprecated: use FetchAggregateMarketVolumeV2 instead func (c *chainClient) FetchAggregateMarketVolume(ctx context.Context, marketId string) (*exchangetypes.QueryAggregateMarketVolumeResponse, error) { req := &exchangetypes.QueryAggregateMarketVolumeRequest{ MarketId: marketId, @@ -1775,6 +1955,7 @@ func (c *chainClient) FetchAggregateMarketVolume(ctx context.Context, marketId s return res, err } +// Deprecated: use FetchAggregateMarketVolumesV2 instead func (c *chainClient) FetchAggregateMarketVolumes(ctx context.Context, marketIDs []string) (*exchangetypes.QueryAggregateMarketVolumesResponse, error) { req := &exchangetypes.QueryAggregateMarketVolumesRequest{ MarketIds: marketIDs, @@ -1784,6 +1965,7 @@ func (c *chainClient) FetchAggregateMarketVolumes(ctx context.Context, marketIDs return res, err } +// Deprecated: use FetchDenomDecimalV2 instead func (c *chainClient) FetchDenomDecimal(ctx context.Context, denom string) (*exchangetypes.QueryDenomDecimalResponse, error) { req := &exchangetypes.QueryDenomDecimalRequest{ Denom: denom, @@ -1793,6 +1975,7 @@ func (c *chainClient) FetchDenomDecimal(ctx context.Context, denom string) (*exc return res, err } +// Deprecated: use FetchDenomDecimalsV2 instead func (c *chainClient) FetchDenomDecimals(ctx context.Context, denoms []string) (*exchangetypes.QueryDenomDecimalsResponse, error) { req := &exchangetypes.QueryDenomDecimalsRequest{ Denoms: denoms, @@ -1802,6 +1985,7 @@ func (c *chainClient) FetchDenomDecimals(ctx context.Context, denoms []string) ( return res, err } +// Deprecated: use FetchChainSpotMarketsV2 instead func (c *chainClient) FetchChainSpotMarkets(ctx context.Context, status string, marketIDs []string) (*exchangetypes.QuerySpotMarketsResponse, error) { req := &exchangetypes.QuerySpotMarketsRequest{ MarketIds: marketIDs, @@ -1814,6 +1998,7 @@ func (c *chainClient) FetchChainSpotMarkets(ctx context.Context, status string, return res, err } +// Deprecated: use FetchChainSpotMarketV2 instead func (c *chainClient) FetchChainSpotMarket(ctx context.Context, marketId string) (*exchangetypes.QuerySpotMarketResponse, error) { req := &exchangetypes.QuerySpotMarketRequest{ MarketId: marketId, @@ -1823,6 +2008,7 @@ func (c *chainClient) FetchChainSpotMarket(ctx context.Context, marketId string) return res, err } +// Deprecated: use FetchChainFullSpotMarketsV2 instead func (c *chainClient) FetchChainFullSpotMarkets(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangetypes.QueryFullSpotMarketsResponse, error) { req := &exchangetypes.QueryFullSpotMarketsRequest{ MarketIds: marketIDs, @@ -1836,6 +2022,7 @@ func (c *chainClient) FetchChainFullSpotMarkets(ctx context.Context, status stri return res, err } +// Deprecated: use FetchChainFullSpotMarketV2 instead func (c *chainClient) FetchChainFullSpotMarket(ctx context.Context, marketId string, withMidPriceAndTob bool) (*exchangetypes.QueryFullSpotMarketResponse, error) { req := &exchangetypes.QueryFullSpotMarketRequest{ MarketId: marketId, @@ -1846,6 +2033,7 @@ func (c *chainClient) FetchChainFullSpotMarket(ctx context.Context, marketId str return res, err } +// Deprecated: use FetchChainSpotOrderbookV2 instead func (c *chainClient) FetchChainSpotOrderbook(ctx context.Context, marketId string, limit uint64, orderSide exchangetypes.OrderSide, limitCumulativeNotional, limitCumulativeQuantity sdkmath.LegacyDec) (*exchangetypes.QuerySpotOrderbookResponse, error) { req := &exchangetypes.QuerySpotOrderbookRequest{ MarketId: marketId, @@ -1859,6 +2047,7 @@ func (c *chainClient) FetchChainSpotOrderbook(ctx context.Context, marketId stri return res, err } +// Deprecated: use FetchChainTraderSpotOrdersV2 instead func (c *chainClient) FetchChainTraderSpotOrders(ctx context.Context, marketId, subaccountId string) (*exchangetypes.QueryTraderSpotOrdersResponse, error) { req := &exchangetypes.QueryTraderSpotOrdersRequest{ MarketId: marketId, @@ -1869,6 +2058,7 @@ func (c *chainClient) FetchChainTraderSpotOrders(ctx context.Context, marketId, return res, err } +// Deprecated: use FetchChainAccountAddressSpotOrdersV2 instead func (c *chainClient) FetchChainAccountAddressSpotOrders(ctx context.Context, marketId, address string) (*exchangetypes.QueryAccountAddressSpotOrdersResponse, error) { req := &exchangetypes.QueryAccountAddressSpotOrdersRequest{ MarketId: marketId, @@ -1879,6 +2069,7 @@ func (c *chainClient) FetchChainAccountAddressSpotOrders(ctx context.Context, ma return res, err } +// Deprecated: use FetchChainSpotOrdersByHashesV2 instead func (c *chainClient) FetchChainSpotOrdersByHashes(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangetypes.QuerySpotOrdersByHashesResponse, error) { req := &exchangetypes.QuerySpotOrdersByHashesRequest{ MarketId: marketId, @@ -1890,6 +2081,7 @@ func (c *chainClient) FetchChainSpotOrdersByHashes(ctx context.Context, marketId return res, err } +// Deprecated: use FetchChainSubaccountOrdersV2 instead func (c *chainClient) FetchChainSubaccountOrders(ctx context.Context, subaccountId, marketId string) (*exchangetypes.QuerySubaccountOrdersResponse, error) { req := &exchangetypes.QuerySubaccountOrdersRequest{ SubaccountId: subaccountId, @@ -1900,6 +2092,7 @@ func (c *chainClient) FetchChainSubaccountOrders(ctx context.Context, subaccount return res, err } +// Deprecated: use FetchChainTraderSpotTransientOrdersV2 instead func (c *chainClient) FetchChainTraderSpotTransientOrders(ctx context.Context, marketId, subaccountId string) (*exchangetypes.QueryTraderSpotOrdersResponse, error) { req := &exchangetypes.QueryTraderSpotOrdersRequest{ MarketId: marketId, @@ -1910,6 +2103,7 @@ func (c *chainClient) FetchChainTraderSpotTransientOrders(ctx context.Context, m return res, err } +// Deprecated: use FetchSpotMidPriceAndTOBV2 instead func (c *chainClient) FetchSpotMidPriceAndTOB(ctx context.Context, marketId string) (*exchangetypes.QuerySpotMidPriceAndTOBResponse, error) { req := &exchangetypes.QuerySpotMidPriceAndTOBRequest{ MarketId: marketId, @@ -1919,6 +2113,7 @@ func (c *chainClient) FetchSpotMidPriceAndTOB(ctx context.Context, marketId stri return res, err } +// Deprecated: use FetchDerivativeMidPriceAndTOBV2 instead func (c *chainClient) FetchDerivativeMidPriceAndTOB(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMidPriceAndTOBResponse, error) { req := &exchangetypes.QueryDerivativeMidPriceAndTOBRequest{ MarketId: marketId, @@ -1928,6 +2123,7 @@ func (c *chainClient) FetchDerivativeMidPriceAndTOB(ctx context.Context, marketI return res, err } +// Deprecated: use FetchChainDerivativeOrderbookV2 instead func (c *chainClient) FetchChainDerivativeOrderbook(ctx context.Context, marketId string, limit uint64, limitCumulativeNotional sdkmath.LegacyDec) (*exchangetypes.QueryDerivativeOrderbookResponse, error) { req := &exchangetypes.QueryDerivativeOrderbookRequest{ MarketId: marketId, @@ -1939,6 +2135,7 @@ func (c *chainClient) FetchChainDerivativeOrderbook(ctx context.Context, marketI return res, err } +// Deprecated: use FetchChainTraderDerivativeOrdersV2 instead func (c *chainClient) FetchChainTraderDerivativeOrders(ctx context.Context, marketId, subaccountId string) (*exchangetypes.QueryTraderDerivativeOrdersResponse, error) { req := &exchangetypes.QueryTraderDerivativeOrdersRequest{ MarketId: marketId, @@ -1949,6 +2146,7 @@ func (c *chainClient) FetchChainTraderDerivativeOrders(ctx context.Context, mark return res, err } +// Deprecated: use FetchChainAccountAddressDerivativeOrdersV2 instead func (c *chainClient) FetchChainAccountAddressDerivativeOrders(ctx context.Context, marketId, address string) (*exchangetypes.QueryAccountAddressDerivativeOrdersResponse, error) { req := &exchangetypes.QueryAccountAddressDerivativeOrdersRequest{ MarketId: marketId, @@ -1959,6 +2157,7 @@ func (c *chainClient) FetchChainAccountAddressDerivativeOrders(ctx context.Conte return res, err } +// Deprecated: use FetchChainDerivativeOrdersByHashesV2 instead func (c *chainClient) FetchChainDerivativeOrdersByHashes(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangetypes.QueryDerivativeOrdersByHashesResponse, error) { req := &exchangetypes.QueryDerivativeOrdersByHashesRequest{ MarketId: marketId, @@ -1970,6 +2169,7 @@ func (c *chainClient) FetchChainDerivativeOrdersByHashes(ctx context.Context, ma return res, err } +// Deprecated: use FetchChainTraderDerivativeTransientOrdersV2 instead func (c *chainClient) FetchChainTraderDerivativeTransientOrders(ctx context.Context, marketId, subaccountId string) (*exchangetypes.QueryTraderDerivativeOrdersResponse, error) { req := &exchangetypes.QueryTraderDerivativeOrdersRequest{ MarketId: marketId, @@ -1980,6 +2180,7 @@ func (c *chainClient) FetchChainTraderDerivativeTransientOrders(ctx context.Cont return res, err } +// Deprecated: use FetchChainDerivativeMarketsV2 instead func (c *chainClient) FetchChainDerivativeMarkets(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangetypes.QueryDerivativeMarketsResponse, error) { req := &exchangetypes.QueryDerivativeMarketsRequest{ MarketIds: marketIDs, @@ -1993,6 +2194,7 @@ func (c *chainClient) FetchChainDerivativeMarkets(ctx context.Context, status st return res, err } +// Deprecated: use FetchChainDerivativeMarketV2 instead func (c *chainClient) FetchChainDerivativeMarket(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMarketResponse, error) { req := &exchangetypes.QueryDerivativeMarketRequest{ MarketId: marketId, @@ -2002,6 +2204,7 @@ func (c *chainClient) FetchChainDerivativeMarket(ctx context.Context, marketId s return res, err } +// Deprecated: use FetchDerivativeMarketAddressV2 instead func (c *chainClient) FetchDerivativeMarketAddress(ctx context.Context, marketId string) (*exchangetypes.QueryDerivativeMarketAddressResponse, error) { req := &exchangetypes.QueryDerivativeMarketAddressRequest{ MarketId: marketId, @@ -2011,6 +2214,7 @@ func (c *chainClient) FetchDerivativeMarketAddress(ctx context.Context, marketId return res, err } +// Deprecated: use FetchSubaccountTradeNonceV2 instead func (c *chainClient) FetchSubaccountTradeNonce(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) { req := &exchangetypes.QuerySubaccountTradeNonceRequest{ SubaccountId: subaccountId, @@ -2020,6 +2224,7 @@ func (c *chainClient) FetchSubaccountTradeNonce(ctx context.Context, subaccountI return res, err } +// Deprecated: use FetchChainPositionsV2 instead func (c *chainClient) FetchChainPositions(ctx context.Context) (*exchangetypes.QueryPositionsResponse, error) { req := &exchangetypes.QueryPositionsRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.Positions, req) @@ -2027,6 +2232,7 @@ func (c *chainClient) FetchChainPositions(ctx context.Context) (*exchangetypes.Q return res, err } +// Deprecated: use FetchChainSubaccountPositionsV2 instead func (c *chainClient) FetchChainSubaccountPositions(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountPositionsResponse, error) { req := &exchangetypes.QuerySubaccountPositionsRequest{ SubaccountId: subaccountId, @@ -2036,6 +2242,7 @@ func (c *chainClient) FetchChainSubaccountPositions(ctx context.Context, subacco return res, err } +// Deprecated: use FetchChainSubaccountPositionInMarketV2 instead func (c *chainClient) FetchChainSubaccountPositionInMarket(ctx context.Context, subaccountId, marketId string) (*exchangetypes.QuerySubaccountPositionInMarketResponse, error) { req := &exchangetypes.QuerySubaccountPositionInMarketRequest{ SubaccountId: subaccountId, @@ -2046,6 +2253,7 @@ func (c *chainClient) FetchChainSubaccountPositionInMarket(ctx context.Context, return res, err } +// Deprecated: use FetchChainSubaccountEffectivePositionInMarketV2 instead func (c *chainClient) FetchChainSubaccountEffectivePositionInMarket(ctx context.Context, subaccountId, marketId string) (*exchangetypes.QuerySubaccountEffectivePositionInMarketResponse, error) { req := &exchangetypes.QuerySubaccountEffectivePositionInMarketRequest{ SubaccountId: subaccountId, @@ -2056,6 +2264,7 @@ func (c *chainClient) FetchChainSubaccountEffectivePositionInMarket(ctx context. return res, err } +// Deprecated: use FetchChainPerpetualMarketInfoV2 instead func (c *chainClient) FetchChainPerpetualMarketInfo(ctx context.Context, marketId string) (*exchangetypes.QueryPerpetualMarketInfoResponse, error) { req := &exchangetypes.QueryPerpetualMarketInfoRequest{ MarketId: marketId, @@ -2065,6 +2274,7 @@ func (c *chainClient) FetchChainPerpetualMarketInfo(ctx context.Context, marketI return res, err } +// Deprecated: use FetchChainExpiryFuturesMarketInfoV2 instead func (c *chainClient) FetchChainExpiryFuturesMarketInfo(ctx context.Context, marketId string) (*exchangetypes.QueryExpiryFuturesMarketInfoResponse, error) { req := &exchangetypes.QueryExpiryFuturesMarketInfoRequest{ MarketId: marketId, @@ -2074,6 +2284,7 @@ func (c *chainClient) FetchChainExpiryFuturesMarketInfo(ctx context.Context, mar return res, err } +// Deprecated: use FetchChainPerpetualMarketFundingV2 instead func (c *chainClient) FetchChainPerpetualMarketFunding(ctx context.Context, marketId string) (*exchangetypes.QueryPerpetualMarketFundingResponse, error) { req := &exchangetypes.QueryPerpetualMarketFundingRequest{ MarketId: marketId, @@ -2083,6 +2294,7 @@ func (c *chainClient) FetchChainPerpetualMarketFunding(ctx context.Context, mark return res, err } +// Deprecated: use FetchSubaccountOrderMetadataV2 instead func (c *chainClient) FetchSubaccountOrderMetadata(ctx context.Context, subaccountId string) (*exchangetypes.QuerySubaccountOrderMetadataResponse, error) { req := &exchangetypes.QuerySubaccountOrderMetadataRequest{ SubaccountId: subaccountId, @@ -2092,6 +2304,7 @@ func (c *chainClient) FetchSubaccountOrderMetadata(ctx context.Context, subaccou return res, err } +// Deprecated: use FetchTradeRewardPointsV2 instead func (c *chainClient) FetchTradeRewardPoints(ctx context.Context, accounts []string) (*exchangetypes.QueryTradeRewardPointsResponse, error) { req := &exchangetypes.QueryTradeRewardPointsRequest{ Accounts: accounts, @@ -2101,6 +2314,7 @@ func (c *chainClient) FetchTradeRewardPoints(ctx context.Context, accounts []str return res, err } +// Deprecated: use FetchPendingTradeRewardPointsV2 instead func (c *chainClient) FetchPendingTradeRewardPoints(ctx context.Context, accounts []string) (*exchangetypes.QueryTradeRewardPointsResponse, error) { req := &exchangetypes.QueryTradeRewardPointsRequest{ Accounts: accounts, @@ -2110,6 +2324,7 @@ func (c *chainClient) FetchPendingTradeRewardPoints(ctx context.Context, account return res, err } +// Deprecated: use FetchTradeRewardCampaignV2 instead func (c *chainClient) FetchTradeRewardCampaign(ctx context.Context) (*exchangetypes.QueryTradeRewardCampaignResponse, error) { req := &exchangetypes.QueryTradeRewardCampaignRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.TradeRewardCampaign, req) @@ -2117,6 +2332,7 @@ func (c *chainClient) FetchTradeRewardCampaign(ctx context.Context) (*exchangety return res, err } +// Deprecated: use FetchFeeDiscountAccountInfoV2 instead func (c *chainClient) FetchFeeDiscountAccountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) { req := &exchangetypes.QueryFeeDiscountAccountInfoRequest{ Account: account, @@ -2126,6 +2342,7 @@ func (c *chainClient) FetchFeeDiscountAccountInfo(ctx context.Context, account s return res, err } +// Deprecated: use FetchFeeDiscountScheduleV2 instead func (c *chainClient) FetchFeeDiscountSchedule(ctx context.Context) (*exchangetypes.QueryFeeDiscountScheduleResponse, error) { req := &exchangetypes.QueryFeeDiscountScheduleRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.FeeDiscountSchedule, req) @@ -2133,6 +2350,7 @@ func (c *chainClient) FetchFeeDiscountSchedule(ctx context.Context) (*exchangety return res, err } +// Deprecated: use FetchBalanceMismatchesV2 instead func (c *chainClient) FetchBalanceMismatches(ctx context.Context, dustFactor int64) (*exchangetypes.QueryBalanceMismatchesResponse, error) { req := &exchangetypes.QueryBalanceMismatchesRequest{ DustFactor: dustFactor, @@ -2142,6 +2360,7 @@ func (c *chainClient) FetchBalanceMismatches(ctx context.Context, dustFactor int return res, err } +// Deprecated: use FetchBalanceWithBalanceHoldsV2 instead func (c *chainClient) FetchBalanceWithBalanceHolds(ctx context.Context) (*exchangetypes.QueryBalanceWithBalanceHoldsResponse, error) { req := &exchangetypes.QueryBalanceWithBalanceHoldsRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.BalanceWithBalanceHolds, req) @@ -2149,6 +2368,7 @@ func (c *chainClient) FetchBalanceWithBalanceHolds(ctx context.Context) (*exchan return res, err } +// Deprecated: use FetchFeeDiscountTierStatisticsV2 instead func (c *chainClient) FetchFeeDiscountTierStatistics(ctx context.Context) (*exchangetypes.QueryFeeDiscountTierStatisticsResponse, error) { req := &exchangetypes.QueryFeeDiscountTierStatisticsRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.FeeDiscountTierStatistics, req) @@ -2156,6 +2376,7 @@ func (c *chainClient) FetchFeeDiscountTierStatistics(ctx context.Context) (*exch return res, err } +// Deprecated: use FetchMitoVaultInfosV2 instead func (c *chainClient) FetchMitoVaultInfos(ctx context.Context) (*exchangetypes.MitoVaultInfosResponse, error) { req := &exchangetypes.MitoVaultInfosRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.MitoVaultInfos, req) @@ -2163,6 +2384,7 @@ func (c *chainClient) FetchMitoVaultInfos(ctx context.Context) (*exchangetypes.M return res, err } +// Deprecated: use FetchMarketIDFromVaultV2 instead func (c *chainClient) FetchMarketIDFromVault(ctx context.Context, vaultAddress string) (*exchangetypes.QueryMarketIDFromVaultResponse, error) { req := &exchangetypes.QueryMarketIDFromVaultRequest{ VaultAddress: vaultAddress, @@ -2172,6 +2394,7 @@ func (c *chainClient) FetchMarketIDFromVault(ctx context.Context, vaultAddress s return res, err } +// Deprecated: use FetchHistoricalTradeRecordsV2 instead func (c *chainClient) FetchHistoricalTradeRecords(ctx context.Context, marketId string) (*exchangetypes.QueryHistoricalTradeRecordsResponse, error) { req := &exchangetypes.QueryHistoricalTradeRecordsRequest{ MarketId: marketId, @@ -2181,6 +2404,7 @@ func (c *chainClient) FetchHistoricalTradeRecords(ctx context.Context, marketId return res, err } +// Deprecated: use FetchIsOptedOutOfRewardsV2 instead func (c *chainClient) FetchIsOptedOutOfRewards(ctx context.Context, account string) (*exchangetypes.QueryIsOptedOutOfRewardsResponse, error) { req := &exchangetypes.QueryIsOptedOutOfRewardsRequest{ Account: account, @@ -2190,6 +2414,7 @@ func (c *chainClient) FetchIsOptedOutOfRewards(ctx context.Context, account stri return res, err } +// Deprecated: use FetchOptedOutOfRewardsAccountsV2 instead func (c *chainClient) FetchOptedOutOfRewardsAccounts(ctx context.Context) (*exchangetypes.QueryOptedOutOfRewardsAccountsResponse, error) { req := &exchangetypes.QueryOptedOutOfRewardsAccountsRequest{} res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeQueryClient.OptedOutOfRewardsAccounts, req) @@ -2197,6 +2422,7 @@ func (c *chainClient) FetchOptedOutOfRewardsAccounts(ctx context.Context) (*exch return res, err } +// Deprecated: use FetchMarketVolatilityV2 instead func (c *chainClient) FetchMarketVolatility(ctx context.Context, marketId string, tradeHistoryOptions *exchangetypes.TradeHistoryOptions) (*exchangetypes.QueryMarketVolatilityResponse, error) { req := &exchangetypes.QueryMarketVolatilityRequest{ MarketId: marketId, @@ -2207,6 +2433,7 @@ func (c *chainClient) FetchMarketVolatility(ctx context.Context, marketId string return res, err } +// Deprecated: use FetchChainBinaryOptionsMarketsV2 instead func (c *chainClient) FetchChainBinaryOptionsMarkets(ctx context.Context, status string) (*exchangetypes.QueryBinaryMarketsResponse, error) { req := &exchangetypes.QueryBinaryMarketsRequest{} if status != "" { @@ -2217,6 +2444,7 @@ func (c *chainClient) FetchChainBinaryOptionsMarkets(ctx context.Context, status return res, err } +// Deprecated: use FetchTraderDerivativeConditionalOrdersV2 instead func (c *chainClient) FetchTraderDerivativeConditionalOrders(ctx context.Context, subaccountId, marketId string) (*exchangetypes.QueryTraderDerivativeConditionalOrdersResponse, error) { req := &exchangetypes.QueryTraderDerivativeConditionalOrdersRequest{ SubaccountId: subaccountId, @@ -2227,6 +2455,7 @@ func (c *chainClient) FetchTraderDerivativeConditionalOrders(ctx context.Context return res, err } +// Deprecated: use FetchMarketAtomicExecutionFeeMultiplierV2 instead func (c *chainClient) FetchMarketAtomicExecutionFeeMultiplier(ctx context.Context, marketId string) (*exchangetypes.QueryMarketAtomicExecutionFeeMultiplierResponse, error) { req := &exchangetypes.QueryMarketAtomicExecutionFeeMultiplierRequest{ MarketId: marketId, @@ -2236,6 +2465,568 @@ func (c *chainClient) FetchMarketAtomicExecutionFeeMultiplier(ctx context.Contex return res, err } +// Chain exchange V2 module +func (c *chainClient) FetchSubaccountDepositsV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountDepositsResponse, error) { + req := &exchangev2types.QuerySubaccountDepositsRequest{ + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountDeposits, req) + + return res, err +} + +func (c *chainClient) FetchSubaccountDepositV2(ctx context.Context, subaccountId, denom string) (*exchangev2types.QuerySubaccountDepositResponse, error) { + req := &exchangev2types.QuerySubaccountDepositRequest{ + SubaccountId: subaccountId, + Denom: denom, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountDeposit, req) + + return res, err +} + +func (c *chainClient) FetchExchangeBalancesV2(ctx context.Context) (*exchangev2types.QueryExchangeBalancesResponse, error) { + req := &exchangev2types.QueryExchangeBalancesRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.ExchangeBalances, req) + + return res, err +} + +func (c *chainClient) FetchAggregateVolumeV2(ctx context.Context, account string) (*exchangev2types.QueryAggregateVolumeResponse, error) { + req := &exchangev2types.QueryAggregateVolumeRequest{ + Account: account, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AggregateVolume, req) + + return res, err +} + +func (c *chainClient) FetchAggregateVolumesV2(ctx context.Context, accounts, marketIDs []string) (*exchangev2types.QueryAggregateVolumesResponse, error) { + req := &exchangev2types.QueryAggregateVolumesRequest{ + Accounts: accounts, + MarketIds: marketIDs, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AggregateVolumes, req) + + return res, err +} + +func (c *chainClient) FetchAggregateMarketVolumeV2(ctx context.Context, marketId string) (*exchangev2types.QueryAggregateMarketVolumeResponse, error) { + req := &exchangev2types.QueryAggregateMarketVolumeRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AggregateMarketVolume, req) + + return res, err +} + +func (c *chainClient) FetchAggregateMarketVolumesV2(ctx context.Context, marketIDs []string) (*exchangev2types.QueryAggregateMarketVolumesResponse, error) { + req := &exchangev2types.QueryAggregateMarketVolumesRequest{ + MarketIds: marketIDs, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AggregateMarketVolumes, req) + + return res, err +} + +func (c *chainClient) FetchDenomDecimalV2(ctx context.Context, denom string) (*exchangev2types.QueryDenomDecimalResponse, error) { + req := &exchangev2types.QueryDenomDecimalRequest{ + Denom: denom, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DenomDecimal, req) + + return res, err +} + +func (c *chainClient) FetchDenomDecimalsV2(ctx context.Context, denoms []string) (*exchangev2types.QueryDenomDecimalsResponse, error) { + req := &exchangev2types.QueryDenomDecimalsRequest{ + Denoms: denoms, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DenomDecimals, req) + + return res, err +} + +func (c *chainClient) FetchChainSpotMarketsV2(ctx context.Context, status string, marketIDs []string) (*exchangev2types.QuerySpotMarketsResponse, error) { + req := &exchangev2types.QuerySpotMarketsRequest{ + MarketIds: marketIDs, + } + if status != "" { + req.Status = status + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SpotMarkets, req) + + return res, err +} + +func (c *chainClient) FetchChainSpotMarketV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMarketResponse, error) { + req := &exchangev2types.QuerySpotMarketRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SpotMarket, req) + + return res, err +} + +func (c *chainClient) FetchChainFullSpotMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketsResponse, error) { + req := &exchangev2types.QueryFullSpotMarketsRequest{ + MarketIds: marketIDs, + WithMidPriceAndTob: withMidPriceAndTob, + } + if status != "" { + req.Status = status + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FullSpotMarkets, req) + + return res, err +} + +func (c *chainClient) FetchChainFullSpotMarketV2(ctx context.Context, marketId string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketResponse, error) { + req := &exchangev2types.QueryFullSpotMarketRequest{ + MarketId: marketId, + WithMidPriceAndTob: withMidPriceAndTob, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FullSpotMarket, req) + + return res, err +} + +func (c *chainClient) FetchChainSpotOrderbookV2(ctx context.Context, marketId string, limit uint64, orderSide exchangev2types.OrderSide, limitCumulativeNotional, limitCumulativeQuantity sdkmath.LegacyDec) (*exchangev2types.QuerySpotOrderbookResponse, error) { + req := &exchangev2types.QuerySpotOrderbookRequest{ + MarketId: marketId, + Limit: limit, + OrderSide: orderSide, + LimitCumulativeNotional: &limitCumulativeNotional, + LimitCumulativeQuantity: &limitCumulativeQuantity, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SpotOrderbook, req) + + return res, err +} + +func (c *chainClient) FetchChainTraderSpotOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) { + req := &exchangev2types.QueryTraderSpotOrdersRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TraderSpotOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainAccountAddressSpotOrdersV2(ctx context.Context, marketId, address string) (*exchangev2types.QueryAccountAddressSpotOrdersResponse, error) { + req := &exchangev2types.QueryAccountAddressSpotOrdersRequest{ + MarketId: marketId, + AccountAddress: address, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AccountAddressSpotOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainSpotOrdersByHashesV2(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangev2types.QuerySpotOrdersByHashesResponse, error) { + req := &exchangev2types.QuerySpotOrdersByHashesRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + OrderHashes: orderHashes, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SpotOrdersByHashes, req) + + return res, err +} + +func (c *chainClient) FetchChainSubaccountOrdersV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountOrdersResponse, error) { + req := &exchangev2types.QuerySubaccountOrdersRequest{ + SubaccountId: subaccountId, + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainTraderSpotTransientOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) { + req := &exchangev2types.QueryTraderSpotOrdersRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TraderSpotTransientOrders, req) + + return res, err +} + +func (c *chainClient) FetchSpotMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMidPriceAndTOBResponse, error) { + req := &exchangev2types.QuerySpotMidPriceAndTOBRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SpotMidPriceAndTOB, req) + + return res, err +} + +func (c *chainClient) FetchDerivativeMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMidPriceAndTOBResponse, error) { + req := &exchangev2types.QueryDerivativeMidPriceAndTOBRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeMidPriceAndTOB, req) + + return res, err +} + +func (c *chainClient) FetchChainDerivativeOrderbookV2(ctx context.Context, marketId string, limit uint64, limitCumulativeNotional sdkmath.LegacyDec) (*exchangev2types.QueryDerivativeOrderbookResponse, error) { + req := &exchangev2types.QueryDerivativeOrderbookRequest{ + MarketId: marketId, + Limit: limit, + LimitCumulativeNotional: &limitCumulativeNotional, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeOrderbook, req) + + return res, err +} + +func (c *chainClient) FetchChainTraderDerivativeOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) { + req := &exchangev2types.QueryTraderDerivativeOrdersRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TraderDerivativeOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainAccountAddressDerivativeOrdersV2(ctx context.Context, marketId, address string) (*exchangev2types.QueryAccountAddressDerivativeOrdersResponse, error) { + req := &exchangev2types.QueryAccountAddressDerivativeOrdersRequest{ + MarketId: marketId, + AccountAddress: address, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.AccountAddressDerivativeOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainDerivativeOrdersByHashesV2(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangev2types.QueryDerivativeOrdersByHashesResponse, error) { + req := &exchangev2types.QueryDerivativeOrdersByHashesRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + OrderHashes: orderHashes, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeOrdersByHashes, req) + + return res, err +} + +func (c *chainClient) FetchChainTraderDerivativeTransientOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) { + req := &exchangev2types.QueryTraderDerivativeOrdersRequest{ + MarketId: marketId, + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TraderDerivativeTransientOrders, req) + + return res, err +} + +func (c *chainClient) FetchChainDerivativeMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryDerivativeMarketsResponse, error) { + req := &exchangev2types.QueryDerivativeMarketsRequest{ + MarketIds: marketIDs, + WithMidPriceAndTob: withMidPriceAndTob, + } + if status != "" { + req.Status = status + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeMarkets, req) + + return res, err +} + +func (c *chainClient) FetchChainDerivativeMarketV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketResponse, error) { + req := &exchangev2types.QueryDerivativeMarketRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeMarket, req) + + return res, err +} + +func (c *chainClient) FetchDerivativeMarketAddressV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketAddressResponse, error) { + req := &exchangev2types.QueryDerivativeMarketAddressRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.DerivativeMarketAddress, req) + + return res, err +} + +func (c *chainClient) FetchSubaccountTradeNonceV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountTradeNonceResponse, error) { + req := &exchangev2types.QuerySubaccountTradeNonceRequest{ + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountTradeNonce, req) + + return res, err +} + +func (c *chainClient) FetchChainPositionsV2(ctx context.Context) (*exchangev2types.QueryPositionsResponse, error) { + req := &exchangev2types.QueryPositionsRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.Positions, req) + + return res, err +} + +func (c *chainClient) FetchChainSubaccountPositionsV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountPositionsResponse, error) { + req := &exchangev2types.QuerySubaccountPositionsRequest{ + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountPositions, req) + + return res, err +} + +func (c *chainClient) FetchChainSubaccountPositionInMarketV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountPositionInMarketResponse, error) { + req := &exchangev2types.QuerySubaccountPositionInMarketRequest{ + SubaccountId: subaccountId, + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountPositionInMarket, req) + + return res, err +} + +func (c *chainClient) FetchChainSubaccountEffectivePositionInMarketV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountEffectivePositionInMarketResponse, error) { + req := &exchangev2types.QuerySubaccountEffectivePositionInMarketRequest{ + SubaccountId: subaccountId, + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountEffectivePositionInMarket, req) + + return res, err +} + +func (c *chainClient) FetchChainPerpetualMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketInfoResponse, error) { + req := &exchangev2types.QueryPerpetualMarketInfoRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.PerpetualMarketInfo, req) + + return res, err +} + +func (c *chainClient) FetchChainExpiryFuturesMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryExpiryFuturesMarketInfoResponse, error) { + req := &exchangev2types.QueryExpiryFuturesMarketInfoRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.ExpiryFuturesMarketInfo, req) + + return res, err +} + +func (c *chainClient) FetchChainPerpetualMarketFundingV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketFundingResponse, error) { + req := &exchangev2types.QueryPerpetualMarketFundingRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.PerpetualMarketFunding, req) + + return res, err +} + +func (c *chainClient) FetchSubaccountOrderMetadataV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountOrderMetadataResponse, error) { + req := &exchangev2types.QuerySubaccountOrderMetadataRequest{ + SubaccountId: subaccountId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.SubaccountOrderMetadata, req) + + return res, err +} + +func (c *chainClient) FetchTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) { + req := &exchangev2types.QueryTradeRewardPointsRequest{ + Accounts: accounts, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TradeRewardPoints, req) + + return res, err +} + +func (c *chainClient) FetchPendingTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) { + req := &exchangev2types.QueryTradeRewardPointsRequest{ + Accounts: accounts, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.PendingTradeRewardPoints, req) + + return res, err +} + +func (c *chainClient) FetchTradeRewardCampaignV2(ctx context.Context) (*exchangev2types.QueryTradeRewardCampaignResponse, error) { + req := &exchangev2types.QueryTradeRewardCampaignRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TradeRewardCampaign, req) + + return res, err +} + +func (c *chainClient) FetchFeeDiscountAccountInfoV2(ctx context.Context, account string) (*exchangev2types.QueryFeeDiscountAccountInfoResponse, error) { + req := &exchangev2types.QueryFeeDiscountAccountInfoRequest{ + Account: account, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FeeDiscountAccountInfo, req) + + return res, err +} + +func (c *chainClient) FetchFeeDiscountScheduleV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountScheduleResponse, error) { + req := &exchangev2types.QueryFeeDiscountScheduleRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FeeDiscountSchedule, req) + + return res, err +} + +func (c *chainClient) FetchBalanceMismatchesV2(ctx context.Context, dustFactor int64) (*exchangev2types.QueryBalanceMismatchesResponse, error) { + req := &exchangev2types.QueryBalanceMismatchesRequest{ + DustFactor: dustFactor, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.BalanceMismatches, req) + + return res, err +} + +func (c *chainClient) FetchBalanceWithBalanceHoldsV2(ctx context.Context) (*exchangev2types.QueryBalanceWithBalanceHoldsResponse, error) { + req := &exchangev2types.QueryBalanceWithBalanceHoldsRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.BalanceWithBalanceHolds, req) + + return res, err +} + +func (c *chainClient) FetchFeeDiscountTierStatisticsV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountTierStatisticsResponse, error) { + req := &exchangev2types.QueryFeeDiscountTierStatisticsRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.FeeDiscountTierStatistics, req) + + return res, err +} + +func (c *chainClient) FetchMitoVaultInfosV2(ctx context.Context) (*exchangev2types.MitoVaultInfosResponse, error) { + req := &exchangev2types.MitoVaultInfosRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.MitoVaultInfos, req) + + return res, err +} + +func (c *chainClient) FetchMarketIDFromVaultV2(ctx context.Context, vaultAddress string) (*exchangev2types.QueryMarketIDFromVaultResponse, error) { + req := &exchangev2types.QueryMarketIDFromVaultRequest{ + VaultAddress: vaultAddress, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.QueryMarketIDFromVault, req) + + return res, err +} + +func (c *chainClient) FetchHistoricalTradeRecordsV2(ctx context.Context, marketId string) (*exchangev2types.QueryHistoricalTradeRecordsResponse, error) { + req := &exchangev2types.QueryHistoricalTradeRecordsRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.HistoricalTradeRecords, req) + + return res, err +} + +func (c *chainClient) FetchIsOptedOutOfRewardsV2(ctx context.Context, account string) (*exchangev2types.QueryIsOptedOutOfRewardsResponse, error) { + req := &exchangev2types.QueryIsOptedOutOfRewardsRequest{ + Account: account, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.IsOptedOutOfRewards, req) + + return res, err +} + +func (c *chainClient) FetchOptedOutOfRewardsAccountsV2(ctx context.Context) (*exchangev2types.QueryOptedOutOfRewardsAccountsResponse, error) { + req := &exchangev2types.QueryOptedOutOfRewardsAccountsRequest{} + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.OptedOutOfRewardsAccounts, req) + + return res, err +} + +func (c *chainClient) FetchMarketVolatilityV2(ctx context.Context, marketId string, tradeHistoryOptions *exchangev2types.TradeHistoryOptions) (*exchangev2types.QueryMarketVolatilityResponse, error) { + req := &exchangev2types.QueryMarketVolatilityRequest{ + MarketId: marketId, + TradeHistoryOptions: tradeHistoryOptions, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.MarketVolatility, req) + + return res, err +} + +func (c *chainClient) FetchChainBinaryOptionsMarketsV2(ctx context.Context, status string) (*exchangev2types.QueryBinaryMarketsResponse, error) { + req := &exchangev2types.QueryBinaryMarketsRequest{} + if status != "" { + req.Status = status + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.BinaryOptionsMarkets, req) + + return res, err +} + +func (c *chainClient) FetchTraderDerivativeConditionalOrdersV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QueryTraderDerivativeConditionalOrdersResponse, error) { + req := &exchangev2types.QueryTraderDerivativeConditionalOrdersRequest{ + SubaccountId: subaccountId, + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.TraderDerivativeConditionalOrders, req) + + return res, err +} + +func (c *chainClient) FetchMarketAtomicExecutionFeeMultiplierV2(ctx context.Context, marketId string) (*exchangev2types.QueryMarketAtomicExecutionFeeMultiplierResponse, error) { + req := &exchangev2types.QueryMarketAtomicExecutionFeeMultiplierRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.MarketAtomicExecutionFeeMultiplier, req) + + return res, err +} + +func (c *chainClient) FetchActiveStakeGrantV2(ctx context.Context, grantee string) (*exchangev2types.QueryActiveStakeGrantResponse, error) { + req := &exchangev2types.QueryActiveStakeGrantRequest{ + Grantee: grantee, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.ActiveStakeGrant, req) + + return res, err +} + +func (c *chainClient) FetchGrantAuthorizationV2(ctx context.Context, granter, grantee string) (*exchangev2types.QueryGrantAuthorizationResponse, error) { + req := &exchangev2types.QueryGrantAuthorizationRequest{ + Granter: granter, + Grantee: grantee, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.GrantAuthorization, req) + + return res, err +} + +func (c *chainClient) FetchGrantAuthorizationsV2(ctx context.Context, granter string) (*exchangev2types.QueryGrantAuthorizationsResponse, error) { + req := &exchangev2types.QueryGrantAuthorizationsRequest{ + Granter: granter, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.GrantAuthorizations, req) + + return res, err +} + +func (c *chainClient) FetchL3DerivativeOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullDerivativeOrderbookResponse, error) { + req := &exchangev2types.QueryFullDerivativeOrderbookRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.L3DerivativeOrderBook, req) + + return res, err +} + +func (c *chainClient) FetchL3SpotOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullSpotOrderbookResponse, error) { + req := &exchangev2types.QueryFullSpotOrderbookRequest{ + MarketId: marketId, + } + res, err := common.ExecuteCall(ctx, c.network.ChainCookieAssistant, c.exchangeV2QueryClient.L3SpotOrderBook, req) + + return res, err +} + // Tendermint module func (c *chainClient) FetchNodeInfo(ctx context.Context) (*cmtservice.GetNodeInfoResponse, error) { diff --git a/client/chain/chain_test_support.go b/client/chain/chain_test_support.go index 1d8df620..6387ef33 100644 --- a/client/chain/chain_test_support.go +++ b/client/chain/chain_test_support.go @@ -5,20 +5,11 @@ import ( "errors" "time" - permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - "google.golang.org/grpc" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" - tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" - "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" @@ -30,9 +21,18 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ibcchanneltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - eth "github.com/ethereum/go-ethereum/common" + ethcommon "github.com/ethereum/go-ethereum/common" + "google.golang.org/grpc" + + exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" + chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" ) +var _ ChainClient = &MockChainClient{} + type MockChainClient struct { DenomsMetadataResponses []*banktypes.QueryDenomsMetadataResponse } @@ -163,15 +163,15 @@ func (c *MockChainClient) BuildExchangeBatchUpdateOrdersAuthz( return &authztypes.MsgGrant{} } -func (c *MockChainClient) DefaultSubaccount(acc sdk.AccAddress) eth.Hash { - return eth.HexToHash("") +func (c *MockChainClient) DefaultSubaccount(acc sdk.AccAddress) ethcommon.Hash { + return ethcommon.HexToHash("") } -func (c *MockChainClient) Subaccount(account sdk.AccAddress, index int) eth.Hash { - return eth.HexToHash("") +func (c *MockChainClient) Subaccount(account sdk.AccAddress, index int) ethcommon.Hash { + return ethcommon.HexToHash("") } -func (c *MockChainClient) GetSubAccountNonce(ctx context.Context, subaccountId eth.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) { +func (c *MockChainClient) GetSubAccountNonce(ctx context.Context, subaccountId ethcommon.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) { return &exchangetypes.QuerySubaccountTradeNonceResponse{}, nil } @@ -179,36 +179,48 @@ func (c *MockChainClient) GetFeeDiscountInfo(ctx context.Context, account string return &exchangetypes.QueryFeeDiscountAccountInfoResponse{}, nil } +func (c *MockChainClient) GetSubAccountNonceV2(ctx context.Context, subaccountId ethcommon.Hash) (*exchangev2types.QuerySubaccountTradeNonceResponse, error) { + return &exchangev2types.QuerySubaccountTradeNonceResponse{}, nil +} + +func (c *MockChainClient) GetFeeDiscountInfoV2(ctx context.Context, account string) (*exchangev2types.QueryFeeDiscountAccountInfoResponse, error) { + return &exchangev2types.QueryFeeDiscountAccountInfoResponse{}, nil +} + func (c *MockChainClient) UpdateSubaccountNonceFromChain() error { return nil } -func (c *MockChainClient) SynchronizeSubaccountNonce(subaccountId eth.Hash) error { +func (c *MockChainClient) SynchronizeSubaccountNonce(subaccountId ethcommon.Hash) error { return nil } -func (c *MockChainClient) ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, derivativeOrders []exchangetypes.DerivativeOrder, subaccountId eth.Hash) (OrderHashes, error) { +func (c *MockChainClient) ComputeOrderHashes(spotOrders []exchangev2types.SpotOrder, derivativeOrders []exchangev2types.DerivativeOrder, subaccountId ethcommon.Hash) (OrderHashes, error) { return OrderHashes{}, nil } -func (c *MockChainClient) SpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder { - return c.CreateSpotOrder(defaultSubaccountID, d, MarketsAssistant{}) +func (c *MockChainClient) CreateSpotOrder(defaultSubaccountID ethcommon.Hash, d *SpotOrderData, marketAssistant MarketsAssistant) *exchangetypes.SpotOrder { + return &exchangetypes.SpotOrder{} } -func (c *MockChainClient) CreateSpotOrder(defaultSubaccountID eth.Hash, d *SpotOrderData, marketsAssistant MarketsAssistant) *exchangetypes.SpotOrder { - return &exchangetypes.SpotOrder{} +func (c *MockChainClient) CreateDerivativeOrder(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder { + return &exchangetypes.DerivativeOrder{} } -func (c *MockChainClient) DerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder { - return c.CreateDerivativeOrder(defaultSubaccountID, d, MarketsAssistant{}) +func (c *MockChainClient) OrderCancel(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangetypes.OrderData { + return &exchangetypes.OrderData{} } -func (c *MockChainClient) CreateDerivativeOrder(defaultSubaccountID eth.Hash, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder { - return &exchangetypes.DerivativeOrder{} +func (c *MockChainClient) CreateSpotOrderV2(defaultSubaccountID ethcommon.Hash, d *SpotOrderData) *exchangev2types.SpotOrder { + return &exchangev2types.SpotOrder{} } -func (c *MockChainClient) OrderCancel(defaultSubaccountID eth.Hash, d *OrderCancelData) *exchangetypes.OrderData { - return &exchangetypes.OrderData{} +func (c *MockChainClient) CreateDerivativeOrderV2(defaultSubaccountID ethcommon.Hash, d *DerivativeOrderData) *exchangev2types.DerivativeOrder { + return &exchangev2types.DerivativeOrder{} +} + +func (c *MockChainClient) OrderCancelV2(defaultSubaccountID ethcommon.Hash, d *OrderCancelData) *exchangev2types.OrderData { + return &exchangev2types.OrderData{} } func (c *MockChainClient) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) {} @@ -554,6 +566,247 @@ func (c *MockChainClient) FetchMarketAtomicExecutionFeeMultiplier(ctx context.Co return &exchangetypes.QueryMarketAtomicExecutionFeeMultiplierResponse{}, nil } +// Chain exchange V2 module +func (c *MockChainClient) FetchSubaccountDepositsV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountDepositsResponse, error) { + return &exchangev2types.QuerySubaccountDepositsResponse{}, nil +} + +func (c *MockChainClient) FetchSubaccountDepositV2(ctx context.Context, subaccountId, denom string) (*exchangev2types.QuerySubaccountDepositResponse, error) { + return &exchangev2types.QuerySubaccountDepositResponse{}, nil +} + +func (c *MockChainClient) FetchExchangeBalancesV2(_ context.Context) (*exchangev2types.QueryExchangeBalancesResponse, error) { + return &exchangev2types.QueryExchangeBalancesResponse{}, nil +} + +func (c *MockChainClient) FetchAggregateVolumeV2(ctx context.Context, account string) (*exchangev2types.QueryAggregateVolumeResponse, error) { + return &exchangev2types.QueryAggregateVolumeResponse{}, nil +} + +func (c *MockChainClient) FetchAggregateVolumesV2(ctx context.Context, accounts, marketIDs []string) (*exchangev2types.QueryAggregateVolumesResponse, error) { + return &exchangev2types.QueryAggregateVolumesResponse{}, nil +} + +func (c *MockChainClient) FetchAggregateMarketVolumeV2(ctx context.Context, marketId string) (*exchangev2types.QueryAggregateMarketVolumeResponse, error) { + return &exchangev2types.QueryAggregateMarketVolumeResponse{}, nil +} + +func (c *MockChainClient) FetchAggregateMarketVolumesV2(ctx context.Context, marketIDs []string) (*exchangev2types.QueryAggregateMarketVolumesResponse, error) { + return &exchangev2types.QueryAggregateMarketVolumesResponse{}, nil +} + +func (c *MockChainClient) FetchDenomDecimalV2(ctx context.Context, denom string) (*exchangev2types.QueryDenomDecimalResponse, error) { + return &exchangev2types.QueryDenomDecimalResponse{}, nil +} + +func (c *MockChainClient) FetchDenomDecimalsV2(ctx context.Context, denoms []string) (*exchangev2types.QueryDenomDecimalsResponse, error) { + return &exchangev2types.QueryDenomDecimalsResponse{}, nil +} + +func (c *MockChainClient) FetchChainSpotMarketsV2(ctx context.Context, status string, marketIDs []string) (*exchangev2types.QuerySpotMarketsResponse, error) { + return &exchangev2types.QuerySpotMarketsResponse{}, nil +} + +func (c *MockChainClient) FetchChainSpotMarketV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMarketResponse, error) { + return &exchangev2types.QuerySpotMarketResponse{}, nil +} + +func (c *MockChainClient) FetchChainFullSpotMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketsResponse, error) { + return &exchangev2types.QueryFullSpotMarketsResponse{}, nil +} + +func (c *MockChainClient) FetchChainFullSpotMarketV2(ctx context.Context, marketId string, withMidPriceAndTob bool) (*exchangev2types.QueryFullSpotMarketResponse, error) { + return &exchangev2types.QueryFullSpotMarketResponse{}, nil +} + +func (c *MockChainClient) FetchChainSpotOrderbookV2(ctx context.Context, marketId string, limit uint64, orderSide exchangev2types.OrderSide, limitCumulativeNotional, limitCumulativeQuantity sdkmath.LegacyDec) (*exchangev2types.QuerySpotOrderbookResponse, error) { + return &exchangev2types.QuerySpotOrderbookResponse{}, nil +} + +func (c *MockChainClient) FetchChainTraderSpotOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) { + return &exchangev2types.QueryTraderSpotOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainAccountAddressSpotOrdersV2(ctx context.Context, marketId, address string) (*exchangev2types.QueryAccountAddressSpotOrdersResponse, error) { + return &exchangev2types.QueryAccountAddressSpotOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainSpotOrdersByHashesV2(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangev2types.QuerySpotOrdersByHashesResponse, error) { + return &exchangev2types.QuerySpotOrdersByHashesResponse{}, nil +} + +func (c *MockChainClient) FetchChainSubaccountOrdersV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountOrdersResponse, error) { + return &exchangev2types.QuerySubaccountOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainTraderSpotTransientOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderSpotOrdersResponse, error) { + return &exchangev2types.QueryTraderSpotOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchSpotMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QuerySpotMidPriceAndTOBResponse, error) { + return &exchangev2types.QuerySpotMidPriceAndTOBResponse{}, nil +} + +func (c *MockChainClient) FetchDerivativeMidPriceAndTOBV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMidPriceAndTOBResponse, error) { + return &exchangev2types.QueryDerivativeMidPriceAndTOBResponse{}, nil +} + +func (c *MockChainClient) FetchChainDerivativeOrderbookV2(ctx context.Context, marketId string, limit uint64, limitCumulativeNotional sdkmath.LegacyDec) (*exchangev2types.QueryDerivativeOrderbookResponse, error) { + return &exchangev2types.QueryDerivativeOrderbookResponse{}, nil +} + +func (c *MockChainClient) FetchChainTraderDerivativeOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) { + return &exchangev2types.QueryTraderDerivativeOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainAccountAddressDerivativeOrdersV2(ctx context.Context, marketId, address string) (*exchangev2types.QueryAccountAddressDerivativeOrdersResponse, error) { + return &exchangev2types.QueryAccountAddressDerivativeOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainDerivativeOrdersByHashesV2(ctx context.Context, marketId, subaccountId string, orderHashes []string) (*exchangev2types.QueryDerivativeOrdersByHashesResponse, error) { + return &exchangev2types.QueryDerivativeOrdersByHashesResponse{}, nil +} + +func (c *MockChainClient) FetchChainTraderDerivativeTransientOrdersV2(ctx context.Context, marketId, subaccountId string) (*exchangev2types.QueryTraderDerivativeOrdersResponse, error) { + return &exchangev2types.QueryTraderDerivativeOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchChainDerivativeMarketsV2(ctx context.Context, status string, marketIDs []string, withMidPriceAndTob bool) (*exchangev2types.QueryDerivativeMarketsResponse, error) { + return &exchangev2types.QueryDerivativeMarketsResponse{}, nil +} + +func (c *MockChainClient) FetchChainDerivativeMarketV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketResponse, error) { + return &exchangev2types.QueryDerivativeMarketResponse{}, nil +} + +func (c *MockChainClient) FetchDerivativeMarketAddressV2(ctx context.Context, marketId string) (*exchangev2types.QueryDerivativeMarketAddressResponse, error) { + return &exchangev2types.QueryDerivativeMarketAddressResponse{}, nil +} + +func (c *MockChainClient) FetchSubaccountTradeNonceV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountTradeNonceResponse, error) { + return &exchangev2types.QuerySubaccountTradeNonceResponse{}, nil +} + +func (c *MockChainClient) FetchChainPositionsV2(ctx context.Context) (*exchangev2types.QueryPositionsResponse, error) { + return &exchangev2types.QueryPositionsResponse{}, nil +} + +func (c *MockChainClient) FetchChainSubaccountPositionsV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountPositionsResponse, error) { + return &exchangev2types.QuerySubaccountPositionsResponse{}, nil +} + +func (c *MockChainClient) FetchChainSubaccountPositionInMarketV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountPositionInMarketResponse, error) { + return &exchangev2types.QuerySubaccountPositionInMarketResponse{}, nil +} + +func (c *MockChainClient) FetchChainSubaccountEffectivePositionInMarketV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QuerySubaccountEffectivePositionInMarketResponse, error) { + return &exchangev2types.QuerySubaccountEffectivePositionInMarketResponse{}, nil +} + +func (c *MockChainClient) FetchChainPerpetualMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketInfoResponse, error) { + return &exchangev2types.QueryPerpetualMarketInfoResponse{}, nil +} + +func (c *MockChainClient) FetchChainExpiryFuturesMarketInfoV2(ctx context.Context, marketId string) (*exchangev2types.QueryExpiryFuturesMarketInfoResponse, error) { + return &exchangev2types.QueryExpiryFuturesMarketInfoResponse{}, nil +} + +func (c *MockChainClient) FetchChainPerpetualMarketFundingV2(ctx context.Context, marketId string) (*exchangev2types.QueryPerpetualMarketFundingResponse, error) { + return &exchangev2types.QueryPerpetualMarketFundingResponse{}, nil +} + +func (c *MockChainClient) FetchSubaccountOrderMetadataV2(ctx context.Context, subaccountId string) (*exchangev2types.QuerySubaccountOrderMetadataResponse, error) { + return &exchangev2types.QuerySubaccountOrderMetadataResponse{}, nil +} + +func (c *MockChainClient) FetchTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) { + return &exchangev2types.QueryTradeRewardPointsResponse{}, nil +} + +func (c *MockChainClient) FetchPendingTradeRewardPointsV2(ctx context.Context, accounts []string) (*exchangev2types.QueryTradeRewardPointsResponse, error) { + return &exchangev2types.QueryTradeRewardPointsResponse{}, nil +} + +func (c *MockChainClient) FetchTradeRewardCampaignV2(ctx context.Context) (*exchangev2types.QueryTradeRewardCampaignResponse, error) { + return &exchangev2types.QueryTradeRewardCampaignResponse{}, nil +} + +func (c *MockChainClient) FetchFeeDiscountAccountInfoV2(ctx context.Context, account string) (*exchangev2types.QueryFeeDiscountAccountInfoResponse, error) { + return &exchangev2types.QueryFeeDiscountAccountInfoResponse{}, nil +} + +func (c *MockChainClient) FetchFeeDiscountScheduleV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountScheduleResponse, error) { + return &exchangev2types.QueryFeeDiscountScheduleResponse{}, nil +} + +func (c *MockChainClient) FetchBalanceMismatchesV2(ctx context.Context, dustFactor int64) (*exchangev2types.QueryBalanceMismatchesResponse, error) { + return &exchangev2types.QueryBalanceMismatchesResponse{}, nil +} + +func (c *MockChainClient) FetchBalanceWithBalanceHoldsV2(ctx context.Context) (*exchangev2types.QueryBalanceWithBalanceHoldsResponse, error) { + return &exchangev2types.QueryBalanceWithBalanceHoldsResponse{}, nil +} + +func (c *MockChainClient) FetchFeeDiscountTierStatisticsV2(ctx context.Context) (*exchangev2types.QueryFeeDiscountTierStatisticsResponse, error) { + return &exchangev2types.QueryFeeDiscountTierStatisticsResponse{}, nil +} + +func (c *MockChainClient) FetchMitoVaultInfosV2(ctx context.Context) (*exchangev2types.MitoVaultInfosResponse, error) { + return &exchangev2types.MitoVaultInfosResponse{}, nil +} + +func (c *MockChainClient) FetchMarketIDFromVaultV2(ctx context.Context, vaultAddress string) (*exchangev2types.QueryMarketIDFromVaultResponse, error) { + return &exchangev2types.QueryMarketIDFromVaultResponse{}, nil +} + +func (c *MockChainClient) FetchHistoricalTradeRecordsV2(ctx context.Context, marketId string) (*exchangev2types.QueryHistoricalTradeRecordsResponse, error) { + return &exchangev2types.QueryHistoricalTradeRecordsResponse{}, nil +} + +func (c *MockChainClient) FetchIsOptedOutOfRewardsV2(ctx context.Context, account string) (*exchangev2types.QueryIsOptedOutOfRewardsResponse, error) { + return &exchangev2types.QueryIsOptedOutOfRewardsResponse{}, nil +} + +func (c *MockChainClient) FetchOptedOutOfRewardsAccountsV2(ctx context.Context) (*exchangev2types.QueryOptedOutOfRewardsAccountsResponse, error) { + return &exchangev2types.QueryOptedOutOfRewardsAccountsResponse{}, nil +} + +func (c *MockChainClient) FetchMarketVolatilityV2(ctx context.Context, marketId string, tradeHistoryOptions *exchangev2types.TradeHistoryOptions) (*exchangev2types.QueryMarketVolatilityResponse, error) { + return &exchangev2types.QueryMarketVolatilityResponse{}, nil +} + +func (c *MockChainClient) FetchChainBinaryOptionsMarketsV2(ctx context.Context, status string) (*exchangev2types.QueryBinaryMarketsResponse, error) { + return &exchangev2types.QueryBinaryMarketsResponse{}, nil +} + +func (c *MockChainClient) FetchTraderDerivativeConditionalOrdersV2(ctx context.Context, subaccountId, marketId string) (*exchangev2types.QueryTraderDerivativeConditionalOrdersResponse, error) { + return &exchangev2types.QueryTraderDerivativeConditionalOrdersResponse{}, nil +} + +func (c *MockChainClient) FetchMarketAtomicExecutionFeeMultiplierV2(ctx context.Context, marketId string) (*exchangev2types.QueryMarketAtomicExecutionFeeMultiplierResponse, error) { + return &exchangev2types.QueryMarketAtomicExecutionFeeMultiplierResponse{}, nil +} + +func (c *MockChainClient) FetchActiveStakeGrantV2(ctx context.Context, grantee string) (*exchangev2types.QueryActiveStakeGrantResponse, error) { + return &exchangev2types.QueryActiveStakeGrantResponse{}, nil +} + +func (c *MockChainClient) FetchGrantAuthorizationV2(ctx context.Context, granter, grantee string) (*exchangev2types.QueryGrantAuthorizationResponse, error) { + return &exchangev2types.QueryGrantAuthorizationResponse{}, nil +} + +func (c *MockChainClient) FetchGrantAuthorizationsV2(ctx context.Context, granter string) (*exchangev2types.QueryGrantAuthorizationsResponse, error) { + return &exchangev2types.QueryGrantAuthorizationsResponse{}, nil +} + +func (c *MockChainClient) FetchL3DerivativeOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullDerivativeOrderbookResponse, error) { + return &exchangev2types.QueryFullDerivativeOrderbookResponse{}, nil +} + +func (c *MockChainClient) FetchL3SpotOrderbookV2(ctx context.Context, marketId string) (*exchangev2types.QueryFullSpotOrderbookResponse, error) { + return &exchangev2types.QueryFullSpotOrderbookResponse{}, nil +} + // Tendermint module func (c *MockChainClient) FetchNodeInfo(ctx context.Context) (*cmtservice.GetNodeInfoResponse, error) { diff --git a/client/chain/markets_assistant.go b/client/chain/markets_assistant.go index f2418414..8b0afa73 100644 --- a/client/chain/markets_assistant.go +++ b/client/chain/markets_assistant.go @@ -2,7 +2,6 @@ package chain import ( "context" - "fmt" "path" "runtime" "strings" @@ -15,7 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/shopspring/decimal" - "gopkg.in/ini.v1" ) var legacyMarketAssistantLazyInitialization sync.Once @@ -46,111 +44,6 @@ func newMarketsAssistant() MarketsAssistant { } } -// Deprecated: use NewMarketsAssistantInitializedFromChain instead -func NewMarketsAssistant(networkName string) (MarketsAssistant, error) { - - legacyMarketAssistantLazyInitialization.Do(func() { - assistant := newMarketsAssistant() - fileName := getFileAbsPath(fmt.Sprintf("../metadata/assets/%s.ini", networkName)) - metadataFile, err := ini.Load(fileName) - - if err == nil { - for _, section := range metadataFile.Sections() { - sectionName := section.Name() - if strings.HasPrefix(sectionName, "0x") { - description := section.Key("description").Value() - - decimals, _ := section.Key("quote").Int() - quoteToken := core.Token{ - Name: "", - Symbol: "", - Denom: "", - Address: "", - Decimals: int32(decimals), - Logo: "", - Updated: -1, - } - - minPriceTickSize := decimal.RequireFromString(section.Key("min_price_tick_size").String()) - minQuantityTickSize := decimal.RequireFromString(section.Key("min_quantity_tick_size").String()) - minNotional := decimal.Zero - if section.HasKey("min_notional") { - minNotional = decimal.RequireFromString(section.Key("min_notional").String()) - } - - if strings.Contains(description, "Spot") { - baseDecimals, _ := section.Key("quote").Int() - baseToken := core.Token{ - Name: "", - Symbol: "", - Denom: "", - Address: "", - Decimals: int32(baseDecimals), - Logo: "", - Updated: -1, - } - - market := core.SpotMarket{ - Id: sectionName, - Status: "", - Ticker: description, - BaseToken: baseToken, - QuoteToken: quoteToken, - MakerFeeRate: decimal.NewFromInt32(0), - TakerFeeRate: decimal.NewFromInt32(0), - ServiceProviderFee: decimal.NewFromInt32(0), - MinPriceTickSize: minPriceTickSize, - MinQuantityTickSize: minQuantityTickSize, - MinNotional: minNotional, - } - - assistant.spotMarkets[market.Id] = market - } else { - market := core.DerivativeMarket{ - Id: sectionName, - Status: "", - Ticker: description, - OracleBase: "", - OracleQuote: "", - OracleType: "", - OracleScaleFactor: 1, - InitialMarginRatio: decimal.NewFromInt32(0), - MaintenanceMarginRatio: decimal.NewFromInt32(0), - QuoteToken: quoteToken, - MakerFeeRate: decimal.NewFromInt32(0), - TakerFeeRate: decimal.NewFromInt32(0), - ServiceProviderFee: decimal.NewFromInt32(0), - MinPriceTickSize: minPriceTickSize, - MinQuantityTickSize: minQuantityTickSize, - MinNotional: minNotional, - } - - assistant.derivativeMarkets[market.Id] = market - } - } else if sectionName != "DEFAULT" { - tokenDecimals, _ := section.Key("decimals").Int() - newToken := core.Token{ - Name: sectionName, - Symbol: sectionName, - Denom: section.Key("peggy_denom").String(), - Address: "", - Decimals: int32(tokenDecimals), - Logo: "", - Updated: -1, - } - - assistant.tokensByDenom[newToken.Denom] = newToken - assistant.tokensBySymbol[newToken.Symbol] = newToken - } - } - } - - legacyMarketAssistant = assistant - }) - - return legacyMarketAssistant, nil -} - func NewMarketsAssistantInitializedFromChain(ctx context.Context, exchangeClient exchange.ExchangeClient) (MarketsAssistant, error) { assistant := newMarketsAssistant() diff --git a/client/chain/orderhash.go b/client/chain/orderhash.go index c0459f77..649a085a 100644 --- a/client/chain/orderhash.go +++ b/client/chain/orderhash.go @@ -4,11 +4,12 @@ import ( "context" "strconv" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" "github.com/ethereum/go-ethereum/common" ethmath "github.com/ethereum/go-ethereum/common/math" gethsigner "github.com/ethereum/go-ethereum/signer/core/apitypes" "golang.org/x/crypto/sha3" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" ) var AuctionSubaccountID = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111") @@ -68,7 +69,7 @@ func (c *chainClient) UpdateSubaccountNonceFromChain() error { } func (c *chainClient) SynchronizeSubaccountNonce(subaccountId common.Hash) error { - res, err := c.GetSubAccountNonce(context.Background(), subaccountId) + res, err := c.GetSubAccountNonceV2(context.Background(), subaccountId) if err != nil { return err } @@ -76,7 +77,7 @@ func (c *chainClient) SynchronizeSubaccountNonce(subaccountId common.Hash) error return nil } -func (c *chainClient) ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, derivativeOrders []exchangetypes.DerivativeOrder, subaccountId common.Hash) (OrderHashes, error) { +func (c *chainClient) ComputeOrderHashes(spotOrders []exchangev2types.SpotOrder, derivativeOrders []exchangev2types.DerivativeOrder, subaccountId common.Hash) (OrderHashes, error) { if len(spotOrders)+len(derivativeOrders) == 0 { return OrderHashes{}, nil } diff --git a/client/exchange/exchange.go b/client/exchange/exchange.go index cc4b3f3b..fc2f04db 100644 --- a/client/exchange/exchange.go +++ b/client/exchange/exchange.go @@ -31,7 +31,6 @@ type ExchangeClient interface { StreamDerivativeMarket(ctx context.Context, marketIDs []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamMarketClient, error) GetDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersRequest) (*derivativeExchangePB.OrdersResponse, error) GetDerivativeMarkets(ctx context.Context, req *derivativeExchangePB.MarketsRequest) (*derivativeExchangePB.MarketsResponse, error) - GetDerivativePositions(ctx context.Context, req *derivativeExchangePB.PositionsRequest) (*derivativeExchangePB.PositionsResponse, error) GetDerivativePositionsV2(ctx context.Context, req *derivativeExchangePB.PositionsV2Request) (*derivativeExchangePB.PositionsV2Response, error) GetDerivativeLiquidablePositions(ctx context.Context, req *derivativeExchangePB.LiquidablePositionsRequest) (*derivativeExchangePB.LiquidablePositionsResponse, error) StreamDerivativePositions(ctx context.Context, req *derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) @@ -82,7 +81,6 @@ type ExchangeClient interface { GetInsuranceFunds(ctx context.Context, req *insurancePB.FundsRequest) (*insurancePB.FundsResponse, error) GetRedemptions(ctx context.Context, req *insurancePB.RedemptionsRequest) (*insurancePB.RedemptionsResponse, error) - GetAccountPortfolio(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioResponse, error) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioBalancesResponse, error) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) @@ -177,17 +175,6 @@ func (c *exchangeClient) GetDerivativeOrders(ctx context.Context, req *derivativ return res, nil } -// Deprecated: Use GetDerivativePositionsV2 instead. -func (c *exchangeClient) GetDerivativePositions(ctx context.Context, req *derivativeExchangePB.PositionsRequest) (*derivativeExchangePB.PositionsResponse, error) { - res, err := common.ExecuteCall(ctx, c.network.ExchangeCookieAssistant, c.derivativeExchangeClient.Positions, req) - if err != nil { - fmt.Println(err) - return &derivativeExchangePB.PositionsResponse{}, err - } - - return res, nil -} - func (c *exchangeClient) GetDerivativePositionsV2(ctx context.Context, req *derivativeExchangePB.PositionsV2Request) (*derivativeExchangePB.PositionsV2Response, error) { res, err := common.ExecuteCall(ctx, c.network.ExchangeCookieAssistant, c.derivativeExchangeClient.PositionsV2, req) if err != nil { @@ -919,20 +906,6 @@ func (c *exchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveM return stream, nil } -// Deprecated: Use GetAccountPortfolioBalances instead. -func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioResponse, error) { - req := &portfolioExchangePB.AccountPortfolioRequest{ - AccountAddress: accountAddress, - } - res, err := common.ExecuteCall(ctx, c.network.ExchangeCookieAssistant, c.portfolioExchangeClient.AccountPortfolio, req) - if err != nil { - fmt.Println(err) - return &portfolioExchangePB.AccountPortfolioResponse{}, err - } - - return res, nil -} - func (c *exchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioBalancesResponse, error) { req := &portfolioExchangePB.AccountPortfolioBalancesRequest{ AccountAddress: accountAddress, diff --git a/examples/chain/10_StreamEventOrderbookUpdate/example.go b/examples/chain/10_StreamEventOrderbookUpdate/example.go deleted file mode 100644 index 21a669fe..00000000 --- a/examples/chain/10_StreamEventOrderbookUpdate/example.go +++ /dev/null @@ -1,48 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/InjectiveLabs/sdk-go/client" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - "github.com/InjectiveLabs/sdk-go/client/common" -) - -func main() { - network := common.LoadNetwork("mainnet", "lb") - - clientCtx, err := chainclient.NewClientContext( - network.ChainId, - "", - nil, - ) - if err != nil { - panic(err) - } - - chainClient, err := chainclient.NewChainClient( - clientCtx, - network, - common.OptionGasPrices(client.DefaultGasPriceWithDenom), - ) - - if err != nil { - panic(err) - } - - //0x74b17b0d6855feba39f1f7ab1e8bad0363bd510ee1dcc74e40c2adfe1502f781 - //0x74ee114ad750f8429a97e07b5e73e145724e9b21670a7666625ddacc03d6758d - //0x26413a70c9b78a495023e5ab8003c9cf963ef963f6755f8b57255feb5744bf31 - marketIds := []string{ - "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0", - } - - orderbookCh := make(chan exchangetypes.Orderbook, 10000) - go chainClient.StreamOrderbookUpdateEvents(chainclient.SpotOrderbook, marketIds, orderbookCh) - for { - ob := <-orderbookCh - fmt.Println(ob) - } -} diff --git a/examples/chain/13_BroadcastMsgWithoutSimulation/example.go b/examples/chain/13_BroadcastMsgWithoutSimulation/example.go index 50bc6713..326bf28b 100644 --- a/examples/chain/13_BroadcastMsgWithoutSimulation/example.go +++ b/examples/chain/13_BroadcastMsgWithoutSimulation/example.go @@ -1,19 +1,17 @@ package main import ( - "context" "fmt" "os" - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -48,17 +46,6 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient).WithSimulation(false) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - txFactory := chainclient.NewTxFactory(clientCtx) txFactory = txFactory.WithGasPrices(client.DefaultGasPriceWithDenom) txFactory = txFactory.WithGas(uint64(txFactory.GasAdjustment() * 140000)) @@ -80,22 +67,21 @@ func main() { amount := decimal.NewFromFloat(1) price := decimal.NewFromFloat(4.55) - order := clientInstance.CreateSpotOrder( + order := clientInstance.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotLimitOrder) + msg := new(exchangev2types.MsgCreateSpotLimitOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) + msg.Order = *order result, err := clientInstance.SyncBroadcastMsg(msg) diff --git a/examples/chain/1_LocalOrderHash/example.go b/examples/chain/1_LocalOrderHash/example.go index a3ba477d..60b777cb 100644 --- a/examples/chain/1_LocalOrderHash/example.go +++ b/examples/chain/1_LocalOrderHash/example.go @@ -1,20 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" + "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - "github.com/shopspring/decimal" ) func main() { @@ -50,17 +48,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -74,23 +61,22 @@ func main() { // prepare tx msg defaultSubaccountID := chainClient.Subaccount(senderAddress, 1) - spotOrder := chainClient.CreateSpotOrder( + spotOrder := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: exchangev2types.OrderType_BUY, Quantity: decimal.NewFromFloat(2), Price: decimal.NewFromFloat(22.55), FeeRecipient: senderAddress.String(), MarketId: "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", Cid: uuid.NewString(), }, - marketsAssistant, ) - derivativeOrder := chainClient.CreateDerivativeOrder( + derivativeOrder := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: exchangev2types.OrderType_BUY, Quantity: decimal.NewFromFloat(2), Price: decimal.RequireFromString("31"), Leverage: decimal.RequireFromString("2.5"), @@ -98,16 +84,15 @@ func main() { MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchCreateSpotLimitOrders) + msg := new(exchangev2types.MsgBatchCreateSpotLimitOrders) msg.Sender = senderAddress.String() - msg.Orders = []exchangetypes.SpotOrder{*spotOrder} + msg.Orders = []exchangev2types.SpotOrder{*spotOrder} - msg1 := new(exchangetypes.MsgBatchCreateDerivativeLimitOrders) + msg1 := new(exchangev2types.MsgBatchCreateDerivativeLimitOrders) msg1.Sender = senderAddress.String() - msg1.Orders = []exchangetypes.DerivativeOrder{*derivativeOrder, *derivativeOrder} + msg1.Orders = []exchangev2types.DerivativeOrder{*derivativeOrder} // compute local order hashes orderHashes, err := chainClient.ComputeOrderHashes(msg.Orders, msg1.Orders, defaultSubaccountID) diff --git a/examples/chain/2_MsgBatchCancelSpotOrders/example.go b/examples/chain/2_MsgBatchCancelSpotOrders/example.go index 2734d9f8..82318175 100644 --- a/examples/chain/2_MsgBatchCancelSpotOrders/example.go +++ b/examples/chain/2_MsgBatchCancelSpotOrders/example.go @@ -5,12 +5,10 @@ import ( "os" "time" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" cosmtypes "github.com/cosmos/cosmos-sdk/types" ) @@ -64,19 +62,19 @@ func main() { orderHash := "0x17196096ffc32ad088ef959ad95b4cc247a87c7c9d45a2500b81ab8f5a71da5a" cid := "666C5452-B563-445F-977B-539D79C482EE" - orderWithHash := chainClient.OrderCancel(defaultSubaccountID, &chainclient.OrderCancelData{ + orderWithHash := chainClient.OrderCancelV2(defaultSubaccountID, &chainclient.OrderCancelData{ MarketId: marketId, OrderHash: orderHash, }) - orderWithCid := chainClient.OrderCancel(defaultSubaccountID, &chainclient.OrderCancelData{ + orderWithCid := chainClient.OrderCancelV2(defaultSubaccountID, &chainclient.OrderCancelData{ MarketId: marketId, Cid: cid, }) - msg := new(exchangetypes.MsgBatchCancelSpotOrders) + msg := new(exchangev2types.MsgBatchCancelSpotOrders) msg.Sender = senderAddress.String() - msg.Data = []exchangetypes.OrderData{*orderWithHash, *orderWithCid} + msg.Data = []exchangev2types.OrderData{*orderWithHash, *orderWithCid} CosMsgs := []cosmtypes.Msg{msg} // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/3_MsgBatchCancelDerivativeOrders/example.go b/examples/chain/3_MsgBatchCancelDerivativeOrders/example.go index d59a188e..0064c5cc 100644 --- a/examples/chain/3_MsgBatchCancelDerivativeOrders/example.go +++ b/examples/chain/3_MsgBatchCancelDerivativeOrders/example.go @@ -5,14 +5,13 @@ import ( "os" "time" - "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" cosmtypes "github.com/cosmos/cosmos-sdk/types" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -64,19 +63,19 @@ func main() { orderHash := "0x7b35e8d3c6e5d1210a83615a935a74349c2c8c5e73a591015729adad3c70af2d" cid := "666C5452-B563-445F-977B-539D79C482EE" - orderWithHash := chainClient.OrderCancel(defaultSubaccountID, &chainclient.OrderCancelData{ + orderWithHash := chainClient.OrderCancelV2(defaultSubaccountID, &chainclient.OrderCancelData{ MarketId: marketId, OrderHash: orderHash, }) - orderWithCid := chainClient.OrderCancel(defaultSubaccountID, &chainclient.OrderCancelData{ + orderWithCid := chainClient.OrderCancelV2(defaultSubaccountID, &chainclient.OrderCancelData{ MarketId: marketId, Cid: cid, }) - msg := new(exchangetypes.MsgBatchCancelDerivativeOrders) + msg := new(exchangev2types.MsgBatchCancelDerivativeOrders) msg.Sender = senderAddress.String() - msg.Data = []exchangetypes.OrderData{*orderWithHash, *orderWithCid} + msg.Data = []exchangev2types.OrderData{*orderWithHash, *orderWithCid} CosMsgs := []cosmtypes.Msg{msg} // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/4_MsgBatchCreateSpotLimitOrders/example.go b/examples/chain/4_MsgBatchCreateSpotLimitOrders/example.go index e8911b0c..56a9edce 100644 --- a/examples/chain/4_MsgBatchCreateSpotLimitOrders/example.go +++ b/examples/chain/4_MsgBatchCreateSpotLimitOrders/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -52,17 +49,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -80,20 +66,19 @@ func main() { amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(22.5) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), - }, - marketsAssistant) - msg := new(exchangetypes.MsgBatchCreateSpotLimitOrders) + }) + msg := new(exchangev2types.MsgBatchCreateSpotLimitOrders) msg.Sender = senderAddress.String() - msg.Orders = []exchangetypes.SpotOrder{*order} + msg.Orders = []exchangev2types.SpotOrder{*order} simRes, err := chainClient.SimulateMsg(clientCtx, msg) @@ -102,7 +87,7 @@ func main() { return } - msgBatchCreateSpotLimitOrdersResponse := exchangetypes.MsgBatchCreateSpotLimitOrdersResponse{} + msgBatchCreateSpotLimitOrdersResponse := exchangev2types.MsgBatchCreateSpotLimitOrdersResponse{} err = msgBatchCreateSpotLimitOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/5_MsgBatchCreateDerivativeLimitOrders/example.go b/examples/chain/5_MsgBatchCreateDerivativeLimitOrders/example.go index cbd1812c..29380300 100644 --- a/examples/chain/5_MsgBatchCreateDerivativeLimitOrders/example.go +++ b/examples/chain/5_MsgBatchCreateDerivativeLimitOrders/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -52,17 +49,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -81,10 +67,10 @@ func main() { price := decimal.NewFromFloat(5) leverage := decimal.NewFromFloat(1) - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, Leverage: leverage, @@ -93,12 +79,11 @@ func main() { IsReduceOnly: false, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchCreateDerivativeLimitOrders) + msg := new(exchangev2types.MsgBatchCreateDerivativeLimitOrders) msg.Sender = senderAddress.String() - msg.Orders = []exchangetypes.DerivativeOrder{*order} + msg.Orders = []exchangev2types.DerivativeOrder{*order} simRes, err := chainClient.SimulateMsg(clientCtx, msg) @@ -107,7 +92,7 @@ func main() { return } - msgBatchCreateDerivativeLimitOrdersResponse := exchangetypes.MsgBatchCreateDerivativeLimitOrdersResponse{} + msgBatchCreateDerivativeLimitOrdersResponse := exchangev2types.MsgBatchCreateDerivativeLimitOrdersResponse{} err = msgBatchCreateDerivativeLimitOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/6_MsgRegisterAsDMM/example.go b/examples/chain/6_MsgRegisterAsDMM/example.go index a21f352b..98efcb4c 100644 --- a/examples/chain/6_MsgRegisterAsDMM/example.go +++ b/examples/chain/6_MsgRegisterAsDMM/example.go @@ -8,7 +8,7 @@ import ( "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) @@ -56,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgRewardsOptOut{ + msg := &exchangev2types.MsgRewardsOptOut{ Sender: senderAddress.String(), } diff --git a/examples/chain/8_OfflineSigning/example.go b/examples/chain/8_OfflineSigning/example.go index 00cacf59..f69bae08 100644 --- a/examples/chain/8_OfflineSigning/example.go +++ b/examples/chain/8_OfflineSigning/example.go @@ -2,20 +2,17 @@ package main import ( - "context" "fmt" "io/ioutil" "os" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func StoreTxToFile(fileName string, txBytes []byte) error { @@ -64,17 +61,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -90,21 +76,20 @@ func main() { amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(1.02) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotLimitOrder) + msg := new(exchangev2types.MsgCreateSpotLimitOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) + msg.Order = exchangev2types.SpotOrder(*order) accNum, accSeq := chainClient.GetAccNonce() signedTx, err := chainClient.BuildSignedTx(clientCtx, accNum, accSeq, 20000, msg) diff --git a/examples/chain/authz/2_MsgExec/example.go b/examples/chain/authz/2_MsgExec/example.go index 840b4bc9..a4a910f7 100644 --- a/examples/chain/authz/2_MsgExec/example.go +++ b/examples/chain/authz/2_MsgExec/example.go @@ -1,23 +1,20 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" - "github.com/shopspring/decimal" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" authztypes "github.com/cosmos/cosmos-sdk/x/authz" + "github.com/shopspring/decimal" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -67,17 +64,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - txFactory := chainclient.NewTxFactory(clientCtx) txFactory = txFactory.WithGasPrices(client.DefaultGasPriceWithDenom) chainClient, err := chainclient.NewChainClient( @@ -100,20 +86,19 @@ func main() { amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(22.55) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, + OrderType: exchangev2types.OrderType_BUY, Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, }, - marketsAssistant, ) // manually pack msg into Any type - msg0 := exchangetypes.MsgCreateSpotLimitOrder{ + msg0 := exchangev2types.MsgCreateSpotLimitOrder{ Sender: granter, Order: *order, } diff --git a/examples/chain/exchange/10_MsgCreateDerivativeLimitOrder/example.go b/examples/chain/exchange/10_MsgCreateDerivativeLimitOrder/example.go index d8881b1c..e5a4cb86 100644 --- a/examples/chain/exchange/10_MsgCreateDerivativeLimitOrder/example.go +++ b/examples/chain/exchange/10_MsgCreateDerivativeLimitOrder/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -51,17 +48,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -79,10 +65,10 @@ func main() { price := decimal.RequireFromString("31000") //31,000 leverage := decimal.RequireFromString("2.5") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, Leverage: leverage, @@ -91,12 +77,11 @@ func main() { IsReduceOnly: true, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateDerivativeLimitOrder) + msg := new(exchangev2types.MsgCreateDerivativeLimitOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.DerivativeOrder(*order) + msg.Order = exchangev2types.DerivativeOrder(*order) simRes, err := chainClient.SimulateMsg(clientCtx, msg) @@ -104,7 +89,7 @@ func main() { panic(err) } - msgCreateDerivativeLimitOrderResponse := exchangetypes.MsgCreateDerivativeLimitOrderResponse{} + msgCreateDerivativeLimitOrderResponse := exchangev2types.MsgCreateDerivativeLimitOrderResponse{} err = msgCreateDerivativeLimitOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/exchange/11_MsgCreateDerivativeMarketOrder/example.go b/examples/chain/exchange/11_MsgCreateDerivativeMarketOrder/example.go index 9e1a8d78..343b4f2d 100644 --- a/examples/chain/exchange/11_MsgCreateDerivativeMarketOrder/example.go +++ b/examples/chain/exchange/11_MsgCreateDerivativeMarketOrder/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -52,17 +49,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -80,10 +66,10 @@ func main() { price := decimal.RequireFromString("33000") //33,000 leverage := decimal.RequireFromString("2.5") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_SELL, //BUY SELL + OrderType: exchangev2types.OrderType_SELL, //BUY SELL Quantity: amount, Price: price, Leverage: leverage, @@ -92,12 +78,11 @@ func main() { IsReduceOnly: true, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateDerivativeMarketOrder) + msg := new(exchangev2types.MsgCreateDerivativeMarketOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.DerivativeOrder(*order) + msg.Order = exchangev2types.DerivativeOrder(*order) simRes, err := chainClient.SimulateMsg(clientCtx, msg) @@ -105,7 +90,7 @@ func main() { panic(err) } - msgCreateDerivativeMarketOrderResponse := exchangetypes.MsgCreateDerivativeMarketOrderResponse{} + msgCreateDerivativeMarketOrderResponse := exchangev2types.MsgCreateDerivativeMarketOrderResponse{} err = msgCreateDerivativeMarketOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/exchange/12_MsgCancelDerivativeOrder/example.go b/examples/chain/exchange/12_MsgCancelDerivativeOrder/example.go index 2fb04e91..a37ae147 100644 --- a/examples/chain/exchange/12_MsgCancelDerivativeOrder/example.go +++ b/examples/chain/exchange/12_MsgCancelDerivativeOrder/example.go @@ -5,13 +5,12 @@ import ( "os" "time" - "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -57,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgCancelDerivativeOrder{ + msg := &exchangev2types.MsgCancelDerivativeOrder{ Sender: senderAddress.String(), MarketId: "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce", SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", diff --git a/examples/chain/exchange/13_MsgInstantBinaryOptionsMarketLaunch/example.go b/examples/chain/exchange/13_MsgInstantBinaryOptionsMarketLaunch/example.go index f9534a72..cdd78f10 100644 --- a/examples/chain/exchange/13_MsgInstantBinaryOptionsMarketLaunch/example.go +++ b/examples/chain/exchange/13_MsgInstantBinaryOptionsMarketLaunch/example.go @@ -7,15 +7,14 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { @@ -75,10 +74,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantBinaryOptionsMarketLaunch{ + msg := &exchangev2types.MsgInstantBinaryOptionsMarketLaunch{ Sender: senderAddress.String(), Ticker: "UFC-KHABIB-TKO-05/30/2023", OracleSymbol: "UFC-KHABIB-TKO-05/30/2023", @@ -91,8 +87,8 @@ func main() { SettlementTimestamp: 1690730982, Admin: senderAddress.String(), QuoteDenom: quoteToken.Denom, - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/14_MsgSubaccountTransfer/example.go b/examples/chain/exchange/14_MsgSubaccountTransfer/example.go index 797bf8e0..83d26e2a 100644 --- a/examples/chain/exchange/14_MsgSubaccountTransfer/example.go +++ b/examples/chain/exchange/14_MsgSubaccountTransfer/example.go @@ -6,14 +6,13 @@ import ( "time" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + sdktypes "github.com/cosmos/cosmos-sdk/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -59,7 +58,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgSubaccountTransfer{ + msg := &exchangev2types.MsgSubaccountTransfer{ Sender: senderAddress.String(), SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", DestinationSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000001", diff --git a/examples/chain/exchange/15_MsgExternalTransfer/example.go b/examples/chain/exchange/15_MsgExternalTransfer/example.go index c67b2ca9..c05f5adb 100644 --- a/examples/chain/exchange/15_MsgExternalTransfer/example.go +++ b/examples/chain/exchange/15_MsgExternalTransfer/example.go @@ -10,7 +10,7 @@ import ( "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" @@ -59,7 +59,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgExternalTransfer{ + msg := &exchangev2types.MsgExternalTransfer{ Sender: senderAddress.String(), SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", DestinationSubaccountId: "0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000", diff --git a/examples/chain/exchange/16_MsgLiquidatePosition/example.go b/examples/chain/exchange/16_MsgLiquidatePosition/example.go index 4a00f6a8..d5d1a17c 100644 --- a/examples/chain/exchange/16_MsgLiquidatePosition/example.go +++ b/examples/chain/exchange/16_MsgLiquidatePosition/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "encoding/json" "fmt" "os" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -51,17 +48,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -79,10 +65,10 @@ func main() { price := decimal.RequireFromString("39.01") leverage := decimal.RequireFromString("1") - order := chainClient.CreateDerivativeOrder( + order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_SELL, + OrderType: exchangev2types.OrderType_SELL, Quantity: amount, Price: price, Leverage: leverage, @@ -90,10 +76,9 @@ func main() { MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := &exchangetypes.MsgLiquidatePosition{ + msg := &exchangev2types.MsgLiquidatePosition{ Sender: senderAddress.String(), SubaccountId: "0x156df4d5bc8e7dd9191433e54bd6a11eeb390921000000000000000000000000", MarketId: marketId, diff --git a/examples/chain/exchange/17_MsgIncreasePositionMargin/example.go b/examples/chain/exchange/17_MsgIncreasePositionMargin/example.go index c239cbc0..716ec4d7 100644 --- a/examples/chain/exchange/17_MsgIncreasePositionMargin/example.go +++ b/examples/chain/exchange/17_MsgIncreasePositionMargin/example.go @@ -6,14 +6,12 @@ import ( "time" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -59,7 +57,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgIncreasePositionMargin{ + msg := &exchangev2types.MsgIncreasePositionMargin{ Sender: senderAddress.String(), MarketId: "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce", SourceSubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", diff --git a/examples/chain/exchange/1_MsgDeposit/example.go b/examples/chain/exchange/1_MsgDeposit/example.go index f1f507b3..b58822e4 100644 --- a/examples/chain/exchange/1_MsgDeposit/example.go +++ b/examples/chain/exchange/1_MsgDeposit/example.go @@ -6,16 +6,13 @@ import ( "time" "cosmossdk.io/math" - - "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - + rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -59,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgDeposit{ + msg := &exchangev2types.MsgDeposit{ Sender: senderAddress.String(), SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", Amount: sdktypes.Coin{ diff --git a/examples/chain/exchange/21_MsgRewardsOptOut/example.go b/examples/chain/exchange/21_MsgRewardsOptOut/example.go index a21f352b..80f65128 100644 --- a/examples/chain/exchange/21_MsgRewardsOptOut/example.go +++ b/examples/chain/exchange/21_MsgRewardsOptOut/example.go @@ -5,12 +5,12 @@ import ( "os" "time" - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -56,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgRewardsOptOut{ + msg := &exchangev2types.MsgRewardsOptOut{ Sender: senderAddress.String(), } diff --git a/examples/chain/exchange/23_MsgDecreasePositionMargin/example.go b/examples/chain/exchange/23_MsgDecreasePositionMargin/example.go index d1b88227..633aa00f 100644 --- a/examples/chain/exchange/23_MsgDecreasePositionMargin/example.go +++ b/examples/chain/exchange/23_MsgDecreasePositionMargin/example.go @@ -6,14 +6,12 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -61,7 +59,7 @@ func main() { defaultSubaccountID := chainClient.DefaultSubaccount(senderAddress) - msg := &exchangetypes.MsgDecreasePositionMargin{ + msg := &exchangev2types.MsgDecreasePositionMargin{ Sender: senderAddress.String(), MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", SourceSubaccountId: defaultSubaccountID.String(), diff --git a/examples/chain/exchange/24_MsgUpdateSpotMarket/example.go b/examples/chain/exchange/24_MsgUpdateSpotMarket/example.go index 2c4d09cc..76f579d9 100644 --- a/examples/chain/exchange/24_MsgUpdateSpotMarket/example.go +++ b/examples/chain/exchange/24_MsgUpdateSpotMarket/example.go @@ -1,20 +1,16 @@ package main import ( - "context" "encoding/json" "fmt" "os" "cosmossdk.io/math" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) @@ -60,36 +56,17 @@ func main() { panic(err) } - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - - baseToken := marketsAssistant.AllTokens()["INJ"] - quoteToken := marketsAssistant.AllTokens()["USDC"] minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.01") minNotional := math.LegacyMustNewDecFromStr("2") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinPriceTickSize = chainMinPriceTickSize.Quo(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(baseToken.Decimals))) - - chainMinQuantityTickSize := minQuantityTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(baseToken.Decimals))) - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - - msg := &exchangetypes.MsgUpdateSpotMarket{ + msg := &exchangev2types.MsgUpdateSpotMarket{ Admin: senderAddress.String(), MarketId: "0x215970bfdea5c94d8e964a759d3ce6eae1d113900129cc8428267db5ccdb3d1a", NewTicker: "INJ/USDC 2", - NewMinPriceTickSize: chainMinPriceTickSize, - NewMinQuantityTickSize: chainMinQuantityTickSize, - NewMinNotional: chainMinNotional, + NewMinPriceTickSize: minPriceTickSize, + NewMinQuantityTickSize: minQuantityTickSize, + NewMinNotional: minNotional, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/25_MsgUpdateDerivativeMarket/example.go b/examples/chain/exchange/25_MsgUpdateDerivativeMarket/example.go index 2346b2c8..2624735c 100644 --- a/examples/chain/exchange/25_MsgUpdateDerivativeMarket/example.go +++ b/examples/chain/exchange/25_MsgUpdateDerivativeMarket/example.go @@ -1,20 +1,17 @@ package main import ( - "context" "encoding/json" "fmt" "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { @@ -59,33 +56,17 @@ func main() { panic(err) } - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - - quoteToken := marketsAssistant.AllTokens()["USDT"] minPriceTickSize := math.LegacyMustNewDecFromStr("0.1") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.1") minNotional := math.LegacyMustNewDecFromStr("2") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinQuantityTickSize := minQuantityTickSize - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - - msg := &exchangetypes.MsgUpdateDerivativeMarket{ + msg := &exchangev2types.MsgUpdateDerivativeMarket{ Admin: senderAddress.String(), MarketId: "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", NewTicker: "INJ/USDT PERP 2", - NewMinPriceTickSize: chainMinPriceTickSize, - NewMinQuantityTickSize: chainMinQuantityTickSize, - NewMinNotional: chainMinNotional, + NewMinPriceTickSize: minPriceTickSize, + NewMinQuantityTickSize: minQuantityTickSize, + NewMinNotional: minNotional, NewInitialMarginRatio: math.LegacyMustNewDecFromStr("0.4"), NewMaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.085"), } diff --git a/examples/chain/exchange/26_MsgAuthorizeStakeGrants/example.go b/examples/chain/exchange/26_MsgAuthorizeStakeGrants/example.go index 752b3e14..b023a30e 100644 --- a/examples/chain/exchange/26_MsgAuthorizeStakeGrants/example.go +++ b/examples/chain/exchange/26_MsgAuthorizeStakeGrants/example.go @@ -6,14 +6,12 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" - - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -59,14 +57,14 @@ func main() { panic(err) } - grantAuthorization := &exchangetypes.GrantAuthorization{ + grantAuthorization := &exchangev2types.GrantAuthorization{ Grantee: "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", Amount: math.NewIntWithDecimal(1, 18), } - msg := &exchangetypes.MsgAuthorizeStakeGrants{ + msg := &exchangev2types.MsgAuthorizeStakeGrants{ Sender: senderAddress.String(), - Grants: []*exchangetypes.GrantAuthorization{grantAuthorization}, + Grants: []*exchangev2types.GrantAuthorization{grantAuthorization}, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/27_MsgActivateStakeGrant/example.go b/examples/chain/exchange/27_MsgActivateStakeGrant/example.go index 8ec7829d..f83732da 100644 --- a/examples/chain/exchange/27_MsgActivateStakeGrant/example.go +++ b/examples/chain/exchange/27_MsgActivateStakeGrant/example.go @@ -5,13 +5,12 @@ import ( "fmt" "os" - "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -57,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgActivateStakeGrant{ + msg := &exchangev2types.MsgActivateStakeGrant{ Sender: senderAddress.String(), Granter: "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r", } diff --git a/examples/chain/exchange/2_MsgWithdraw/example.go b/examples/chain/exchange/2_MsgWithdraw/example.go index ab1f76db..8ef46352 100644 --- a/examples/chain/exchange/2_MsgWithdraw/example.go +++ b/examples/chain/exchange/2_MsgWithdraw/example.go @@ -10,7 +10,7 @@ import ( "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" rpchttp "github.com/cometbft/cometbft/rpc/client/http" sdktypes "github.com/cosmos/cosmos-sdk/types" @@ -59,7 +59,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgWithdraw{ + msg := &exchangev2types.MsgWithdraw{ Sender: senderAddress.String(), SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", Amount: sdktypes.Coin{ diff --git a/examples/chain/exchange/3_MsgInstantSpotMarketLaunch/example.go b/examples/chain/exchange/3_MsgInstantSpotMarketLaunch/example.go index 6345284a..5555d714 100644 --- a/examples/chain/exchange/3_MsgInstantSpotMarketLaunch/example.go +++ b/examples/chain/exchange/3_MsgInstantSpotMarketLaunch/example.go @@ -7,14 +7,13 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { @@ -76,20 +75,14 @@ func main() { minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") minNotional := math.LegacyMustNewDecFromStr("1") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinPriceTickSize = chainMinPriceTickSize.Quo(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(baseToken.Decimals))) - - chainMinQuantityTickSize := minQuantityTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(baseToken.Decimals))) - chainMinNotional := minNotional.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - - msg := &exchangetypes.MsgInstantSpotMarketLaunch{ + msg := &exchangev2types.MsgInstantSpotMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC", BaseDenom: baseToken.Denom, QuoteDenom: quoteToken.Denom, - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, - MinNotional: chainMinNotional, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, + MinNotional: minNotional, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/4_MsgInstantPerpetualMarketLaunch/example.go b/examples/chain/exchange/4_MsgInstantPerpetualMarketLaunch/example.go index 2de5f4fb..5e730cd5 100644 --- a/examples/chain/exchange/4_MsgInstantPerpetualMarketLaunch/example.go +++ b/examples/chain/exchange/4_MsgInstantPerpetualMarketLaunch/example.go @@ -7,15 +7,14 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { @@ -75,10 +74,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantPerpetualMarketLaunch{ + msg := &exchangev2types.MsgInstantPerpetualMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC PERP", QuoteDenom: quoteToken.Denom, @@ -90,8 +86,8 @@ func main() { TakerFeeRate: math.LegacyMustNewDecFromStr("0.001"), InitialMarginRatio: math.LegacyMustNewDecFromStr("0.33"), MaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.095"), - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/5_MsgInstantExpiryFuturesMarketLaunch/example.go b/examples/chain/exchange/5_MsgInstantExpiryFuturesMarketLaunch/example.go index e02b7835..c8dc2d4b 100644 --- a/examples/chain/exchange/5_MsgInstantExpiryFuturesMarketLaunch/example.go +++ b/examples/chain/exchange/5_MsgInstantExpiryFuturesMarketLaunch/example.go @@ -7,15 +7,14 @@ import ( "os" "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" oracletypes "github.com/InjectiveLabs/sdk-go/chain/oracle/types" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) func main() { @@ -75,10 +74,7 @@ func main() { minPriceTickSize := math.LegacyMustNewDecFromStr("0.01") minQuantityTickSize := math.LegacyMustNewDecFromStr("0.001") - chainMinPriceTickSize := minPriceTickSize.Mul(math.LegacyNewDecFromIntWithPrec(math.NewInt(1), int64(quoteToken.Decimals))) - chainMinQuantityTickSize := minQuantityTickSize - - msg := &exchangetypes.MsgInstantExpiryFuturesMarketLaunch{ + msg := &exchangev2types.MsgInstantExpiryFuturesMarketLaunch{ Sender: senderAddress.String(), Ticker: "INJ/USDC FUT", QuoteDenom: quoteToken.Denom, @@ -91,8 +87,8 @@ func main() { TakerFeeRate: math.LegacyMustNewDecFromStr("0.001"), InitialMarginRatio: math.LegacyMustNewDecFromStr("0.33"), MaintenanceMarginRatio: math.LegacyMustNewDecFromStr("0.095"), - MinPriceTickSize: chainMinPriceTickSize, - MinQuantityTickSize: chainMinQuantityTickSize, + MinPriceTickSize: minPriceTickSize, + MinQuantityTickSize: minQuantityTickSize, } // AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg diff --git a/examples/chain/exchange/6_MsgCreateSpotLimitOrder/example.go b/examples/chain/exchange/6_MsgCreateSpotLimitOrder/example.go index 3707d502..ca73c853 100644 --- a/examples/chain/exchange/6_MsgCreateSpotLimitOrder/example.go +++ b/examples/chain/exchange/6_MsgCreateSpotLimitOrder/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -50,17 +47,6 @@ func main() { } clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -78,22 +64,21 @@ func main() { amount := decimal.NewFromFloat(2) price := decimal.NewFromFloat(22.55) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotLimitOrder) + msg := new(exchangev2types.MsgCreateSpotLimitOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) + msg.Order = exchangev2types.SpotOrder(*order) simRes, err := chainClient.SimulateMsg(clientCtx, msg) @@ -102,7 +87,7 @@ func main() { return } - msgCreateSpotLimitOrderResponse := exchangetypes.MsgCreateSpotLimitOrderResponse{} + msgCreateSpotLimitOrderResponse := exchangev2types.MsgCreateSpotLimitOrderResponse{} err = msgCreateSpotLimitOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/exchange/7_MsgCreateSpotMarketOrder/example.go b/examples/chain/exchange/7_MsgCreateSpotMarketOrder/example.go index 392fbd08..bbc72bd4 100644 --- a/examples/chain/exchange/7_MsgCreateSpotMarketOrder/example.go +++ b/examples/chain/exchange/7_MsgCreateSpotMarketOrder/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -51,17 +48,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -78,22 +64,21 @@ func main() { amount := decimal.NewFromFloat(0.1) price := decimal.NewFromFloat(22) - order := chainClient.CreateSpotOrder( + order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_SELL, //BUY SELL + OrderType: exchangev2types.OrderType_SELL, //BUY SELL Quantity: amount, Price: price, FeeRecipient: senderAddress.String(), MarketId: marketId, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgCreateSpotMarketOrder) + msg := new(exchangev2types.MsgCreateSpotMarketOrder) msg.Sender = senderAddress.String() - msg.Order = exchangetypes.SpotOrder(*order) + msg.Order = exchangev2types.SpotOrder(*order) simRes, err := chainClient.SimulateMsg(clientCtx, msg) if err != nil { @@ -101,7 +86,7 @@ func main() { return } - msgCreateSpotMarketOrderResponse := exchangetypes.MsgCreateSpotMarketOrderResponse{} + msgCreateSpotMarketOrderResponse := exchangev2types.MsgCreateSpotMarketOrderResponse{} err = msgCreateSpotMarketOrderResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) if err != nil { diff --git a/examples/chain/exchange/8_MsgCancelSpotOrder/example.go b/examples/chain/exchange/8_MsgCancelSpotOrder/example.go index adc9d9a8..2a7b8405 100644 --- a/examples/chain/exchange/8_MsgCancelSpotOrder/example.go +++ b/examples/chain/exchange/8_MsgCancelSpotOrder/example.go @@ -5,13 +5,12 @@ import ( "os" "time" - "github.com/InjectiveLabs/sdk-go/client" - - "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -57,7 +56,7 @@ func main() { panic(err) } - msg := &exchangetypes.MsgCancelSpotOrder{ + msg := &exchangev2types.MsgCancelSpotOrder{ Sender: senderAddress.String(), MarketId: "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0", SubaccountId: "0xaf79152ac5df276d9a8e1e2e22822f9713474902000000000000000000000000", diff --git a/examples/chain/exchange/9_MsgBatchUpdateOrders/example.go b/examples/chain/exchange/9_MsgBatchUpdateOrders/example.go index a292074d..c2f80a62 100644 --- a/examples/chain/exchange/9_MsgBatchUpdateOrders/example.go +++ b/examples/chain/exchange/9_MsgBatchUpdateOrders/example.go @@ -1,21 +1,18 @@ package main import ( - "context" "fmt" "os" "time" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/google/uuid" - - "github.com/InjectiveLabs/sdk-go/client" - "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" - exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/InjectiveLabs/sdk-go/client/common" ) func main() { @@ -52,17 +49,6 @@ func main() { clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) - exchangeClient, err := exchangeclient.NewExchangeClient(network) - if err != nil { - panic(err) - } - - ctx := context.Background() - marketsAssistant, err := chainclient.NewMarketsAssistantInitializedFromChain(ctx, exchangeClient) - if err != nil { - panic(err) - } - chainClient, err := chainclient.NewChainClient( clientCtx, network, @@ -81,17 +67,16 @@ func main() { sprice := decimal.NewFromFloat(22.5) smarketIds := []string{"0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0"} - spot_order := chainClient.CreateSpotOrder( + spot_order := chainClient.CreateSpotOrderV2( defaultSubaccountID, &chainclient.SpotOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: samount, Price: sprice, FeeRecipient: senderAddress.String(), MarketId: smarketId, Cid: uuid.NewString(), }, - marketsAssistant, ) dmarketId := "0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce" @@ -100,10 +85,10 @@ func main() { dleverage := decimal.RequireFromString("2") dmarketIds := []string{"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce"} - derivative_order := chainClient.CreateDerivativeOrder( + derivative_order := chainClient.CreateDerivativeOrderV2( defaultSubaccountID, &chainclient.DerivativeOrderData{ - OrderType: exchangetypes.OrderType_BUY, //BUY SELL BUY_PO SELL_PO + OrderType: exchangev2types.OrderType_BUY, //BUY SELL BUY_PO SELL_PO Quantity: damount, Price: dprice, Leverage: dleverage, @@ -112,14 +97,13 @@ func main() { IsReduceOnly: false, Cid: uuid.NewString(), }, - marketsAssistant, ) - msg := new(exchangetypes.MsgBatchUpdateOrders) + msg := new(exchangev2types.MsgBatchUpdateOrders) msg.Sender = senderAddress.String() msg.SubaccountId = defaultSubaccountID.Hex() - msg.SpotOrdersToCreate = []*exchangetypes.SpotOrder{spot_order} - msg.DerivativeOrdersToCreate = []*exchangetypes.DerivativeOrder{derivative_order} + msg.SpotOrdersToCreate = []*exchangev2types.SpotOrder{spot_order} + msg.DerivativeOrdersToCreate = []*exchangev2types.DerivativeOrder{derivative_order} msg.SpotMarketIdsToCancelAll = smarketIds msg.DerivativeMarketIdsToCancelAll = dmarketIds @@ -130,7 +114,7 @@ func main() { return } - MsgBatchUpdateOrdersResponse := exchangetypes.MsgBatchUpdateOrdersResponse{} + MsgBatchUpdateOrdersResponse := exchangev2types.MsgBatchUpdateOrdersResponse{} MsgBatchUpdateOrdersResponse.Unmarshal(simRes.Result.MsgResponses[0].Value) fmt.Println("simulated spot order hashes", MsgBatchUpdateOrdersResponse.SpotOrderHashes) diff --git a/examples/chain/exchange/query/10_SpotMarkets/example.go b/examples/chain/exchange/query/10_SpotMarkets/example.go index 9bb071e4..a6241e0e 100644 --- a/examples/chain/exchange/query/10_SpotMarkets/example.go +++ b/examples/chain/exchange/query/10_SpotMarkets/example.go @@ -61,7 +61,7 @@ func main() { status := "Active" marketIds := []string{"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"} - res, err := chainClient.FetchChainSpotMarkets(ctx, status, marketIds) + res, err := chainClient.FetchChainSpotMarketsV2(ctx, status, marketIds) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/11_SpotMarket/example.go b/examples/chain/exchange/query/11_SpotMarket/example.go index 0251543b..6e74aa6b 100644 --- a/examples/chain/exchange/query/11_SpotMarket/example.go +++ b/examples/chain/exchange/query/11_SpotMarket/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchChainSpotMarket(ctx, marketId) + res, err := chainClient.FetchChainSpotMarketV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/12_FullSpotMarkets/example.go b/examples/chain/exchange/query/12_FullSpotMarkets/example.go index c560b9c3..53ba567d 100644 --- a/examples/chain/exchange/query/12_FullSpotMarkets/example.go +++ b/examples/chain/exchange/query/12_FullSpotMarkets/example.go @@ -62,7 +62,7 @@ func main() { marketIds := []string{"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"} withMidPriceAndTob := true - res, err := chainClient.FetchChainFullSpotMarkets(ctx, status, marketIds, withMidPriceAndTob) + res, err := chainClient.FetchChainFullSpotMarketsV2(ctx, status, marketIds, withMidPriceAndTob) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/13_FullSpotMarket/example.go b/examples/chain/exchange/query/13_FullSpotMarket/example.go index 54700709..f3a965a1 100644 --- a/examples/chain/exchange/query/13_FullSpotMarket/example.go +++ b/examples/chain/exchange/query/13_FullSpotMarket/example.go @@ -61,7 +61,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" withMidPriceAndTob := true - res, err := chainClient.FetchChainFullSpotMarket(ctx, marketId, withMidPriceAndTob) + res, err := chainClient.FetchChainFullSpotMarketV2(ctx, marketId, withMidPriceAndTob) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/14_SpotOrderbook/example.go b/examples/chain/exchange/query/14_SpotOrderbook/example.go index 65c07040..146026ff 100644 --- a/examples/chain/exchange/query/14_SpotOrderbook/example.go +++ b/examples/chain/exchange/query/14_SpotOrderbook/example.go @@ -4,17 +4,15 @@ import ( "context" "encoding/json" "fmt" - - "cosmossdk.io/math" - "os" - "github.com/InjectiveLabs/sdk-go/chain/exchange/types" + "cosmossdk.io/math" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + v2 "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { @@ -64,11 +62,11 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" limit := uint64(2) - orderSide := types.OrderSide_Buy + orderSide := v2.OrderSide_Buy limitCumulativeNotional := math.LegacyDec{} limitCumulativeQuantity := math.LegacyDec{} - res, err := chainClient.FetchChainSpotOrderbook(ctx, marketId, limit, orderSide, limitCumulativeNotional, limitCumulativeQuantity) + res, err := chainClient.FetchChainSpotOrderbookV2(ctx, marketId, limit, orderSide, limitCumulativeNotional, limitCumulativeQuantity) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/15_TraderSpotOrders/example.go b/examples/chain/exchange/query/15_TraderSpotOrders/example.go index 5452b06c..03913cd2 100644 --- a/examples/chain/exchange/query/15_TraderSpotOrders/example.go +++ b/examples/chain/exchange/query/15_TraderSpotOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainTraderSpotOrders(ctx, marketId, subaccountId.Hex()) + res, err := chainClient.FetchChainTraderSpotOrdersV2(ctx, marketId, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/16_AccountAddressSpotOrders/example.go b/examples/chain/exchange/query/16_AccountAddressSpotOrders/example.go index 9c5f4c05..6d95e8f0 100644 --- a/examples/chain/exchange/query/16_AccountAddressSpotOrders/example.go +++ b/examples/chain/exchange/query/16_AccountAddressSpotOrders/example.go @@ -59,7 +59,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchChainAccountAddressSpotOrders(ctx, marketId, senderAddress.String()) + res, err := chainClient.FetchChainAccountAddressSpotOrdersV2(ctx, marketId, senderAddress.String()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/17_SpotOrdersByHashes/example.go b/examples/chain/exchange/query/17_SpotOrdersByHashes/example.go index 93dea96c..a0e63d82 100644 --- a/examples/chain/exchange/query/17_SpotOrdersByHashes/example.go +++ b/examples/chain/exchange/query/17_SpotOrdersByHashes/example.go @@ -61,7 +61,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) orderHashes := []string{"0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1"} - res, err := chainClient.FetchChainSpotOrdersByHashes(ctx, marketId, subaccountId.Hex(), orderHashes) + res, err := chainClient.FetchChainSpotOrdersByHashesV2(ctx, marketId, subaccountId.Hex(), orderHashes) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/18_SubaccountOrders/example.go b/examples/chain/exchange/query/18_SubaccountOrders/example.go index f2ccb128..3fc448bf 100644 --- a/examples/chain/exchange/query/18_SubaccountOrders/example.go +++ b/examples/chain/exchange/query/18_SubaccountOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainSubaccountOrders(ctx, subaccountId.Hex(), marketId) + res, err := chainClient.FetchChainSubaccountOrdersV2(ctx, subaccountId.Hex(), marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/19_TraderSpotTransientOrders/example.go b/examples/chain/exchange/query/19_TraderSpotTransientOrders/example.go index 4df67cad..c2b42521 100644 --- a/examples/chain/exchange/query/19_TraderSpotTransientOrders/example.go +++ b/examples/chain/exchange/query/19_TraderSpotTransientOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainTraderSpotTransientOrders(ctx, marketId, subaccountId.Hex()) + res, err := chainClient.FetchChainTraderSpotTransientOrdersV2(ctx, marketId, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/1_SubaccountDeposits/example.go b/examples/chain/exchange/query/1_SubaccountDeposits/example.go index 526edc5a..8deadf95 100644 --- a/examples/chain/exchange/query/1_SubaccountDeposits/example.go +++ b/examples/chain/exchange/query/1_SubaccountDeposits/example.go @@ -59,7 +59,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) ctx := context.Background() - res, err := chainClient.FetchSubaccountDeposits(ctx, subaccountId.Hex()) + res, err := chainClient.FetchSubaccountDepositsV2(ctx, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/20_SpotMidPriceAndTOB/example.go b/examples/chain/exchange/query/20_SpotMidPriceAndTOB/example.go index 789ceec1..cb351e4f 100644 --- a/examples/chain/exchange/query/20_SpotMidPriceAndTOB/example.go +++ b/examples/chain/exchange/query/20_SpotMidPriceAndTOB/example.go @@ -59,7 +59,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchSpotMidPriceAndTOB(ctx, marketId) + res, err := chainClient.FetchSpotMidPriceAndTOBV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/21_DerivativeMidPriceAndTOB/example.go b/examples/chain/exchange/query/21_DerivativeMidPriceAndTOB/example.go index 1de6d908..cfa10457 100644 --- a/examples/chain/exchange/query/21_DerivativeMidPriceAndTOB/example.go +++ b/examples/chain/exchange/query/21_DerivativeMidPriceAndTOB/example.go @@ -59,7 +59,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchDerivativeMidPriceAndTOB(ctx, marketId) + res, err := chainClient.FetchDerivativeMidPriceAndTOBV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/22_DerivativeOrderbook/example.go b/examples/chain/exchange/query/22_DerivativeOrderbook/example.go index 5af14c85..e4f18607 100644 --- a/examples/chain/exchange/query/22_DerivativeOrderbook/example.go +++ b/examples/chain/exchange/query/22_DerivativeOrderbook/example.go @@ -64,7 +64,7 @@ func main() { limit := uint64(2) limitCumulativeNotional := math.LegacyDec{} - res, err := chainClient.FetchChainDerivativeOrderbook(ctx, marketId, limit, limitCumulativeNotional) + res, err := chainClient.FetchChainDerivativeOrderbookV2(ctx, marketId, limit, limitCumulativeNotional) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/23_TraderDerivativeOrders/example.go b/examples/chain/exchange/query/23_TraderDerivativeOrders/example.go index 307df66c..568be040 100644 --- a/examples/chain/exchange/query/23_TraderDerivativeOrders/example.go +++ b/examples/chain/exchange/query/23_TraderDerivativeOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainTraderDerivativeOrders(ctx, marketId, subaccountId.Hex()) + res, err := chainClient.FetchChainTraderDerivativeOrdersV2(ctx, marketId, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/24_AccountAddressDerivativeOrders/example.go b/examples/chain/exchange/query/24_AccountAddressDerivativeOrders/example.go index c08c7959..a4097ceb 100644 --- a/examples/chain/exchange/query/24_AccountAddressDerivativeOrders/example.go +++ b/examples/chain/exchange/query/24_AccountAddressDerivativeOrders/example.go @@ -59,7 +59,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainAccountAddressDerivativeOrders(ctx, marketId, senderAddress.String()) + res, err := chainClient.FetchChainAccountAddressDerivativeOrdersV2(ctx, marketId, senderAddress.String()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/25_DerivativeOrdersByHashes/example.go b/examples/chain/exchange/query/25_DerivativeOrdersByHashes/example.go index bb8ba8db..e66b07b0 100644 --- a/examples/chain/exchange/query/25_DerivativeOrdersByHashes/example.go +++ b/examples/chain/exchange/query/25_DerivativeOrdersByHashes/example.go @@ -61,7 +61,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) orderHashes := []string{"0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1"} - res, err := chainClient.FetchChainDerivativeOrdersByHashes(ctx, marketId, subaccountId.Hex(), orderHashes) + res, err := chainClient.FetchChainDerivativeOrdersByHashesV2(ctx, marketId, subaccountId.Hex(), orderHashes) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/26_TraderDerivativeTransientOrders/example.go b/examples/chain/exchange/query/26_TraderDerivativeTransientOrders/example.go index 6d4b7b22..5223ea87 100644 --- a/examples/chain/exchange/query/26_TraderDerivativeTransientOrders/example.go +++ b/examples/chain/exchange/query/26_TraderDerivativeTransientOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainTraderDerivativeTransientOrders(ctx, marketId, subaccountId.Hex()) + res, err := chainClient.FetchChainTraderDerivativeTransientOrdersV2(ctx, marketId, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/27_DerivativeMarkets/example.go b/examples/chain/exchange/query/27_DerivativeMarkets/example.go index ad4ecb6f..7f9dabf0 100644 --- a/examples/chain/exchange/query/27_DerivativeMarkets/example.go +++ b/examples/chain/exchange/query/27_DerivativeMarkets/example.go @@ -62,7 +62,7 @@ func main() { marketIds := []string{"0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"} withMidPriceAndTob := true - res, err := chainClient.FetchChainDerivativeMarkets(ctx, status, marketIds, withMidPriceAndTob) + res, err := chainClient.FetchChainDerivativeMarketsV2(ctx, status, marketIds, withMidPriceAndTob) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/28_DerivativeMarket/example.go b/examples/chain/exchange/query/28_DerivativeMarket/example.go index 881ba344..94d9c7f1 100644 --- a/examples/chain/exchange/query/28_DerivativeMarket/example.go +++ b/examples/chain/exchange/query/28_DerivativeMarket/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainDerivativeMarket(ctx, marketId) + res, err := chainClient.FetchChainDerivativeMarketV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/29_DerivativeMarketAddress/example.go b/examples/chain/exchange/query/29_DerivativeMarketAddress/example.go index 534aa4a9..8fcf016f 100644 --- a/examples/chain/exchange/query/29_DerivativeMarketAddress/example.go +++ b/examples/chain/exchange/query/29_DerivativeMarketAddress/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchDerivativeMarketAddress(ctx, marketId) + res, err := chainClient.FetchDerivativeMarketAddressV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/2_SubaccountDeposit/example.go b/examples/chain/exchange/query/2_SubaccountDeposit/example.go index 02346c0e..9c9dd243 100644 --- a/examples/chain/exchange/query/2_SubaccountDeposit/example.go +++ b/examples/chain/exchange/query/2_SubaccountDeposit/example.go @@ -60,7 +60,7 @@ func main() { denom := "inj" ctx := context.Background() - res, err := chainClient.FetchSubaccountDeposit(ctx, subaccountId.Hex(), denom) + res, err := chainClient.FetchSubaccountDepositV2(ctx, subaccountId.Hex(), denom) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/30_SubaccountTradeNonce/example.go b/examples/chain/exchange/query/30_SubaccountTradeNonce/example.go index cf0ef07c..a6f36b3d 100644 --- a/examples/chain/exchange/query/30_SubaccountTradeNonce/example.go +++ b/examples/chain/exchange/query/30_SubaccountTradeNonce/example.go @@ -60,7 +60,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchSubaccountTradeNonce(ctx, subaccountId.Hex()) + res, err := chainClient.FetchSubaccountTradeNonceV2(ctx, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/31_Positions/example.go b/examples/chain/exchange/query/31_Positions/example.go index 5e19feca..e98827c4 100644 --- a/examples/chain/exchange/query/31_Positions/example.go +++ b/examples/chain/exchange/query/31_Positions/example.go @@ -58,7 +58,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchChainPositions(ctx) + res, err := chainClient.FetchChainPositionsV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/32_SubaccountPositions/example.go b/examples/chain/exchange/query/32_SubaccountPositions/example.go index 0d0b423e..feb0aa95 100644 --- a/examples/chain/exchange/query/32_SubaccountPositions/example.go +++ b/examples/chain/exchange/query/32_SubaccountPositions/example.go @@ -60,7 +60,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchChainSubaccountPositions(ctx, subaccountId.Hex()) + res, err := chainClient.FetchChainSubaccountPositionsV2(ctx, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/33_SubaccountPositionInMarket/example.go b/examples/chain/exchange/query/33_SubaccountPositionInMarket/example.go index 5fbb4f09..1509cfe1 100644 --- a/examples/chain/exchange/query/33_SubaccountPositionInMarket/example.go +++ b/examples/chain/exchange/query/33_SubaccountPositionInMarket/example.go @@ -61,7 +61,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainSubaccountPositionInMarket(ctx, subaccountId.Hex(), marketId) + res, err := chainClient.FetchChainSubaccountPositionInMarketV2(ctx, subaccountId.Hex(), marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/34_SubaccountEffectivePositionInMarket/example.go b/examples/chain/exchange/query/34_SubaccountEffectivePositionInMarket/example.go index 1bdb9f31..fb1e5f12 100644 --- a/examples/chain/exchange/query/34_SubaccountEffectivePositionInMarket/example.go +++ b/examples/chain/exchange/query/34_SubaccountEffectivePositionInMarket/example.go @@ -61,7 +61,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainSubaccountEffectivePositionInMarket(ctx, subaccountId.Hex(), marketId) + res, err := chainClient.FetchChainSubaccountEffectivePositionInMarketV2(ctx, subaccountId.Hex(), marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/35_PerpetualMarketInfo/example.go b/examples/chain/exchange/query/35_PerpetualMarketInfo/example.go index eb95664c..a3b08934 100644 --- a/examples/chain/exchange/query/35_PerpetualMarketInfo/example.go +++ b/examples/chain/exchange/query/35_PerpetualMarketInfo/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainPerpetualMarketInfo(ctx, marketId) + res, err := chainClient.FetchChainPerpetualMarketInfoV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/36_ExpiryFuturesMarketInfo/example.go b/examples/chain/exchange/query/36_ExpiryFuturesMarketInfo/example.go index 59749df0..977746bc 100644 --- a/examples/chain/exchange/query/36_ExpiryFuturesMarketInfo/example.go +++ b/examples/chain/exchange/query/36_ExpiryFuturesMarketInfo/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainExpiryFuturesMarketInfo(ctx, marketId) + res, err := chainClient.FetchChainExpiryFuturesMarketInfoV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/37_PerpetualMarketFunding/example.go b/examples/chain/exchange/query/37_PerpetualMarketFunding/example.go index 11ed5cae..38585253 100644 --- a/examples/chain/exchange/query/37_PerpetualMarketFunding/example.go +++ b/examples/chain/exchange/query/37_PerpetualMarketFunding/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchChainPerpetualMarketFunding(ctx, marketId) + res, err := chainClient.FetchChainPerpetualMarketFundingV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/38_SubaccountOrderMetadata/example.go b/examples/chain/exchange/query/38_SubaccountOrderMetadata/example.go index b9d08a15..0d52169d 100644 --- a/examples/chain/exchange/query/38_SubaccountOrderMetadata/example.go +++ b/examples/chain/exchange/query/38_SubaccountOrderMetadata/example.go @@ -59,7 +59,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchSubaccountOrderMetadata(ctx, subaccountId.Hex()) + res, err := chainClient.FetchSubaccountOrderMetadataV2(ctx, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/39_TradeRewardPoints/example.go b/examples/chain/exchange/query/39_TradeRewardPoints/example.go index c6586fe8..5679d227 100644 --- a/examples/chain/exchange/query/39_TradeRewardPoints/example.go +++ b/examples/chain/exchange/query/39_TradeRewardPoints/example.go @@ -59,7 +59,7 @@ func main() { accounts := []string{senderAddress.String()} - res, err := chainClient.FetchTradeRewardPoints(ctx, accounts) + res, err := chainClient.FetchTradeRewardPointsV2(ctx, accounts) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/3_ExchangeBalances/example.go b/examples/chain/exchange/query/3_ExchangeBalances/example.go index d8cf9d47..51ba78a4 100644 --- a/examples/chain/exchange/query/3_ExchangeBalances/example.go +++ b/examples/chain/exchange/query/3_ExchangeBalances/example.go @@ -58,7 +58,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchExchangeBalances(ctx) + res, err := chainClient.FetchExchangeBalancesV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/40_PendingTradeRewardPoints/example.go b/examples/chain/exchange/query/40_PendingTradeRewardPoints/example.go index f5bd8f7b..c795f4b4 100644 --- a/examples/chain/exchange/query/40_PendingTradeRewardPoints/example.go +++ b/examples/chain/exchange/query/40_PendingTradeRewardPoints/example.go @@ -59,7 +59,7 @@ func main() { accounts := []string{senderAddress.String()} - res, err := chainClient.FetchPendingTradeRewardPoints(ctx, accounts) + res, err := chainClient.FetchPendingTradeRewardPointsV2(ctx, accounts) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/41_TradeRewardCampaign/example.go b/examples/chain/exchange/query/41_TradeRewardCampaign/example.go index 908a3813..ef9ee416 100644 --- a/examples/chain/exchange/query/41_TradeRewardCampaign/example.go +++ b/examples/chain/exchange/query/41_TradeRewardCampaign/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchTradeRewardCampaign(ctx) + res, err := chainClient.FetchTradeRewardCampaignV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/42_FeeDiscountAccountInfo/example.go b/examples/chain/exchange/query/42_FeeDiscountAccountInfo/example.go index 018d8393..29869b06 100644 --- a/examples/chain/exchange/query/42_FeeDiscountAccountInfo/example.go +++ b/examples/chain/exchange/query/42_FeeDiscountAccountInfo/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchFeeDiscountAccountInfo(ctx, senderAddress.String()) + res, err := chainClient.FetchFeeDiscountAccountInfoV2(ctx, senderAddress.String()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/43_FeeDiscountSchedule/example.go b/examples/chain/exchange/query/43_FeeDiscountSchedule/example.go index 122f239c..1aec6efa 100644 --- a/examples/chain/exchange/query/43_FeeDiscountSchedule/example.go +++ b/examples/chain/exchange/query/43_FeeDiscountSchedule/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchFeeDiscountSchedule(ctx) + res, err := chainClient.FetchFeeDiscountScheduleV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/44_BalanceMismatches/example.go b/examples/chain/exchange/query/44_BalanceMismatches/example.go index f4db8308..15380e91 100644 --- a/examples/chain/exchange/query/44_BalanceMismatches/example.go +++ b/examples/chain/exchange/query/44_BalanceMismatches/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchBalanceMismatches(ctx, 1) + res, err := chainClient.FetchBalanceMismatchesV2(ctx, 1) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/45_BalanceWithBalanceHolds/example.go b/examples/chain/exchange/query/45_BalanceWithBalanceHolds/example.go index b3677024..bae2b2cc 100644 --- a/examples/chain/exchange/query/45_BalanceWithBalanceHolds/example.go +++ b/examples/chain/exchange/query/45_BalanceWithBalanceHolds/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchBalanceWithBalanceHolds(ctx) + res, err := chainClient.FetchBalanceWithBalanceHoldsV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/46_FeeDiscountTierStatistics/example.go b/examples/chain/exchange/query/46_FeeDiscountTierStatistics/example.go index 2fdaf947..3cb6a863 100644 --- a/examples/chain/exchange/query/46_FeeDiscountTierStatistics/example.go +++ b/examples/chain/exchange/query/46_FeeDiscountTierStatistics/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchFeeDiscountTierStatistics(ctx) + res, err := chainClient.FetchFeeDiscountTierStatisticsV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/47_MitoVaultInfos/example.go b/examples/chain/exchange/query/47_MitoVaultInfos/example.go index e6b52166..c45afa52 100644 --- a/examples/chain/exchange/query/47_MitoVaultInfos/example.go +++ b/examples/chain/exchange/query/47_MitoVaultInfos/example.go @@ -57,7 +57,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchMitoVaultInfos(ctx) + res, err := chainClient.FetchMitoVaultInfosV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/48_QueryMarketIDFromVault/example.go b/examples/chain/exchange/query/48_QueryMarketIDFromVault/example.go index 5e269e30..da70c304 100644 --- a/examples/chain/exchange/query/48_QueryMarketIDFromVault/example.go +++ b/examples/chain/exchange/query/48_QueryMarketIDFromVault/example.go @@ -59,7 +59,7 @@ func main() { vaultAddress := "inj1qg5ega6dykkxc307y25pecuufrjkxkag6xhp6y" - res, err := chainClient.FetchMarketIDFromVault(ctx, vaultAddress) + res, err := chainClient.FetchMarketIDFromVaultV2(ctx, vaultAddress) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/49_HistoricalTradeRecords/example.go b/examples/chain/exchange/query/49_HistoricalTradeRecords/example.go index 0d52d73a..692107d6 100644 --- a/examples/chain/exchange/query/49_HistoricalTradeRecords/example.go +++ b/examples/chain/exchange/query/49_HistoricalTradeRecords/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchHistoricalTradeRecords(ctx, marketId) + res, err := chainClient.FetchHistoricalTradeRecordsV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/4_AggregateVolume/example.go b/examples/chain/exchange/query/4_AggregateVolume/example.go index 84a66eba..e7cfd523 100644 --- a/examples/chain/exchange/query/4_AggregateVolume/example.go +++ b/examples/chain/exchange/query/4_AggregateVolume/example.go @@ -60,7 +60,7 @@ func main() { subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchAggregateVolume(ctx, senderAddress.String()) + res, err := chainClient.FetchAggregateVolumeV2(ctx, senderAddress.String()) if err != nil { fmt.Println(err) } @@ -68,7 +68,7 @@ func main() { str, _ := json.MarshalIndent(res, "", " ") fmt.Print(string(str)) - res, err = chainClient.FetchAggregateVolume(ctx, subaccountId.Hex()) + res, err = chainClient.FetchAggregateVolumeV2(ctx, subaccountId.Hex()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/50_IsOptedOutOfRewards/example.go b/examples/chain/exchange/query/50_IsOptedOutOfRewards/example.go index 89d915e2..1daae645 100644 --- a/examples/chain/exchange/query/50_IsOptedOutOfRewards/example.go +++ b/examples/chain/exchange/query/50_IsOptedOutOfRewards/example.go @@ -58,7 +58,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchIsOptedOutOfRewards(ctx, senderAddress.String()) + res, err := chainClient.FetchIsOptedOutOfRewardsV2(ctx, senderAddress.String()) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/51_OptedOutOfRewardsAccounts/example.go b/examples/chain/exchange/query/51_OptedOutOfRewardsAccounts/example.go index 7809c836..e8a56b89 100644 --- a/examples/chain/exchange/query/51_OptedOutOfRewardsAccounts/example.go +++ b/examples/chain/exchange/query/51_OptedOutOfRewardsAccounts/example.go @@ -58,7 +58,7 @@ func main() { ctx := context.Background() - res, err := chainClient.FetchOptedOutOfRewardsAccounts(ctx) + res, err := chainClient.FetchOptedOutOfRewardsAccountsV2(ctx) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/52_MarketVolatility/example.go b/examples/chain/exchange/query/52_MarketVolatility/example.go index 5dc6b988..8969bca4 100644 --- a/examples/chain/exchange/query/52_MarketVolatility/example.go +++ b/examples/chain/exchange/query/52_MarketVolatility/example.go @@ -4,15 +4,14 @@ import ( "context" "encoding/json" "fmt" - - "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - "os" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + + exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" ) func main() { @@ -61,14 +60,14 @@ func main() { ctx := context.Background() marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - tradeHistoryOptions := types.TradeHistoryOptions{ + tradeHistoryOptions := exchangev2types.TradeHistoryOptions{ TradeGroupingSec: 10, MaxAge: 0, IncludeRawHistory: true, IncludeMetadata: true, } - res, err := chainClient.FetchMarketVolatility(ctx, marketId, &tradeHistoryOptions) + res, err := chainClient.FetchMarketVolatilityV2(ctx, marketId, &tradeHistoryOptions) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/53_BinaryOptionsMarkets/example.go b/examples/chain/exchange/query/53_BinaryOptionsMarkets/example.go index ba0ae6fe..b675bc78 100644 --- a/examples/chain/exchange/query/53_BinaryOptionsMarkets/example.go +++ b/examples/chain/exchange/query/53_BinaryOptionsMarkets/example.go @@ -60,7 +60,7 @@ func main() { status := "Active" - res, err := chainClient.FetchChainBinaryOptionsMarkets(ctx, status) + res, err := chainClient.FetchChainBinaryOptionsMarketsV2(ctx, status) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/54_TraderDerivativeConditionalOrders/example.go b/examples/chain/exchange/query/54_TraderDerivativeConditionalOrders/example.go index a26fb380..039f8a74 100644 --- a/examples/chain/exchange/query/54_TraderDerivativeConditionalOrders/example.go +++ b/examples/chain/exchange/query/54_TraderDerivativeConditionalOrders/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" subaccountId := chainClient.Subaccount(senderAddress, 0) - res, err := chainClient.FetchTraderDerivativeConditionalOrders(ctx, subaccountId.Hex(), marketId) + res, err := chainClient.FetchTraderDerivativeConditionalOrdersV2(ctx, subaccountId.Hex(), marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/55_MarketAtomicExecutionFeeMultiplier/example.go b/examples/chain/exchange/query/55_MarketAtomicExecutionFeeMultiplier/example.go index 493f05ea..d292f770 100644 --- a/examples/chain/exchange/query/55_MarketAtomicExecutionFeeMultiplier/example.go +++ b/examples/chain/exchange/query/55_MarketAtomicExecutionFeeMultiplier/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" - res, err := chainClient.FetchMarketAtomicExecutionFeeMultiplier(ctx, marketId) + res, err := chainClient.FetchMarketAtomicExecutionFeeMultiplierV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/56_ActivateStakeGrant/example.go b/examples/chain/exchange/query/56_ActivateStakeGrant/example.go new file mode 100644 index 00000000..78b4285e --- /dev/null +++ b/examples/chain/exchange/query/56_ActivateStakeGrant/example.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + grantee := "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" + + res, err := chainClient.FetchActiveStakeGrantV2(ctx, grantee) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/exchange/query/57_GrantAuthorization/example.go b/examples/chain/exchange/query/57_GrantAuthorization/example.go new file mode 100644 index 00000000..094f56eb --- /dev/null +++ b/examples/chain/exchange/query/57_GrantAuthorization/example.go @@ -0,0 +1,71 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + granter := senderAddress.String() + grantee := "inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r" + + res, err := chainClient.FetchGrantAuthorizationV2(ctx, granter, grantee) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/exchange/query/58_GrantAuthorizations/example.go b/examples/chain/exchange/query/58_GrantAuthorizations/example.go new file mode 100644 index 00000000..ebd770f6 --- /dev/null +++ b/examples/chain/exchange/query/58_GrantAuthorizations/example.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + granter := senderAddress.String() + + res, err := chainClient.FetchGrantAuthorizationsV2(ctx, granter) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/exchange/query/59_L3DerivativeOrderBook/example.go b/examples/chain/exchange/query/59_L3DerivativeOrderBook/example.go new file mode 100644 index 00000000..d5314e99 --- /dev/null +++ b/examples/chain/exchange/query/59_L3DerivativeOrderBook/example.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + marketId := "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" + + res, err := chainClient.FetchL3DerivativeOrderbookV2(ctx, marketId) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/exchange/query/5_AggregateVolumes/example.go b/examples/chain/exchange/query/5_AggregateVolumes/example.go index 0bae825c..d0caa440 100644 --- a/examples/chain/exchange/query/5_AggregateVolumes/example.go +++ b/examples/chain/exchange/query/5_AggregateVolumes/example.go @@ -61,7 +61,7 @@ func main() { accounts := []string{senderAddress.String()} marketIds := []string{"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"} - res, err := chainClient.FetchAggregateVolumes(ctx, accounts, marketIds) + res, err := chainClient.FetchAggregateVolumesV2(ctx, accounts, marketIds) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/60_L3SpotOrderBook/example.go b/examples/chain/exchange/query/60_L3SpotOrderBook/example.go new file mode 100644 index 00000000..96eb6674 --- /dev/null +++ b/examples/chain/exchange/query/60_L3SpotOrderBook/example.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/InjectiveLabs/sdk-go/client" + chainclient "github.com/InjectiveLabs/sdk-go/client/chain" + "github.com/InjectiveLabs/sdk-go/client/common" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" +) + +func main() { + network := common.LoadNetwork("testnet", "lb") + tmClient, err := rpchttp.New(network.TmEndpoint, "/websocket") + if err != nil { + panic(err) + } + + senderAddress, cosmosKeyring, err := chainclient.InitCosmosKeyring( + os.Getenv("HOME")+"/.injectived", + "injectived", + "file", + "inj-user", + "12345678", + "5d386fbdbf11f1141010f81a46b40f94887367562bd33b452bbaa6ce1cd1381e", // keyring will be used if pk not provided + false, + ) + + if err != nil { + panic(err) + } + + clientCtx, err := chainclient.NewClientContext( + network.ChainId, + senderAddress.String(), + cosmosKeyring, + ) + + if err != nil { + panic(err) + } + + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + ctx := context.Background() + + marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" + + res, err := chainClient.FetchL3SpotOrderbookV2(ctx, marketId) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/exchange/query/6_AggregateMarketVolume/example.go b/examples/chain/exchange/query/6_AggregateMarketVolume/example.go index 1bf1ebbc..645d9618 100644 --- a/examples/chain/exchange/query/6_AggregateMarketVolume/example.go +++ b/examples/chain/exchange/query/6_AggregateMarketVolume/example.go @@ -60,7 +60,7 @@ func main() { marketId := "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - res, err := chainClient.FetchAggregateMarketVolume(ctx, marketId) + res, err := chainClient.FetchAggregateMarketVolumeV2(ctx, marketId) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/7_AggregateMarketVolumes/example.go b/examples/chain/exchange/query/7_AggregateMarketVolumes/example.go index bb8c8ea5..324e9153 100644 --- a/examples/chain/exchange/query/7_AggregateMarketVolumes/example.go +++ b/examples/chain/exchange/query/7_AggregateMarketVolumes/example.go @@ -60,7 +60,7 @@ func main() { marketIds := []string{"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe"} - res, err := chainClient.FetchAggregateMarketVolumes(ctx, marketIds) + res, err := chainClient.FetchAggregateMarketVolumesV2(ctx, marketIds) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/8_DenomDecimal/example.go b/examples/chain/exchange/query/8_DenomDecimal/example.go index 97663656..0baa3a0c 100644 --- a/examples/chain/exchange/query/8_DenomDecimal/example.go +++ b/examples/chain/exchange/query/8_DenomDecimal/example.go @@ -60,7 +60,7 @@ func main() { denom := "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" - res, err := chainClient.FetchDenomDecimal(ctx, denom) + res, err := chainClient.FetchDenomDecimalV2(ctx, denom) if err != nil { fmt.Println(err) } diff --git a/examples/chain/exchange/query/9_DenomDecimals/example.go b/examples/chain/exchange/query/9_DenomDecimals/example.go index f4e9866c..4f2dcacb 100644 --- a/examples/chain/exchange/query/9_DenomDecimals/example.go +++ b/examples/chain/exchange/query/9_DenomDecimals/example.go @@ -60,7 +60,7 @@ func main() { denoms := []string{"inj", "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"} - res, err := chainClient.FetchDenomDecimals(ctx, denoms) + res, err := chainClient.FetchDenomDecimalsV2(ctx, denoms) if err != nil { fmt.Println(err) } From bcafaa091ec279d37164b91e24fb2fcc63ee4ab2 Mon Sep 17 00:00:00 2001 From: Abel Armoa <30988000+aarmoa@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:25:54 -0300 Subject: [PATCH 2/3] (feat) Added support for chain stream V2 types --- Makefile | 3 + chain/exchange/types/conditional_orders.go | 29 - chain/exchange/types/events.go | 33 - chain/exchange/types/orderbook.go | 157 - chain/exchange/types/reclamation.go | 41 - chain/exchange/types/stake_grants.go | 21 - chain/exchange/types/v2/common_order.go | 14 - chain/exchange/types/v2/derivative_orders.go | 54 - chain/exchange/types/v2/exchange.go | 25 - chain/exchange/types/v2/market.go | 136 - chain/exchange/types/v2/order.go | 25 - chain/exchange/types/v2/orderbook.go | 8 - chain/exchange/types/v2/params.go | 33 - chain/exchange/types/v2/position.go | 19 - chain/exchange/types/v2/query.go | 122 - chain/exchange/types/v2/spot_orders.go | 37 +- chain/exchange/types/wasm_maker_contract.go | 23 - chain/stream/types/query.pb.go | 261 +- chain/stream/types/request.go | 18 + chain/stream/types/v2/query.pb.go | 7660 ++++++++++++++++++ chain/stream/types/v2/request.go | 74 + chain/stream/types/{ => v2}/response.go | 31 +- client/chain/chain.go | 16 + client/chain/chain_test_support.go | 5 + examples/chain/12_ChainStream/example.go | 4 +- 25 files changed, 7918 insertions(+), 931 deletions(-) delete mode 100644 chain/exchange/types/conditional_orders.go delete mode 100644 chain/exchange/types/events.go delete mode 100644 chain/exchange/types/orderbook.go delete mode 100644 chain/exchange/types/reclamation.go delete mode 100644 chain/exchange/types/stake_grants.go delete mode 100644 chain/exchange/types/v2/order.go delete mode 100644 chain/exchange/types/v2/query.go delete mode 100644 chain/exchange/types/wasm_maker_contract.go create mode 100644 chain/stream/types/v2/query.pb.go create mode 100644 chain/stream/types/v2/request.go rename chain/stream/types/{ => v2}/response.go (86%) diff --git a/Makefile b/Makefile index 56e4b2f1..441d9d99 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,8 @@ copy-chain-types: rm -rf chain/wasmx/types/*test.go rm -rf chain/wasmx/types/*gw.go cp ../injective-core/injective-chain/stream/types/*.go chain/stream/types rm -rf chain/stream/types/*test.go rm -rf chain/stream/types/*gw.go + cp ../injective-core/injective-chain/stream/types/v2/*.go chain/stream/types/v2 + rm -rf chain/stream/types/v2/*test.go rm -rf chain/stream/types/v2/*gw.go cp ../injective-core/injective-chain/types/*.go chain/types rm -rf chain/types/*test.go rm -rf chain/types/*gw.go @@ -69,6 +71,7 @@ copy-chain-types: @echo "👉 Replace injective-core/injective-chain/codec/types with sdk-go/chain/codec/types" @echo "👉 Replace injective-core/injective-chain/types with sdk-go/chain/types" @echo "👉 Replace injective-core/injective-chain/crypto with sdk-go/chain/crypto" + @echo "👉 Replace injective-core/injective-chain/stream/types with sdk-go/chain/stream/types" tests: go test -race ./client/... ./ethereum/... diff --git a/chain/exchange/types/conditional_orders.go b/chain/exchange/types/conditional_orders.go deleted file mode 100644 index 4c3e9a43..00000000 --- a/chain/exchange/types/conditional_orders.go +++ /dev/null @@ -1,29 +0,0 @@ -package types - -func (b *ConditionalDerivativeOrderBook) HasLimitBuyOrders() bool { - return len(b.LimitBuyOrders) > 0 -} - -func (b *ConditionalDerivativeOrderBook) HasLimitSellOrders() bool { - return len(b.LimitSellOrders) > 0 -} - -func (b *ConditionalDerivativeOrderBook) HasMarketBuyOrders() bool { - return len(b.MarketBuyOrders) > 0 -} - -func (b *ConditionalDerivativeOrderBook) HasMarketSellOrders() bool { - return len(b.MarketSellOrders) > 0 -} - -func (b *ConditionalDerivativeOrderBook) IsEmpty() bool { - return !b.HasLimitBuyOrders() && !b.HasLimitSellOrders() && !b.HasMarketBuyOrders() && b.HasMarketSellOrders() -} - -func (b *ConditionalDerivativeOrderBook) GetMarketOrders() []*DerivativeMarketOrder { - return append(b.MarketBuyOrders, b.MarketSellOrders...) -} - -func (b *ConditionalDerivativeOrderBook) GetLimitOrders() []*DerivativeLimitOrder { - return append(b.LimitBuyOrders, b.LimitSellOrders...) -} diff --git a/chain/exchange/types/events.go b/chain/exchange/types/events.go deleted file mode 100644 index 0ed30b40..00000000 --- a/chain/exchange/types/events.go +++ /dev/null @@ -1,33 +0,0 @@ -package types - -import ( - "github.com/ethereum/go-ethereum/common" -) - -// Event type and attribute constants - -func (e *EventOrderFail) AddOrderFail(orderHash common.Hash, cid string, flag uint32) { - e.Hashes = append(e.Hashes, orderHash.Bytes()) - e.Flags = append(e.Flags, flag) - - if cid != "" { - e.Cids = append(e.Cids, cid) - } -} - -func (e *EventOrderFail) IsEmpty() bool { - return len(e.Flags) == 0 && len(e.Hashes) == 0 && len(e.Cids) == 0 -} - -func NewEventOrderCancelFail(marketID, subaccountID common.Hash, orderHash, cid string, err error) *EventOrderCancelFail { - ev := &EventOrderCancelFail{ - MarketId: marketID.Hex(), - SubaccountId: subaccountID.Hex(), - OrderHash: orderHash, - Cid: cid, - } - if err != nil { - ev.Description = err.Error() - } - return ev -} diff --git a/chain/exchange/types/orderbook.go b/chain/exchange/types/orderbook.go deleted file mode 100644 index 62b59125..00000000 --- a/chain/exchange/types/orderbook.go +++ /dev/null @@ -1,157 +0,0 @@ -package types - -import ( - "os" - "sort" - "strings" - - "cosmossdk.io/math" - "github.com/ethereum/go-ethereum/common" - "github.com/olekukonko/tablewriter" -) - -func NewOrderbook(marketID common.Hash) *Orderbook { - return &Orderbook{ - MarketId: marketID.Bytes(), - BuyLevels: make([]*Level, 0), - SellLevels: make([]*Level, 0), - } -} - -func NewOrderbookWithLevels(marketID common.Hash, buyLevels, sellLevels []*Level) *Orderbook { - return &Orderbook{ - MarketId: marketID.Bytes(), - BuyLevels: buyLevels, - SellLevels: sellLevels, - } -} - -func (o *Orderbook) AppendLevel(isBuy bool, level *Level) { - if isBuy { - o.BuyLevels = append(o.BuyLevels, level) - return - } - o.SellLevels = append(o.SellLevels, level) -} - -func (o *Orderbook) IsCrossed() bool { - if len(o.BuyLevels) == 0 || len(o.SellLevels) == 0 { - return false - } - - highestBuyLevel := o.BuyLevels[len(o.BuyLevels)-1] - - if highestBuyLevel.Q.IsZero() { - return false - } - - lowestSellPrice := math.LegacyZeroDec() - - isQuantityAllZero := true - - for _, level := range o.SellLevels { - if level.Q.IsZero() { - continue - } - lowestSellPrice = level.P - isQuantityAllZero = false - break - } - - if isQuantityAllZero { - return false - } - - return highestBuyLevel.P.GTE(lowestSellPrice) -} - -// PrintDisplay is a helper function to print the orderbook in a human readable format for debugging purposes -func (o *Orderbook) PrintDisplay() { - PrintDisplayLevels(o.BuyLevels, o.SellLevels) -} - -// PrintDisplayLevels is a helper function to print the orderbook in a human readable format for debugging purposes -func PrintDisplayLevels(buyLevels, sellLevels []*Level) { - buyLevelsSorted := make([]*Level, len(buyLevels)) - copy(buyLevelsSorted, buyLevels) - sellLevelsSorted := make([]*Level, len(sellLevels)) - copy(sellLevelsSorted, sellLevels) - if len(buyLevels) > 1 { - sort.SliceStable(buyLevelsSorted, func(i, j int) bool { - return buyLevelsSorted[i].GetPrice().GT(buyLevelsSorted[j].GetPrice()) - }) - } - if len(sellLevelsSorted) > 1 { - sort.SliceStable(sellLevelsSorted, func(i, j int) bool { - return sellLevelsSorted[i].GetPrice().LT(sellLevelsSorted[j].GetPrice()) - }) - } - - table := tablewriter.NewWriter(os.Stdout) - table.SetHeader([]string{"Buy Price", "Buy Quantity", "Sell Price", "Sell Quantity"}) - - maxLength := len(buyLevelsSorted) - if len(sellLevelsSorted) > maxLength { - maxLength = len(sellLevelsSorted) - } - - for idx := 0; idx < maxLength; idx++ { - row := make([]string, 0) - if idx < len(buyLevelsSorted) { - row = append(row, getReadableDec(buyLevelsSorted[idx].P), getReadableDec(buyLevelsSorted[idx].Q)) - } else { - row = append(row, "-", "-") - } - if idx < len(sellLevelsSorted) { - row = append(row, getReadableDec(sellLevelsSorted[idx].P), getReadableDec(sellLevelsSorted[idx].Q)) - } else { - row = append(row, "-", "-") - } - table.Append(row) - } - table.Render() -} - -func (o *Orderbook) Equals(other *Orderbook) bool { - if len(o.BuyLevels) != len(other.BuyLevels) || len(o.SellLevels) != len(other.SellLevels) { - return false - } - for i, level := range o.BuyLevels { - metaLevel := other.BuyLevels[i] - if !level.Q.Equal(metaLevel.Q) || !level.P.Equal(metaLevel.P) { - return false - } - } - return true -} - -// getReadableDec is a test utility function to return a readable representation of decimal strings -func getReadableDec(d math.LegacyDec) string { - if d.IsNil() { - return d.String() - } - dec := strings.TrimRight(d.String(), "0") - if len(dec) < 2 { - return dec - } - - if dec[len(dec)-1:] == "." { - return dec + "0" - } - return dec -} - -func NewLevel(price, quantity math.LegacyDec) *Level { - return &Level{ - P: price, - Q: quantity, - } -} - -func (l *Level) GetPrice() math.LegacyDec { - return l.P -} - -func (l *Level) GetQuantity() math.LegacyDec { - return l.Q -} diff --git a/chain/exchange/types/reclamation.go b/chain/exchange/types/reclamation.go deleted file mode 100644 index e1d7d3f0..00000000 --- a/chain/exchange/types/reclamation.go +++ /dev/null @@ -1,41 +0,0 @@ -package types - -import ( - "fmt" - - sdksecp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - - "github.com/InjectiveLabs/sdk-go/chain/crypto/ethsecp256k1" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func ValidateFundsReclaimSignature( - lockedAccountPubKey, signature []byte, -) error { - // validate the signature of the locked account - lockedPubKey := sdksecp256k1.PubKey{ - Key: lockedAccountPubKey, - } - - correctPubKey := ethsecp256k1.PubKey{ - Key: lockedAccountPubKey, - } - - lockedAddress := sdk.AccAddress(lockedPubKey.Address()) - recipient := sdk.AccAddress(correctPubKey.Address()) - - signMessage := ConstructFundsReclaimMessage(recipient, lockedAddress) - - if !lockedPubKey.VerifySignature(signMessage, signature) { - return ErrInvalidSignature - } - return nil -} - -func ConstructFundsReclaimMessage( - recipient, signer sdk.AccAddress, -) []byte { - message := fmt.Sprintf("I authorize %s to reclaim my funds from locked account %s on Injective", recipient.String(), signer.String()) - return []byte(message) -} diff --git a/chain/exchange/types/stake_grants.go b/chain/exchange/types/stake_grants.go deleted file mode 100644 index f2dc959f..00000000 --- a/chain/exchange/types/stake_grants.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import ( - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func NewActiveGrant(granter sdk.AccAddress, amount math.Int) *ActiveGrant { - return &ActiveGrant{ - Granter: granter.String(), - Amount: amount, - } -} - -func NewEffectiveGrant(granter string, amount math.Int, isValid bool) *EffectiveGrant { - return &EffectiveGrant{ - Granter: granter, - NetGrantedStake: amount, - IsValid: isValid, - } -} diff --git a/chain/exchange/types/v2/common_order.go b/chain/exchange/types/v2/common_order.go index 0ed720da..45c2bf83 100644 --- a/chain/exchange/types/v2/common_order.go +++ b/chain/exchange/types/v2/common_order.go @@ -6,7 +6,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" ) func (t OrderType) IsBuy() bool { @@ -48,19 +47,6 @@ func (t OrderType) IsAtomic() bool { return false } -func NewV2OrderInfoFromV1(market MarketInterface, orderInfo v1.OrderInfo) *OrderInfo { - humanPrice := market.PriceFromChainFormat(orderInfo.Price) - humanQuantity := market.QuantityFromChainFormat(orderInfo.Quantity) - - return &OrderInfo{ - SubaccountId: orderInfo.SubaccountId, - FeeRecipient: orderInfo.FeeRecipient, - Price: humanPrice, - Quantity: humanQuantity, - Cid: orderInfo.Cid, - } -} - func (m *OrderInfo) GetNotional() math.LegacyDec { return m.Quantity.Mul(m.Price) } diff --git a/chain/exchange/types/v2/derivative_orders.go b/chain/exchange/types/v2/derivative_orders.go index bf3a998c..af3dc54c 100644 --- a/chain/exchange/types/v2/derivative_orders.go +++ b/chain/exchange/types/v2/derivative_orders.go @@ -388,42 +388,6 @@ func (o *DerivativeOrder) IsVanilla() bool { return !o.IsReduceOnly() } -func NewV1DerivativeMarketOrderFromV2(market DerivativeMarket, order DerivativeMarketOrder) v1.DerivativeMarketOrder { - v1OrderInfo := NewV1OrderInfoFromV2(&market, order.OrderInfo) - v1Order := v1.DerivativeMarketOrder{ - OrderInfo: v1OrderInfo, - OrderType: v1.OrderType(order.OrderType), - Margin: market.NotionalToChainFormat(order.Margin), - MarginHold: market.NotionalToChainFormat(order.MarginHold), - OrderHash: order.OrderHash, - } - - if order.TriggerPrice != nil { - chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) - v1Order.TriggerPrice = &chainFormatTriggerPrice - } - - return v1Order -} - -func NewV1DerivativeLimitOrderFromV2(market MarketInterface, order DerivativeLimitOrder) v1.DerivativeLimitOrder { - v1OrderInfo := NewV1OrderInfoFromV2(market, order.OrderInfo) - v1Order := v1.DerivativeLimitOrder{ - OrderInfo: v1OrderInfo, - OrderType: v1.OrderType(order.OrderType), - Margin: market.NotionalToChainFormat(order.Margin), - Fillable: order.Fillable, - OrderHash: order.OrderHash, - } - - if order.TriggerPrice != nil { - chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) - v1Order.TriggerPrice = &chainFormatTriggerPrice - } - - return v1Order -} - func (o *DerivativeMarketOrder) IsVanilla() bool { return !o.IsReduceOnly() } @@ -484,24 +448,6 @@ func (o *DerivativeMarketOrder) Cid() string { return o.OrderInfo.GetCid() } -func NewV2DerivativeOrderFromV1(market MarketInterface, order v1.DerivativeOrder) *DerivativeOrder { - humanMargin := market.NotionalFromChainFormat(order.Margin) - v2OrderInfo := NewV2OrderInfoFromV1(market, order.OrderInfo) - v2Order := DerivativeOrder{ - MarketId: order.MarketId, - OrderInfo: *v2OrderInfo, - OrderType: OrderType(order.OrderType), - Margin: humanMargin, - } - - if order.TriggerPrice != nil && !order.TriggerPrice.IsNil() { - humanPrice := market.PriceFromChainFormat(*order.TriggerPrice) - v2Order.TriggerPrice = &humanPrice - } - - return &v2Order -} - func (o *DerivativeOrder) SubaccountID() common.Hash { return o.OrderInfo.SubaccountID() } diff --git a/chain/exchange/types/v2/exchange.go b/chain/exchange/types/v2/exchange.go index 6511dfac..449a275b 100644 --- a/chain/exchange/types/v2/exchange.go +++ b/chain/exchange/types/v2/exchange.go @@ -4,7 +4,6 @@ import ( "fmt" "cosmossdk.io/math" - v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" "github.com/ethereum/go-ethereum/common" ) @@ -202,27 +201,3 @@ func (al AtomicMarketOrderAccessLevel) IsValid() bool { return false } } - -func NewV1TradeRecordsFromV2(market MarketInterface, tradeRecords TradeRecords) v1.TradeRecords { - v1TradeRecords := v1.TradeRecords{ - MarketId: tradeRecords.MarketId, - LatestTradeRecords: make([]*v1.TradeRecord, 0, len(tradeRecords.LatestTradeRecords)), - } - - for _, tradeRecord := range tradeRecords.LatestTradeRecords { - v1TradeRecord := NewV1TradeRecordFromV2(market, *tradeRecord) - v1TradeRecords.LatestTradeRecords = append(v1TradeRecords.LatestTradeRecords, &v1TradeRecord) - } - - return v1TradeRecords -} - -func NewV1TradeRecordFromV2(market MarketInterface, record TradeRecord) v1.TradeRecord { - v1TradeRecord := v1.TradeRecord{ - Timestamp: record.Timestamp, - Price: market.PriceToChainFormat(record.Price), - Quantity: market.QuantityToChainFormat(record.Quantity), - } - - return v1TradeRecord -} diff --git a/chain/exchange/types/v2/market.go b/chain/exchange/types/v2/market.go index 6e3b2c53..f9151ac4 100644 --- a/chain/exchange/types/v2/market.go +++ b/chain/exchange/types/v2/market.go @@ -24,45 +24,6 @@ type MarketInterface interface { NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec } -func NewV1MarketVolumeFromV2(market MarketInterface, v2MarketVolume MarketVolume) types.MarketVolume { - return types.MarketVolume{ - MarketId: v2MarketVolume.MarketId, - Volume: NewV1VolumeRecordFromV2(market, v2MarketVolume.Volume), - } -} - -func NewV1VolumeRecordFromV2(market MarketInterface, v2VolumeRecord VolumeRecord) types.VolumeRecord { - chainFormatMakerVolume := market.NotionalToChainFormat(v2VolumeRecord.MakerVolume) - chainFormatTakerVolume := market.NotionalToChainFormat(v2VolumeRecord.TakerVolume) - return types.VolumeRecord{ - MakerVolume: chainFormatMakerVolume, - TakerVolume: chainFormatTakerVolume, - } -} - -func NewV1SpotMarketFromV2(spotMarket SpotMarket) types.SpotMarket { - chainFormattedMinPriceTickSize := spotMarket.PriceToChainFormat(spotMarket.MinPriceTickSize) - chainFormattedMinQuantityTickSize := spotMarket.QuantityToChainFormat(spotMarket.MinQuantityTickSize) - chainFormattedMinNotional := spotMarket.NotionalToChainFormat(spotMarket.MinNotional) - return types.SpotMarket{ - Ticker: spotMarket.Ticker, - BaseDenom: spotMarket.BaseDenom, - QuoteDenom: spotMarket.QuoteDenom, - MakerFeeRate: spotMarket.MakerFeeRate, - TakerFeeRate: spotMarket.TakerFeeRate, - RelayerFeeShareRate: spotMarket.RelayerFeeShareRate, - MarketId: spotMarket.MarketId, - Status: types.MarketStatus(spotMarket.Status), - MinPriceTickSize: chainFormattedMinPriceTickSize, - MinQuantityTickSize: chainFormattedMinQuantityTickSize, - MinNotional: chainFormattedMinNotional, - Admin: spotMarket.Admin, - AdminPermissions: spotMarket.AdminPermissions, - BaseDecimals: spotMarket.BaseDecimals, - QuoteDecimals: spotMarket.QuoteDecimals, - } -} - func (m *SpotMarket) IsActive() bool { return m.Status == MarketStatus_Active } @@ -138,24 +99,6 @@ func (m *SpotMarket) NotionalToChainFormat(humanReadableValue math.LegacyDec) ma return types.NotionalToChainFormat(humanReadableValue, m.QuoteDecimals) } -func NewV1ExpiryFuturesMarketInfoStateFromV2(market DerivativeMarket, marketInfoState ExpiryFuturesMarketInfoState) types.ExpiryFuturesMarketInfoState { - v1MarketInfo := NewV1ExpiryFuturesMarketInfoFromV2(market, *marketInfoState.MarketInfo) - return types.ExpiryFuturesMarketInfoState{ - MarketId: marketInfoState.MarketId, - MarketInfo: &v1MarketInfo, - } -} - -func NewV1ExpiryFuturesMarketInfoFromV2(market DerivativeMarket, marketInfo ExpiryFuturesMarketInfo) types.ExpiryFuturesMarketInfo { - return types.ExpiryFuturesMarketInfo{ - MarketId: marketInfo.MarketId, - ExpirationTimestamp: marketInfo.ExpirationTimestamp, - TwapStartTimestamp: marketInfo.TwapStartTimestamp, - ExpirationTwapStartPriceCumulative: market.PriceToChainFormat(marketInfo.ExpirationTwapStartPriceCumulative), - SettlementPrice: market.PriceToChainFormat(marketInfo.SettlementPrice), - } -} - func (m *ExpiryFuturesMarketInfo) IsPremature(currBlockTime int64) bool { return currBlockTime < m.TwapStartTimestamp } @@ -168,31 +111,6 @@ func (m *ExpiryFuturesMarketInfo) IsMatured(currBlockTime int64) bool { return currBlockTime >= m.ExpirationTimestamp } -func NewV1DerivativeMarketFromV2(derivativeMarket DerivativeMarket) types.DerivativeMarket { - return types.DerivativeMarket{ - Ticker: derivativeMarket.Ticker, - OracleBase: derivativeMarket.OracleBase, - OracleQuote: derivativeMarket.OracleQuote, - OracleType: derivativeMarket.OracleType, - OracleScaleFactor: derivativeMarket.OracleScaleFactor + derivativeMarket.QuoteDecimals, - QuoteDenom: derivativeMarket.QuoteDenom, - MarketId: derivativeMarket.MarketId, - InitialMarginRatio: derivativeMarket.InitialMarginRatio, - MaintenanceMarginRatio: derivativeMarket.MaintenanceMarginRatio, - MakerFeeRate: derivativeMarket.MakerFeeRate, - TakerFeeRate: derivativeMarket.TakerFeeRate, - RelayerFeeShareRate: derivativeMarket.RelayerFeeShareRate, - IsPerpetual: derivativeMarket.IsPerpetual, - Status: types.MarketStatus(derivativeMarket.Status), - MinPriceTickSize: derivativeMarket.PriceToChainFormat(derivativeMarket.MinPriceTickSize), - MinQuantityTickSize: derivativeMarket.QuantityToChainFormat(derivativeMarket.MinQuantityTickSize), - MinNotional: derivativeMarket.NotionalToChainFormat(derivativeMarket.MinNotional), - Admin: derivativeMarket.Admin, - AdminPermissions: derivativeMarket.AdminPermissions, - QuoteDecimals: derivativeMarket.QuoteDecimals, - } -} - func (m *DerivativeMarket) MarketID() common.Hash { return common.HexToHash(m.MarketId) } @@ -303,37 +221,6 @@ func (m *DerivativeMarket) NotionalToChainFormat(humanReadableValue math.LegacyD /// Binary Options Markets // -func NewV1BinaryOptionsMarketFromV2(market BinaryOptionsMarket) types.BinaryOptionsMarket { - v1Market := types.BinaryOptionsMarket{ - Ticker: market.Ticker, - OracleSymbol: market.OracleSymbol, - OracleProvider: market.OracleProvider, - OracleType: market.OracleType, - OracleScaleFactor: market.OracleScaleFactor + market.QuoteDecimals, - ExpirationTimestamp: market.ExpirationTimestamp, - SettlementTimestamp: market.SettlementTimestamp, - Admin: market.Admin, - QuoteDenom: market.QuoteDenom, - MarketId: market.MarketId, - MakerFeeRate: market.MakerFeeRate, - TakerFeeRate: market.TakerFeeRate, - RelayerFeeShareRate: market.RelayerFeeShareRate, - Status: types.MarketStatus(market.Status), - MinPriceTickSize: market.PriceToChainFormat(market.MinPriceTickSize), - MinQuantityTickSize: market.QuantityToChainFormat(market.MinQuantityTickSize), - MinNotional: market.NotionalToChainFormat(market.MinNotional), - AdminPermissions: market.AdminPermissions, - QuoteDecimals: market.QuoteDecimals, - } - - if market.SettlementPrice != nil { - chainFormatSettlementPrice := market.PriceToChainFormat(*market.SettlementPrice) - v1Market.SettlementPrice = &chainFormatSettlementPrice - } - - return v1Market -} - func (m *BinaryOptionsMarket) GetMarketType() types.MarketType { return types.MarketType_BinaryOption } @@ -431,26 +318,3 @@ func (m *BinaryOptionsMarket) QuantityToChainFormat(humanReadableValue math.Lega func (m *BinaryOptionsMarket) NotionalToChainFormat(humanReadableValue math.LegacyDec) math.LegacyDec { return types.NotionalToChainFormat(humanReadableValue, m.QuoteDecimals) } - -func NewV1PerpetualMarketFundingStateFromV2(market DerivativeMarket, fundingState PerpetualMarketFundingState) types.PerpetualMarketFundingState { - v1Funding := NewV1PerpetualMarketFundingFromV2(market, *fundingState.Funding) - return types.PerpetualMarketFundingState{ - MarketId: fundingState.MarketId, - Funding: &v1Funding, - } -} - -func NewV1PerpetualMarketFundingFromV2(market DerivativeMarket, funding PerpetualMarketFunding) types.PerpetualMarketFunding { - return types.PerpetualMarketFunding{ - CumulativeFunding: market.NotionalToChainFormat(funding.CumulativeFunding), - CumulativePrice: market.PriceToChainFormat(funding.CumulativePrice), - LastTimestamp: funding.LastTimestamp, - } -} - -func NewV1DerivativeMarketSettlementInfoFromV2(market DerivativeMarket, settlementInfo DerivativeMarketSettlementInfo) types.DerivativeMarketSettlementInfo { - return types.DerivativeMarketSettlementInfo{ - MarketId: settlementInfo.MarketId, - SettlementPrice: market.PriceToChainFormat(settlementInfo.SettlementPrice), - } -} diff --git a/chain/exchange/types/v2/order.go b/chain/exchange/types/v2/order.go deleted file mode 100644 index 59e9e7d0..00000000 --- a/chain/exchange/types/v2/order.go +++ /dev/null @@ -1,25 +0,0 @@ -package v2 - -import v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - -func NewV1OrderInfoFromV2(market MarketInterface, orderInfo OrderInfo) v1.OrderInfo { - return v1.OrderInfo{ - SubaccountId: orderInfo.SubaccountId, - FeeRecipient: orderInfo.FeeRecipient, - Price: market.PriceToChainFormat(orderInfo.Price), - Quantity: market.QuantityToChainFormat(orderInfo.Quantity), - Cid: orderInfo.Cid, - } -} - -func NewV1SubaccountOrderDataFromV2(market MarketInterface, orderData *SubaccountOrderData) *v1.SubaccountOrderData { - return &v1.SubaccountOrderData{ - Order: &v1.SubaccountOrder{ - Price: market.PriceToChainFormat(orderData.Order.Price), - Quantity: market.QuantityToChainFormat(orderData.Order.Quantity), - IsReduceOnly: orderData.Order.IsReduceOnly, - Cid: orderData.Order.Cid, - }, - OrderHash: orderData.OrderHash, - } -} diff --git a/chain/exchange/types/v2/orderbook.go b/chain/exchange/types/v2/orderbook.go index ba66d4ed..7c3773d2 100644 --- a/chain/exchange/types/v2/orderbook.go +++ b/chain/exchange/types/v2/orderbook.go @@ -1,7 +1,6 @@ package v2 import ( - "github.com/InjectiveLabs/sdk-go/chain/exchange/types" "os" "sort" "strings" @@ -156,10 +155,3 @@ func (l *Level) GetPrice() math.LegacyDec { func (l *Level) GetQuantity() math.LegacyDec { return l.Q } - -func NewV1LevelFromV2(market MarketInterface, level *Level) *types.Level { - return &types.Level{ - P: market.PriceToChainFormat(level.P), - Q: market.QuantityToChainFormat(level.Q), - } -} diff --git a/chain/exchange/types/v2/params.go b/chain/exchange/types/v2/params.go index 7f79e1af..25b22c89 100644 --- a/chain/exchange/types/v2/params.go +++ b/chain/exchange/types/v2/params.go @@ -41,39 +41,6 @@ var ( KeyPostOnlyModeHeightThreshold = []byte("PostOnlyModeHeightThreshold") ) -func NewV1ExchangeParamsFromV2(params Params) types.Params { - return types.Params{ - SpotMarketInstantListingFee: params.SpotMarketInstantListingFee, - DerivativeMarketInstantListingFee: params.DerivativeMarketInstantListingFee, - DefaultSpotMakerFeeRate: params.DefaultSpotMakerFeeRate, - DefaultSpotTakerFeeRate: params.DefaultSpotTakerFeeRate, - DefaultDerivativeMakerFeeRate: params.DefaultDerivativeMakerFeeRate, - DefaultDerivativeTakerFeeRate: params.DefaultDerivativeTakerFeeRate, - DefaultInitialMarginRatio: params.DefaultInitialMarginRatio, - DefaultMaintenanceMarginRatio: params.DefaultMaintenanceMarginRatio, - DefaultFundingInterval: params.DefaultFundingInterval, - FundingMultiple: params.FundingMultiple, - RelayerFeeShareRate: params.RelayerFeeShareRate, - DefaultHourlyFundingRateCap: params.DefaultHourlyFundingRateCap, - DefaultHourlyInterestRate: params.DefaultHourlyInterestRate, - MaxDerivativeOrderSideCount: params.MaxDerivativeOrderSideCount, - InjRewardStakedRequirementThreshold: params.InjRewardStakedRequirementThreshold, - TradingRewardsVestingDuration: params.TradingRewardsVestingDuration, - LiquidatorRewardShareRate: params.LiquidatorRewardShareRate, - BinaryOptionsMarketInstantListingFee: params.BinaryOptionsMarketInstantListingFee, - AtomicMarketOrderAccessLevel: types.AtomicMarketOrderAccessLevel(params.AtomicMarketOrderAccessLevel), - SpotAtomicMarketOrderFeeMultiplier: params.SpotAtomicMarketOrderFeeMultiplier, - DerivativeAtomicMarketOrderFeeMultiplier: params.DerivativeAtomicMarketOrderFeeMultiplier, - BinaryOptionsAtomicMarketOrderFeeMultiplier: params.BinaryOptionsAtomicMarketOrderFeeMultiplier, - MinimalProtocolFeeRate: params.MinimalProtocolFeeRate, - IsInstantDerivativeMarketLaunchEnabled: params.IsInstantDerivativeMarketLaunchEnabled, - PostOnlyModeHeightThreshold: params.PostOnlyModeHeightThreshold, - MarginDecreasePriceTimestampThresholdSeconds: params.MarginDecreasePriceTimestampThresholdSeconds, - ExchangeAdmins: params.ExchangeAdmins, - InjAuctionMaxCap: params.InjAuctionMaxCap, - } -} - // ParamSetPairs returns the parameter set pairs. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ diff --git a/chain/exchange/types/v2/position.go b/chain/exchange/types/v2/position.go index 8ca48901..3aef13fc 100644 --- a/chain/exchange/types/v2/position.go +++ b/chain/exchange/types/v2/position.go @@ -7,25 +7,6 @@ import ( v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" ) -func NewV1DerivativePositonFromV2(market MarketInterface, position DerivativePosition) v1.DerivativePosition { - v1Position := NewV1PositionFromV2(market, *position.Position) - return v1.DerivativePosition{ - SubaccountId: position.SubaccountId, - MarketId: position.MarketId, - Position: &v1Position, - } -} - -func NewV1PositionFromV2(market MarketInterface, position Position) v1.Position { - return v1.Position{ - IsLong: position.IsLong, - Quantity: market.QuantityToChainFormat(position.Quantity), - EntryPrice: market.PriceToChainFormat(position.EntryPrice), - Margin: market.NotionalToChainFormat(position.Margin), - CumulativeFundingEntry: market.NotionalFromChainFormat(position.CumulativeFundingEntry), - } -} - func (p *DerivativePosition) Copy() *DerivativePosition { return &DerivativePosition{ SubaccountId: p.SubaccountId, diff --git a/chain/exchange/types/v2/query.go b/chain/exchange/types/v2/query.go deleted file mode 100644 index c2689c70..00000000 --- a/chain/exchange/types/v2/query.go +++ /dev/null @@ -1,122 +0,0 @@ -package v2 - -import v1 "github.com/InjectiveLabs/sdk-go/chain/exchange/types" - -func NewV1FullSpotMarketFromV2(fullSpotMarket FullSpotMarket) v1.FullSpotMarket { - v1SpotMarket := NewV1SpotMarketFromV2(*fullSpotMarket.Market) - newFullSpotMarket := v1.FullSpotMarket{ - Market: &v1SpotMarket, - } - - if fullSpotMarket.MidPriceAndTob != nil { - v1MidPriceAndTOB := NewV1MidPriceAndTOBFromV2(fullSpotMarket.Market, *fullSpotMarket.MidPriceAndTob) - newFullSpotMarket.MidPriceAndTob = &v1MidPriceAndTOB - } - - return newFullSpotMarket -} - -func NewV1FullDerivativeMarketFromV2(fullDerivativeMarket FullDerivativeMarket) v1.FullDerivativeMarket { - v1FullMarket := v1.FullDerivativeMarket{} - - switch info := fullDerivativeMarket.Info.(type) { - case *FullDerivativeMarket_FuturesInfo: - v1FuturesInfo := NewV1FuturesInfoFromV2(fullDerivativeMarket.Market, *info) - v1FullMarket.Info = &v1FuturesInfo - case *FullDerivativeMarket_PerpetualInfo: - v1PerpetualInfo := NewV1PerpetualInfoFromV2(fullDerivativeMarket.Market, *info) - v1FullMarket.Info = &v1PerpetualInfo - } - - v1FullMarket.MarkPrice = fullDerivativeMarket.Market.PriceToChainFormat(fullDerivativeMarket.MarkPrice) - - v1DerivativeMarket := NewV1DerivativeMarketFromV2(*fullDerivativeMarket.Market) - v1FullMarket.Market = &v1DerivativeMarket - - if fullDerivativeMarket.MidPriceAndTob != nil { - v1MidPriceAndTOB := NewV1MidPriceAndTOBFromV2(fullDerivativeMarket.Market, *fullDerivativeMarket.MidPriceAndTob) - v1FullMarket.MidPriceAndTob = &v1MidPriceAndTOB - } - - return v1FullMarket -} - -func NewV1MidPriceAndTOBFromV2(market MarketInterface, midPriceAndTOB MidPriceAndTOB) v1.MidPriceAndTOB { - chainFormatMidPrice := market.PriceToChainFormat(*midPriceAndTOB.MidPrice) - chainFormatBestBuyPrice := market.PriceToChainFormat(*midPriceAndTOB.BestBuyPrice) - chainFormatBestSellPrice := market.PriceToChainFormat(*midPriceAndTOB.BestSellPrice) - return v1.MidPriceAndTOB{ - MidPrice: &chainFormatMidPrice, - BestBuyPrice: &chainFormatBestBuyPrice, - BestSellPrice: &chainFormatBestSellPrice, - } -} - -func NewV1FuturesInfoFromV2(market MarketInterface, info FullDerivativeMarket_FuturesInfo) v1.FullDerivativeMarket_FuturesInfo { - v1FuturesInfo := v1.ExpiryFuturesMarketInfo{ - MarketId: info.FuturesInfo.MarketId, - ExpirationTimestamp: info.FuturesInfo.ExpirationTimestamp, - TwapStartTimestamp: info.FuturesInfo.TwapStartTimestamp, - ExpirationTwapStartPriceCumulative: market.PriceToChainFormat(info.FuturesInfo.ExpirationTwapStartPriceCumulative), - SettlementPrice: market.PriceToChainFormat(info.FuturesInfo.SettlementPrice), - } - return v1.FullDerivativeMarket_FuturesInfo{ - FuturesInfo: &v1FuturesInfo, - } -} - -func NewV1PerpetualInfoFromV2(market MarketInterface, perpetualInfo FullDerivativeMarket_PerpetualInfo) v1.FullDerivativeMarket_PerpetualInfo { - v1PerpetualMarketInfo := NewV1PerpetualMarketInfoFromV2(*perpetualInfo.PerpetualInfo.MarketInfo) - v1FundingInfo := NewV1FundingInfoFromV2(market, *perpetualInfo.PerpetualInfo.FundingInfo) - return v1.FullDerivativeMarket_PerpetualInfo{ - PerpetualInfo: &v1.PerpetualMarketState{ - MarketInfo: &v1PerpetualMarketInfo, - FundingInfo: &v1FundingInfo, - }, - } -} - -func NewV1FundingInfoFromV2(market MarketInterface, fundingInfo PerpetualMarketFunding) v1.PerpetualMarketFunding { - return v1.PerpetualMarketFunding{ - CumulativeFunding: market.NotionalToChainFormat(fundingInfo.CumulativeFunding), - CumulativePrice: market.PriceToChainFormat(fundingInfo.CumulativePrice), - LastTimestamp: fundingInfo.LastTimestamp, - } -} - -func NewV1PerpetualMarketInfoFromV2(perpetualMarketInfo PerpetualMarketInfo) v1.PerpetualMarketInfo { - return v1.PerpetualMarketInfo{ - MarketId: perpetualMarketInfo.MarketId, - HourlyFundingRateCap: perpetualMarketInfo.HourlyFundingRateCap, - HourlyInterestRate: perpetualMarketInfo.HourlyInterestRate, - NextFundingTimestamp: perpetualMarketInfo.NextFundingTimestamp, - FundingInterval: perpetualMarketInfo.FundingInterval, - } -} - -func NewV1TrimmedDerivativeLimitOrderFromV2(market MarketInterface, trimmedOrder TrimmedDerivativeLimitOrder) v1.TrimmedDerivativeLimitOrder { - chainFormatPrice := market.PriceToChainFormat(trimmedOrder.Price) - chainFormatQuantity := market.QuantityToChainFormat(trimmedOrder.Quantity) - chainFormatMargin := market.NotionalToChainFormat(trimmedOrder.Margin) - chainFormatFillable := market.QuantityToChainFormat(trimmedOrder.Fillable) - return v1.TrimmedDerivativeLimitOrder{ - Price: chainFormatPrice, - Quantity: chainFormatQuantity, - Margin: chainFormatMargin, - Fillable: chainFormatFillable, - IsBuy: trimmedOrder.IsBuy, - OrderHash: trimmedOrder.OrderHash, - Cid: trimmedOrder.Cid, - } -} - -func NewV1TrimmedSpotLimitOrderFromV2(market MarketInterface, trimmedOrder *TrimmedSpotLimitOrder) *v1.TrimmedSpotLimitOrder { - return &v1.TrimmedSpotLimitOrder{ - Price: market.PriceToChainFormat(trimmedOrder.Price), - Quantity: market.QuantityToChainFormat(trimmedOrder.Quantity), - Fillable: market.QuantityToChainFormat(trimmedOrder.Fillable), - IsBuy: trimmedOrder.IsBuy, - OrderHash: trimmedOrder.OrderHash, - Cid: trimmedOrder.Cid, - } -} diff --git a/chain/exchange/types/v2/spot_orders.go b/chain/exchange/types/v2/spot_orders.go index edc40d2c..2bf48158 100644 --- a/chain/exchange/types/v2/spot_orders.go +++ b/chain/exchange/types/v2/spot_orders.go @@ -81,39 +81,6 @@ func (o *SpotMarketOrder) SdkAccAddress() sdk.AccAddress { return o.SubaccountID().Bytes()[:common.AddressLength] } -func NewV1SpotLimitOrderFromV2(market SpotMarket, order SpotLimitOrder) types.SpotLimitOrder { - v1OrderInfo := NewV1OrderInfoFromV2(&market, order.OrderInfo) - v1Order := types.SpotLimitOrder{ - OrderInfo: v1OrderInfo, - OrderType: types.OrderType(order.OrderType), - Fillable: market.QuantityToChainFormat(order.Fillable), - OrderHash: order.OrderHash, - } - - if order.TriggerPrice != nil { - chainFormatTriggerPrice := market.PriceToChainFormat(*order.TriggerPrice) - v1Order.TriggerPrice = &chainFormatTriggerPrice - } - - return v1Order -} - -func NewV2SpotOrderFromV1(market MarketInterface, order types.SpotOrder) *SpotOrder { - v2OrderInfo := NewV2OrderInfoFromV1(market, order.OrderInfo) - v2Order := SpotOrder{ - MarketId: order.MarketId, - OrderInfo: *v2OrderInfo, - OrderType: OrderType(order.OrderType), - } - - if order.TriggerPrice != nil && !order.TriggerPrice.IsNil() { - humanPrice := market.PriceFromChainFormat(*order.TriggerPrice) - v2Order.TriggerPrice = &humanPrice - } - - return &v2Order -} - func (m *SpotLimitOrder) SdkAccAddress() sdk.AccAddress { return m.SubaccountID().Bytes()[:common.AddressLength] } @@ -207,7 +174,9 @@ func (m *SpotOrder) GetBalanceHoldAndMarginDenom(market *SpotMarket) (math.Legac return balanceHold, denom } -func (m *SpotLimitOrder) GetUnfilledMarginHoldAndMarginDenom(market *SpotMarket, isTransient bool) (balanceHold math.LegacyDec, denom string) { +func (m *SpotLimitOrder) GetUnfilledMarginHoldAndMarginDenom(market *SpotMarket, isTransient bool) (math.LegacyDec, string) { + var denom string + var balanceHold math.LegacyDec if m.IsBuy() { var tradeFeeRate math.LegacyDec diff --git a/chain/exchange/types/wasm_maker_contract.go b/chain/exchange/types/wasm_maker_contract.go deleted file mode 100644 index 8b75eb9f..00000000 --- a/chain/exchange/types/wasm_maker_contract.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "cosmossdk.io/math" -) - -type MintToUser struct { - SubaccountIDSender string `json:"subaccount_id_sender"` - Amount string `json:"amount"` -} - -type MintToUserMsg struct { - MintToUser MintToUser `json:"mint_to_user"` -} - -func NewMintToUserMsg(subaccountIDSender string, amount math.Int) MintToUserMsg { - return MintToUserMsg{ - MintToUser: MintToUser{ - SubaccountIDSender: subaccountIDSender, - Amount: amount.String(), - }, - } -} diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index b7488ea1..73d96e9e 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - v2 "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + types "github.com/InjectiveLabs/sdk-go/chain/exchange/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -364,9 +364,9 @@ func (m *OrderbookUpdate) GetOrderbook() *Orderbook { } type Orderbook struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - BuyLevels []*v2.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` - SellLevels []*v2.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyLevels []*types.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + SellLevels []*types.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` } func (m *Orderbook) Reset() { *m = Orderbook{} } @@ -409,14 +409,14 @@ func (m *Orderbook) GetMarketId() string { return "" } -func (m *Orderbook) GetBuyLevels() []*v2.Level { +func (m *Orderbook) GetBuyLevels() []*types.Level { if m != nil { return m.BuyLevels } return nil } -func (m *Orderbook) GetSellLevels() []*v2.Level { +func (m *Orderbook) GetSellLevels() []*types.Level { if m != nil { return m.SellLevels } @@ -528,8 +528,8 @@ func (m *SubaccountDeposits) GetDeposits() []SubaccountDeposit { } type SubaccountDeposit struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Deposit v2.Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Deposit types.Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit"` } func (m *SubaccountDeposit) Reset() { *m = SubaccountDeposit{} } @@ -572,11 +572,11 @@ func (m *SubaccountDeposit) GetDenom() string { return "" } -func (m *SubaccountDeposit) GetDeposit() v2.Deposit { +func (m *SubaccountDeposit) GetDeposit() types.Deposit { if m != nil { return m.Deposit } - return v2.Deposit{} + return types.Deposit{} } type SpotOrderUpdate struct { @@ -648,8 +648,8 @@ func (m *SpotOrderUpdate) GetOrder() *SpotOrder { } type SpotOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order v2.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order types.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` } func (m *SpotOrder) Reset() { *m = SpotOrder{} } @@ -692,11 +692,11 @@ func (m *SpotOrder) GetMarketId() string { return "" } -func (m *SpotOrder) GetOrder() v2.SpotLimitOrder { +func (m *SpotOrder) GetOrder() types.SpotLimitOrder { if m != nil { return m.Order } - return v2.SpotLimitOrder{} + return types.SpotLimitOrder{} } type DerivativeOrderUpdate struct { @@ -768,9 +768,9 @@ func (m *DerivativeOrderUpdate) GetOrder() *DerivativeOrder { } type DerivativeOrder struct { - MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Order v2.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` - IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order types.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` } func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } @@ -813,11 +813,11 @@ func (m *DerivativeOrder) GetMarketId() string { return "" } -func (m *DerivativeOrder) GetOrder() v2.DerivativeLimitOrder { +func (m *DerivativeOrder) GetOrder() types.DerivativeLimitOrder { if m != nil { return m.Order } - return v2.DerivativeLimitOrder{} + return types.DerivativeLimitOrder{} } func (m *DerivativeOrder) GetIsMarket() bool { @@ -1053,7 +1053,7 @@ type DerivativeTrade struct { IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` - PositionDelta *v2.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + PositionDelta *types.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` @@ -1123,7 +1123,7 @@ func (m *DerivativeTrade) GetSubaccountId() string { return "" } -func (m *DerivativeTrade) GetPositionDelta() *v2.PositionDelta { +func (m *DerivativeTrade) GetPositionDelta() *types.PositionDelta { if m != nil { return m.PositionDelta } @@ -1521,111 +1521,110 @@ func init() { } var fileDescriptor_e23b7dcfb2fbc9c7 = []byte{ - // 1650 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6e, 0xdb, 0x46, - 0x16, 0xb6, 0x2c, 0x5b, 0x16, 0x8f, 0xfc, 0x23, 0x4f, 0x1c, 0x83, 0x71, 0xb2, 0x72, 0x42, 0x3b, - 0xbb, 0xce,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0xa1, 0xed, 0xc2, 0xea, 0xc0, 0x7d, 0x42, 0x42, 0xc7, 0xd3, 0x3d, 0x1d, 0xff, 0xfb, 0x11, 0x33, - 0xee, 0x6b, 0x4f, 0xd0, 0x0a, 0xe4, 0x1e, 0x3b, 0xb4, 0x8d, 0x2d, 0x52, 0x25, 0xd8, 0xce, 0xcf, - 0x20, 0x80, 0x4c, 0xd9, 0x75, 0x1b, 0xd8, 0xce, 0xa7, 0x50, 0x0e, 0x16, 0x1e, 0x9a, 0xbe, 0x55, - 0xc7, 0x76, 0x7e, 0x16, 0x2d, 0x81, 0x72, 0x97, 0x85, 0xd6, 0x6c, 0x62, 0x3b, 0x9f, 0xde, 0xab, - 0x41, 0x46, 0xdc, 0x4d, 0xa0, 0xa7, 0xd1, 0xd3, 0xdf, 0xc6, 0xf4, 0x76, 0xf1, 0x8b, 0xcd, 0x8d, - 0x9d, 0xc9, 0x86, 0xe2, 0xc2, 0xe3, 0x66, 0xaa, 0xfc, 0xc9, 0x8b, 0xd7, 0x85, 0xd4, 0xcb, 0xd7, - 0x85, 0xd4, 0x2f, 0xaf, 0x0b, 0xa9, 0xe7, 0x6f, 0x0a, 0x33, 0x2f, 0xdf, 0x14, 0x66, 0x7e, 0x7c, - 0x53, 0x98, 0x79, 0x72, 0x10, 0xfb, 0x1a, 0x38, 0x0c, 0xf1, 0x8e, 0xcc, 0x0a, 0x2d, 0x45, 0xe8, - 0x37, 0x2c, 0xd7, 0xc3, 0xf1, 0xd7, 0xba, 0x49, 0x9c, 0xf0, 0x06, 0x99, 0x7f, 0x2f, 0x54, 0x32, - 0xfc, 0xf6, 0xf5, 0x1f, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xfa, 0xa8, 0x0c, 0x62, 0x16, - 0x00, 0x00, + // 1638 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x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0xc7, 0x59, 0xb6, 0xc7, 0xb0, + 0x30, 0x97, 0x14, 0xd1, 0x4a, 0x1c, 0x0a, 0x47, 0x93, 0x34, 0x27, 0xf0, 0xa7, 0x6c, 0x38, 0x29, + 0xb2, 0xe2, 0x87, 0x91, 0xad, 0x65, 0xa2, 0x4a, 0x52, 0x3e, 0x87, 0x32, 0xdf, 0x71, 0xc4, 0x73, + 0x63, 0x1a, 0x65, 0x1c, 0xcd, 0xd3, 0xc8, 0x23, 0x45, 0xb3, 0xd4, 0x4d, 0x0f, 0x23, 0x13, 0x2e, + 0x78, 0xbe, 0x69, 0xb7, 0xb1, 0xd1, 0xf5, 0x89, 0x8d, 0x23, 0x78, 0xe0, 0xf0, 0xb7, 0x46, 0x45, + 0xc1, 0x9c, 0x9e, 0x32, 0x9f, 0x14, 0xc1, 0xb2, 0x97, 0xfd, 0x43, 0xfb, 0x72, 0x0e, 0x16, 0x23, + 0x41, 0xa0, 0x5d, 0xcf, 0xa5, 0x18, 0x5d, 0x85, 0x79, 0xab, 0xed, 0xd9, 0x2d, 0xa3, 0x89, 0x49, + 0xa3, 0x19, 0x70, 0x25, 0x98, 0xd1, 0x4b, 0x7c, 0xec, 0x11, 0x1f, 0x42, 0x7f, 0x06, 0x10, 0x26, + 0x01, 0xe9, 0x60, 0x5e, 0xbe, 0x79, 0x5d, 0xe1, 0x23, 0xc7, 0xa4, 0x83, 0xd1, 0x63, 0x58, 0x48, + 0x69, 0x8a, 0x9a, 0xbf, 0x92, 0xdf, 0x2a, 0xed, 0x5e, 0x9f, 0x48, 0x4c, 0xf4, 0xf9, 0xa4, 0x7e, + 0xa0, 0x17, 0x70, 0x61, 0x88, 0x72, 0xa8, 0x33, 0x1c, 0xf1, 0xf6, 0x79, 0x24, 0x43, 0x47, 0x83, + 0x32, 0x81, 0xf6, 0xa1, 0x94, 0x10, 0x08, 0x75, 0x96, 0xc3, 0x6e, 0x8e, 0x80, 0x8d, 0x54, 0x40, + 0x87, 0xbe, 0x20, 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 0x55, 0xa7, 0x79, 0x6c, 0x57, 0x13, + 0x74, 0x71, 0xdb, 0x11, 0x11, 0x1e, 0x32, 0x4b, 0x5d, 0xb1, 0xc2, 0x1e, 0x7f, 0xa2, 0xa8, 0x06, + 0x25, 0x8a, 0xdb, 0xed, 0x08, 0x22, 0x3f, 0x29, 0x04, 0x30, 0x2f, 0x81, 0xa1, 0xbd, 0xca, 0x41, + 0x29, 0xa1, 0x1c, 0x48, 0x85, 0x39, 0x59, 0xdf, 0x72, 0xc2, 0xd1, 0x2b, 0x6a, 0x40, 0x31, 0x16, + 0x23, 0x31, 0xdb, 0x4b, 0x15, 0xd1, 0x94, 0x55, 0x58, 0x53, 0x16, 0x73, 0xec, 0x79, 0xc4, 0xad, + 0xed, 0xbc, 0x7e, 0xbb, 0x31, 0xf5, 0xd5, 0x4f, 0x1b, 0x5b, 0x0d, 0x12, 0x34, 0x43, 0xab, 0x62, + 0x7b, 0x9d, 0xaa, 0xec, 0xe0, 0xc4, 0xcf, 0x1d, 0xea, 0xb4, 0xaa, 0x41, 0xaf, 0x8b, 0x29, 0x77, + 0xa0, 0x7a, 0x0c, 0xae, 0x7d, 0x96, 0x03, 0x34, 0x28, 0x3d, 0x68, 0x13, 0x16, 0x12, 0x2a, 0x16, + 0x27, 0x74, 0xbe, 0x3f, 0x78, 0xe0, 0xa0, 0x27, 0x50, 0x8c, 0xf5, 0x4d, 0x4c, 0xf2, 0xd6, 0x39, + 0xf4, 0x8d, 0x6b, 0xfc, 0x94, 0x1e, 0x43, 0x68, 0x2e, 0x2c, 0x0f, 0x18, 0xa1, 0x15, 0x98, 0x75, + 0xb0, 0xeb, 0x75, 0xe4, 0x04, 0xc4, 0x0b, 0xda, 0x83, 0x39, 0xe9, 0x36, 0x64, 0xeb, 0x0c, 0x2c, + 0x44, 0x9a, 0x30, 0xf2, 0xd4, 0xbe, 0xc9, 0xc1, 0x52, 0x46, 0x80, 0xd0, 0x1e, 0x14, 0x68, 0x60, + 0x06, 0x21, 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0x6b, 0x13, 0x46, 0xa1, 0xdd, 0x82, 0xe5, 0x81, 0xdb, 0x86, 0x94, 0x98, 0xe7, 0xfb, 0x62, + 0x7e, 0xf3, 0x90, 0x19, 0x67, 0x1a, 0x15, 0xb4, 0x04, 0xa5, 0x67, 0x2e, 0xed, 0x62, 0x9b, 0xd4, + 0x09, 0x76, 0xca, 0x53, 0x08, 0xa0, 0x50, 0xf3, 0xbc, 0x16, 0x76, 0xca, 0x39, 0x54, 0x82, 0xb9, + 0x27, 0x66, 0x60, 0x37, 0xb1, 0x53, 0x9e, 0x46, 0x0b, 0xa0, 0xec, 0xb1, 0xd0, 0xda, 0x6d, 0xec, + 0x94, 0xf3, 0xbb, 0x0d, 0x28, 0x88, 0x9b, 0x0b, 0xf4, 0x22, 0x7e, 0xba, 0x31, 0xa2, 0xd5, 0x4b, + 0x5e, 0x7b, 0xae, 0x6d, 0x8d, 0x37, 0x14, 0xd7, 0x21, 0x3b, 0xb9, 0xda, 0xff, 0x5f, 0xbf, 0x5b, + 0xcf, 0xbd, 0x79, 0xb7, 0x9e, 0xfb, 0xf9, 0xdd, 0x7a, 0xee, 0xd5, 0xfb, 0xf5, 0xa9, 0x37, 0xef, + 0xd7, 0xa7, 0xbe, 0x7f, 0xbf, 0x3e, 0xf5, 0x7c, 0x3f, 0xf1, 0x85, 0x70, 0x10, 0xe1, 0x1d, 0x9a, + 0x16, 0xad, 0xc6, 0xe8, 0x77, 0x6c, 0xcf, 0xc7, 0xc9, 0xd7, 0xa6, 0x49, 0xdc, 0xe8, 0x1a, 0x99, + 0x7f, 0x43, 0x58, 0x05, 0x7e, 0x37, 0xfb, 0xd7, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x42, + 0x1d, 0x82, 0x67, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4699,7 +4698,7 @@ func (m *Orderbook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BuyLevels = append(m.BuyLevels, &v2.Level{}) + m.BuyLevels = append(m.BuyLevels, &types.Level{}) if err := m.BuyLevels[len(m.BuyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4733,7 +4732,7 @@ func (m *Orderbook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SellLevels = append(m.SellLevels, &v2.Level{}) + m.SellLevels = append(m.SellLevels, &types.Level{}) if err := m.SellLevels[len(m.SellLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4849,7 +4848,7 @@ func (m *BankBalance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Balances = append(m.Balances, types.Coin{}) + m.Balances = append(m.Balances, types1.Coin{}) if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6683,7 +6682,7 @@ func (m *DerivativeTrade) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.PositionDelta == nil { - m.PositionDelta = &v2.PositionDelta{} + m.PositionDelta = &types.PositionDelta{} } if err := m.PositionDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/chain/stream/types/request.go b/chain/stream/types/request.go index 3bf542aa..f4051c39 100644 --- a/chain/stream/types/request.go +++ b/chain/stream/types/request.go @@ -1,5 +1,7 @@ package types +import "fmt" + func NewFullStreamRequest() *StreamRequest { return &StreamRequest{ BankBalancesFilter: &BankBalancesFilter{ @@ -52,3 +54,19 @@ func (Empty) Matches(tags map[string][]string) (bool, error) { func (Empty) String() string { return "empty" } + +func (m *StreamRequest) Validate() error { + if m.BankBalancesFilter == nil && + m.SubaccountDepositsFilter == nil && + m.SpotTradesFilter == nil && + m.DerivativeTradesFilter == nil && + m.SpotOrdersFilter == nil && + m.DerivativeOrdersFilter == nil && + m.SpotOrderbooksFilter == nil && + m.DerivativeOrderbooksFilter == nil && + m.PositionsFilter == nil && + m.OraclePriceFilter == nil { + return fmt.Errorf("at least one filter must be set") + } + return nil +} diff --git a/chain/stream/types/v2/query.pb.go b/chain/stream/types/v2/query.pb.go new file mode 100644 index 00000000..a36c8e9f --- /dev/null +++ b/chain/stream/types/v2/query.pb.go @@ -0,0 +1,7660 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/stream/v2/query.proto + +package v2 + +import ( + context "context" + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + v2 "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type OrderUpdateStatus int32 + +const ( + OrderUpdateStatus_Unspecified OrderUpdateStatus = 0 + OrderUpdateStatus_Booked OrderUpdateStatus = 1 + OrderUpdateStatus_Matched OrderUpdateStatus = 2 + OrderUpdateStatus_Cancelled OrderUpdateStatus = 3 +) + +var OrderUpdateStatus_name = map[int32]string{ + 0: "Unspecified", + 1: "Booked", + 2: "Matched", + 3: "Cancelled", +} + +var OrderUpdateStatus_value = map[string]int32{ + "Unspecified": 0, + "Booked": 1, + "Matched": 2, + "Cancelled": 3, +} + +func (x OrderUpdateStatus) String() string { + return proto.EnumName(OrderUpdateStatus_name, int32(x)) +} + +func (OrderUpdateStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{0} +} + +type StreamRequest struct { + BankBalancesFilter *BankBalancesFilter `protobuf:"bytes,1,opt,name=bank_balances_filter,json=bankBalancesFilter,proto3" json:"bank_balances_filter,omitempty"` + SubaccountDepositsFilter *SubaccountDepositsFilter `protobuf:"bytes,2,opt,name=subaccount_deposits_filter,json=subaccountDepositsFilter,proto3" json:"subaccount_deposits_filter,omitempty"` + SpotTradesFilter *TradesFilter `protobuf:"bytes,3,opt,name=spot_trades_filter,json=spotTradesFilter,proto3" json:"spot_trades_filter,omitempty"` + DerivativeTradesFilter *TradesFilter `protobuf:"bytes,4,opt,name=derivative_trades_filter,json=derivativeTradesFilter,proto3" json:"derivative_trades_filter,omitempty"` + SpotOrdersFilter *OrdersFilter `protobuf:"bytes,5,opt,name=spot_orders_filter,json=spotOrdersFilter,proto3" json:"spot_orders_filter,omitempty"` + DerivativeOrdersFilter *OrdersFilter `protobuf:"bytes,6,opt,name=derivative_orders_filter,json=derivativeOrdersFilter,proto3" json:"derivative_orders_filter,omitempty"` + SpotOrderbooksFilter *OrderbookFilter `protobuf:"bytes,7,opt,name=spot_orderbooks_filter,json=spotOrderbooksFilter,proto3" json:"spot_orderbooks_filter,omitempty"` + DerivativeOrderbooksFilter *OrderbookFilter `protobuf:"bytes,8,opt,name=derivative_orderbooks_filter,json=derivativeOrderbooksFilter,proto3" json:"derivative_orderbooks_filter,omitempty"` + PositionsFilter *PositionsFilter `protobuf:"bytes,9,opt,name=positions_filter,json=positionsFilter,proto3" json:"positions_filter,omitempty"` + OraclePriceFilter *OraclePriceFilter `protobuf:"bytes,10,opt,name=oracle_price_filter,json=oraclePriceFilter,proto3" json:"oracle_price_filter,omitempty"` +} + +func (m *StreamRequest) Reset() { *m = StreamRequest{} } +func (m *StreamRequest) String() string { return proto.CompactTextString(m) } +func (*StreamRequest) ProtoMessage() {} +func (*StreamRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{0} +} +func (m *StreamRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StreamRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StreamRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamRequest.Merge(m, src) +} +func (m *StreamRequest) XXX_Size() int { + return m.Size() +} +func (m *StreamRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StreamRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamRequest proto.InternalMessageInfo + +func (m *StreamRequest) GetBankBalancesFilter() *BankBalancesFilter { + if m != nil { + return m.BankBalancesFilter + } + return nil +} + +func (m *StreamRequest) GetSubaccountDepositsFilter() *SubaccountDepositsFilter { + if m != nil { + return m.SubaccountDepositsFilter + } + return nil +} + +func (m *StreamRequest) GetSpotTradesFilter() *TradesFilter { + if m != nil { + return m.SpotTradesFilter + } + return nil +} + +func (m *StreamRequest) GetDerivativeTradesFilter() *TradesFilter { + if m != nil { + return m.DerivativeTradesFilter + } + return nil +} + +func (m *StreamRequest) GetSpotOrdersFilter() *OrdersFilter { + if m != nil { + return m.SpotOrdersFilter + } + return nil +} + +func (m *StreamRequest) GetDerivativeOrdersFilter() *OrdersFilter { + if m != nil { + return m.DerivativeOrdersFilter + } + return nil +} + +func (m *StreamRequest) GetSpotOrderbooksFilter() *OrderbookFilter { + if m != nil { + return m.SpotOrderbooksFilter + } + return nil +} + +func (m *StreamRequest) GetDerivativeOrderbooksFilter() *OrderbookFilter { + if m != nil { + return m.DerivativeOrderbooksFilter + } + return nil +} + +func (m *StreamRequest) GetPositionsFilter() *PositionsFilter { + if m != nil { + return m.PositionsFilter + } + return nil +} + +func (m *StreamRequest) GetOraclePriceFilter() *OraclePriceFilter { + if m != nil { + return m.OraclePriceFilter + } + return nil +} + +type StreamResponse struct { + BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + BankBalances []*BankBalance `protobuf:"bytes,3,rep,name=bank_balances,json=bankBalances,proto3" json:"bank_balances,omitempty"` + SubaccountDeposits []*SubaccountDeposits `protobuf:"bytes,4,rep,name=subaccount_deposits,json=subaccountDeposits,proto3" json:"subaccount_deposits,omitempty"` + SpotTrades []*SpotTrade `protobuf:"bytes,5,rep,name=spot_trades,json=spotTrades,proto3" json:"spot_trades,omitempty"` + DerivativeTrades []*DerivativeTrade `protobuf:"bytes,6,rep,name=derivative_trades,json=derivativeTrades,proto3" json:"derivative_trades,omitempty"` + SpotOrders []*SpotOrderUpdate `protobuf:"bytes,7,rep,name=spot_orders,json=spotOrders,proto3" json:"spot_orders,omitempty"` + DerivativeOrders []*DerivativeOrderUpdate `protobuf:"bytes,8,rep,name=derivative_orders,json=derivativeOrders,proto3" json:"derivative_orders,omitempty"` + SpotOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,9,rep,name=spot_orderbook_updates,json=spotOrderbookUpdates,proto3" json:"spot_orderbook_updates,omitempty"` + DerivativeOrderbookUpdates []*OrderbookUpdate `protobuf:"bytes,10,rep,name=derivative_orderbook_updates,json=derivativeOrderbookUpdates,proto3" json:"derivative_orderbook_updates,omitempty"` + Positions []*Position `protobuf:"bytes,11,rep,name=positions,proto3" json:"positions,omitempty"` + OraclePrices []*OraclePrice `protobuf:"bytes,12,rep,name=oracle_prices,json=oraclePrices,proto3" json:"oracle_prices,omitempty"` +} + +func (m *StreamResponse) Reset() { *m = StreamResponse{} } +func (m *StreamResponse) String() string { return proto.CompactTextString(m) } +func (*StreamResponse) ProtoMessage() {} +func (*StreamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{1} +} +func (m *StreamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StreamResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StreamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamResponse.Merge(m, src) +} +func (m *StreamResponse) XXX_Size() int { + return m.Size() +} +func (m *StreamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StreamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamResponse proto.InternalMessageInfo + +func (m *StreamResponse) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *StreamResponse) GetBlockTime() int64 { + if m != nil { + return m.BlockTime + } + return 0 +} + +func (m *StreamResponse) GetBankBalances() []*BankBalance { + if m != nil { + return m.BankBalances + } + return nil +} + +func (m *StreamResponse) GetSubaccountDeposits() []*SubaccountDeposits { + if m != nil { + return m.SubaccountDeposits + } + return nil +} + +func (m *StreamResponse) GetSpotTrades() []*SpotTrade { + if m != nil { + return m.SpotTrades + } + return nil +} + +func (m *StreamResponse) GetDerivativeTrades() []*DerivativeTrade { + if m != nil { + return m.DerivativeTrades + } + return nil +} + +func (m *StreamResponse) GetSpotOrders() []*SpotOrderUpdate { + if m != nil { + return m.SpotOrders + } + return nil +} + +func (m *StreamResponse) GetDerivativeOrders() []*DerivativeOrderUpdate { + if m != nil { + return m.DerivativeOrders + } + return nil +} + +func (m *StreamResponse) GetSpotOrderbookUpdates() []*OrderbookUpdate { + if m != nil { + return m.SpotOrderbookUpdates + } + return nil +} + +func (m *StreamResponse) GetDerivativeOrderbookUpdates() []*OrderbookUpdate { + if m != nil { + return m.DerivativeOrderbookUpdates + } + return nil +} + +func (m *StreamResponse) GetPositions() []*Position { + if m != nil { + return m.Positions + } + return nil +} + +func (m *StreamResponse) GetOraclePrices() []*OraclePrice { + if m != nil { + return m.OraclePrices + } + return nil +} + +type OrderbookUpdate struct { + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + Orderbook *Orderbook `protobuf:"bytes,2,opt,name=orderbook,proto3" json:"orderbook,omitempty"` +} + +func (m *OrderbookUpdate) Reset() { *m = OrderbookUpdate{} } +func (m *OrderbookUpdate) String() string { return proto.CompactTextString(m) } +func (*OrderbookUpdate) ProtoMessage() {} +func (*OrderbookUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{2} +} +func (m *OrderbookUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderbookUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderbookUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderbookUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderbookUpdate.Merge(m, src) +} +func (m *OrderbookUpdate) XXX_Size() int { + return m.Size() +} +func (m *OrderbookUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_OrderbookUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderbookUpdate proto.InternalMessageInfo + +func (m *OrderbookUpdate) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *OrderbookUpdate) GetOrderbook() *Orderbook { + if m != nil { + return m.Orderbook + } + return nil +} + +type Orderbook struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + BuyLevels []*v2.Level `protobuf:"bytes,2,rep,name=buy_levels,json=buyLevels,proto3" json:"buy_levels,omitempty"` + SellLevels []*v2.Level `protobuf:"bytes,3,rep,name=sell_levels,json=sellLevels,proto3" json:"sell_levels,omitempty"` +} + +func (m *Orderbook) Reset() { *m = Orderbook{} } +func (m *Orderbook) String() string { return proto.CompactTextString(m) } +func (*Orderbook) ProtoMessage() {} +func (*Orderbook) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{3} +} +func (m *Orderbook) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Orderbook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Orderbook.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Orderbook) XXX_Merge(src proto.Message) { + xxx_messageInfo_Orderbook.Merge(m, src) +} +func (m *Orderbook) XXX_Size() int { + return m.Size() +} +func (m *Orderbook) XXX_DiscardUnknown() { + xxx_messageInfo_Orderbook.DiscardUnknown(m) +} + +var xxx_messageInfo_Orderbook proto.InternalMessageInfo + +func (m *Orderbook) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *Orderbook) GetBuyLevels() []*v2.Level { + if m != nil { + return m.BuyLevels + } + return nil +} + +func (m *Orderbook) GetSellLevels() []*v2.Level { + if m != nil { + return m.SellLevels + } + return nil +} + +type BankBalance struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` +} + +func (m *BankBalance) Reset() { *m = BankBalance{} } +func (m *BankBalance) String() string { return proto.CompactTextString(m) } +func (*BankBalance) ProtoMessage() {} +func (*BankBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{4} +} +func (m *BankBalance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BankBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BankBalance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BankBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_BankBalance.Merge(m, src) +} +func (m *BankBalance) XXX_Size() int { + return m.Size() +} +func (m *BankBalance) XXX_DiscardUnknown() { + xxx_messageInfo_BankBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_BankBalance proto.InternalMessageInfo + +func (m *BankBalance) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *BankBalance) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + +type SubaccountDeposits struct { + SubaccountId string `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Deposits []SubaccountDeposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits"` +} + +func (m *SubaccountDeposits) Reset() { *m = SubaccountDeposits{} } +func (m *SubaccountDeposits) String() string { return proto.CompactTextString(m) } +func (*SubaccountDeposits) ProtoMessage() {} +func (*SubaccountDeposits) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{5} +} +func (m *SubaccountDeposits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountDeposits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountDeposits.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountDeposits) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountDeposits.Merge(m, src) +} +func (m *SubaccountDeposits) XXX_Size() int { + return m.Size() +} +func (m *SubaccountDeposits) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountDeposits.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountDeposits proto.InternalMessageInfo + +func (m *SubaccountDeposits) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *SubaccountDeposits) GetDeposits() []SubaccountDeposit { + if m != nil { + return m.Deposits + } + return nil +} + +type SubaccountDeposit struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Deposit v2.Deposit `protobuf:"bytes,2,opt,name=deposit,proto3" json:"deposit"` +} + +func (m *SubaccountDeposit) Reset() { *m = SubaccountDeposit{} } +func (m *SubaccountDeposit) String() string { return proto.CompactTextString(m) } +func (*SubaccountDeposit) ProtoMessage() {} +func (*SubaccountDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{6} +} +func (m *SubaccountDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountDeposit.Merge(m, src) +} +func (m *SubaccountDeposit) XXX_Size() int { + return m.Size() +} +func (m *SubaccountDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountDeposit proto.InternalMessageInfo + +func (m *SubaccountDeposit) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *SubaccountDeposit) GetDeposit() v2.Deposit { + if m != nil { + return m.Deposit + } + return v2.Deposit{} +} + +type SpotOrderUpdate struct { + Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Order *SpotOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` +} + +func (m *SpotOrderUpdate) Reset() { *m = SpotOrderUpdate{} } +func (m *SpotOrderUpdate) String() string { return proto.CompactTextString(m) } +func (*SpotOrderUpdate) ProtoMessage() {} +func (*SpotOrderUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{7} +} +func (m *SpotOrderUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotOrderUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotOrderUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotOrderUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotOrderUpdate.Merge(m, src) +} +func (m *SpotOrderUpdate) XXX_Size() int { + return m.Size() +} +func (m *SpotOrderUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_SpotOrderUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotOrderUpdate proto.InternalMessageInfo + +func (m *SpotOrderUpdate) GetStatus() OrderUpdateStatus { + if m != nil { + return m.Status + } + return OrderUpdateStatus_Unspecified +} + +func (m *SpotOrderUpdate) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *SpotOrderUpdate) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *SpotOrderUpdate) GetOrder() *SpotOrder { + if m != nil { + return m.Order + } + return nil +} + +type SpotOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order v2.SpotLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` +} + +func (m *SpotOrder) Reset() { *m = SpotOrder{} } +func (m *SpotOrder) String() string { return proto.CompactTextString(m) } +func (*SpotOrder) ProtoMessage() {} +func (*SpotOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{8} +} +func (m *SpotOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotOrder.Merge(m, src) +} +func (m *SpotOrder) XXX_Size() int { + return m.Size() +} +func (m *SpotOrder) XXX_DiscardUnknown() { + xxx_messageInfo_SpotOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotOrder proto.InternalMessageInfo + +func (m *SpotOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *SpotOrder) GetOrder() v2.SpotLimitOrder { + if m != nil { + return m.Order + } + return v2.SpotLimitOrder{} +} + +type DerivativeOrderUpdate struct { + Status OrderUpdateStatus `protobuf:"varint,1,opt,name=status,proto3,enum=injective.stream.v2.OrderUpdateStatus" json:"status,omitempty"` + OrderHash string `protobuf:"bytes,2,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Order *DerivativeOrder `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` +} + +func (m *DerivativeOrderUpdate) Reset() { *m = DerivativeOrderUpdate{} } +func (m *DerivativeOrderUpdate) String() string { return proto.CompactTextString(m) } +func (*DerivativeOrderUpdate) ProtoMessage() {} +func (*DerivativeOrderUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{9} +} +func (m *DerivativeOrderUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeOrderUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeOrderUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeOrderUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeOrderUpdate.Merge(m, src) +} +func (m *DerivativeOrderUpdate) XXX_Size() int { + return m.Size() +} +func (m *DerivativeOrderUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeOrderUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeOrderUpdate proto.InternalMessageInfo + +func (m *DerivativeOrderUpdate) GetStatus() OrderUpdateStatus { + if m != nil { + return m.Status + } + return OrderUpdateStatus_Unspecified +} + +func (m *DerivativeOrderUpdate) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *DerivativeOrderUpdate) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *DerivativeOrderUpdate) GetOrder() *DerivativeOrder { + if m != nil { + return m.Order + } + return nil +} + +type DerivativeOrder struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + Order v2.DerivativeLimitOrder `protobuf:"bytes,2,opt,name=order,proto3" json:"order"` + IsMarket bool `protobuf:"varint,3,opt,name=is_market,json=isMarket,proto3" json:"is_market,omitempty"` +} + +func (m *DerivativeOrder) Reset() { *m = DerivativeOrder{} } +func (m *DerivativeOrder) String() string { return proto.CompactTextString(m) } +func (*DerivativeOrder) ProtoMessage() {} +func (*DerivativeOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{10} +} +func (m *DerivativeOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeOrder.Merge(m, src) +} +func (m *DerivativeOrder) XXX_Size() int { + return m.Size() +} +func (m *DerivativeOrder) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeOrder proto.InternalMessageInfo + +func (m *DerivativeOrder) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *DerivativeOrder) GetOrder() v2.DerivativeLimitOrder { + if m != nil { + return m.Order + } + return v2.DerivativeLimitOrder{} +} + +func (m *DerivativeOrder) GetIsMarket() bool { + if m != nil { + return m.IsMarket + } + return false +} + +type Position struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + SubaccountId string `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + IsLong bool `protobuf:"varint,3,opt,name=isLong,proto3" json:"isLong,omitempty"` + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + EntryPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=entry_price,json=entryPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"entry_price"` + Margin cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=margin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"margin"` + CumulativeFundingEntry cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=cumulative_funding_entry,json=cumulativeFundingEntry,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"cumulative_funding_entry"` +} + +func (m *Position) Reset() { *m = Position{} } +func (m *Position) String() string { return proto.CompactTextString(m) } +func (*Position) ProtoMessage() {} +func (*Position) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{11} +} +func (m *Position) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Position.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Position) XXX_Merge(src proto.Message) { + xxx_messageInfo_Position.Merge(m, src) +} +func (m *Position) XXX_Size() int { + return m.Size() +} +func (m *Position) XXX_DiscardUnknown() { + xxx_messageInfo_Position.DiscardUnknown(m) +} + +var xxx_messageInfo_Position proto.InternalMessageInfo + +func (m *Position) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *Position) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *Position) GetIsLong() bool { + if m != nil { + return m.IsLong + } + return false +} + +type OraclePrice struct { + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *OraclePrice) Reset() { *m = OraclePrice{} } +func (m *OraclePrice) String() string { return proto.CompactTextString(m) } +func (*OraclePrice) ProtoMessage() {} +func (*OraclePrice) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{12} +} +func (m *OraclePrice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OraclePrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OraclePrice.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OraclePrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_OraclePrice.Merge(m, src) +} +func (m *OraclePrice) XXX_Size() int { + return m.Size() +} +func (m *OraclePrice) XXX_DiscardUnknown() { + xxx_messageInfo_OraclePrice.DiscardUnknown(m) +} + +var xxx_messageInfo_OraclePrice proto.InternalMessageInfo + +func (m *OraclePrice) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *OraclePrice) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type SpotTrade struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + Quantity cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=quantity,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quantity"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + // bytes32 subaccount ID that executed the trade + SubaccountId string `protobuf:"bytes,6,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` +} + +func (m *SpotTrade) Reset() { *m = SpotTrade{} } +func (m *SpotTrade) String() string { return proto.CompactTextString(m) } +func (*SpotTrade) ProtoMessage() {} +func (*SpotTrade) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{13} +} +func (m *SpotTrade) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpotTrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpotTrade.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpotTrade) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpotTrade.Merge(m, src) +} +func (m *SpotTrade) XXX_Size() int { + return m.Size() +} +func (m *SpotTrade) XXX_DiscardUnknown() { + xxx_messageInfo_SpotTrade.DiscardUnknown(m) +} + +var xxx_messageInfo_SpotTrade proto.InternalMessageInfo + +func (m *SpotTrade) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *SpotTrade) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *SpotTrade) GetExecutionType() string { + if m != nil { + return m.ExecutionType + } + return "" +} + +func (m *SpotTrade) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *SpotTrade) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *SpotTrade) GetFeeRecipientAddress() string { + if m != nil { + return m.FeeRecipientAddress + } + return "" +} + +func (m *SpotTrade) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *SpotTrade) GetTradeId() string { + if m != nil { + return m.TradeId + } + return "" +} + +type DerivativeTrade struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + IsBuy bool `protobuf:"varint,2,opt,name=is_buy,json=isBuy,proto3" json:"is_buy,omitempty"` + ExecutionType string `protobuf:"bytes,3,opt,name=executionType,proto3" json:"executionType,omitempty"` + SubaccountId string `protobuf:"bytes,4,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"` + PositionDelta *v2.PositionDelta `protobuf:"bytes,5,opt,name=position_delta,json=positionDelta,proto3" json:"position_delta,omitempty"` + Payout cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=payout,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"payout"` + Fee cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=fee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fee"` + OrderHash string `protobuf:"bytes,8,opt,name=order_hash,json=orderHash,proto3" json:"order_hash,omitempty"` + FeeRecipientAddress string `protobuf:"bytes,9,opt,name=fee_recipient_address,json=feeRecipientAddress,proto3" json:"fee_recipient_address,omitempty"` + Cid string `protobuf:"bytes,10,opt,name=cid,proto3" json:"cid,omitempty"` + TradeId string `protobuf:"bytes,11,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` +} + +func (m *DerivativeTrade) Reset() { *m = DerivativeTrade{} } +func (m *DerivativeTrade) String() string { return proto.CompactTextString(m) } +func (*DerivativeTrade) ProtoMessage() {} +func (*DerivativeTrade) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{14} +} +func (m *DerivativeTrade) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DerivativeTrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DerivativeTrade.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DerivativeTrade) XXX_Merge(src proto.Message) { + xxx_messageInfo_DerivativeTrade.Merge(m, src) +} +func (m *DerivativeTrade) XXX_Size() int { + return m.Size() +} +func (m *DerivativeTrade) XXX_DiscardUnknown() { + xxx_messageInfo_DerivativeTrade.DiscardUnknown(m) +} + +var xxx_messageInfo_DerivativeTrade proto.InternalMessageInfo + +func (m *DerivativeTrade) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *DerivativeTrade) GetIsBuy() bool { + if m != nil { + return m.IsBuy + } + return false +} + +func (m *DerivativeTrade) GetExecutionType() string { + if m != nil { + return m.ExecutionType + } + return "" +} + +func (m *DerivativeTrade) GetSubaccountId() string { + if m != nil { + return m.SubaccountId + } + return "" +} + +func (m *DerivativeTrade) GetPositionDelta() *v2.PositionDelta { + if m != nil { + return m.PositionDelta + } + return nil +} + +func (m *DerivativeTrade) GetOrderHash() string { + if m != nil { + return m.OrderHash + } + return "" +} + +func (m *DerivativeTrade) GetFeeRecipientAddress() string { + if m != nil { + return m.FeeRecipientAddress + } + return "" +} + +func (m *DerivativeTrade) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *DerivativeTrade) GetTradeId() string { + if m != nil { + return m.TradeId + } + return "" +} + +type TradesFilter struct { + SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *TradesFilter) Reset() { *m = TradesFilter{} } +func (m *TradesFilter) String() string { return proto.CompactTextString(m) } +func (*TradesFilter) ProtoMessage() {} +func (*TradesFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{15} +} +func (m *TradesFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradesFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TradesFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradesFilter.Merge(m, src) +} +func (m *TradesFilter) XXX_Size() int { + return m.Size() +} +func (m *TradesFilter) XXX_DiscardUnknown() { + xxx_messageInfo_TradesFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_TradesFilter proto.InternalMessageInfo + +func (m *TradesFilter) GetSubaccountIds() []string { + if m != nil { + return m.SubaccountIds + } + return nil +} + +func (m *TradesFilter) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type PositionsFilter struct { + SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *PositionsFilter) Reset() { *m = PositionsFilter{} } +func (m *PositionsFilter) String() string { return proto.CompactTextString(m) } +func (*PositionsFilter) ProtoMessage() {} +func (*PositionsFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{16} +} +func (m *PositionsFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PositionsFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PositionsFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PositionsFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_PositionsFilter.Merge(m, src) +} +func (m *PositionsFilter) XXX_Size() int { + return m.Size() +} +func (m *PositionsFilter) XXX_DiscardUnknown() { + xxx_messageInfo_PositionsFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_PositionsFilter proto.InternalMessageInfo + +func (m *PositionsFilter) GetSubaccountIds() []string { + if m != nil { + return m.SubaccountIds + } + return nil +} + +func (m *PositionsFilter) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type OrdersFilter struct { + SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` + MarketIds []string `protobuf:"bytes,2,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *OrdersFilter) Reset() { *m = OrdersFilter{} } +func (m *OrdersFilter) String() string { return proto.CompactTextString(m) } +func (*OrdersFilter) ProtoMessage() {} +func (*OrdersFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{17} +} +func (m *OrdersFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrdersFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrdersFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrdersFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrdersFilter.Merge(m, src) +} +func (m *OrdersFilter) XXX_Size() int { + return m.Size() +} +func (m *OrdersFilter) XXX_DiscardUnknown() { + xxx_messageInfo_OrdersFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_OrdersFilter proto.InternalMessageInfo + +func (m *OrdersFilter) GetSubaccountIds() []string { + if m != nil { + return m.SubaccountIds + } + return nil +} + +func (m *OrdersFilter) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type OrderbookFilter struct { + MarketIds []string `protobuf:"bytes,1,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` +} + +func (m *OrderbookFilter) Reset() { *m = OrderbookFilter{} } +func (m *OrderbookFilter) String() string { return proto.CompactTextString(m) } +func (*OrderbookFilter) ProtoMessage() {} +func (*OrderbookFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{18} +} +func (m *OrderbookFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderbookFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderbookFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OrderbookFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderbookFilter.Merge(m, src) +} +func (m *OrderbookFilter) XXX_Size() int { + return m.Size() +} +func (m *OrderbookFilter) XXX_DiscardUnknown() { + xxx_messageInfo_OrderbookFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderbookFilter proto.InternalMessageInfo + +func (m *OrderbookFilter) GetMarketIds() []string { + if m != nil { + return m.MarketIds + } + return nil +} + +type BankBalancesFilter struct { + Accounts []string `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (m *BankBalancesFilter) Reset() { *m = BankBalancesFilter{} } +func (m *BankBalancesFilter) String() string { return proto.CompactTextString(m) } +func (*BankBalancesFilter) ProtoMessage() {} +func (*BankBalancesFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{19} +} +func (m *BankBalancesFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BankBalancesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BankBalancesFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BankBalancesFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_BankBalancesFilter.Merge(m, src) +} +func (m *BankBalancesFilter) XXX_Size() int { + return m.Size() +} +func (m *BankBalancesFilter) XXX_DiscardUnknown() { + xxx_messageInfo_BankBalancesFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_BankBalancesFilter proto.InternalMessageInfo + +func (m *BankBalancesFilter) GetAccounts() []string { + if m != nil { + return m.Accounts + } + return nil +} + +type SubaccountDepositsFilter struct { + SubaccountIds []string `protobuf:"bytes,1,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` +} + +func (m *SubaccountDepositsFilter) Reset() { *m = SubaccountDepositsFilter{} } +func (m *SubaccountDepositsFilter) String() string { return proto.CompactTextString(m) } +func (*SubaccountDepositsFilter) ProtoMessage() {} +func (*SubaccountDepositsFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{20} +} +func (m *SubaccountDepositsFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubaccountDepositsFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubaccountDepositsFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubaccountDepositsFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubaccountDepositsFilter.Merge(m, src) +} +func (m *SubaccountDepositsFilter) XXX_Size() int { + return m.Size() +} +func (m *SubaccountDepositsFilter) XXX_DiscardUnknown() { + xxx_messageInfo_SubaccountDepositsFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_SubaccountDepositsFilter proto.InternalMessageInfo + +func (m *SubaccountDepositsFilter) GetSubaccountIds() []string { + if m != nil { + return m.SubaccountIds + } + return nil +} + +type OraclePriceFilter struct { + Symbol []string `protobuf:"bytes,1,rep,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (m *OraclePriceFilter) Reset() { *m = OraclePriceFilter{} } +func (m *OraclePriceFilter) String() string { return proto.CompactTextString(m) } +func (*OraclePriceFilter) ProtoMessage() {} +func (*OraclePriceFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_63d15adfde4eb6f9, []int{21} +} +func (m *OraclePriceFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OraclePriceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OraclePriceFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OraclePriceFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_OraclePriceFilter.Merge(m, src) +} +func (m *OraclePriceFilter) XXX_Size() int { + return m.Size() +} +func (m *OraclePriceFilter) XXX_DiscardUnknown() { + xxx_messageInfo_OraclePriceFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_OraclePriceFilter proto.InternalMessageInfo + +func (m *OraclePriceFilter) GetSymbol() []string { + if m != nil { + return m.Symbol + } + return nil +} + +func init() { + proto.RegisterEnum("injective.stream.v2.OrderUpdateStatus", OrderUpdateStatus_name, OrderUpdateStatus_value) + proto.RegisterType((*StreamRequest)(nil), "injective.stream.v2.StreamRequest") + proto.RegisterType((*StreamResponse)(nil), "injective.stream.v2.StreamResponse") + proto.RegisterType((*OrderbookUpdate)(nil), "injective.stream.v2.OrderbookUpdate") + proto.RegisterType((*Orderbook)(nil), "injective.stream.v2.Orderbook") + proto.RegisterType((*BankBalance)(nil), "injective.stream.v2.BankBalance") + proto.RegisterType((*SubaccountDeposits)(nil), "injective.stream.v2.SubaccountDeposits") + proto.RegisterType((*SubaccountDeposit)(nil), "injective.stream.v2.SubaccountDeposit") + proto.RegisterType((*SpotOrderUpdate)(nil), "injective.stream.v2.SpotOrderUpdate") + proto.RegisterType((*SpotOrder)(nil), "injective.stream.v2.SpotOrder") + proto.RegisterType((*DerivativeOrderUpdate)(nil), "injective.stream.v2.DerivativeOrderUpdate") + proto.RegisterType((*DerivativeOrder)(nil), "injective.stream.v2.DerivativeOrder") + proto.RegisterType((*Position)(nil), "injective.stream.v2.Position") + proto.RegisterType((*OraclePrice)(nil), "injective.stream.v2.OraclePrice") + proto.RegisterType((*SpotTrade)(nil), "injective.stream.v2.SpotTrade") + proto.RegisterType((*DerivativeTrade)(nil), "injective.stream.v2.DerivativeTrade") + proto.RegisterType((*TradesFilter)(nil), "injective.stream.v2.TradesFilter") + proto.RegisterType((*PositionsFilter)(nil), "injective.stream.v2.PositionsFilter") + proto.RegisterType((*OrdersFilter)(nil), "injective.stream.v2.OrdersFilter") + proto.RegisterType((*OrderbookFilter)(nil), "injective.stream.v2.OrderbookFilter") + proto.RegisterType((*BankBalancesFilter)(nil), "injective.stream.v2.BankBalancesFilter") + proto.RegisterType((*SubaccountDepositsFilter)(nil), "injective.stream.v2.SubaccountDepositsFilter") + proto.RegisterType((*OraclePriceFilter)(nil), "injective.stream.v2.OraclePriceFilter") +} + +func init() { proto.RegisterFile("injective/stream/v2/query.proto", fileDescriptor_63d15adfde4eb6f9) } + +var fileDescriptor_63d15adfde4eb6f9 = []byte{ + // 1659 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6f, 0x1b, 0x47, + 0x12, 0x16, 0x45, 0x89, 0xe2, 0x14, 0xf5, 0xa0, 0x5a, 0xb2, 0x40, 0xcb, 0x36, 0x65, 0x8f, 0xe5, + 0x07, 0x6c, 0x98, 0xb4, 0xb9, 0xbb, 0xc0, 0xee, 0x7a, 0xd7, 0x86, 0x69, 0xf9, 0x21, 0xac, 0x8c, + 0xf5, 0x8e, 0xa4, 0xf5, 0xc2, 0xd8, 0x60, 0xd2, 0x9c, 0x69, 0x91, 0x1d, 0x92, 0x33, 0xd4, 0xf4, + 0x0c, 0x61, 0x9e, 0x73, 0xc8, 0xd5, 0x87, 0xfc, 0x84, 0x9c, 0xf2, 0x0b, 0x72, 0x4f, 0x0e, 0x3e, + 0xfa, 0x96, 0x20, 0x08, 0x9c, 0xc0, 0xfe, 0x01, 0xf9, 0x0b, 0x41, 0x3f, 0x66, 0x38, 0xc3, 0x97, + 0x29, 0xc4, 0x09, 0x90, 0x13, 0xbb, 0x9b, 0x55, 0xdf, 0x57, 0x5d, 0x5d, 0x55, 0x5d, 0xd3, 0xb0, + 0x45, 0x9d, 0x4f, 0x88, 0xe5, 0xd3, 0x2e, 0x29, 0x33, 0xdf, 0x23, 0xb8, 0x5d, 0xee, 0x56, 0xca, + 0xc7, 0x01, 0xf1, 0x7a, 0xa5, 0x8e, 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, 0x8e, 0xd2, 0x82, 0xea, + 0xc2, 0x48, 0xaa, 0x03, 0x21, 0x99, 0x80, 0xcf, 0x73, 0x88, 0xf8, 0x3a, 0xc2, 0x50, 0xb0, 0x89, + 0x47, 0xbb, 0x98, 0x2b, 0x0f, 0x80, 0xcf, 0x9d, 0x0c, 0x7c, 0xa3, 0x0f, 0x94, 0xa0, 0x08, 0x2d, + 0x17, 0x67, 0x16, 0x81, 0xcf, 0x4f, 0x00, 0xff, 0xb7, 0x90, 0x1c, 0xb6, 0x3c, 0xbe, 0x3e, 0x60, + 0x79, 0x12, 0x3c, 0x73, 0x32, 0xf0, 0x98, 0xe5, 0x09, 0x8a, 0x8f, 0x61, 0xa3, 0x6f, 0x79, 0xcd, + 0x75, 0x9b, 0x11, 0xc1, 0x82, 0x20, 0xd8, 0x1e, 0x4f, 0xc0, 0xa5, 0x13, 0x1c, 0xeb, 0xd1, 0x06, + 0x04, 0x90, 0x62, 0x68, 0xc1, 0xd9, 0xc1, 0x4d, 0x24, 0x78, 0xb2, 0x27, 0xe6, 0xd9, 0x1c, 0xd8, + 0x4b, 0x9c, 0xed, 0x10, 0xf2, 0x22, 0xa6, 0xa8, 0xeb, 0x44, 0x0c, 0xda, 0x04, 0x86, 0xa7, 0xa1, + 0x70, 0x82, 0x61, 0xa5, 0x93, 0x5c, 0x46, 0xff, 0x87, 0x35, 0xd7, 0xc3, 0x56, 0x8b, 0x98, 0x1d, + 0x8f, 0x5a, 0x24, 0x44, 0x06, 0x81, 0x7c, 0x79, 0x8c, 0xed, 0x5c, 0xfe, 0x29, 0x17, 0x4f, 0x60, + 0xaf, 0xba, 0x83, 0x7f, 0xe8, 0x3f, 0x67, 0x60, 0x39, 0x4c, 0x6f, 0xd6, 0x71, 0x1d, 0x46, 0xd0, + 0x05, 0x58, 0xac, 0xb5, 0x5c, 0xab, 0x69, 0x36, 0x08, 0xad, 0x37, 0x7c, 0x91, 0xd7, 0x73, 0x46, + 0x4e, 0xac, 0x3d, 0x16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, 0xba, 0x47, 0x49, 0xd7, 0x5d, 0x1f, + 0x1b, 0x5d, 0x21, 0xe6, 0x18, 0x07, 0x72, 0x16, 0xca, 0x4c, 0x89, 0x2b, 0x76, 0x93, 0x35, 0xb2, + 0x94, 0x3d, 0x11, 0x73, 0xfd, 0xb3, 0x34, 0x64, 0xc3, 0x92, 0x3b, 0xd9, 0x9e, 0xa1, 0x4c, 0x9c, + 0x1d, 0x91, 0x89, 0x1b, 0x90, 0xa1, 0x6c, 0xcf, 0x75, 0xea, 0x8a, 0x48, 0xcd, 0xd0, 0x5d, 0xc8, + 0x1e, 0x07, 0xd8, 0xf1, 0xa9, 0xdf, 0x13, 0xce, 0xd3, 0xaa, 0x17, 0xb9, 0x89, 0xdf, 0xbf, 0xd9, + 0x3a, 0x23, 0x2b, 0x03, 0xb3, 0x9b, 0x25, 0xea, 0x96, 0xdb, 0xd8, 0x6f, 0x94, 0xf6, 0x48, 0x1d, + 0x5b, 0xbd, 0x1d, 0x62, 0x19, 0x91, 0x12, 0xda, 0x81, 0x1c, 0x71, 0x7c, 0xaf, 0x27, 0x6f, 0x00, + 0xd1, 0x65, 0x4f, 0x89, 0x01, 0x42, 0x4f, 0x5c, 0x01, 0xe8, 0x36, 0x64, 0xda, 0xd8, 0xab, 0x53, + 0x47, 0x74, 0xd2, 0x53, 0x02, 0x28, 0x15, 0xf4, 0x11, 0x14, 0xac, 0xa0, 0x1d, 0xb4, 0xe4, 0x55, + 0x79, 0x14, 0x38, 0x36, 0x75, 0xea, 0xa6, 0x40, 0x17, 0x7d, 0xf3, 0x94, 0x70, 0x1b, 0x7d, 0x90, + 0x87, 0x12, 0xe3, 0x01, 0x87, 0xd0, 0x7d, 0xc8, 0xc5, 0xae, 0x2e, 0xee, 0x49, 0xd6, 0x6b, 0xd7, + 0xdc, 0x96, 0x3a, 0x08, 0x35, 0x43, 0x7f, 0x83, 0x79, 0xe9, 0x82, 0xd9, 0xe9, 0x29, 0xa5, 0x06, + 0x42, 0x30, 0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0x97, 0xef, 0x8a, + 0x33, 0xaf, 0xdf, 0x15, 0x67, 0xbe, 0x7b, 0x57, 0x9c, 0x79, 0xfe, 0x28, 0xd6, 0xec, 0xef, 0x86, + 0x50, 0x7b, 0xb8, 0xc6, 0xca, 0x11, 0xf0, 0x0d, 0xcb, 0xf5, 0x48, 0x7c, 0xda, 0xc0, 0xd4, 0x09, + 0x5f, 0x6b, 0xc5, 0xe7, 0x40, 0xb9, 0x5b, 0xa9, 0x65, 0xc4, 0xb3, 0xe7, 0x9f, 0x7e, 0x09, 0x00, + 0x00, 0xff, 0xff, 0x5c, 0xb4, 0x69, 0x7b, 0xd1, 0x15, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// StreamClient is the client API for Stream service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type StreamClient interface { + StreamV2(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (Stream_StreamV2Client, error) +} + +type streamClient struct { + cc grpc1.ClientConn +} + +func NewStreamClient(cc grpc1.ClientConn) StreamClient { + return &streamClient{cc} +} + +func (c *streamClient) StreamV2(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (Stream_StreamV2Client, error) { + stream, err := c.cc.NewStream(ctx, &_Stream_serviceDesc.Streams[0], "/injective.stream.v2.Stream/StreamV2", opts...) + if err != nil { + return nil, err + } + x := &streamStreamV2Client{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Stream_StreamV2Client interface { + Recv() (*StreamResponse, error) + grpc.ClientStream +} + +type streamStreamV2Client struct { + grpc.ClientStream +} + +func (x *streamStreamV2Client) Recv() (*StreamResponse, error) { + m := new(StreamResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// StreamServer is the server API for Stream service. +type StreamServer interface { + StreamV2(*StreamRequest, Stream_StreamV2Server) error +} + +// UnimplementedStreamServer can be embedded to have forward compatible implementations. +type UnimplementedStreamServer struct { +} + +func (*UnimplementedStreamServer) StreamV2(req *StreamRequest, srv Stream_StreamV2Server) error { + return status.Errorf(codes.Unimplemented, "method StreamV2 not implemented") +} + +func RegisterStreamServer(s grpc1.Server, srv StreamServer) { + s.RegisterService(&_Stream_serviceDesc, srv) +} + +func _Stream_StreamV2_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StreamServer).StreamV2(m, &streamStreamV2Server{stream}) +} + +type Stream_StreamV2Server interface { + Send(*StreamResponse) error + grpc.ServerStream +} + +type streamStreamV2Server struct { + grpc.ServerStream +} + +func (x *streamStreamV2Server) Send(m *StreamResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _Stream_serviceDesc = grpc.ServiceDesc{ + ServiceName: "injective.stream.v2.Stream", + HandlerType: (*StreamServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamV2", + Handler: _Stream_StreamV2_Handler, + ServerStreams: true, + }, + }, + Metadata: "injective/stream/v2/query.proto", +} + +func (m *StreamRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OraclePriceFilter != nil { + { + size, err := m.OraclePriceFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.PositionsFilter != nil { + { + size, err := m.PositionsFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if m.DerivativeOrderbooksFilter != nil { + { + size, err := m.DerivativeOrderbooksFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.SpotOrderbooksFilter != nil { + { + size, err := m.SpotOrderbooksFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.DerivativeOrdersFilter != nil { + { + size, err := m.DerivativeOrdersFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.SpotOrdersFilter != nil { + { + size, err := m.SpotOrdersFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.DerivativeTradesFilter != nil { + { + size, err := m.DerivativeTradesFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.SpotTradesFilter != nil { + { + size, err := m.SpotTradesFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.SubaccountDepositsFilter != nil { + { + size, err := m.SubaccountDepositsFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BankBalancesFilter != nil { + { + size, err := m.BankBalancesFilter.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StreamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OraclePrices) > 0 { + for iNdEx := len(m.OraclePrices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OraclePrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + if len(m.Positions) > 0 { + for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.DerivativeOrderbookUpdates) > 0 { + for iNdEx := len(m.DerivativeOrderbookUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeOrderbookUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.SpotOrderbookUpdates) > 0 { + for iNdEx := len(m.SpotOrderbookUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotOrderbookUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.DerivativeOrders) > 0 { + for iNdEx := len(m.DerivativeOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.SpotOrders) > 0 { + for iNdEx := len(m.SpotOrders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotOrders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.DerivativeTrades) > 0 { + for iNdEx := len(m.DerivativeTrades) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DerivativeTrades[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.SpotTrades) > 0 { + for iNdEx := len(m.SpotTrades) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpotTrades[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.SubaccountDeposits) > 0 { + for iNdEx := len(m.SubaccountDeposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SubaccountDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.BankBalances) > 0 { + for iNdEx := len(m.BankBalances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BankBalances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.BlockTime != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockTime)) + i-- + dAtA[i] = 0x10 + } + if m.BlockHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *OrderbookUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderbookUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderbookUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Orderbook != nil { + { + size, err := m.Orderbook.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Seq != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Seq)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Orderbook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Orderbook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Orderbook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SellLevels) > 0 { + for iNdEx := len(m.SellLevels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SellLevels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.BuyLevels) > 0 { + for iNdEx := len(m.BuyLevels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BuyLevels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BankBalance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BankBalance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BankBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountDeposits) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountDeposits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountDeposits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubaccountDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotOrderUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotOrderUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotOrderUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Order != nil { + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SpotOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeOrderUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeOrderUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeOrderUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Order != nil { + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x1a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *DerivativeOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsMarket { + i-- + if m.IsMarket { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Position) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Position) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CumulativeFundingEntry.Size() + i -= size + if _, err := m.CumulativeFundingEntry.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.Margin.Size() + i -= size + if _, err := m.Margin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.EntryPrice.Size() + i -= size + if _, err := m.EntryPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.IsLong { + i-- + if m.IsLong { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x12 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OraclePrice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OraclePrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OraclePrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpotTrade) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpotTrade) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpotTrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TradeId) > 0 { + i -= len(m.TradeId) + copy(dAtA[i:], m.TradeId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TradeId))) + i-- + dAtA[i] = 0x5a + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x52 + } + if len(m.FeeRecipientAddress) > 0 { + i -= len(m.FeeRecipientAddress) + copy(dAtA[i:], m.FeeRecipientAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeeRecipientAddress))) + i-- + dAtA[i] = 0x4a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x42 + } + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x32 + } + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Quantity.Size() + i -= size + if _, err := m.Quantity.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.ExecutionType) > 0 { + i -= len(m.ExecutionType) + copy(dAtA[i:], m.ExecutionType) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ExecutionType))) + i-- + dAtA[i] = 0x1a + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DerivativeTrade) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DerivativeTrade) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DerivativeTrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TradeId) > 0 { + i -= len(m.TradeId) + copy(dAtA[i:], m.TradeId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TradeId))) + i-- + dAtA[i] = 0x5a + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x52 + } + if len(m.FeeRecipientAddress) > 0 { + i -= len(m.FeeRecipientAddress) + copy(dAtA[i:], m.FeeRecipientAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeeRecipientAddress))) + i-- + dAtA[i] = 0x4a + } + if len(m.OrderHash) > 0 { + i -= len(m.OrderHash) + copy(dAtA[i:], m.OrderHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OrderHash))) + i-- + dAtA[i] = 0x42 + } + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.Payout.Size() + i -= size + if _, err := m.Payout.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.PositionDelta != nil { + { + size, err := m.PositionDelta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.SubaccountId) > 0 { + i -= len(m.SubaccountId) + copy(dAtA[i:], m.SubaccountId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ExecutionType) > 0 { + i -= len(m.ExecutionType) + copy(dAtA[i:], m.ExecutionType) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ExecutionType))) + i-- + dAtA[i] = 0x1a + } + if m.IsBuy { + i-- + if m.IsBuy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.MarketId) > 0 { + i -= len(m.MarketId) + copy(dAtA[i:], m.MarketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradesFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TradesFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountIds) > 0 { + for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubaccountIds[iNdEx]) + copy(dAtA[i:], m.SubaccountIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PositionsFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PositionsFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PositionsFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountIds) > 0 { + for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubaccountIds[iNdEx]) + copy(dAtA[i:], m.SubaccountIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *OrdersFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrdersFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrdersFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.SubaccountIds) > 0 { + for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubaccountIds[iNdEx]) + copy(dAtA[i:], m.SubaccountIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *OrderbookFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OrderbookFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderbookFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MarketIds) > 0 { + for iNdEx := len(m.MarketIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MarketIds[iNdEx]) + copy(dAtA[i:], m.MarketIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MarketIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *BankBalancesFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BankBalancesFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BankBalancesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Accounts[iNdEx]) + copy(dAtA[i:], m.Accounts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Accounts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SubaccountDepositsFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubaccountDepositsFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubaccountDepositsFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubaccountIds[iNdEx]) + copy(dAtA[i:], m.SubaccountIds[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubaccountIds[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *OraclePriceFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OraclePriceFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OraclePriceFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Symbol) > 0 { + for iNdEx := len(m.Symbol) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Symbol[iNdEx]) + copy(dAtA[i:], m.Symbol[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Symbol[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StreamRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BankBalancesFilter != nil { + l = m.BankBalancesFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.SubaccountDepositsFilter != nil { + l = m.SubaccountDepositsFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.SpotTradesFilter != nil { + l = m.SpotTradesFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.DerivativeTradesFilter != nil { + l = m.DerivativeTradesFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.SpotOrdersFilter != nil { + l = m.SpotOrdersFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.DerivativeOrdersFilter != nil { + l = m.DerivativeOrdersFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.SpotOrderbooksFilter != nil { + l = m.SpotOrderbooksFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.DerivativeOrderbooksFilter != nil { + l = m.DerivativeOrderbooksFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.PositionsFilter != nil { + l = m.PositionsFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.OraclePriceFilter != nil { + l = m.OraclePriceFilter.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *StreamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovQuery(uint64(m.BlockHeight)) + } + if m.BlockTime != 0 { + n += 1 + sovQuery(uint64(m.BlockTime)) + } + if len(m.BankBalances) > 0 { + for _, e := range m.BankBalances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SubaccountDeposits) > 0 { + for _, e := range m.SubaccountDeposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SpotTrades) > 0 { + for _, e := range m.SpotTrades { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DerivativeTrades) > 0 { + for _, e := range m.DerivativeTrades { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SpotOrders) > 0 { + for _, e := range m.SpotOrders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DerivativeOrders) > 0 { + for _, e := range m.DerivativeOrders { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SpotOrderbookUpdates) > 0 { + for _, e := range m.SpotOrderbookUpdates { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.DerivativeOrderbookUpdates) > 0 { + for _, e := range m.DerivativeOrderbookUpdates { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Positions) > 0 { + for _, e := range m.Positions { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.OraclePrices) > 0 { + for _, e := range m.OraclePrices { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *OrderbookUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seq != 0 { + n += 1 + sovQuery(uint64(m.Seq)) + } + if m.Orderbook != nil { + l = m.Orderbook.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *Orderbook) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.BuyLevels) > 0 { + for _, e := range m.BuyLevels { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.SellLevels) > 0 { + for _, e := range m.SellLevels { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BankBalance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SubaccountDeposits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SubaccountDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *SpotOrderUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Order != nil { + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SpotOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *DerivativeOrderUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Order != nil { + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DerivativeOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.IsMarket { + n += 2 + } + return n +} + +func (m *Position) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.IsLong { + n += 2 + } + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EntryPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Margin.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.CumulativeFundingEntry.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *OraclePrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.Type) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SpotTrade) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.IsBuy { + n += 2 + } + l = len(m.ExecutionType) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Quantity.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.FeeRecipientAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TradeId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *DerivativeTrade) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.IsBuy { + n += 2 + } + l = len(m.ExecutionType) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SubaccountId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.PositionDelta != nil { + l = m.PositionDelta.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Payout.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.OrderHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.FeeRecipientAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.TradeId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TradesFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for _, s := range m.SubaccountIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *PositionsFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for _, s := range m.SubaccountIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *OrdersFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for _, s := range m.SubaccountIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *OrderbookFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MarketIds) > 0 { + for _, s := range m.MarketIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *BankBalancesFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, s := range m.Accounts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SubaccountDepositsFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SubaccountIds) > 0 { + for _, s := range m.SubaccountIds { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *OraclePriceFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Symbol) > 0 { + for _, s := range m.Symbol { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StreamRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StreamRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BankBalancesFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BankBalancesFilter == nil { + m.BankBalancesFilter = &BankBalancesFilter{} + } + if err := m.BankBalancesFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountDepositsFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SubaccountDepositsFilter == nil { + m.SubaccountDepositsFilter = &SubaccountDepositsFilter{} + } + if err := m.SubaccountDepositsFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotTradesFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpotTradesFilter == nil { + m.SpotTradesFilter = &TradesFilter{} + } + if err := m.SpotTradesFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeTradesFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DerivativeTradesFilter == nil { + m.DerivativeTradesFilter = &TradesFilter{} + } + if err := m.DerivativeTradesFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrdersFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpotOrdersFilter == nil { + m.SpotOrdersFilter = &OrdersFilter{} + } + if err := m.SpotOrdersFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrdersFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DerivativeOrdersFilter == nil { + m.DerivativeOrdersFilter = &OrdersFilter{} + } + if err := m.DerivativeOrdersFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrderbooksFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpotOrderbooksFilter == nil { + m.SpotOrderbooksFilter = &OrderbookFilter{} + } + if err := m.SpotOrderbooksFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrderbooksFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DerivativeOrderbooksFilter == nil { + m.DerivativeOrderbooksFilter = &OrderbookFilter{} + } + if err := m.DerivativeOrderbooksFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionsFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PositionsFilter == nil { + m.PositionsFilter = &PositionsFilter{} + } + if err := m.PositionsFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OraclePriceFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OraclePriceFilter == nil { + m.OraclePriceFilter = &OraclePriceFilter{} + } + if err := m.OraclePriceFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StreamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StreamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StreamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + m.BlockTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BankBalances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BankBalances = append(m.BankBalances, &BankBalance{}) + if err := m.BankBalances[len(m.BankBalances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountDeposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountDeposits = append(m.SubaccountDeposits, &SubaccountDeposits{}) + if err := m.SubaccountDeposits[len(m.SubaccountDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotTrades", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotTrades = append(m.SpotTrades, &SpotTrade{}) + if err := m.SpotTrades[len(m.SpotTrades)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeTrades", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeTrades = append(m.DerivativeTrades, &DerivativeTrade{}) + if err := m.DerivativeTrades[len(m.DerivativeTrades)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrders = append(m.SpotOrders, &SpotOrderUpdate{}) + if err := m.SpotOrders[len(m.SpotOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrders = append(m.DerivativeOrders, &DerivativeOrderUpdate{}) + if err := m.DerivativeOrders[len(m.DerivativeOrders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotOrderbookUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpotOrderbookUpdates = append(m.SpotOrderbookUpdates, &OrderbookUpdate{}) + if err := m.SpotOrderbookUpdates[len(m.SpotOrderbookUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DerivativeOrderbookUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DerivativeOrderbookUpdates = append(m.DerivativeOrderbookUpdates, &OrderbookUpdate{}) + if err := m.DerivativeOrderbookUpdates[len(m.DerivativeOrderbookUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Positions = append(m.Positions, &Position{}) + if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OraclePrices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OraclePrices = append(m.OraclePrices, &OraclePrice{}) + if err := m.OraclePrices[len(m.OraclePrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderbookUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderbookUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderbookUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orderbook", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Orderbook == nil { + m.Orderbook = &Orderbook{} + } + if err := m.Orderbook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Orderbook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Orderbook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Orderbook: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuyLevels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BuyLevels = append(m.BuyLevels, &v2.Level{}) + if err := m.BuyLevels[len(m.BuyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SellLevels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SellLevels = append(m.SellLevels, &v2.Level{}) + if err := m.SellLevels[len(m.SellLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BankBalance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BankBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BankBalance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountDeposits) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountDeposits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountDeposits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, SubaccountDeposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotOrderUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotOrderUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotOrderUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= OrderUpdateStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Order == nil { + m.Order = &SpotOrder{} + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeOrderUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeOrderUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeOrderUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= OrderUpdateStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Order == nil { + m.Order = &DerivativeOrder{} + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsMarket", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsMarket = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Position) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Position: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Position: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLong", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLong = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntryPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EntryPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Margin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Margin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CumulativeFundingEntry", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CumulativeFundingEntry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OraclePrice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OraclePrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OraclePrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpotTrade) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpotTrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpotTrade: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutionType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DerivativeTrade) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DerivativeTrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DerivativeTrade: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsBuy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsBuy = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutionType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionDelta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PositionDelta == nil { + m.PositionDelta = &v2.PositionDelta{} + } + if err := m.PositionDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Payout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradeId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TradesFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TradesFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradesFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountIds = append(m.SubaccountIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PositionsFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PositionsFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PositionsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountIds = append(m.SubaccountIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrdersFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrdersFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrdersFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountIds = append(m.SubaccountIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderbookFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OrderbookFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderbookFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MarketIds = append(m.MarketIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BankBalancesFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BankBalancesFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BankBalancesFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubaccountDepositsFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubaccountDepositsFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubaccountDepositsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubaccountIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubaccountIds = append(m.SubaccountIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OraclePriceFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OraclePriceFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OraclePriceFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = append(m.Symbol, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/chain/stream/types/v2/request.go b/chain/stream/types/v2/request.go new file mode 100644 index 00000000..9331feef --- /dev/null +++ b/chain/stream/types/v2/request.go @@ -0,0 +1,74 @@ +package v2 + +import ( + "fmt" +) + +func NewFullStreamRequest() *StreamRequest { + return &StreamRequest{ + BankBalancesFilter: &BankBalancesFilter{ + Accounts: []string{}, + }, + SpotOrdersFilter: &OrdersFilter{ + MarketIds: []string{"*"}, + SubaccountIds: []string{"*"}, + }, + DerivativeOrdersFilter: &OrdersFilter{ + MarketIds: []string{"*"}, + SubaccountIds: []string{"*"}, + }, + SpotTradesFilter: &TradesFilter{ + MarketIds: []string{"*"}, + SubaccountIds: []string{"*"}, + }, + SubaccountDepositsFilter: &SubaccountDepositsFilter{ + SubaccountIds: []string{"*"}, + }, + DerivativeOrderbooksFilter: &OrderbookFilter{ + MarketIds: []string{"*"}, + }, + SpotOrderbooksFilter: &OrderbookFilter{ + MarketIds: []string{"*"}, + }, + PositionsFilter: &PositionsFilter{ + SubaccountIds: []string{"*"}, + MarketIds: []string{"*"}, + }, + DerivativeTradesFilter: &TradesFilter{ + SubaccountIds: []string{"*"}, + MarketIds: []string{"*"}, + }, + OraclePriceFilter: &OraclePriceFilter{ + Symbol: []string{"*"}, + }, + } +} + +// Empty query matches any set of events. +type Empty struct { +} + +// Matches always returns true. +func (Empty) Matches(tags map[string][]string) (bool, error) { + return true, nil +} + +func (Empty) String() string { + return "empty" +} + +func (m *StreamRequest) Validate() error { + if m.BankBalancesFilter == nil && + m.SubaccountDepositsFilter == nil && + m.SpotTradesFilter == nil && + m.DerivativeTradesFilter == nil && + m.SpotOrdersFilter == nil && + m.DerivativeOrdersFilter == nil && + m.SpotOrderbooksFilter == nil && + m.DerivativeOrderbooksFilter == nil && + m.PositionsFilter == nil && + m.OraclePriceFilter == nil { + return fmt.Errorf("at least one filter must be set") + } + return nil +} diff --git a/chain/stream/types/response.go b/chain/stream/types/v2/response.go similarity index 86% rename from chain/stream/types/response.go rename to chain/stream/types/v2/response.go index 3a215960..aa70b1a6 100644 --- a/chain/stream/types/response.go +++ b/chain/stream/types/v2/response.go @@ -1,7 +1,6 @@ -package types +package v2 import ( - "fmt" "time" ) @@ -46,6 +45,12 @@ func NewStreamResponseMap() *StreamResponseMap { } } +func (m *StreamResponseMap) NextTradeEventNumber() (tradeNumber uint64) { + currentTradesNumber := m.tradeEventsCounter + m.tradeEventsCounter++ + return currentTradesNumber +} + func NewChainStreamResponse() *StreamResponse { return &StreamResponse{ BankBalances: []*BankBalance{}, @@ -60,25 +65,3 @@ func NewChainStreamResponse() *StreamResponse { OraclePrices: []*OraclePrice{}, } } - -func (m *StreamRequest) Validate() error { - if m.BankBalancesFilter == nil && - m.SubaccountDepositsFilter == nil && - m.SpotTradesFilter == nil && - m.DerivativeTradesFilter == nil && - m.SpotOrdersFilter == nil && - m.DerivativeOrdersFilter == nil && - m.SpotOrderbooksFilter == nil && - m.DerivativeOrderbooksFilter == nil && - m.PositionsFilter == nil && - m.OraclePriceFilter == nil { - return fmt.Errorf("at least one filter must be set") - } - return nil -} - -func (m *StreamResponseMap) NextTradeEventNumber() (tradeNumber uint64) { - currentTradesNumber := m.tradeEventsCounter - m.tradeEventsCounter++ - return currentTradesNumber -} diff --git a/client/chain/chain.go b/client/chain/chain.go index f93559dc..b95c30b2 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -42,6 +42,7 @@ import ( exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" + chainstreamv2types "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" "github.com/InjectiveLabs/sdk-go/client/common" log "github.com/InjectiveLabs/suplog" @@ -144,7 +145,9 @@ type ChainClient interface { // Deprecated: use the chain stream instead StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIDs []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) + // Deprecated: use ChainStreamV2 instead ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) + ChainStreamV2(ctx context.Context, req chainstreamv2types.StreamRequest) (chainstreamv2types.Stream_StreamV2Client, error) // get tx from chain node GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) @@ -452,6 +455,7 @@ type chainClient struct { authzQueryClient authztypes.QueryClient bankQueryClient banktypes.QueryClient chainStreamClient chainstreamtypes.StreamClient + chainStreamV2Client chainstreamv2types.StreamClient distributionQueryClient distributiontypes.QueryClient exchangeQueryClient exchangetypes.QueryClient exchangeV2QueryClient exchangev2types.QueryClient @@ -1633,6 +1637,7 @@ func (c *chainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxR return res, err } +// Deprecated: use ChainStreamV2 instead func (c *chainClient) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) { stream, err := common.ExecuteStreamCall(ctx, c.network.ChainCookieAssistant, c.chainStreamClient.Stream, &req) @@ -1644,6 +1649,17 @@ func (c *chainClient) ChainStream(ctx context.Context, req chainstreamtypes.Stre return stream, nil } +func (c *chainClient) ChainStreamV2(ctx context.Context, req chainstreamv2types.StreamRequest) (chainstreamv2types.Stream_StreamV2Client, error) { + stream, err := common.ExecuteStreamCall(ctx, c.network.ChainCookieAssistant, c.chainStreamV2Client.StreamV2, &req) + + if err != nil { + fmt.Println(err) + return nil, err + } + + return stream, nil +} + // wasm module func (c *chainClient) FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error) { diff --git a/client/chain/chain_test_support.go b/client/chain/chain_test_support.go index 47b7e36b..7ad3deeb 100644 --- a/client/chain/chain_test_support.go +++ b/client/chain/chain_test_support.go @@ -3,6 +3,7 @@ package chain import ( "context" "errors" + chainstreamv2types "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" "time" sdkmath "cosmossdk.io/math" @@ -246,6 +247,10 @@ func (c *MockChainClient) ChainStream(ctx context.Context, req chainstreamtypes. return nil, nil } +func (c *MockChainClient) ChainStreamV2(ctx context.Context, req chainstreamv2types.StreamRequest) (chainstreamv2types.Stream_StreamV2Client, error) { + return nil, nil +} + func (c *MockChainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) { return &txtypes.GetTxResponse{}, nil } diff --git a/examples/chain/12_ChainStream/example.go b/examples/chain/12_ChainStream/example.go index 7279f0e2..74983c6d 100644 --- a/examples/chain/12_ChainStream/example.go +++ b/examples/chain/12_ChainStream/example.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - chainStreamModule "github.com/InjectiveLabs/sdk-go/chain/stream/types" + chainStreamModule "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" "github.com/InjectiveLabs/sdk-go/client/common" @@ -79,7 +79,7 @@ func main() { ctx := context.Background() - stream, err := chainClient.ChainStream(ctx, req) + stream, err := chainClient.ChainStreamV2(ctx, req) if err != nil { panic(err) } From 95e6e8b04bace1969d6f8ca216567f5e1e403df3 Mon Sep 17 00:00:00 2001 From: Abel Armoa <30988000+aarmoa@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:33:08 -0300 Subject: [PATCH 3/3] (fix) Fixed pre-commit issues --- client/chain/chain_test_support.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/chain/chain_test_support.go b/client/chain/chain_test_support.go index 7ad3deeb..804bdb0f 100644 --- a/client/chain/chain_test_support.go +++ b/client/chain/chain_test_support.go @@ -3,7 +3,6 @@ package chain import ( "context" "errors" - chainstreamv2types "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" "time" sdkmath "cosmossdk.io/math" @@ -29,6 +28,7 @@ import ( exchangev2types "github.com/InjectiveLabs/sdk-go/chain/exchange/types/v2" permissionstypes "github.com/InjectiveLabs/sdk-go/chain/permissions/types" chainstreamtypes "github.com/InjectiveLabs/sdk-go/chain/stream/types" + chainstreamv2types "github.com/InjectiveLabs/sdk-go/chain/stream/types/v2" tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" "github.com/InjectiveLabs/sdk-go/client/common" )