From 3736b386c2d2b7015a740cf99354920eaa048858 Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:15:03 -0300 Subject: [PATCH 01/15] (feat) Added configuration for pre-commit. Solved all issues found by pre-commit stepts, including golangci-lint --- .pre-commit-config.yaml | 19 + LICENSE.md | 2 +- NOTICE.md | 2 +- README.md | 2 +- chain/auction/types/auction.pb.go | 7 +- chain/auction/types/genesis.pb.go | 5 +- chain/auction/types/query.pb.go | 7 +- chain/auction/types/tx.pb.go | 7 +- chain/crypto/ethsecp256k1/keys.pb.go | 5 +- chain/exchange/types/authz.pb.go | 5 +- chain/exchange/types/events.pb.go | 7 +- chain/exchange/types/exchange.pb.go | 7 +- chain/exchange/types/genesis.pb.go | 7 +- chain/exchange/types/proposal.pb.go | 7 +- chain/exchange/types/query.pb.go | 7 +- chain/exchange/types/tx.pb.go | 7 +- chain/exchange/types/wasm_maker_contract.go | 4 +- chain/insurance/types/genesis.pb.go | 5 +- chain/insurance/types/insurance.pb.go | 9 +- chain/insurance/types/query.pb.go | 7 +- chain/insurance/types/tx.pb.go | 7 +- chain/ocr/types/genesis.pb.go | 7 +- chain/ocr/types/ocr.pb.go | 9 +- chain/ocr/types/query.pb.go | 7 +- chain/ocr/types/tx.pb.go | 7 +- chain/oracle/types/events.pb.go | 7 +- chain/oracle/types/genesis.pb.go | 5 +- chain/oracle/types/oracle.pb.go | 7 +- chain/oracle/types/proposal.pb.go | 7 +- chain/oracle/types/query.pb.go | 7 +- chain/oracle/types/tx.pb.go | 7 +- chain/peggy/types/attestation.pb.go | 7 +- chain/peggy/types/batch.pb.go | 3 +- chain/peggy/types/ethereum_signer.pb.go | 3 +- chain/peggy/types/events.pb.go | 7 +- chain/peggy/types/genesis.pb.go | 7 +- chain/peggy/types/msgs.pb.go | 7 +- chain/peggy/types/params.pb.go | 7 +- chain/peggy/types/pool.pb.go | 7 +- chain/peggy/types/proposal.pb.go | 7 +- chain/peggy/types/query.pb.go | 7 +- chain/peggy/types/types.pb.go | 7 +- chain/stream/types/query.pb.go | 7 +- .../types/authorityMetadata.pb.go | 7 +- chain/tokenfactory/types/events.pb.go | 7 +- chain/tokenfactory/types/genesis.pb.go | 5 +- chain/tokenfactory/types/params.pb.go | 7 +- chain/tokenfactory/types/query.pb.go | 7 +- chain/tokenfactory/types/tx.pb.go | 7 +- chain/types/account.pb.go | 7 +- chain/types/tx_ext.pb.go | 5 +- chain/types/tx_response.pb.go | 3 +- chain/wasmx/types/events.pb.go | 5 +- chain/wasmx/types/genesis.pb.go | 5 +- chain/wasmx/types/proposal.pb.go | 7 +- chain/wasmx/types/query.pb.go | 7 +- chain/wasmx/types/tx.pb.go | 7 +- chain/wasmx/types/wasmx.pb.go | 5 +- client/chain/chain.go | 66 ++- client/chain/chain_test.go | 5 +- client/common/embeded.go | 6 +- client/common/network.go | 5 +- client/common/network_test.go | 3 +- client/common/util.go | 8 +- client/exchange/exchange.go | 500 +++++++++--------- client/explorer/explorer.go | 142 +++-- client/metadata/assets/devnet-1.ini | 1 - client/metadata/fetch_metadata.go | 19 +- ethereum/util/amounts.go | 6 +- examples/chain/0_LocalOrderHash/example.go | 3 +- .../example.go | 3 +- .../example.go | 3 +- .../example.go | 3 +- .../13_MsgIncreasePositionMargin/example.go | 3 +- .../chain/17_MsgBatchUpdateOrders/example.go | 3 +- examples/chain/19_MsgGrant/example.go | 3 +- examples/chain/1_MsgSend/example.go | 3 +- examples/chain/28_BankBalances/example.go | 1 + examples/chain/2_MsgDeposit/example.go | 3 +- examples/chain/33_GetBlock/example.go | 1 + examples/chain/37_DecodeTx/37_decode_tx.go | 1 + .../3_MsgCreateSpotLimitOrder/example.go | 3 +- examples/chain/40_ChainStream/example.go | 1 + .../example.go | 3 +- .../4_MsgCreateSpotMarketOrder/example.go | 3 +- .../chain/5_MsgCancelSpotOrder/example.go | 3 +- .../example.go | 3 +- .../example.go | 3 +- .../8_MsgCancelDerivativeOrder/example.go | 3 +- .../9_MsgBatchCancelSpotOrders/example.go | 3 +- .../accounts/5_SubaccountHistory/example.go | 2 +- .../6_SubaccountOrderSummary/example.go | 2 +- .../accounts/7_OrderStates/example.go | 2 +- .../exchange/accounts/9_Rewards/example.go | 2 +- .../derivatives/10_StreamPositions/example.go | 2 +- .../derivatives/11_StreamOrders/example.go | 2 +- .../exchange/derivatives/12_Trades/example.go | 2 +- .../derivatives/13_StreamTrades/example.go | 2 +- .../14_SubaccountOrdersList/example.go | 2 +- .../15_SubaccountTradesList/example.go | 2 +- .../derivatives/16_FundingPayments/example.go | 2 +- .../derivatives/17_FundingRates/example.go | 2 +- .../18_HistoricalOrders/example.go | 2 +- .../19_StreamHistoricalOrders/example.go | 2 +- .../20_LiquidablePositions/example.go | 2 +- .../derivatives/21_TradesV2/example.go | 2 +- .../derivatives/22_StreamTradesV2/example.go | 2 +- .../exchange/derivatives/2_Markets/example.go | 2 +- .../derivatives/8_Positions/example.go | 2 +- .../exchange/derivatives/9_Orders/example.go | 2 +- .../insurance/1_InsuranceFunds/example.go | 3 +- .../insurance/2_Redemptions/example.go | 3 +- examples/exchange/meta/1_Ping/example.go | 2 +- examples/exchange/meta/2_Version/example.go | 2 +- examples/exchange/meta/3_Info/example.go | 2 +- .../meta/4_StreamKeepAlive/example.go | 2 +- examples/exchange/oracle/2_Price/example.go | 1 + .../example.go | 1 + .../exchange/spot/10_StreamTrades/example.go | 2 +- .../spot/11_SubaccountOrdersList/example.go | 2 +- .../spot/12_SubaccountTradesList/example.go | 2 +- .../spot/14_HistoricalOrders/example.go | 2 +- .../spot/15_StreamHistoricalOrders/example.go | 2 +- examples/exchange/spot/16_TradesV2/example.go | 2 +- .../spot/17_StreamTradesV2/example.go | 2 +- examples/exchange/spot/2_Markets/example.go | 2 +- examples/exchange/spot/5_Orders/example.go | 4 +- examples/exchange/spot/6_Trades/example.go | 2 +- .../exchange/spot/9_StreamOrders/example.go | 2 +- examples/explorer/10_IBCTransfers/example.go | 2 +- examples/explorer/11_GetWasmCodes/example.go | 2 +- .../explorer/12_GetWasmCodeById/example.go | 2 +- .../explorer/13_GetWasmContracts/example.go | 2 +- .../14_GetWasmContractByAddress/example.go | 2 +- .../explorer/15_GetCW20Balance/example.go | 2 +- examples/explorer/2_AccountTxs/example.go | 2 +- examples/explorer/5_TxsRequest/example.go | 2 +- examples/explorer/8_PeggyDeposits/example.go | 2 +- .../explorer/9_PeggyWithdrawals/example.go | 2 +- go.mod | 2 +- 140 files changed, 698 insertions(+), 592 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7c8d4cf5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +exclude: | + (?x)^( + proto/.*| + exchange/.* + )$ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: end-of-file-fixer + - id: check-yaml + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.0 + hooks: + - id: go-fmt + - id: go-imports + - id: golangci-lint diff --git a/LICENSE.md b/LICENSE.md index fd30af8c..1d5c5b7c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -200,4 +200,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/NOTICE.md b/NOTICE.md index 68e8c372..9e73b26c 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -5,4 +5,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) Originally released by Injective Labs Inc. under:
Apache License
Version 2.0, January 2004
-http://www.apache.org/licenses/ +http://www.apache.org/licenses/ diff --git a/README.md b/README.md index b5f92d4d..32653a09 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) Originally released by Injective Labs Inc. under:
Apache License
Version 2.0, January 2004
-http://www.apache.org/licenses/ +http://www.apache.org/licenses/ diff --git a/chain/auction/types/auction.pb.go b/chain/auction/types/auction.pb.go index d0d2e780..0d7b6220 100644 --- a/chain/auction/types/auction.pb.go +++ b/chain/auction/types/auction.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/auction/types/genesis.pb.go b/chain/auction/types/genesis.pb.go index d1452e2a..c7c3ab27 100644 --- a/chain/auction/types/genesis.pb.go +++ b/chain/auction/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/auction/types/query.pb.go b/chain/auction/types/query.pb.go index ec9d8b68..bde86cb4 100644 --- a/chain/auction/types/query.pb.go +++ b/chain/auction/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/auction/types/tx.pb.go b/chain/auction/types/tx.pb.go index 57d3be57..b592915e 100644 --- a/chain/auction/types/tx.pb.go +++ b/chain/auction/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/crypto/ethsecp256k1/keys.pb.go b/chain/crypto/ethsecp256k1/keys.pb.go index c445cb5b..1f19c66a 100644 --- a/chain/crypto/ethsecp256k1/keys.pb.go +++ b/chain/crypto/ethsecp256k1/keys.pb.go @@ -5,11 +5,12 @@ package ethsecp256k1 import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/authz.pb.go b/chain/exchange/types/authz.pb.go index e97e8a78..7989416a 100644 --- a/chain/exchange/types/authz.pb.go +++ b/chain/exchange/types/authz.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/events.pb.go b/chain/exchange/types/events.pb.go index fde0ea75..0b05ad3a 100644 --- a/chain/exchange/types/events.pb.go +++ b/chain/exchange/types/events.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "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/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. diff --git a/chain/exchange/types/exchange.pb.go b/chain/exchange/types/exchange.pb.go index d462df25..1db8e74d 100644 --- a/chain/exchange/types/exchange.pb.go +++ b/chain/exchange/types/exchange.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types1 "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/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. diff --git a/chain/exchange/types/genesis.pb.go b/chain/exchange/types/genesis.pb.go index 92998d1d..d83d83f7 100644 --- a/chain/exchange/types/genesis.pb.go +++ b/chain/exchange/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/proposal.pb.go b/chain/exchange/types/proposal.pb.go index 6f3eee76..8ec78f6e 100644 --- a/chain/exchange/types/proposal.pb.go +++ b/chain/exchange/types/proposal.pb.go @@ -5,6 +5,10 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/exchange/types/query.pb.go b/chain/exchange/types/query.pb.go index b4111c76..d95ca74e 100644 --- a/chain/exchange/types/query.pb.go +++ b/chain/exchange/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/exchange/types/tx.pb.go b/chain/exchange/types/tx.pb.go index 682a9a23..b36abb8e 100644 --- a/chain/exchange/types/tx.pb.go +++ b/chain/exchange/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + 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" @@ -18,9 +22,6 @@ import ( 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. diff --git a/chain/exchange/types/wasm_maker_contract.go b/chain/exchange/types/wasm_maker_contract.go index ca0a9227..8b75eb9f 100644 --- a/chain/exchange/types/wasm_maker_contract.go +++ b/chain/exchange/types/wasm_maker_contract.go @@ -1,7 +1,7 @@ package types import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" ) type MintToUser struct { @@ -13,7 +13,7 @@ type MintToUserMsg struct { MintToUser MintToUser `json:"mint_to_user"` } -func NewMintToUserMsg(subaccountIDSender string, amount sdk.Int) MintToUserMsg { +func NewMintToUserMsg(subaccountIDSender string, amount math.Int) MintToUserMsg { return MintToUserMsg{ MintToUser: MintToUser{ SubaccountIDSender: subaccountIDSender, diff --git a/chain/insurance/types/genesis.pb.go b/chain/insurance/types/genesis.pb.go index 2bd30a00..09aa4be5 100644 --- a/chain/insurance/types/genesis.pb.go +++ b/chain/insurance/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/insurance/types/insurance.pb.go b/chain/insurance/types/insurance.pb.go index ba256531..bf9d978e 100644 --- a/chain/insurance/types/insurance.pb.go +++ b/chain/insurance/types/insurance.pb.go @@ -5,6 +5,11 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -13,10 +18,6 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/insurance/types/query.pb.go b/chain/insurance/types/query.pb.go index 4b79acab..37fdf2bd 100644 --- a/chain/insurance/types/query.pb.go +++ b/chain/insurance/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/insurance/types/tx.pb.go b/chain/insurance/types/tx.pb.go index 846919ee..1113a9f8 100644 --- a/chain/insurance/types/tx.pb.go +++ b/chain/insurance/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/types" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/ocr/types/genesis.pb.go b/chain/ocr/types/genesis.pb.go index 210d8023..68aee64a 100644 --- a/chain/ocr/types/genesis.pb.go +++ b/chain/ocr/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - 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" + + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/ocr/types/ocr.pb.go b/chain/ocr/types/ocr.pb.go index d80ac284..4c0279d4 100644 --- a/chain/ocr/types/ocr.pb.go +++ b/chain/ocr/types/ocr.pb.go @@ -5,6 +5,11 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -12,10 +17,6 @@ import ( proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/ocr/types/query.pb.go b/chain/ocr/types/query.pb.go index 5320b68e..3000c85e 100644 --- a/chain/ocr/types/query.pb.go +++ b/chain/ocr/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/ocr/types/tx.pb.go b/chain/ocr/types/tx.pb.go index 76af8a8c..b1574018 100644 --- a/chain/ocr/types/tx.pb.go +++ b/chain/ocr/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/oracle/types/events.pb.go b/chain/oracle/types/events.pb.go index d8b8118e..4f5e3139 100644 --- a/chain/oracle/types/events.pb.go +++ b/chain/oracle/types/events.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/oracle/types/genesis.pb.go b/chain/oracle/types/genesis.pb.go index 04cb607c..df592e98 100644 --- a/chain/oracle/types/genesis.pb.go +++ b/chain/oracle/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/oracle.pb.go b/chain/oracle/types/oracle.pb.go index 156c1208..65482710 100644 --- a/chain/oracle/types/oracle.pb.go +++ b/chain/oracle/types/oracle.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/proposal.pb.go b/chain/oracle/types/proposal.pb.go index 2606c3f3..ae4c5169 100644 --- a/chain/oracle/types/proposal.pb.go +++ b/chain/oracle/types/proposal.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/oracle/types/query.pb.go b/chain/oracle/types/query.pb.go index d82bee6f..4581b81c 100644 --- a/chain/oracle/types/query.pb.go +++ b/chain/oracle/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/oracle/types/tx.pb.go b/chain/oracle/types/tx.pb.go index c993e9d9..165fcf35 100644 --- a/chain/oracle/types/tx.pb.go +++ b/chain/oracle/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/peggy/types/attestation.pb.go b/chain/peggy/types/attestation.pb.go index 0d591bd2..3ea675f8 100644 --- a/chain/peggy/types/attestation.pb.go +++ b/chain/peggy/types/attestation.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/peggy/types/batch.pb.go b/chain/peggy/types/batch.pb.go index 083ea8c7..65fac894 100644 --- a/chain/peggy/types/batch.pb.go +++ b/chain/peggy/types/batch.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/ethereum_signer.pb.go b/chain/peggy/types/ethereum_signer.pb.go index d52e1b45..08af7a8a 100644 --- a/chain/peggy/types/ethereum_signer.pb.go +++ b/chain/peggy/types/ethereum_signer.pb.go @@ -5,9 +5,10 @@ package types import ( fmt "fmt" + math "math" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/events.pb.go b/chain/peggy/types/events.pb.go index 13168705..571bb00b 100644 --- a/chain/peggy/types/events.pb.go +++ b/chain/peggy/types/events.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/genesis.pb.go b/chain/peggy/types/genesis.pb.go index 197630ab..e4baffbc 100644 --- a/chain/peggy/types/genesis.pb.go +++ b/chain/peggy/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "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" + + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/msgs.pb.go b/chain/peggy/types/msgs.pb.go index 6bf0619c..7797fcfe 100644 --- a/chain/peggy/types/msgs.pb.go +++ b/chain/peggy/types/msgs.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -18,9 +22,6 @@ import ( 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. diff --git a/chain/peggy/types/params.pb.go b/chain/peggy/types/params.pb.go index f7932952..7afc74dd 100644 --- a/chain/peggy/types/params.pb.go +++ b/chain/peggy/types/params.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/peggy/types/pool.pb.go b/chain/peggy/types/pool.pb.go index a7eabb67..68e76b1a 100644 --- a/chain/peggy/types/pool.pb.go +++ b/chain/peggy/types/pool.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/proposal.pb.go b/chain/peggy/types/proposal.pb.go index dd9ece2a..242fd142 100644 --- a/chain/peggy/types/proposal.pb.go +++ b/chain/peggy/types/proposal.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/query.pb.go b/chain/peggy/types/query.pb.go index 56cc080b..daac4c68 100644 --- a/chain/peggy/types/query.pb.go +++ b/chain/peggy/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/peggy/types/types.pb.go b/chain/peggy/types/types.pb.go index 66673a3c..29281874 100644 --- a/chain/peggy/types/types.pb.go +++ b/chain/peggy/types/types.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index 1e7e3f0c..fcbb41c6 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/exchange/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/tokenfactory/types/authorityMetadata.pb.go b/chain/tokenfactory/types/authorityMetadata.pb.go index 51337590..8ee31dd6 100644 --- a/chain/tokenfactory/types/authorityMetadata.pb.go +++ b/chain/tokenfactory/types/authorityMetadata.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "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" + + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/tokenfactory/types/events.pb.go b/chain/tokenfactory/types/events.pb.go index 96598dc0..17d0804f 100644 --- a/chain/tokenfactory/types/events.pb.go +++ b/chain/tokenfactory/types/events.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/bank/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. diff --git a/chain/tokenfactory/types/genesis.pb.go b/chain/tokenfactory/types/genesis.pb.go index 85a59947..9f623873 100644 --- a/chain/tokenfactory/types/genesis.pb.go +++ b/chain/tokenfactory/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/tokenfactory/types/params.pb.go b/chain/tokenfactory/types/params.pb.go index 9d705d9c..089844bc 100644 --- a/chain/tokenfactory/types/params.pb.go +++ b/chain/tokenfactory/types/params.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "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/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. diff --git a/chain/tokenfactory/types/query.pb.go b/chain/tokenfactory/types/query.pb.go index 9d7f5742..f8afd710 100644 --- a/chain/tokenfactory/types/query.pb.go +++ b/chain/tokenfactory/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/tokenfactory/types/tx.pb.go b/chain/tokenfactory/types/tx.pb.go index 214084f8..33e4eb33 100644 --- a/chain/tokenfactory/types/tx.pb.go +++ b/chain/tokenfactory/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/types/account.pb.go b/chain/types/account.pb.go index cb352b87..59afd490 100644 --- a/chain/types/account.pb.go +++ b/chain/types/account.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/x/auth/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. diff --git a/chain/types/tx_ext.pb.go b/chain/types/tx_ext.pb.go index 3b5e02ae..5f48212a 100644 --- a/chain/types/tx_ext.pb.go +++ b/chain/types/tx_ext.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/types/tx_response.pb.go b/chain/types/tx_response.pb.go index e4d2327b..de584707 100644 --- a/chain/types/tx_response.pb.go +++ b/chain/types/tx_response.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/events.pb.go b/chain/wasmx/types/events.pb.go index 9f3f7471..a211e66a 100644 --- a/chain/wasmx/types/events.pb.go +++ b/chain/wasmx/types/events.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/genesis.pb.go b/chain/wasmx/types/genesis.pb.go index fe9147ae..c9405de5 100644 --- a/chain/wasmx/types/genesis.pb.go +++ b/chain/wasmx/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/proposal.pb.go b/chain/wasmx/types/proposal.pb.go index 128ae2cc..4e85c1c3 100644 --- a/chain/wasmx/types/proposal.pb.go +++ b/chain/wasmx/types/proposal.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/CosmWasm/wasmd/x/wasm/types" _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/wasmx/types/query.pb.go b/chain/wasmx/types/query.pb.go index a94efce7..1b1f4cdb 100644 --- a/chain/wasmx/types/query.pb.go +++ b/chain/wasmx/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/wasmx/types/tx.pb.go b/chain/wasmx/types/tx.pb.go index 02545b39..908d6219 100644 --- a/chain/wasmx/types/tx.pb.go +++ b/chain/wasmx/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/wasmx/types/wasmx.pb.go b/chain/wasmx/types/wasmx.pb.go index 053a0a76..e3e8dee8 100644 --- a/chain/wasmx/types/wasmx.pb.go +++ b/chain/wasmx/types/wasmx.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/client/chain/chain.go b/client/chain/chain.go index e9474631..dbcff32c 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -15,6 +15,8 @@ import ( "sync/atomic" "time" + "google.golang.org/grpc/credentials/insecure" + sdkmath "cosmossdk.io/math" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" log "github.com/InjectiveLabs/suplog" @@ -151,10 +153,9 @@ type chainClient struct { chainStreamConn *grpc.ClientConn txFactory tx.Factory - fromAddress sdk.AccAddress - doneC chan bool - msgC chan sdk.Msg - syncMux *sync.Mutex + doneC chan bool + msgC chan sdk.Msg + syncMux *sync.Mutex cancelCtx context.Context cancelFn func() @@ -218,7 +219,7 @@ func NewChainClient( if opts.TLSCert != nil { conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) stickySessionEnabled = false } if err != nil { @@ -230,7 +231,7 @@ func NewChainClient( if opts.TLSCert != nil { chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err = errors.Wrapf(err, "failed to connect to the chain stream gRPC: %s", network.ChainStreamGrpcEndpoint) @@ -379,7 +380,10 @@ func (c *chainClient) getAccSeq() uint64 { func (c *chainClient) requestCookie() metadata.MD { var header metadata.MD - c.txClient.GetTx(context.Background(), &txtypes.GetTxRequest{}, grpc.Header(&header)) + _, err := c.txClient.GetTx(context.Background(), &txtypes.GetTxRequest{}, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -461,16 +465,18 @@ func (c *chainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRes c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) res, err := c.broadcastTx(c.ctx, c.txFactory, true, msgs...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, true, msgs...) } if err != nil { @@ -480,8 +486,6 @@ func (c *chainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRes } } - c.accSeq++ - return res, nil } @@ -525,15 +529,17 @@ func (c *chainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRe c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) res, err := c.broadcastTx(c.ctx, c.txFactory, false, msgs...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, false, msgs...) } if err != nil { @@ -543,8 +549,6 @@ func (c *chainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRe } } - c.accSeq++ - return res, nil } @@ -781,16 +785,18 @@ func (c *chainClient) runBatchBroadcast() { submitBatch := func(toSubmit []sdk.Msg) { c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("broadcastTx with nonce", c.accSeq) + log.Debugln("broadcastTx with nonce", sequence) res, err := c.broadcastTx(c.ctx, c.txFactory, true, toSubmit...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, true, toSubmit...) } if err != nil { @@ -807,8 +813,6 @@ func (c *chainClient) runBatchBroadcast() { log.WithField("txHash", res.TxResponse.TxHash).Debugln("msg batch broadcasted successfully at height", res.TxResponse.Height) } - c.accSeq++ - log.Debugln("nonce incremented to", c.accSeq) log.Debugln("gas wanted: ", c.gasWanted) } @@ -955,7 +959,7 @@ func (c *chainClient) DerivativeOrder(defaultSubaccountID eth.Hash, network comm margin := cosmtypes.MustNewDecFromStr(fmt.Sprint(d.Quantity)).Mul(d.Price).Quo(d.Leverage) - if d.IsReduceOnly == true { + if d.IsReduceOnly { margin = cosmtypes.MustNewDecFromStr("0") } @@ -1183,7 +1187,12 @@ func (c *chainClient) StreamEventOrderFail(sender string, failEventCh chan map[s panic(err) } } - defer cometbftClient.Stop() + defer func() { + err := cometbftClient.Stop() + if err != nil { + panic(err) + } + }() c.StreamEventOrderFailWithWebsocket(sender, cometbftClient, failEventCh) } @@ -1237,7 +1246,12 @@ func (c *chainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, m panic(err) } } - defer cometbftClient.Stop() + defer func() { + err := cometbftClient.Stop() + if err != nil { + panic(err) + } + }() c.StreamOrderbookUpdateEventsWithWebsocket(orderbookType, marketIds, cometbftClient, orderbookCh) diff --git a/client/chain/chain_test.go b/client/chain/chain_test.go index 0ec9bde8..ed55ed2a 100644 --- a/client/chain/chain_test.go +++ b/client/chain/chain_test.go @@ -1,14 +1,15 @@ package chain import ( + "os" + "testing" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/crypto/keyring" cosmtypes "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" - "os" - "testing" ) func accountForTests() (cosmtypes.AccAddress, keyring.Keyring, error) { diff --git a/client/common/embeded.go b/client/common/embeded.go index b22554cf..d1c7d7e6 100644 --- a/client/common/embeded.go +++ b/client/common/embeded.go @@ -1,4 +1,6 @@ package common -import _ "github.com/InjectiveLabs/sdk-go/client/cert" -import _ "github.com/InjectiveLabs/sdk-go/client/metadata/assets" +import ( + _ "github.com/InjectiveLabs/sdk-go/client/cert" + _ "github.com/InjectiveLabs/sdk-go/client/metadata/assets" +) diff --git a/client/common/network.go b/client/common/network.go index 7095823b..42ba48f9 100644 --- a/client/common/network.go +++ b/client/common/network.go @@ -4,7 +4,6 @@ import ( "context" "crypto/tls" "fmt" - "google.golang.org/grpc/metadata" "net" "net/http" "path" @@ -12,6 +11,8 @@ import ( "strings" "time" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/credentials" ) @@ -74,7 +75,7 @@ func (assistant *ExpiringCookieAssistant) checkCookieExpiration() { expirationTime, err := time.Parse(assistant.timeLayout, cookie.Value) if err == nil { - timestampDiff := expirationTime.Sub(time.Now()) + timestampDiff := time.Until(expirationTime) if timestampDiff < SessionRenewalOffset { assistant.cookie = "" } diff --git a/client/common/network_test.go b/client/common/network_test.go index cf63efcd..235c580e 100644 --- a/client/common/network_test.go +++ b/client/common/network_test.go @@ -2,9 +2,10 @@ package common import ( "fmt" - "google.golang.org/grpc/metadata" "testing" "time" + + "google.golang.org/grpc/metadata" ) func TestMainnetKubernetesLoadBalancedCookieAssistant(t *testing.T) { diff --git a/client/common/util.go b/client/common/util.go index 6f6af8ee..f7e0c9bc 100644 --- a/client/common/util.go +++ b/client/common/util.go @@ -5,7 +5,7 @@ import ( "crypto/x509" "encoding/hex" "fmt" - "io/ioutil" + "os" "strings" chaintypes "github.com/InjectiveLabs/sdk-go/chain/types" @@ -13,9 +13,7 @@ import ( ) func HexToBytes(str string) ([]byte, error) { - if strings.HasPrefix(str, "0x") { - str = str[2:] - } + str = strings.TrimPrefix(str, "0x") data, err := hex.DecodeString(str) if err != nil { @@ -31,7 +29,7 @@ func LoadTlsCert(path string, serverName string) credentials.TransportCredential } // build cert obj - rootCert, err := ioutil.ReadFile(path) + rootCert, err := os.ReadFile(path) if err != nil { fmt.Println(err, "cannot load tls cert from path") return nil diff --git a/client/exchange/exchange.go b/client/exchange/exchange.go index 59552049..e331d947 100644 --- a/client/exchange/exchange.go +++ b/client/exchange/exchange.go @@ -3,6 +3,10 @@ package exchange import ( "context" "fmt" + "time" + + "google.golang.org/grpc/credentials/insecure" + "github.com/InjectiveLabs/sdk-go/client/common" accountPB "github.com/InjectiveLabs/sdk-go/exchange/accounts_rpc/pb" auctionPB "github.com/InjectiveLabs/sdk-go/exchange/auction_rpc/pb" @@ -22,74 +26,74 @@ import ( type ExchangeClient interface { QueryClient() *grpc.ClientConn - GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error) - GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error) - GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error) + GetDerivativeMarket(ctx context.Context, marketId string) (*derivativeExchangePB.MarketResponse, error) + GetDerivativeOrderbookV2(ctx context.Context, marketId string) (*derivativeExchangePB.OrderbookV2Response, error) + GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.OrderbooksV2Response, error) // StreamDerivativeOrderbook deprecated API - StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) - StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error) + StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) + StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (*derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error) 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) - StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) - GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error) - GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error) - StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) - StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) - GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error) - GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error) - GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error) - StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) - GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error) - GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error) - GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error) - GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, 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) + StreamDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) + GetDerivativeTrades(ctx context.Context, req *derivativeExchangePB.TradesRequest) (*derivativeExchangePB.TradesResponse, error) + GetDerivativeTradesV2(ctx context.Context, req *derivativeExchangePB.TradesV2Request) (*derivativeExchangePB.TradesV2Response, error) + StreamDerivativeTrades(ctx context.Context, req *derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) + StreamDerivativeV2Trades(ctx context.Context, req *derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) + GetSubaccountDerivativeOrdersList(ctx context.Context, req *derivativeExchangePB.SubaccountOrdersListRequest) (*derivativeExchangePB.SubaccountOrdersListResponse, error) + GetSubaccountDerivativeTradesList(ctx context.Context, req *derivativeExchangePB.SubaccountTradesListRequest) (*derivativeExchangePB.SubaccountTradesListResponse, error) + GetHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersHistoryRequest) (*derivativeExchangePB.OrdersHistoryResponse, error) + StreamHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) + GetDerivativeFundingPayments(ctx context.Context, req *derivativeExchangePB.FundingPaymentsRequest) (*derivativeExchangePB.FundingPaymentsResponse, error) + GetDerivativeFundingRates(ctx context.Context, req *derivativeExchangePB.FundingRatesRequest) (*derivativeExchangePB.FundingRatesResponse, error) + GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (*oraclePB.PriceResponse, error) + GetOracleList(ctx context.Context) (*oraclePB.OracleListResponse, error) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error) - GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error) - GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error) + GetAuction(ctx context.Context, round int64) (*auctionPB.AuctionEndpointResponse, error) + GetAuctions(ctx context.Context) (*auctionPB.AuctionsResponse, error) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error) - GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error) - GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error) + GetSubaccountsList(ctx context.Context, accountAddress string) (*accountPB.SubaccountsListResponse, error) + GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (*accountPB.SubaccountBalanceEndpointResponse, error) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) - GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error) - GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error) - GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error) - GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error) - GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error) - GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error) - GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error) - GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error) - GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error) + GetSubaccountBalancesList(ctx context.Context, subaccountId string) (*accountPB.SubaccountBalancesListResponse, error) + GetSubaccountHistory(ctx context.Context, req *accountPB.SubaccountHistoryRequest) (*accountPB.SubaccountHistoryResponse, error) + GetSubaccountOrderSummary(ctx context.Context, req *accountPB.SubaccountOrderSummaryRequest) (*accountPB.SubaccountOrderSummaryResponse, error) + GetOrderStates(ctx context.Context, req *accountPB.OrderStatesRequest) (*accountPB.OrderStatesResponse, error) + GetPortfolio(ctx context.Context, accountAddress string) (*accountPB.PortfolioResponse, error) + GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error) + GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error) + GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error) + GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) // StreamSpotOrderbook deprecated API StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) - GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error) - GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error) + GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error) + GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error) - StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) - GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error) - GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error) - StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) - StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) - GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error) - GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error) - GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error) - StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) - 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) + StreamSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) + GetSpotTrades(ctx context.Context, req *spotExchangePB.TradesRequest) (*spotExchangePB.TradesResponse, error) + GetSpotTradesV2(ctx context.Context, req *spotExchangePB.TradesV2Request) (*spotExchangePB.TradesV2Response, error) + StreamSpotTrades(ctx context.Context, req *spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) + StreamSpotTradesV2(ctx context.Context, req *spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) + GetSubaccountSpotOrdersList(ctx context.Context, req *spotExchangePB.SubaccountOrdersListRequest) (*spotExchangePB.SubaccountOrdersListResponse, error) + GetSubaccountSpotTradesList(ctx context.Context, req *spotExchangePB.SubaccountTradesListRequest) (*spotExchangePB.SubaccountTradesListResponse, error) + GetHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.OrdersHistoryRequest) (*spotExchangePB.OrdersHistoryResponse, error) + StreamHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) + 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) - StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) - GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) - GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error) - Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error) + StreamKeepalive(ctx context.Context) (*metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) + GetInfo(ctx context.Context, req *metaPB.InfoRequest) (*metaPB.InfoResponse, error) + GetVersion(ctx context.Context, req *metaPB.VersionRequest) (*metaPB.VersionResponse, error) + Ping(ctx context.Context, req *metaPB.PingRequest) (*metaPB.PingResponse, error) Close() } @@ -113,7 +117,7 @@ func NewExchangeClient(network common.Network, options ...common.ClientOption) ( conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExchangeGrpcEndpoint) @@ -150,9 +154,6 @@ type exchangeClient struct { network common.Network conn *grpc.ClientConn logger log.Logger - client *grpc.ClientConn - - sessionCookie string metaClient metaPB.InjectiveMetaRPCClient explorerClient explorerPB.InjectiveExplorerRPCClient @@ -163,14 +164,15 @@ type exchangeClient struct { spotExchangeClient spotExchangePB.InjectiveSpotExchangeRPCClient derivativeExchangeClient derivativeExchangePB.InjectiveDerivativeExchangeRPCClient portfolioExchangeClient portfolioExchangePB.InjectivePortfolioRPCClient - - closed int64 } func (c *exchangeClient) requestCookie() metadata.MD { var header metadata.MD - req := metaPB.InfoRequest{} - c.metaClient.Info(context.Background(), &req, grpc.Header(&header)) + req := metaPB.InfoRequest{Timestamp: time.Now().UnixMilli()} + _, err := c.metaClient.Info(context.Background(), &req, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -186,52 +188,52 @@ func (c *exchangeClient) QueryClient() *grpc.ClientConn { // Derivatives RPC -func (c *exchangeClient) GetDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersRequest) (derivativeExchangePB.OrdersResponse, error) { +func (c *exchangeClient) GetDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersRequest) (*derivativeExchangePB.OrdersResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Orders(ctx, &req) + res, err := c.derivativeExchangeClient.Orders(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrdersResponse{}, err + return &derivativeExchangePB.OrdersResponse{}, err } - return *res, nil + return res, nil } // Deprecated: Use GetDerivativePositionsV2 instead. -func (c *exchangeClient) GetDerivativePositions(ctx context.Context, req derivativeExchangePB.PositionsRequest) (derivativeExchangePB.PositionsResponse, error) { +func (c *exchangeClient) GetDerivativePositions(ctx context.Context, req *derivativeExchangePB.PositionsRequest) (*derivativeExchangePB.PositionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Positions(ctx, &req) + res, err := c.derivativeExchangeClient.Positions(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.PositionsResponse{}, err + return &derivativeExchangePB.PositionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativePositionsV2(ctx context.Context, req derivativeExchangePB.PositionsV2Request) (derivativeExchangePB.PositionsV2Response, error) { +func (c *exchangeClient) GetDerivativePositionsV2(ctx context.Context, req *derivativeExchangePB.PositionsV2Request) (*derivativeExchangePB.PositionsV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.PositionsV2(ctx, &req) + res, err := c.derivativeExchangeClient.PositionsV2(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.PositionsV2Response{}, err + return &derivativeExchangePB.PositionsV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req derivativeExchangePB.LiquidablePositionsRequest) (derivativeExchangePB.LiquidablePositionsResponse, error) { +func (c *exchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req *derivativeExchangePB.LiquidablePositionsRequest) (*derivativeExchangePB.LiquidablePositionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.LiquidablePositions(ctx, &req) + res, err := c.derivativeExchangeClient.LiquidablePositions(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.LiquidablePositionsResponse{}, err + return &derivativeExchangePB.LiquidablePositionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error) { +func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (*derivativeExchangePB.OrderbookV2Response, error) { req := derivativeExchangePB.OrderbookV2Request{ MarketId: marketId, } @@ -240,13 +242,13 @@ func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId res, err := c.derivativeExchangeClient.OrderbookV2(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrderbookV2Response{}, err + return &derivativeExchangePB.OrderbookV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error) { +func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.OrderbooksV2Response, error) { req := derivativeExchangePB.OrderbooksV2Request{ MarketIds: marketIds, } @@ -255,13 +257,13 @@ func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketId res, err := c.derivativeExchangeClient.OrderbooksV2(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrderbooksV2Response{}, err + return &derivativeExchangePB.OrderbooksV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) { +func (c *exchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) { req := derivativeExchangePB.StreamOrderbookV2Request{ MarketIds: marketIds, } @@ -273,10 +275,10 @@ func (c *exchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, market return nil, err } - return stream, nil + return &stream, nil } -func (c *exchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error) { +func (c *exchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (*derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error) { req := derivativeExchangePB.StreamOrderbookUpdateRequest{ MarketIds: marketIds, } @@ -288,21 +290,21 @@ func (c *exchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, ma return nil, err } - return stream, nil + return &stream, nil } -func (c *exchangeClient) GetDerivativeMarkets(ctx context.Context, req derivativeExchangePB.MarketsRequest) (derivativeExchangePB.MarketsResponse, error) { +func (c *exchangeClient) GetDerivativeMarkets(ctx context.Context, req *derivativeExchangePB.MarketsRequest) (*derivativeExchangePB.MarketsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Markets(ctx, &req) + res, err := c.derivativeExchangeClient.Markets(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.MarketsResponse{}, err + return &derivativeExchangePB.MarketsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error) { +func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (*derivativeExchangePB.MarketResponse, error) { req := derivativeExchangePB.MarketRequest{ MarketId: marketId, } @@ -311,10 +313,10 @@ func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId strin res, err := c.derivativeExchangeClient.Market(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.MarketResponse{}, err + return &derivativeExchangePB.MarketResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamMarketClient, error) { @@ -332,9 +334,9 @@ func (c *exchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds [ return stream, nil } -func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { +func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req *derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamPositions(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamPositions(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -343,9 +345,9 @@ func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req deri return stream, nil } -func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { +func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamOrders(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamOrders(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -354,31 +356,31 @@ func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req derivat return stream, nil } -func (c *exchangeClient) GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error) { +func (c *exchangeClient) GetDerivativeTrades(ctx context.Context, req *derivativeExchangePB.TradesRequest) (*derivativeExchangePB.TradesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Trades(ctx, &req) + res, err := c.derivativeExchangeClient.Trades(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.TradesResponse{}, err + return &derivativeExchangePB.TradesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error) { +func (c *exchangeClient) GetDerivativeTradesV2(ctx context.Context, req *derivativeExchangePB.TradesV2Request) (*derivativeExchangePB.TradesV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.TradesV2(ctx, &req) + res, err := c.derivativeExchangeClient.TradesV2(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.TradesV2Response{}, err + return &derivativeExchangePB.TradesV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { +func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req *derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamTrades(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamTrades(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -387,9 +389,9 @@ func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req derivat return stream, nil } -func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { +func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req *derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamTradesV2(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamTradesV2(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -398,41 +400,41 @@ func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req deriv return stream, nil } -func (c *exchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error) { +func (c *exchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req *derivativeExchangePB.SubaccountOrdersListRequest) (*derivativeExchangePB.SubaccountOrdersListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.SubaccountOrdersList(ctx, &req) + res, err := c.derivativeExchangeClient.SubaccountOrdersList(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.SubaccountOrdersListResponse{}, err + return &derivativeExchangePB.SubaccountOrdersListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error) { +func (c *exchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req *derivativeExchangePB.SubaccountTradesListRequest) (*derivativeExchangePB.SubaccountTradesListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.SubaccountTradesList(ctx, &req) + res, err := c.derivativeExchangeClient.SubaccountTradesList(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.SubaccountTradesListResponse{}, err + return &derivativeExchangePB.SubaccountTradesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error) { +func (c *exchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersHistoryRequest) (*derivativeExchangePB.OrdersHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.OrdersHistory(ctx, &req) + res, err := c.derivativeExchangeClient.OrdersHistory(ctx, req) if err != nil { - return derivativeExchangePB.OrdersHistoryResponse{}, err + return &derivativeExchangePB.OrdersHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { +func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamOrdersHistory(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamOrdersHistory(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -441,31 +443,31 @@ func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, r return stream, nil } -func (c *exchangeClient) GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error) { +func (c *exchangeClient) GetDerivativeFundingPayments(ctx context.Context, req *derivativeExchangePB.FundingPaymentsRequest) (*derivativeExchangePB.FundingPaymentsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.FundingPayments(ctx, &req) + res, err := c.derivativeExchangeClient.FundingPayments(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.FundingPaymentsResponse{}, err + return &derivativeExchangePB.FundingPaymentsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error) { +func (c *exchangeClient) GetDerivativeFundingRates(ctx context.Context, req *derivativeExchangePB.FundingRatesRequest) (*derivativeExchangePB.FundingRatesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.FundingRates(ctx, &req) + res, err := c.derivativeExchangeClient.FundingRates(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.FundingRatesResponse{}, err + return &derivativeExchangePB.FundingRatesResponse{}, err } - return *res, nil + return res, nil } // Oracle RPC -func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error) { +func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (*oraclePB.PriceResponse, error) { req := oraclePB.PriceRequest{ BaseSymbol: baseSymbol, QuoteSymbol: quoteSymbol, @@ -477,23 +479,23 @@ func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteS res, err := c.oracleClient.Price(ctx, &req) if err != nil { fmt.Println(err) - return oraclePB.PriceResponse{}, err + return &oraclePB.PriceResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, error) { +func (c *exchangeClient) GetOracleList(ctx context.Context) (*oraclePB.OracleListResponse, error) { req := oraclePB.OracleListRequest{} ctx = c.getCookie(ctx) res, err := c.oracleClient.OracleList(ctx, &req) if err != nil { fmt.Println(err) - return oraclePB.OracleListResponse{}, err + return &oraclePB.OracleListResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error) { @@ -515,7 +517,7 @@ func (c *exchangeClient) StreamPrices(ctx context.Context, baseSymbol string, qu // Auction RPC -func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error) { +func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (*auctionPB.AuctionEndpointResponse, error) { req := auctionPB.AuctionEndpointRequest{ Round: round, } @@ -524,23 +526,23 @@ func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB res, err := c.auctionClient.AuctionEndpoint(ctx, &req) if err != nil { fmt.Println(err) - return auctionPB.AuctionEndpointResponse{}, err + return &auctionPB.AuctionEndpointResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error) { +func (c *exchangeClient) GetAuctions(ctx context.Context) (*auctionPB.AuctionsResponse, error) { req := auctionPB.AuctionsRequest{} ctx = c.getCookie(ctx) res, err := c.auctionClient.Auctions(ctx, &req) if err != nil { fmt.Println(err) - return auctionPB.AuctionsResponse{}, err + return &auctionPB.AuctionsResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error) { @@ -558,7 +560,7 @@ func (c *exchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuc // Accounts RPC -func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error) { +func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (*accountPB.SubaccountsListResponse, error) { req := accountPB.SubaccountsListRequest{ AccountAddress: accountAddress, } @@ -567,13 +569,13 @@ func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress res, err := c.accountClient.SubaccountsList(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountsListResponse{}, err + return &accountPB.SubaccountsListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error) { +func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (*accountPB.SubaccountBalanceEndpointResponse, error) { req := accountPB.SubaccountBalanceEndpointRequest{ SubaccountId: subaccountId, Denom: denom, @@ -583,10 +585,10 @@ func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId res, err := c.accountClient.SubaccountBalanceEndpoint(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountBalanceEndpointResponse{}, err + return &accountPB.SubaccountBalanceEndpointResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) { @@ -604,7 +606,7 @@ func (c *exchangeClient) StreamSubaccountBalance(ctx context.Context, subaccount return stream, nil } -func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error) { +func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (*accountPB.SubaccountBalancesListResponse, error) { req := accountPB.SubaccountBalancesListRequest{ SubaccountId: subaccountId, } @@ -613,46 +615,46 @@ func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccou res, err := c.accountClient.SubaccountBalancesList(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountBalancesListResponse{}, err + return &accountPB.SubaccountBalancesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error) { +func (c *exchangeClient) GetSubaccountHistory(ctx context.Context, req *accountPB.SubaccountHistoryRequest) (*accountPB.SubaccountHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.SubaccountHistory(ctx, &req) + res, err := c.accountClient.SubaccountHistory(ctx, req) if err != nil { fmt.Println(err) - return accountPB.SubaccountHistoryResponse{}, err + return &accountPB.SubaccountHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error) { +func (c *exchangeClient) GetSubaccountOrderSummary(ctx context.Context, req *accountPB.SubaccountOrderSummaryRequest) (*accountPB.SubaccountOrderSummaryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.SubaccountOrderSummary(ctx, &req) + res, err := c.accountClient.SubaccountOrderSummary(ctx, req) if err != nil { fmt.Println(err) - return accountPB.SubaccountOrderSummaryResponse{}, err + return &accountPB.SubaccountOrderSummaryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error) { +func (c *exchangeClient) GetOrderStates(ctx context.Context, req *accountPB.OrderStatesRequest) (*accountPB.OrderStatesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.OrderStates(ctx, &req) + res, err := c.accountClient.OrderStates(ctx, req) if err != nil { fmt.Println(err) - return accountPB.OrderStatesResponse{}, err + return &accountPB.OrderStatesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error) { +func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (*accountPB.PortfolioResponse, error) { req := accountPB.PortfolioRequest{ AccountAddress: accountAddress, } @@ -661,37 +663,37 @@ func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string res, err := c.accountClient.Portfolio(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.PortfolioResponse{}, err + return &accountPB.PortfolioResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error) { +func (c *exchangeClient) GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.Rewards(ctx, &req) + res, err := c.accountClient.Rewards(ctx, req) if err != nil { fmt.Println(err) - return accountPB.RewardsResponse{}, err + return &accountPB.RewardsResponse{}, err } - return *res, nil + return res, nil } // Spot RPC -func (c *exchangeClient) GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error) { +func (c *exchangeClient) GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Orders(ctx, &req) + res, err := c.spotExchangeClient.Orders(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.OrdersResponse{}, err + return &spotExchangePB.OrdersResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error) { +func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error) { req := spotExchangePB.OrderbookV2Request{ MarketId: marketId, } @@ -700,13 +702,13 @@ func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string res, err := c.spotExchangeClient.OrderbookV2(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.OrderbookV2Response{}, err + return &spotExchangePB.OrderbookV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error) { +func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) { req := spotExchangePB.OrderbooksV2Request{ MarketIds: marketIds, } @@ -715,10 +717,10 @@ func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []st res, err := c.spotExchangeClient.OrderbooksV2(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.OrderbooksV2Response{}, err + return &spotExchangePB.OrderbooksV2Response{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) { @@ -751,18 +753,18 @@ func (c *exchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds [] return stream, nil } -func (c *exchangeClient) GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error) { +func (c *exchangeClient) GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Markets(ctx, &req) + res, err := c.spotExchangeClient.Markets(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.MarketsResponse{}, err + return &spotExchangePB.MarketsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error) { +func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error) { req := spotExchangePB.MarketRequest{ MarketId: marketId, } @@ -771,10 +773,10 @@ func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (sp res, err := c.spotExchangeClient.Market(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.MarketResponse{}, err + return &spotExchangePB.MarketResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error) { @@ -792,9 +794,9 @@ func (c *exchangeClient) StreamSpotMarket(ctx context.Context, marketIds []strin return stream, nil } -func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { +func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamOrders(ctx, &req) + stream, err := c.spotExchangeClient.StreamOrders(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -803,31 +805,31 @@ func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangeP return stream, nil } -func (c *exchangeClient) GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error) { +func (c *exchangeClient) GetSpotTrades(ctx context.Context, req *spotExchangePB.TradesRequest) (*spotExchangePB.TradesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Trades(ctx, &req) + res, err := c.spotExchangeClient.Trades(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.TradesResponse{}, err + return &spotExchangePB.TradesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error) { +func (c *exchangeClient) GetSpotTradesV2(ctx context.Context, req *spotExchangePB.TradesV2Request) (*spotExchangePB.TradesV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.TradesV2(ctx, &req) + res, err := c.spotExchangeClient.TradesV2(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.TradesV2Response{}, err + return &spotExchangePB.TradesV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { +func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req *spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamTrades(ctx, &req) + stream, err := c.spotExchangeClient.StreamTrades(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -836,9 +838,9 @@ func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangeP return stream, nil } -func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { +func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req *spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamTradesV2(ctx, &req) + stream, err := c.spotExchangeClient.StreamTradesV2(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -847,41 +849,41 @@ func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchang return stream, nil } -func (c *exchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error) { +func (c *exchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req *spotExchangePB.SubaccountOrdersListRequest) (*spotExchangePB.SubaccountOrdersListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.SubaccountOrdersList(ctx, &req) + res, err := c.spotExchangeClient.SubaccountOrdersList(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.SubaccountOrdersListResponse{}, err + return &spotExchangePB.SubaccountOrdersListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error) { +func (c *exchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req *spotExchangePB.SubaccountTradesListRequest) (*spotExchangePB.SubaccountTradesListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.SubaccountTradesList(ctx, &req) + res, err := c.spotExchangeClient.SubaccountTradesList(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.SubaccountTradesListResponse{}, err + return &spotExchangePB.SubaccountTradesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error) { +func (c *exchangeClient) GetHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.OrdersHistoryRequest) (*spotExchangePB.OrdersHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.OrdersHistory(ctx, &req) + res, err := c.spotExchangeClient.OrdersHistory(ctx, req) if err != nil { - return spotExchangePB.OrdersHistoryResponse{}, err + return &spotExchangePB.OrdersHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { +func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamOrdersHistory(ctx, &req) + stream, err := c.spotExchangeClient.StreamOrdersHistory(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -890,62 +892,62 @@ func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spo return stream, nil } -func (c *exchangeClient) GetInsuranceFunds(ctx context.Context, req insurancePB.FundsRequest) (insurancePB.FundsResponse, error) { +func (c *exchangeClient) GetInsuranceFunds(ctx context.Context, req *insurancePB.FundsRequest) (*insurancePB.FundsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.insuranceClient.Funds(ctx, &req) + res, err := c.insuranceClient.Funds(ctx, req) if err != nil { fmt.Println(err) - return insurancePB.FundsResponse{}, err + return &insurancePB.FundsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error) { +func (c *exchangeClient) GetRedemptions(ctx context.Context, req *insurancePB.RedemptionsRequest) (*insurancePB.RedemptionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.insuranceClient.Redemptions(ctx, &req) + res, err := c.insuranceClient.Redemptions(ctx, req) if err != nil { fmt.Println(err) - return insurancePB.RedemptionsResponse{}, err + return &insurancePB.RedemptionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error) { +func (c *exchangeClient) Ping(ctx context.Context, req *metaPB.PingRequest) (*metaPB.PingResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Ping(ctx, &req) + res, err := c.metaClient.Ping(ctx, req) if err != nil { fmt.Println(err) - return metaPB.PingResponse{}, err + return &metaPB.PingResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error) { +func (c *exchangeClient) GetVersion(ctx context.Context, req *metaPB.VersionRequest) (*metaPB.VersionResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Version(ctx, &req) + res, err := c.metaClient.Version(ctx, req) if err != nil { fmt.Println(err) - return metaPB.VersionResponse{}, err + return &metaPB.VersionResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) { +func (c *exchangeClient) GetInfo(ctx context.Context, req *metaPB.InfoRequest) (*metaPB.InfoResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Info(ctx, &req) + res, err := c.metaClient.Info(ctx, req) if err != nil { fmt.Println(err) - return metaPB.InfoResponse{}, err + return &metaPB.InfoResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) { +func (c *exchangeClient) StreamKeepalive(ctx context.Context) (*metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) { req := metaPB.StreamKeepaliveRequest{} ctx = c.getCookie(ctx) @@ -955,34 +957,34 @@ func (c *exchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveM return nil, err } - return stream, nil + return &stream, nil } // Deprecated: Use GetAccountPortfolioBalances instead. -func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error) { +func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioResponse, error) { ctx = c.getCookie(ctx) res, err := c.portfolioExchangeClient.AccountPortfolio(ctx, &portfolioExchangePB.AccountPortfolioRequest{ AccountAddress: accountAddress, }) if err != nil { fmt.Println(err) - return portfolioExchangePB.AccountPortfolioResponse{}, err + return &portfolioExchangePB.AccountPortfolioResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioBalancesResponse, error) { +func (c *exchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioBalancesResponse, error) { ctx = c.getCookie(ctx) res, err := c.portfolioExchangeClient.AccountPortfolioBalances(ctx, &portfolioExchangePB.AccountPortfolioBalancesRequest{ AccountAddress: accountAddress, }) if err != nil { fmt.Println(err) - return portfolioExchangePB.AccountPortfolioBalancesResponse{}, err + return &portfolioExchangePB.AccountPortfolioBalancesResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) { diff --git a/client/explorer/explorer.go b/client/explorer/explorer.go index e5fcef53..00c76fc6 100644 --- a/client/explorer/explorer.go +++ b/client/explorer/explorer.go @@ -3,6 +3,9 @@ package exchange import ( "context" "fmt" + + "google.golang.org/grpc/credentials/insecure" + "github.com/InjectiveLabs/sdk-go/client/common" explorerPB "github.com/InjectiveLabs/sdk-go/exchange/explorer_rpc/pb" "google.golang.org/grpc/metadata" @@ -14,21 +17,21 @@ import ( type ExplorerClient interface { QueryClient() *grpc.ClientConn - GetTxByTxHash(ctx context.Context, hash string) (explorerPB.GetTxByTxHashResponse, error) - GetTxs(ctx context.Context, req explorerPB.GetTxsRequest) (explorerPB.GetTxsResponse, error) - GetBlock(ctx context.Context, blockHeight string) (explorerPB.GetBlockResponse, error) - GetBlocks(ctx context.Context) (explorerPB.GetBlocksResponse, error) - GetAccountTxs(ctx context.Context, req explorerPB.GetAccountTxsRequest) (explorerPB.GetAccountTxsResponse, error) - GetPeggyDeposits(ctx context.Context, req explorerPB.GetPeggyDepositTxsRequest) (explorerPB.GetPeggyDepositTxsResponse, error) - GetPeggyWithdrawals(ctx context.Context, req explorerPB.GetPeggyWithdrawalTxsRequest) (explorerPB.GetPeggyWithdrawalTxsResponse, error) - GetIBCTransfers(ctx context.Context, req explorerPB.GetIBCTransferTxsRequest) (explorerPB.GetIBCTransferTxsResponse, error) + GetTxByTxHash(ctx context.Context, hash string) (*explorerPB.GetTxByTxHashResponse, error) + GetTxs(ctx context.Context, req *explorerPB.GetTxsRequest) (*explorerPB.GetTxsResponse, error) + GetBlock(ctx context.Context, blockHeight string) (*explorerPB.GetBlockResponse, error) + GetBlocks(ctx context.Context) (*explorerPB.GetBlocksResponse, error) + GetAccountTxs(ctx context.Context, req *explorerPB.GetAccountTxsRequest) (*explorerPB.GetAccountTxsResponse, error) + GetPeggyDeposits(ctx context.Context, req *explorerPB.GetPeggyDepositTxsRequest) (*explorerPB.GetPeggyDepositTxsResponse, error) + GetPeggyWithdrawals(ctx context.Context, req *explorerPB.GetPeggyWithdrawalTxsRequest) (*explorerPB.GetPeggyWithdrawalTxsResponse, error) + GetIBCTransfers(ctx context.Context, req *explorerPB.GetIBCTransferTxsRequest) (*explorerPB.GetIBCTransferTxsResponse, error) StreamTxs(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamTxsClient, error) StreamBlocks(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamBlocksClient, error) - GetWasmCodes(ctx context.Context, req explorerPB.GetWasmCodesRequest) (explorerPB.GetWasmCodesResponse, error) - GetWasmCodeByID(ctx context.Context, req explorerPB.GetWasmCodeByIDRequest) (explorerPB.GetWasmCodeByIDResponse, error) - GetWasmContracts(ctx context.Context, req explorerPB.GetWasmContractsRequest) (explorerPB.GetWasmContractsResponse, error) - GetWasmContractByAddress(ctx context.Context, req explorerPB.GetWasmContractByAddressRequest) (explorerPB.GetWasmContractByAddressResponse, error) - GetCW20Balance(ctx context.Context, req explorerPB.GetCw20BalanceRequest) (explorerPB.GetCw20BalanceResponse, error) + GetWasmCodes(ctx context.Context, req *explorerPB.GetWasmCodesRequest) (*explorerPB.GetWasmCodesResponse, error) + GetWasmCodeByID(ctx context.Context, req *explorerPB.GetWasmCodeByIDRequest) (*explorerPB.GetWasmCodeByIDResponse, error) + GetWasmContracts(ctx context.Context, req *explorerPB.GetWasmContractsRequest) (*explorerPB.GetWasmContractsResponse, error) + GetWasmContractByAddress(ctx context.Context, req *explorerPB.GetWasmContractByAddressRequest) (*explorerPB.GetWasmContractByAddressResponse, error) + GetCW20Balance(ctx context.Context, req *explorerPB.GetCw20BalanceRequest) (*explorerPB.GetCw20BalanceResponse, error) Close() } @@ -51,7 +54,7 @@ func NewExplorerClient(network common.Network, options ...common.ClientOption) ( if opts.TLSCert != nil { conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExplorerGrpcEndpoint) @@ -80,14 +83,16 @@ type explorerClient struct { conn *grpc.ClientConn logger log.Logger - sessionCookie string explorerClient explorerPB.InjectiveExplorerRPCClient } func (c *explorerClient) requestCookie() metadata.MD { var header metadata.MD req := explorerPB.GetTxsRequest{} - c.explorerClient.GetTxs(context.Background(), &req, grpc.Header(&header)) + _, err := c.explorerClient.GetTxs(context.Background(), &req, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -97,18 +102,11 @@ func (c *explorerClient) getCookie(ctx context.Context) context.Context { return metadata.AppendToOutgoingContext(ctx, "cookie", cookie) } -func (c *explorerClient) setCookie(metadata metadata.MD) { - md := metadata.Get("set-cookie") - if len(md) > 0 { - c.sessionCookie = md[0] - } -} - func (c *explorerClient) QueryClient() *grpc.ClientConn { return c.conn } -func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (explorerPB.GetTxByTxHashResponse, error) { +func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (*explorerPB.GetTxByTxHashResponse, error) { req := explorerPB.GetTxByTxHashRequest{ Hash: hash, } @@ -117,37 +115,37 @@ func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (explor res, err := c.explorerClient.GetTxByTxHash(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetTxByTxHashResponse{}, err + return &explorerPB.GetTxByTxHashResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetAccountTxs(ctx context.Context, req explorerPB.GetAccountTxsRequest) (explorerPB.GetAccountTxsResponse, error) { +func (c *explorerClient) GetAccountTxs(ctx context.Context, req *explorerPB.GetAccountTxsRequest) (*explorerPB.GetAccountTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetAccountTxs(ctx, &req) + res, err := c.explorerClient.GetAccountTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetAccountTxsResponse{}, err + return &explorerPB.GetAccountTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetBlocks(ctx context.Context) (explorerPB.GetBlocksResponse, error) { +func (c *explorerClient) GetBlocks(ctx context.Context) (*explorerPB.GetBlocksResponse, error) { req := explorerPB.GetBlocksRequest{} ctx = c.getCookie(ctx) res, err := c.explorerClient.GetBlocks(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetBlocksResponse{}, err + return &explorerPB.GetBlocksResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (explorerPB.GetBlockResponse, error) { +func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (*explorerPB.GetBlockResponse, error) { req := explorerPB.GetBlockRequest{ Id: blockHeight, } @@ -156,54 +154,54 @@ func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (expl res, err := c.explorerClient.GetBlock(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetBlockResponse{}, err + return &explorerPB.GetBlockResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetTxs(ctx context.Context, req explorerPB.GetTxsRequest) (explorerPB.GetTxsResponse, error) { +func (c *explorerClient) GetTxs(ctx context.Context, req *explorerPB.GetTxsRequest) (*explorerPB.GetTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetTxs(ctx, &req) + res, err := c.explorerClient.GetTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetTxsResponse{}, err + return &explorerPB.GetTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetPeggyDeposits(ctx context.Context, req explorerPB.GetPeggyDepositTxsRequest) (explorerPB.GetPeggyDepositTxsResponse, error) { +func (c *explorerClient) GetPeggyDeposits(ctx context.Context, req *explorerPB.GetPeggyDepositTxsRequest) (*explorerPB.GetPeggyDepositTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetPeggyDepositTxs(ctx, &req) + res, err := c.explorerClient.GetPeggyDepositTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetPeggyDepositTxsResponse{}, err + return &explorerPB.GetPeggyDepositTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetPeggyWithdrawals(ctx context.Context, req explorerPB.GetPeggyWithdrawalTxsRequest) (explorerPB.GetPeggyWithdrawalTxsResponse, error) { +func (c *explorerClient) GetPeggyWithdrawals(ctx context.Context, req *explorerPB.GetPeggyWithdrawalTxsRequest) (*explorerPB.GetPeggyWithdrawalTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetPeggyWithdrawalTxs(ctx, &req) + res, err := c.explorerClient.GetPeggyWithdrawalTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetPeggyWithdrawalTxsResponse{}, err + return &explorerPB.GetPeggyWithdrawalTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetIBCTransfers(ctx context.Context, req explorerPB.GetIBCTransferTxsRequest) (explorerPB.GetIBCTransferTxsResponse, error) { +func (c *explorerClient) GetIBCTransfers(ctx context.Context, req *explorerPB.GetIBCTransferTxsRequest) (*explorerPB.GetIBCTransferTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetIBCTransferTxs(ctx, &req) + res, err := c.explorerClient.GetIBCTransferTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetIBCTransferTxsResponse{}, err + return &explorerPB.GetIBCTransferTxsResponse{}, err } - return *res, nil + return res, nil } func (c *explorerClient) StreamTxs(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamTxsClient, error) { @@ -232,59 +230,59 @@ func (c *explorerClient) StreamBlocks(ctx context.Context) (explorerPB.Injective return stream, nil } -func (c *explorerClient) GetWasmCodes(ctx context.Context, req explorerPB.GetWasmCodesRequest) (explorerPB.GetWasmCodesResponse, error) { +func (c *explorerClient) GetWasmCodes(ctx context.Context, req *explorerPB.GetWasmCodesRequest) (*explorerPB.GetWasmCodesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmCodes(ctx, &req) + res, err := c.explorerClient.GetWasmCodes(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmCodesResponse{}, err + return &explorerPB.GetWasmCodesResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmCodeByID(ctx context.Context, req explorerPB.GetWasmCodeByIDRequest) (explorerPB.GetWasmCodeByIDResponse, error) { +func (c *explorerClient) GetWasmCodeByID(ctx context.Context, req *explorerPB.GetWasmCodeByIDRequest) (*explorerPB.GetWasmCodeByIDResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmCodeByID(ctx, &req) + res, err := c.explorerClient.GetWasmCodeByID(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmCodeByIDResponse{}, err + return &explorerPB.GetWasmCodeByIDResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmContracts(ctx context.Context, req explorerPB.GetWasmContractsRequest) (explorerPB.GetWasmContractsResponse, error) { +func (c *explorerClient) GetWasmContracts(ctx context.Context, req *explorerPB.GetWasmContractsRequest) (*explorerPB.GetWasmContractsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmContracts(ctx, &req) + res, err := c.explorerClient.GetWasmContracts(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmContractsResponse{}, err + return &explorerPB.GetWasmContractsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmContractByAddress(ctx context.Context, req explorerPB.GetWasmContractByAddressRequest) (explorerPB.GetWasmContractByAddressResponse, error) { +func (c *explorerClient) GetWasmContractByAddress(ctx context.Context, req *explorerPB.GetWasmContractByAddressRequest) (*explorerPB.GetWasmContractByAddressResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmContractByAddress(ctx, &req) + res, err := c.explorerClient.GetWasmContractByAddress(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmContractByAddressResponse{}, err + return &explorerPB.GetWasmContractByAddressResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetCW20Balance(ctx context.Context, req explorerPB.GetCw20BalanceRequest) (explorerPB.GetCw20BalanceResponse, error) { +func (c *explorerClient) GetCW20Balance(ctx context.Context, req *explorerPB.GetCw20BalanceRequest) (*explorerPB.GetCw20BalanceResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetCw20Balance(ctx, &req) + res, err := c.explorerClient.GetCw20Balance(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetCw20BalanceResponse{}, err + return &explorerPB.GetCw20BalanceResponse{}, err } - return *res, nil + return res, nil } func (c *explorerClient) Close() { diff --git a/client/metadata/assets/devnet-1.ini b/client/metadata/assets/devnet-1.ini index ea7462f8..5d4c12cb 100644 --- a/client/metadata/assets/devnet-1.ini +++ b/client/metadata/assets/devnet-1.ini @@ -255,4 +255,3 @@ decimals = 18 [USDC] peggy_denom = peggy0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals = 6 - diff --git a/client/metadata/fetch_metadata.go b/client/metadata/fetch_metadata.go index 4e9d02bb..cb4f08b0 100644 --- a/client/metadata/fetch_metadata.go +++ b/client/metadata/fetch_metadata.go @@ -3,25 +3,18 @@ package main import ( "context" "fmt" + "os" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" - "os" //derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" - spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" "math" "strconv" -) -func find(slice []string, val string) bool { - for _, item := range slice { - if item == val { - return true - } - } - return false -} + spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" +) var metadataTemplate = `[%s] description = '%s %s %s' @@ -50,7 +43,7 @@ func FetchDenom(network common.Network) { // fetch spot markets spotMarketsReq := spotExchangePB.MarketsRequest{MarketStatus: "active"} ctx := context.Background() - spotRes, err := exchangeClient.GetSpotMarkets(ctx, spotMarketsReq) + spotRes, err := exchangeClient.GetSpotMarkets(ctx, &spotMarketsReq) if err != nil { panic(err) } @@ -90,7 +83,7 @@ func FetchDenom(network common.Network) { //fetch derivative markets derivativeMarketsReq := derivativeExchangePB.MarketsRequest{MarketStatus: "active"} - derivativeRes, err := exchangeClient.GetDerivativeMarkets(ctx, derivativeMarketsReq) + derivativeRes, err := exchangeClient.GetDerivativeMarkets(ctx, &derivativeMarketsReq) if err != nil { panic(err) } diff --git a/ethereum/util/amounts.go b/ethereum/util/amounts.go index b195b404..1435beaa 100644 --- a/ethereum/util/amounts.go +++ b/ethereum/util/amounts.go @@ -27,11 +27,11 @@ func (w *Wei) Scan(v interface{}) error { return nil } var source string - switch v.(type) { + switch value := v.(type) { case string: - source = v.(string) + source = value case []byte: - source = string(v.([]byte)) + source = string(value) default: return fmt.Errorf("incompatible type for decimal.Decimal: %T", v) } diff --git a/examples/chain/0_LocalOrderHash/example.go b/examples/chain/0_LocalOrderHash/example.go index aee0e24d..3d875458 100644 --- a/examples/chain/0_LocalOrderHash/example.go +++ b/examples/chain/0_LocalOrderHash/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go b/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go index 0f422a64..f5c395c6 100644 --- a/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go +++ b/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" diff --git a/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go b/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go index 21782db9..0b6d7882 100644 --- a/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go +++ b/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go b/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go index 6275ec78..bdab45c9 100644 --- a/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go +++ b/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/13_MsgIncreasePositionMargin/example.go b/examples/chain/13_MsgIncreasePositionMargin/example.go index 9f7be080..3fa058aa 100644 --- a/examples/chain/13_MsgIncreasePositionMargin/example.go +++ b/examples/chain/13_MsgIncreasePositionMargin/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" diff --git a/examples/chain/17_MsgBatchUpdateOrders/example.go b/examples/chain/17_MsgBatchUpdateOrders/example.go index b2b73123..92dd3c8b 100644 --- a/examples/chain/17_MsgBatchUpdateOrders/example.go +++ b/examples/chain/17_MsgBatchUpdateOrders/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/19_MsgGrant/example.go b/examples/chain/19_MsgGrant/example.go index b5c3f96f..618f8a85 100644 --- a/examples/chain/19_MsgGrant/example.go +++ b/examples/chain/19_MsgGrant/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/1_MsgSend/example.go b/examples/chain/1_MsgSend/example.go index eee926cb..c28ec491 100644 --- a/examples/chain/1_MsgSend/example.go +++ b/examples/chain/1_MsgSend/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/28_BankBalances/example.go b/examples/chain/28_BankBalances/example.go index 48975525..70547abd 100644 --- a/examples/chain/28_BankBalances/example.go +++ b/examples/chain/28_BankBalances/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/2_MsgDeposit/example.go b/examples/chain/2_MsgDeposit/example.go index 7b823b79..538f004e 100644 --- a/examples/chain/2_MsgDeposit/example.go +++ b/examples/chain/2_MsgDeposit/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" sdktypes "github.com/cosmos/cosmos-sdk/types" diff --git a/examples/chain/33_GetBlock/example.go b/examples/chain/33_GetBlock/example.go index a0e70672..35e195dd 100644 --- a/examples/chain/33_GetBlock/example.go +++ b/examples/chain/33_GetBlock/example.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" tmclient "github.com/InjectiveLabs/sdk-go/client/tm" ) diff --git a/examples/chain/37_DecodeTx/37_decode_tx.go b/examples/chain/37_DecodeTx/37_decode_tx.go index b444eb18..f72f564c 100644 --- a/examples/chain/37_DecodeTx/37_decode_tx.go +++ b/examples/chain/37_DecodeTx/37_decode_tx.go @@ -3,6 +3,7 @@ package main import ( "encoding/base64" "fmt" + cosmostxpb "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) diff --git a/examples/chain/3_MsgCreateSpotLimitOrder/example.go b/examples/chain/3_MsgCreateSpotLimitOrder/example.go index dd3bd3f0..3873604c 100644 --- a/examples/chain/3_MsgCreateSpotLimitOrder/example.go +++ b/examples/chain/3_MsgCreateSpotLimitOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/40_ChainStream/example.go b/examples/chain/40_ChainStream/example.go index 21935caf..c0413d92 100644 --- a/examples/chain/40_ChainStream/example.go +++ b/examples/chain/40_ChainStream/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + chainStreamModule "github.com/InjectiveLabs/sdk-go/chain/stream/types" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/41_BroadcastMsgWithoutSimulation/example.go b/examples/chain/41_BroadcastMsgWithoutSimulation/example.go index 0ac4e18e..ff1031e7 100644 --- a/examples/chain/41_BroadcastMsgWithoutSimulation/example.go +++ b/examples/chain/41_BroadcastMsgWithoutSimulation/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" + "os" + "github.com/InjectiveLabs/sdk-go/client/common" "github.com/google/uuid" "github.com/shopspring/decimal" - "os" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/4_MsgCreateSpotMarketOrder/example.go b/examples/chain/4_MsgCreateSpotMarketOrder/example.go index 9fbb8fa9..7136a747 100644 --- a/examples/chain/4_MsgCreateSpotMarketOrder/example.go +++ b/examples/chain/4_MsgCreateSpotMarketOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/5_MsgCancelSpotOrder/example.go b/examples/chain/5_MsgCancelSpotOrder/example.go index 6ed6b5c2..7d8165ce 100644 --- a/examples/chain/5_MsgCancelSpotOrder/example.go +++ b/examples/chain/5_MsgCancelSpotOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" diff --git a/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go b/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go index 3ef69f5d..b69518fb 100644 --- a/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go +++ b/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go b/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go index 6bd93c67..3d5201e9 100644 --- a/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go +++ b/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/google/uuid" "os" "time" + "github.com/google/uuid" + "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/8_MsgCancelDerivativeOrder/example.go b/examples/chain/8_MsgCancelDerivativeOrder/example.go index 7e7cc342..8624ad0c 100644 --- a/examples/chain/8_MsgCancelDerivativeOrder/example.go +++ b/examples/chain/8_MsgCancelDerivativeOrder/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" diff --git a/examples/chain/9_MsgBatchCancelSpotOrders/example.go b/examples/chain/9_MsgBatchCancelSpotOrders/example.go index 485f3357..3b62bb4e 100644 --- a/examples/chain/9_MsgBatchCancelSpotOrders/example.go +++ b/examples/chain/9_MsgBatchCancelSpotOrders/example.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/InjectiveLabs/sdk-go/client" "os" "time" + "github.com/InjectiveLabs/sdk-go/client" + "github.com/InjectiveLabs/sdk-go/client/common" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" diff --git a/examples/exchange/accounts/5_SubaccountHistory/example.go b/examples/exchange/accounts/5_SubaccountHistory/example.go index b8b54798..8dc67c4a 100644 --- a/examples/exchange/accounts/5_SubaccountHistory/example.go +++ b/examples/exchange/accounts/5_SubaccountHistory/example.go @@ -32,7 +32,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountHistory(ctx, req) + res, err := exchangeClient.GetSubaccountHistory(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/6_SubaccountOrderSummary/example.go b/examples/exchange/accounts/6_SubaccountOrderSummary/example.go index 01176ee3..bc8da227 100644 --- a/examples/exchange/accounts/6_SubaccountOrderSummary/example.go +++ b/examples/exchange/accounts/6_SubaccountOrderSummary/example.go @@ -27,7 +27,7 @@ func main() { OrderDirection: orderDirection, } - res, err := exchangeClient.GetSubaccountOrderSummary(ctx, req) + res, err := exchangeClient.GetSubaccountOrderSummary(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/7_OrderStates/example.go b/examples/exchange/accounts/7_OrderStates/example.go index 1db56f65..f6b849da 100644 --- a/examples/exchange/accounts/7_OrderStates/example.go +++ b/examples/exchange/accounts/7_OrderStates/example.go @@ -26,7 +26,7 @@ func main() { DerivativeOrderHashes: derivativeOrderHashes, } - res, err := exchangeClient.GetOrderStates(ctx, req) + res, err := exchangeClient.GetOrderStates(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/9_Rewards/example.go b/examples/exchange/accounts/9_Rewards/example.go index af024703..3cdc0330 100644 --- a/examples/exchange/accounts/9_Rewards/example.go +++ b/examples/exchange/accounts/9_Rewards/example.go @@ -26,7 +26,7 @@ func main() { AccountAddress: accountAddress, } - res, err := exchangeClient.GetRewards(ctx, req) + res, err := exchangeClient.GetRewards(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/derivatives/10_StreamPositions/example.go b/examples/exchange/derivatives/10_StreamPositions/example.go index 23f38139..af23ee70 100644 --- a/examples/exchange/derivatives/10_StreamPositions/example.go +++ b/examples/exchange/derivatives/10_StreamPositions/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativePositions(ctx, req) + stream, err := exchangeClient.StreamDerivativePositions(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/11_StreamOrders/example.go b/examples/exchange/derivatives/11_StreamOrders/example.go index 393bc86b..245d6f69 100644 --- a/examples/exchange/derivatives/11_StreamOrders/example.go +++ b/examples/exchange/derivatives/11_StreamOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, OrderSide: orderSide, } - stream, err := exchangeClient.StreamDerivativeOrders(ctx, req) + stream, err := exchangeClient.StreamDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/12_Trades/example.go b/examples/exchange/derivatives/12_Trades/example.go index 7b87b301..afa45715 100644 --- a/examples/exchange/derivatives/12_Trades/example.go +++ b/examples/exchange/derivatives/12_Trades/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeTrades(ctx, req) + res, err := exchangeClient.GetDerivativeTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/13_StreamTrades/example.go b/examples/exchange/derivatives/13_StreamTrades/example.go index a94c49f7..02239ad5 100644 --- a/examples/exchange/derivatives/13_StreamTrades/example.go +++ b/examples/exchange/derivatives/13_StreamTrades/example.go @@ -26,7 +26,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativeTrades(ctx, req) + stream, err := exchangeClient.StreamDerivativeTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/14_SubaccountOrdersList/example.go b/examples/exchange/derivatives/14_SubaccountOrdersList/example.go index c8cd6db6..0177193e 100644 --- a/examples/exchange/derivatives/14_SubaccountOrdersList/example.go +++ b/examples/exchange/derivatives/14_SubaccountOrdersList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountDerivativeOrdersList(ctx, req) + res, err := exchangeClient.GetSubaccountDerivativeOrdersList(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/15_SubaccountTradesList/example.go b/examples/exchange/derivatives/15_SubaccountTradesList/example.go index 2b8a1d04..2bf30a1e 100644 --- a/examples/exchange/derivatives/15_SubaccountTradesList/example.go +++ b/examples/exchange/derivatives/15_SubaccountTradesList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountDerivativeTradesList(ctx, req) + res, err := exchangeClient.GetSubaccountDerivativeTradesList(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/16_FundingPayments/example.go b/examples/exchange/derivatives/16_FundingPayments/example.go index d1d960e0..8aa286c9 100644 --- a/examples/exchange/derivatives/16_FundingPayments/example.go +++ b/examples/exchange/derivatives/16_FundingPayments/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeFundingPayments(ctx, req) + res, err := exchangeClient.GetDerivativeFundingPayments(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/17_FundingRates/example.go b/examples/exchange/derivatives/17_FundingRates/example.go index 53c799af..0512f91a 100644 --- a/examples/exchange/derivatives/17_FundingRates/example.go +++ b/examples/exchange/derivatives/17_FundingRates/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, } - res, err := exchangeClient.GetDerivativeFundingRates(ctx, req) + res, err := exchangeClient.GetDerivativeFundingRates(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/18_HistoricalOrders/example.go b/examples/exchange/derivatives/18_HistoricalOrders/example.go index 2b39b069..718b6c00 100644 --- a/examples/exchange/derivatives/18_HistoricalOrders/example.go +++ b/examples/exchange/derivatives/18_HistoricalOrders/example.go @@ -32,7 +32,7 @@ func main() { IsConditional: isConditional, } - res, err := exchangeClient.GetHistoricalDerivativeOrders(ctx, req) + res, err := exchangeClient.GetHistoricalDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go b/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go index e3260f6c..3c49b01d 100644 --- a/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go +++ b/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, Direction: direction, } - stream, err := exchangeClient.StreamHistoricalDerivativeOrders(ctx, req) + stream, err := exchangeClient.StreamHistoricalDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/20_LiquidablePositions/example.go b/examples/exchange/derivatives/20_LiquidablePositions/example.go index 0759019a..3b28112d 100644 --- a/examples/exchange/derivatives/20_LiquidablePositions/example.go +++ b/examples/exchange/derivatives/20_LiquidablePositions/example.go @@ -28,7 +28,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativeLiquidablePositions(ctx, req) + res, err := exchangeClient.GetDerivativeLiquidablePositions(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/21_TradesV2/example.go b/examples/exchange/derivatives/21_TradesV2/example.go index eff34442..50be9292 100644 --- a/examples/exchange/derivatives/21_TradesV2/example.go +++ b/examples/exchange/derivatives/21_TradesV2/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeTradesV2(ctx, req) + res, err := exchangeClient.GetDerivativeTradesV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/22_StreamTradesV2/example.go b/examples/exchange/derivatives/22_StreamTradesV2/example.go index e771be2f..3d78df5d 100644 --- a/examples/exchange/derivatives/22_StreamTradesV2/example.go +++ b/examples/exchange/derivatives/22_StreamTradesV2/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativeV2Trades(ctx, req) + stream, err := exchangeClient.StreamDerivativeV2Trades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/2_Markets/example.go b/examples/exchange/derivatives/2_Markets/example.go index c4654980..97618d7a 100644 --- a/examples/exchange/derivatives/2_Markets/example.go +++ b/examples/exchange/derivatives/2_Markets/example.go @@ -27,7 +27,7 @@ func main() { QuoteDenom: quoteDenom, } - res, err := exchangeClient.GetDerivativeMarkets(ctx, req) + res, err := exchangeClient.GetDerivativeMarkets(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/8_Positions/example.go b/examples/exchange/derivatives/8_Positions/example.go index b3ec5878..3b11e289 100644 --- a/examples/exchange/derivatives/8_Positions/example.go +++ b/examples/exchange/derivatives/8_Positions/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativePositionsV2(ctx, req) + res, err := exchangeClient.GetDerivativePositionsV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/9_Orders/example.go b/examples/exchange/derivatives/9_Orders/example.go index 30d07946..824ebd28 100644 --- a/examples/exchange/derivatives/9_Orders/example.go +++ b/examples/exchange/derivatives/9_Orders/example.go @@ -29,7 +29,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativeOrders(ctx, req) + res, err := exchangeClient.GetDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/insurance/1_InsuranceFunds/example.go b/examples/exchange/insurance/1_InsuranceFunds/example.go index 83fde460..ec55943b 100644 --- a/examples/exchange/insurance/1_InsuranceFunds/example.go +++ b/examples/exchange/insurance/1_InsuranceFunds/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" insurancePB "github.com/InjectiveLabs/sdk-go/exchange/insurance_rpc/pb" @@ -21,7 +22,7 @@ func main() { req := insurancePB.FundsRequest{} - res, err := exchangeClient.GetInsuranceFunds(ctx, req) + res, err := exchangeClient.GetInsuranceFunds(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/insurance/2_Redemptions/example.go b/examples/exchange/insurance/2_Redemptions/example.go index 4f36e7d3..d9de971a 100644 --- a/examples/exchange/insurance/2_Redemptions/example.go +++ b/examples/exchange/insurance/2_Redemptions/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" insurancePB "github.com/InjectiveLabs/sdk-go/exchange/insurance_rpc/pb" @@ -21,7 +22,7 @@ func main() { req := insurancePB.RedemptionsRequest{} - res, err := exchangeClient.GetRedemptions(ctx, req) + res, err := exchangeClient.GetRedemptions(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/1_Ping/example.go b/examples/exchange/meta/1_Ping/example.go index cc0ff1ab..342cd9b7 100644 --- a/examples/exchange/meta/1_Ping/example.go +++ b/examples/exchange/meta/1_Ping/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.PingRequest{} - res, err := exchangeClient.Ping(ctx, req) + res, err := exchangeClient.Ping(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/2_Version/example.go b/examples/exchange/meta/2_Version/example.go index 7f83badf..cc29a71e 100644 --- a/examples/exchange/meta/2_Version/example.go +++ b/examples/exchange/meta/2_Version/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.VersionRequest{} - res, err := exchangeClient.GetVersion(ctx, req) + res, err := exchangeClient.GetVersion(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/3_Info/example.go b/examples/exchange/meta/3_Info/example.go index edda9480..535c170d 100644 --- a/examples/exchange/meta/3_Info/example.go +++ b/examples/exchange/meta/3_Info/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.InfoRequest{} - res, err := exchangeClient.GetInfo(ctx, req) + res, err := exchangeClient.GetInfo(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/4_StreamKeepAlive/example.go b/examples/exchange/meta/4_StreamKeepAlive/example.go index 6731ed39..64c4c958 100644 --- a/examples/exchange/meta/4_StreamKeepAlive/example.go +++ b/examples/exchange/meta/4_StreamKeepAlive/example.go @@ -29,7 +29,7 @@ func main() { case <-ctx.Done(): return default: - res, err := stream.Recv() + res, err := (*stream).Recv() if err != nil { fmt.Println(err) return diff --git a/examples/exchange/oracle/2_Price/example.go b/examples/exchange/oracle/2_Price/example.go index 80acbf9e..bc1be02b 100644 --- a/examples/exchange/oracle/2_Price/example.go +++ b/examples/exchange/oracle/2_Price/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) diff --git a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go index 66763a29..4b6d9434 100644 --- a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go +++ b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/exchange/spot/10_StreamTrades/example.go b/examples/exchange/spot/10_StreamTrades/example.go index c61e0cf5..91eeb7ae 100644 --- a/examples/exchange/spot/10_StreamTrades/example.go +++ b/examples/exchange/spot/10_StreamTrades/example.go @@ -26,7 +26,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamSpotTrades(ctx, req) + stream, err := exchangeClient.StreamSpotTrades(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/11_SubaccountOrdersList/example.go b/examples/exchange/spot/11_SubaccountOrdersList/example.go index 33c924ce..ea10cf9b 100644 --- a/examples/exchange/spot/11_SubaccountOrdersList/example.go +++ b/examples/exchange/spot/11_SubaccountOrdersList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountSpotOrdersList(ctx, req) + res, err := exchangeClient.GetSubaccountSpotOrdersList(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/12_SubaccountTradesList/example.go b/examples/exchange/spot/12_SubaccountTradesList/example.go index 5ce30b0e..3c13bc97 100644 --- a/examples/exchange/spot/12_SubaccountTradesList/example.go +++ b/examples/exchange/spot/12_SubaccountTradesList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountSpotTradesList(ctx, req) + res, err := exchangeClient.GetSubaccountSpotTradesList(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/14_HistoricalOrders/example.go b/examples/exchange/spot/14_HistoricalOrders/example.go index 027855c3..288781b3 100644 --- a/examples/exchange/spot/14_HistoricalOrders/example.go +++ b/examples/exchange/spot/14_HistoricalOrders/example.go @@ -32,7 +32,7 @@ func main() { OrderTypes: orderTypes, } - res, err := exchangeClient.GetHistoricalSpotOrders(ctx, req) + res, err := exchangeClient.GetHistoricalSpotOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/15_StreamHistoricalOrders/example.go b/examples/exchange/spot/15_StreamHistoricalOrders/example.go index 0cfcf4c8..45c59723 100644 --- a/examples/exchange/spot/15_StreamHistoricalOrders/example.go +++ b/examples/exchange/spot/15_StreamHistoricalOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, Direction: direction, } - stream, err := exchangeClient.StreamHistoricalSpotOrders(ctx, req) + stream, err := exchangeClient.StreamHistoricalSpotOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/16_TradesV2/example.go b/examples/exchange/spot/16_TradesV2/example.go index c4bf53cc..851dee00 100644 --- a/examples/exchange/spot/16_TradesV2/example.go +++ b/examples/exchange/spot/16_TradesV2/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetSpotTradesV2(ctx, req) + res, err := exchangeClient.GetSpotTradesV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/17_StreamTradesV2/example.go b/examples/exchange/spot/17_StreamTradesV2/example.go index 02a086a3..d81e88ec 100644 --- a/examples/exchange/spot/17_StreamTradesV2/example.go +++ b/examples/exchange/spot/17_StreamTradesV2/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamSpotTradesV2(ctx, req) + stream, err := exchangeClient.StreamSpotTradesV2(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/2_Markets/example.go b/examples/exchange/spot/2_Markets/example.go index dbfb3e45..928cca41 100644 --- a/examples/exchange/spot/2_Markets/example.go +++ b/examples/exchange/spot/2_Markets/example.go @@ -27,7 +27,7 @@ func main() { QuoteDenom: quoteDenom, } - res, err := exchangeClient.GetSpotMarkets(ctx, req) + res, err := exchangeClient.GetSpotMarkets(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/5_Orders/example.go b/examples/exchange/spot/5_Orders/example.go index 4aca678d..20ca209f 100644 --- a/examples/exchange/spot/5_Orders/example.go +++ b/examples/exchange/spot/5_Orders/example.go @@ -12,7 +12,7 @@ import ( func main() { //network := common.LoadNetwork("mainnet", "k8s") - network := common.LoadNetwork("testnet", "lb") + network := common.LoadNetwork("mainnet", "lb") exchangeClient, err := exchangeclient.NewExchangeClient(network) if err != nil { fmt.Println(err) @@ -29,7 +29,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSpotOrders(ctx, req) + res, err := exchangeClient.GetSpotOrders(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/6_Trades/example.go b/examples/exchange/spot/6_Trades/example.go index 655146d2..9fce3efc 100644 --- a/examples/exchange/spot/6_Trades/example.go +++ b/examples/exchange/spot/6_Trades/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetSpotTrades(ctx, req) + res, err := exchangeClient.GetSpotTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/9_StreamOrders/example.go b/examples/exchange/spot/9_StreamOrders/example.go index 1f83acf8..65ff75b1 100644 --- a/examples/exchange/spot/9_StreamOrders/example.go +++ b/examples/exchange/spot/9_StreamOrders/example.go @@ -28,7 +28,7 @@ func main() { SubaccountId: subaccountId, OrderSide: orderSide, } - stream, err := exchangeClient.StreamSpotOrders(ctx, req) + stream, err := exchangeClient.StreamSpotOrders(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/10_IBCTransfers/example.go b/examples/explorer/10_IBCTransfers/example.go index d17ad7ff..ad3a08dc 100644 --- a/examples/explorer/10_IBCTransfers/example.go +++ b/examples/explorer/10_IBCTransfers/example.go @@ -25,7 +25,7 @@ func main() { Receiver: receiver, } - res, err := explorerClient.GetIBCTransfers(ctx, req) + res, err := explorerClient.GetIBCTransfers(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/11_GetWasmCodes/example.go b/examples/explorer/11_GetWasmCodes/example.go index b2e47810..ea298b34 100644 --- a/examples/explorer/11_GetWasmCodes/example.go +++ b/examples/explorer/11_GetWasmCodes/example.go @@ -24,7 +24,7 @@ func main() { Limit: 10, } - res, err := explorerClient.GetWasmCodes(ctx, req) + res, err := explorerClient.GetWasmCodes(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/12_GetWasmCodeById/example.go b/examples/explorer/12_GetWasmCodeById/example.go index 26a92ba3..b8b932fa 100644 --- a/examples/explorer/12_GetWasmCodeById/example.go +++ b/examples/explorer/12_GetWasmCodeById/example.go @@ -24,7 +24,7 @@ func main() { CodeId: 10, } - res, err := explorerClient.GetWasmCodeByID(ctx, req) + res, err := explorerClient.GetWasmCodeByID(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/13_GetWasmContracts/example.go b/examples/explorer/13_GetWasmContracts/example.go index d4153e2f..33f7df07 100644 --- a/examples/explorer/13_GetWasmContracts/example.go +++ b/examples/explorer/13_GetWasmContracts/example.go @@ -22,7 +22,7 @@ func main() { req := explorerPB.GetWasmContractsRequest{} - res, err := explorerClient.GetWasmContracts(ctx, req) + res, err := explorerClient.GetWasmContracts(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/14_GetWasmContractByAddress/example.go b/examples/explorer/14_GetWasmContractByAddress/example.go index 5c142671..d3a880c2 100644 --- a/examples/explorer/14_GetWasmContractByAddress/example.go +++ b/examples/explorer/14_GetWasmContractByAddress/example.go @@ -23,7 +23,7 @@ func main() { req := explorerPB.GetWasmContractByAddressRequest{ ContractAddress: "inj1ru9nhdjtjtz8u8wrwxmcl9zsns4fh2838yr5ga", } - res, err := explorerClient.GetWasmContractByAddress(ctx, req) + res, err := explorerClient.GetWasmContractByAddress(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/15_GetCW20Balance/example.go b/examples/explorer/15_GetCW20Balance/example.go index 6a82495e..da38564d 100644 --- a/examples/explorer/15_GetCW20Balance/example.go +++ b/examples/explorer/15_GetCW20Balance/example.go @@ -23,7 +23,7 @@ func main() { req := explorerPB.GetCw20BalanceRequest{ Address: "inj1dc6rrxhfjaxexzdcrec5w3ryl4jn6x5t7t9j3z", } - res, err := explorerClient.GetCW20Balance(ctx, req) + res, err := explorerClient.GetCW20Balance(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/2_AccountTxs/example.go b/examples/explorer/2_AccountTxs/example.go index 8bce4684..3bbb56dc 100644 --- a/examples/explorer/2_AccountTxs/example.go +++ b/examples/explorer/2_AccountTxs/example.go @@ -27,7 +27,7 @@ func main() { } ctx := context.Background() - res, err := explorerClient.GetAccountTxs(ctx, req) + res, err := explorerClient.GetAccountTxs(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/5_TxsRequest/example.go b/examples/explorer/5_TxsRequest/example.go index 8ebbe1a2..dd57bfe8 100644 --- a/examples/explorer/5_TxsRequest/example.go +++ b/examples/explorer/5_TxsRequest/example.go @@ -26,7 +26,7 @@ func main() { Before: before, } - res, err := explorerClient.GetTxs(ctx, req) + res, err := explorerClient.GetTxs(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/8_PeggyDeposits/example.go b/examples/explorer/8_PeggyDeposits/example.go index 9cd17c67..bd00e9e1 100644 --- a/examples/explorer/8_PeggyDeposits/example.go +++ b/examples/explorer/8_PeggyDeposits/example.go @@ -26,7 +26,7 @@ func main() { Receiver: receiver, } - res, err := explorerClient.GetPeggyDeposits(ctx, req) + res, err := explorerClient.GetPeggyDeposits(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/9_PeggyWithdrawals/example.go b/examples/explorer/9_PeggyWithdrawals/example.go index f7d221d4..d6284f5a 100644 --- a/examples/explorer/9_PeggyWithdrawals/example.go +++ b/examples/explorer/9_PeggyWithdrawals/example.go @@ -25,7 +25,7 @@ func main() { Sender: sender, } - res, err := explorerClient.GetPeggyWithdrawals(ctx, req) + res, err := explorerClient.GetPeggyWithdrawals(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/go.mod b/go.mod index 3bf80764..6ca3a336 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.0.1 github.com/ethereum/go-ethereum v1.11.5 + github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.4.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/olekukonko/tablewriter v0.0.5 @@ -85,7 +86,6 @@ require ( github.com/gofrs/uuid v4.3.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect From 4eb212d9051a7581c37c36f61541cb98bb156917 Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:35:35 -0300 Subject: [PATCH 02/15] (feat) Added GitHub workflow to run pre-commit for PRs and when pushing to master and dev --- .github/workflows/pre-commit.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..7b4efc6e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,17 @@ +name: pre-commit +on: + pull_request: + push: + branches: [master, dev] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: actions/setup-go@v3 + - run: go install golang.org/x/tools/cmd/goimports@latest + - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 + - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV + - uses: pre-commit/action@v2.0.2 From e8126fe0be5a921db376bc02d3e8b3974879397e Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:48:55 -0300 Subject: [PATCH 03/15] (fix) Fix pre-commit configuration --- .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7b4efc6e..ba4a3f6b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 - run: go install golang.org/x/tools/cmd/goimports@latest - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c8d4cf5..f35e0ca6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,4 @@ repos: - id: go-fmt - id: go-imports - id: golangci-lint + args: [--timeout=15m] From 8443d0b9e4bcd0ba991e572ca27839a573034ec0 Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 18:21:57 -0300 Subject: [PATCH 04/15] (fix) Fix pre-commit configuration --- .github/workflows/pre-commit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ba4a3f6b..e822c838 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,10 +8,12 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - uses: actions/setup-go@v5 + with: + go-version: 1.19 - run: go install golang.org/x/tools/cmd/goimports@latest - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV + - uses: actions/checkout@v3 - uses: pre-commit/action@v2.0.2 From bce2da2c8b7d3add32b33796ac747d54fe33775d Mon Sep 17 00:00:00 2001 From: abel Date: Fri, 22 Dec 2023 00:23:35 -0300 Subject: [PATCH 05/15] (feat) Added GitHub workflow to run tests and calculate coverage --- .github/workflows/run-tests.yml | 20 ++++++++++++++++++++ .gitignore | 1 + Makefile | 7 ++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 00000000..c95973fc --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,20 @@ +name: run-tests +on: + pull_request: + push: + branches: [ master, dev ] + +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: actions/setup-go@v5 + with: + go-version: 1.19 + - name: Run test and calculate coverage + run: make coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index 23bbb47f..8f38a601 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea/ .chain_cookie .exchange_cookie +coverage.out diff --git a/Makefile b/Makefile index a0ceca7c..627437a9 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ copy-exchange-client: cp -r ../injective-indexer/api/gen/grpc/injective_derivative_exchange_rpc/pb exchange/derivative_exchange_rpc/pb cp -r ../injective-indexer/api/gen/grpc/injective_portfolio_rpc/pb exchange/portfolio_rpc/pb -.PHONY: copy-exchange-client +.PHONY: copy-exchange-client tests coverage copy-chain-types: cp ../injective-core/injective-chain/types/*.go chain/types @@ -53,3 +53,8 @@ copy-chain-types: echo "👉 Replace injective-core/injective-chain/modules with sdk-go/chain" echo "👉 Replace injective-core/injective-chain/types with sdk-go/chain/types" echo "👉 Replace injective-core/injective-chain/crypto with sdk-go/chain/crypto" + +tests: + go test -race ./client/... ./ethereum/... +coverage: + go test -race -coverprofile=coverage.out -covermode=atomic ./client/... ./ethereum/... From 4170d7f6a0e46ae8ebb3f4ebbee2af5108e44c46 Mon Sep 17 00:00:00 2001 From: abel Date: Fri, 22 Dec 2023 00:36:35 -0300 Subject: [PATCH 06/15] (feat) Added Codecov badge in README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 32653a09..1ab21609 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Injective Protocol Golang SDK 🌟 +[![codecov](https://codecov.io/gh/InjectiveLabs/sdk-go/graph/badge.svg?token=XDGZV265EE)](https://codecov.io/gh/InjectiveLabs/sdk-go) + --- ## 📚 Getting Started From a170f1f201accdacca465481a68514491b7c4b9d Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:15:03 -0300 Subject: [PATCH 07/15] (feat) Added configuration for pre-commit. Solved all issues found by pre-commit stepts, including golangci-lint --- .gitignore | 1 + .pre-commit-config.yaml | 19 + LICENSE.md | 2 +- NOTICE.md | 2 +- README.md | 2 +- chain/auction/types/auction.pb.go | 7 +- chain/auction/types/genesis.pb.go | 5 +- chain/auction/types/query.pb.go | 7 +- chain/auction/types/tx.pb.go | 7 +- chain/crypto/ethsecp256k1/keys.pb.go | 5 +- chain/exchange/types/authz.pb.go | 5 +- chain/exchange/types/events.pb.go | 7 +- chain/exchange/types/exchange.pb.go | 7 +- chain/exchange/types/genesis.pb.go | 7 +- chain/exchange/types/proposal.pb.go | 7 +- chain/exchange/types/query.pb.go | 7 +- chain/exchange/types/tx.pb.go | 7 +- chain/exchange/types/wasm_maker_contract.go | 4 +- chain/insurance/types/genesis.pb.go | 5 +- chain/insurance/types/insurance.pb.go | 9 +- chain/insurance/types/query.pb.go | 7 +- chain/insurance/types/tx.pb.go | 7 +- chain/ocr/types/genesis.pb.go | 7 +- chain/ocr/types/ocr.pb.go | 9 +- chain/ocr/types/query.pb.go | 7 +- chain/ocr/types/tx.pb.go | 7 +- chain/oracle/types/events.pb.go | 7 +- chain/oracle/types/genesis.pb.go | 5 +- chain/oracle/types/oracle.pb.go | 7 +- chain/oracle/types/proposal.pb.go | 7 +- chain/oracle/types/query.pb.go | 7 +- chain/oracle/types/tx.pb.go | 7 +- chain/peggy/types/attestation.pb.go | 7 +- chain/peggy/types/batch.pb.go | 3 +- chain/peggy/types/ethereum_signer.pb.go | 3 +- chain/peggy/types/events.pb.go | 7 +- chain/peggy/types/genesis.pb.go | 7 +- chain/peggy/types/msgs.pb.go | 7 +- chain/peggy/types/params.pb.go | 7 +- chain/peggy/types/pool.pb.go | 7 +- chain/peggy/types/proposal.pb.go | 7 +- chain/peggy/types/query.pb.go | 7 +- chain/peggy/types/types.pb.go | 7 +- chain/stream/types/query.pb.go | 7 +- .../types/authorityMetadata.pb.go | 7 +- chain/tokenfactory/types/events.pb.go | 7 +- chain/tokenfactory/types/genesis.pb.go | 5 +- chain/tokenfactory/types/params.pb.go | 7 +- chain/tokenfactory/types/query.pb.go | 7 +- chain/tokenfactory/types/tx.pb.go | 7 +- chain/types/account.pb.go | 7 +- chain/types/tx_ext.pb.go | 5 +- chain/types/tx_response.pb.go | 3 +- chain/wasmx/types/events.pb.go | 5 +- chain/wasmx/types/genesis.pb.go | 5 +- chain/wasmx/types/proposal.pb.go | 7 +- chain/wasmx/types/query.pb.go | 7 +- chain/wasmx/types/tx.pb.go | 7 +- chain/wasmx/types/wasmx.pb.go | 5 +- client/chain/chain.go | 67 ++- client/chain/chain_test.go | 5 +- client/common/embeded.go | 6 +- client/common/network.go | 12 +- client/common/network_test.go | 3 +- client/common/util.go | 8 +- client/core/market_test.go | 3 +- client/core/markets_assistant.go | 23 +- client/core/markets_assistant_test.go | 15 +- client/core/markets_assistant_test_support.go | 215 ++++---- client/core/token_test.go | 3 +- client/exchange/exchange.go | 482 +++++++++--------- client/explorer/explorer.go | 142 +++--- client/metadata/assets/devnet-1.ini | 1 - client/metadata/fetch_metadata.go | 19 +- ethereum/util/amounts.go | 6 +- examples/chain/0_LocalOrderHash/example.go | 5 +- .../example.go | 5 +- .../example.go | 5 +- .../example.go | 5 +- .../13_MsgIncreasePositionMargin/example.go | 5 +- examples/chain/15_MsgWithdraw/example.go | 5 +- .../chain/16_MsgSubaccountTransfer/example.go | 5 +- .../chain/17_MsgBatchUpdateOrders/example.go | 5 +- examples/chain/18_MsgBid/example.go | 5 +- examples/chain/19_MsgGrant/example.go | 5 +- examples/chain/1_MsgSend/example.go | 5 +- examples/chain/20_MsgExec/example.go | 5 +- examples/chain/21_MsgRevoke/example.go | 5 +- examples/chain/22_MsgSendToEth/example.go | 5 +- .../23_MsgRelayPriceFeedPrice/example.go | 5 +- examples/chain/24_MsgRegisterAsDMM/example.go | 5 +- examples/chain/25_MsgDelegate/example.go | 5 +- .../26_MsgWithdrawDelegatorReward/example.go | 5 +- examples/chain/27_QueryAuthzGrants/example.go | 1 + examples/chain/28_BankBalances/example.go | 1 + examples/chain/29_BankBalance/example.go | 1 + examples/chain/2_MsgDeposit/example.go | 5 +- .../chain/30_MsgExternalTransfer/example.go | 5 +- examples/chain/31_MsgMultiSend/example.go | 5 +- examples/chain/33_GetBlock/example.go | 1 + examples/chain/34_OfflineSigning/example.go | 5 +- .../chain/35_StreamEventOrderFail/example.go | 1 + .../36_StreamEventOrderbookUpdate/example.go | 1 + examples/chain/37_DecodeTx/37_decode_tx.go | 1 + examples/chain/38_MsgLiquidate/example.go | 5 +- examples/chain/39_GetTx/example.go | 5 +- .../3_MsgCreateSpotLimitOrder/example.go | 5 +- examples/chain/40_ChainStream/example.go | 1 + .../example.go | 3 +- .../4_MsgCreateSpotMarketOrder/example.go | 5 +- .../chain/5_MsgCancelSpotOrder/example.go | 5 +- .../example.go | 5 +- .../example.go | 5 +- .../8_MsgCancelDerivativeOrder/example.go | 5 +- .../9_MsgBatchCancelSpotOrders/example.go | 5 +- .../accounts/5_SubaccountHistory/example.go | 2 +- .../6_SubaccountOrderSummary/example.go | 2 +- .../accounts/7_OrderStates/example.go | 2 +- .../exchange/accounts/9_Rewards/example.go | 2 +- .../derivatives/10_StreamPositions/example.go | 2 +- .../derivatives/11_StreamOrders/example.go | 2 +- .../exchange/derivatives/12_Trades/example.go | 2 +- .../derivatives/13_StreamTrades/example.go | 2 +- .../14_SubaccountOrdersList/example.go | 2 +- .../15_SubaccountTradesList/example.go | 2 +- .../derivatives/16_FundingPayments/example.go | 2 +- .../derivatives/17_FundingRates/example.go | 2 +- .../18_HistoricalOrders/example.go | 2 +- .../19_StreamHistoricalOrders/example.go | 2 +- .../20_LiquidablePositions/example.go | 2 +- .../derivatives/21_TradesV2/example.go | 2 +- .../derivatives/22_StreamTradesV2/example.go | 2 +- .../exchange/derivatives/2_Markets/example.go | 2 +- .../derivatives/8_Positions/example.go | 2 +- .../exchange/derivatives/9_Orders/example.go | 2 +- .../insurance/1_InsuranceFunds/example.go | 3 +- .../insurance/2_Redemptions/example.go | 3 +- examples/exchange/meta/1_Ping/example.go | 2 +- examples/exchange/meta/2_Version/example.go | 2 +- examples/exchange/meta/3_Info/example.go | 2 +- .../meta/4_StreamKeepAlive/example.go | 2 +- examples/exchange/oracle/2_Price/example.go | 1 + .../example.go | 1 + .../exchange/spot/10_StreamTrades/example.go | 2 +- .../spot/11_SubaccountOrdersList/example.go | 2 +- .../spot/12_SubaccountTradesList/example.go | 2 +- .../spot/14_HistoricalOrders/example.go | 2 +- .../spot/15_StreamHistoricalOrders/example.go | 2 +- examples/exchange/spot/16_TradesV2/example.go | 2 +- .../spot/17_StreamTradesV2/example.go | 2 +- examples/exchange/spot/2_Markets/example.go | 2 +- examples/exchange/spot/5_Orders/example.go | 4 +- examples/exchange/spot/6_Trades/example.go | 2 +- .../exchange/spot/9_StreamOrders/example.go | 2 +- examples/explorer/10_IBCTransfers/example.go | 2 +- examples/explorer/11_GetWasmCodes/example.go | 2 +- .../explorer/12_GetWasmCodeById/example.go | 2 +- .../explorer/13_GetWasmContracts/example.go | 2 +- .../14_GetWasmContractByAddress/example.go | 2 +- .../explorer/15_GetCW20Balance/example.go | 2 +- examples/explorer/2_AccountTxs/example.go | 2 +- examples/explorer/5_TxsRequest/example.go | 2 +- examples/explorer/8_PeggyDeposits/example.go | 2 +- .../explorer/9_PeggyWithdrawals/example.go | 2 +- go.mod | 6 +- 165 files changed, 894 insertions(+), 761 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 23bbb47f..8f38a601 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea/ .chain_cookie .exchange_cookie +coverage.out diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7c8d4cf5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +exclude: | + (?x)^( + proto/.*| + exchange/.* + )$ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: end-of-file-fixer + - id: check-yaml + - repo: https://github.com/dnephin/pre-commit-golang + rev: v0.5.0 + hooks: + - id: go-fmt + - id: go-imports + - id: golangci-lint diff --git a/LICENSE.md b/LICENSE.md index fd30af8c..1d5c5b7c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -200,4 +200,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/NOTICE.md b/NOTICE.md index 68e8c372..9e73b26c 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -5,4 +5,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) Originally released by Injective Labs Inc. under:
Apache License
Version 2.0, January 2004
-http://www.apache.org/licenses/ +http://www.apache.org/licenses/ diff --git a/README.md b/README.md index b5f92d4d..32653a09 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/) Originally released by Injective Labs Inc. under:
Apache License
Version 2.0, January 2004
-http://www.apache.org/licenses/ +http://www.apache.org/licenses/ diff --git a/chain/auction/types/auction.pb.go b/chain/auction/types/auction.pb.go index d0d2e780..0d7b6220 100644 --- a/chain/auction/types/auction.pb.go +++ b/chain/auction/types/auction.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/auction/types/genesis.pb.go b/chain/auction/types/genesis.pb.go index d1452e2a..c7c3ab27 100644 --- a/chain/auction/types/genesis.pb.go +++ b/chain/auction/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/auction/types/query.pb.go b/chain/auction/types/query.pb.go index ec9d8b68..bde86cb4 100644 --- a/chain/auction/types/query.pb.go +++ b/chain/auction/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/auction/types/tx.pb.go b/chain/auction/types/tx.pb.go index 57d3be57..b592915e 100644 --- a/chain/auction/types/tx.pb.go +++ b/chain/auction/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/crypto/ethsecp256k1/keys.pb.go b/chain/crypto/ethsecp256k1/keys.pb.go index c445cb5b..1f19c66a 100644 --- a/chain/crypto/ethsecp256k1/keys.pb.go +++ b/chain/crypto/ethsecp256k1/keys.pb.go @@ -5,11 +5,12 @@ package ethsecp256k1 import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/authz.pb.go b/chain/exchange/types/authz.pb.go index e97e8a78..7989416a 100644 --- a/chain/exchange/types/authz.pb.go +++ b/chain/exchange/types/authz.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/events.pb.go b/chain/exchange/types/events.pb.go index fde0ea75..0b05ad3a 100644 --- a/chain/exchange/types/events.pb.go +++ b/chain/exchange/types/events.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "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/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. diff --git a/chain/exchange/types/exchange.pb.go b/chain/exchange/types/exchange.pb.go index d462df25..1db8e74d 100644 --- a/chain/exchange/types/exchange.pb.go +++ b/chain/exchange/types/exchange.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types1 "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/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. diff --git a/chain/exchange/types/genesis.pb.go b/chain/exchange/types/genesis.pb.go index 92998d1d..d83d83f7 100644 --- a/chain/exchange/types/genesis.pb.go +++ b/chain/exchange/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/proposal.pb.go b/chain/exchange/types/proposal.pb.go index 6f3eee76..8ec78f6e 100644 --- a/chain/exchange/types/proposal.pb.go +++ b/chain/exchange/types/proposal.pb.go @@ -5,6 +5,10 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/exchange/types/query.pb.go b/chain/exchange/types/query.pb.go index b4111c76..d95ca74e 100644 --- a/chain/exchange/types/query.pb.go +++ b/chain/exchange/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/exchange/types/tx.pb.go b/chain/exchange/types/tx.pb.go index 682a9a23..b36abb8e 100644 --- a/chain/exchange/types/tx.pb.go +++ b/chain/exchange/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + 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" @@ -18,9 +22,6 @@ import ( 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. diff --git a/chain/exchange/types/wasm_maker_contract.go b/chain/exchange/types/wasm_maker_contract.go index ca0a9227..8b75eb9f 100644 --- a/chain/exchange/types/wasm_maker_contract.go +++ b/chain/exchange/types/wasm_maker_contract.go @@ -1,7 +1,7 @@ package types import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" ) type MintToUser struct { @@ -13,7 +13,7 @@ type MintToUserMsg struct { MintToUser MintToUser `json:"mint_to_user"` } -func NewMintToUserMsg(subaccountIDSender string, amount sdk.Int) MintToUserMsg { +func NewMintToUserMsg(subaccountIDSender string, amount math.Int) MintToUserMsg { return MintToUserMsg{ MintToUser: MintToUser{ SubaccountIDSender: subaccountIDSender, diff --git a/chain/insurance/types/genesis.pb.go b/chain/insurance/types/genesis.pb.go index 2bd30a00..09aa4be5 100644 --- a/chain/insurance/types/genesis.pb.go +++ b/chain/insurance/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/insurance/types/insurance.pb.go b/chain/insurance/types/insurance.pb.go index ba256531..bf9d978e 100644 --- a/chain/insurance/types/insurance.pb.go +++ b/chain/insurance/types/insurance.pb.go @@ -5,6 +5,11 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -13,10 +18,6 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/insurance/types/query.pb.go b/chain/insurance/types/query.pb.go index 4b79acab..37fdf2bd 100644 --- a/chain/insurance/types/query.pb.go +++ b/chain/insurance/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/insurance/types/tx.pb.go b/chain/insurance/types/tx.pb.go index 846919ee..1113a9f8 100644 --- a/chain/insurance/types/tx.pb.go +++ b/chain/insurance/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/types" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/ocr/types/genesis.pb.go b/chain/ocr/types/genesis.pb.go index 210d8023..68aee64a 100644 --- a/chain/ocr/types/genesis.pb.go +++ b/chain/ocr/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - 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" + + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/ocr/types/ocr.pb.go b/chain/ocr/types/ocr.pb.go index d80ac284..4c0279d4 100644 --- a/chain/ocr/types/ocr.pb.go +++ b/chain/ocr/types/ocr.pb.go @@ -5,6 +5,11 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -12,10 +17,6 @@ import ( proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/ocr/types/query.pb.go b/chain/ocr/types/query.pb.go index 5320b68e..3000c85e 100644 --- a/chain/ocr/types/query.pb.go +++ b/chain/ocr/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/ocr/types/tx.pb.go b/chain/ocr/types/tx.pb.go index 76af8a8c..b1574018 100644 --- a/chain/ocr/types/tx.pb.go +++ b/chain/ocr/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/oracle/types/events.pb.go b/chain/oracle/types/events.pb.go index d8b8118e..4f5e3139 100644 --- a/chain/oracle/types/events.pb.go +++ b/chain/oracle/types/events.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/oracle/types/genesis.pb.go b/chain/oracle/types/genesis.pb.go index 04cb607c..df592e98 100644 --- a/chain/oracle/types/genesis.pb.go +++ b/chain/oracle/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/oracle.pb.go b/chain/oracle/types/oracle.pb.go index 156c1208..65482710 100644 --- a/chain/oracle/types/oracle.pb.go +++ b/chain/oracle/types/oracle.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" golang_proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/proposal.pb.go b/chain/oracle/types/proposal.pb.go index 2606c3f3..ae4c5169 100644 --- a/chain/oracle/types/proposal.pb.go +++ b/chain/oracle/types/proposal.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/oracle/types/query.pb.go b/chain/oracle/types/query.pb.go index d82bee6f..4581b81c 100644 --- a/chain/oracle/types/query.pb.go +++ b/chain/oracle/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/oracle/types/tx.pb.go b/chain/oracle/types/tx.pb.go index c993e9d9..165fcf35 100644 --- a/chain/oracle/types/tx.pb.go +++ b/chain/oracle/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/peggy/types/attestation.pb.go b/chain/peggy/types/attestation.pb.go index 0d591bd2..3ea675f8 100644 --- a/chain/peggy/types/attestation.pb.go +++ b/chain/peggy/types/attestation.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/peggy/types/batch.pb.go b/chain/peggy/types/batch.pb.go index 083ea8c7..65fac894 100644 --- a/chain/peggy/types/batch.pb.go +++ b/chain/peggy/types/batch.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/ethereum_signer.pb.go b/chain/peggy/types/ethereum_signer.pb.go index d52e1b45..08af7a8a 100644 --- a/chain/peggy/types/ethereum_signer.pb.go +++ b/chain/peggy/types/ethereum_signer.pb.go @@ -5,9 +5,10 @@ package types import ( fmt "fmt" + math "math" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/events.pb.go b/chain/peggy/types/events.pb.go index 13168705..571bb00b 100644 --- a/chain/peggy/types/events.pb.go +++ b/chain/peggy/types/events.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/genesis.pb.go b/chain/peggy/types/genesis.pb.go index 197630ab..e4baffbc 100644 --- a/chain/peggy/types/genesis.pb.go +++ b/chain/peggy/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "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" + + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/msgs.pb.go b/chain/peggy/types/msgs.pb.go index 6bf0619c..7797fcfe 100644 --- a/chain/peggy/types/msgs.pb.go +++ b/chain/peggy/types/msgs.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -18,9 +22,6 @@ import ( 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. diff --git a/chain/peggy/types/params.pb.go b/chain/peggy/types/params.pb.go index f7932952..7afc74dd 100644 --- a/chain/peggy/types/params.pb.go +++ b/chain/peggy/types/params.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/peggy/types/pool.pb.go b/chain/peggy/types/pool.pb.go index a7eabb67..68e76b1a 100644 --- a/chain/peggy/types/pool.pb.go +++ b/chain/peggy/types/pool.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/proposal.pb.go b/chain/peggy/types/proposal.pb.go index dd9ece2a..242fd142 100644 --- a/chain/peggy/types/proposal.pb.go +++ b/chain/peggy/types/proposal.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/query.pb.go b/chain/peggy/types/query.pb.go index 56cc080b..daac4c68 100644 --- a/chain/peggy/types/query.pb.go +++ b/chain/peggy/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/peggy/types/types.pb.go b/chain/peggy/types/types.pb.go index 66673a3c..29281874 100644 --- a/chain/peggy/types/types.pb.go +++ b/chain/peggy/types/types.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_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" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index 1e7e3f0c..fcbb41c6 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/InjectiveLabs/sdk-go/chain/exchange/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/tokenfactory/types/authorityMetadata.pb.go b/chain/tokenfactory/types/authorityMetadata.pb.go index 51337590..8ee31dd6 100644 --- a/chain/tokenfactory/types/authorityMetadata.pb.go +++ b/chain/tokenfactory/types/authorityMetadata.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "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" + + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/tokenfactory/types/events.pb.go b/chain/tokenfactory/types/events.pb.go index 96598dc0..17d0804f 100644 --- a/chain/tokenfactory/types/events.pb.go +++ b/chain/tokenfactory/types/events.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/bank/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. diff --git a/chain/tokenfactory/types/genesis.pb.go b/chain/tokenfactory/types/genesis.pb.go index 85a59947..9f623873 100644 --- a/chain/tokenfactory/types/genesis.pb.go +++ b/chain/tokenfactory/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/tokenfactory/types/params.pb.go b/chain/tokenfactory/types/params.pb.go index 9d705d9c..089844bc 100644 --- a/chain/tokenfactory/types/params.pb.go +++ b/chain/tokenfactory/types/params.pb.go @@ -5,14 +5,15 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "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/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. diff --git a/chain/tokenfactory/types/query.pb.go b/chain/tokenfactory/types/query.pb.go index 9d7f5742..f8afd710 100644 --- a/chain/tokenfactory/types/query.pb.go +++ b/chain/tokenfactory/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,9 +18,6 @@ import ( 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. diff --git a/chain/tokenfactory/types/tx.pb.go b/chain/tokenfactory/types/tx.pb.go index 214084f8..33e4eb33 100644 --- a/chain/tokenfactory/types/tx.pb.go +++ b/chain/tokenfactory/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -16,9 +20,6 @@ import ( 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. diff --git a/chain/types/account.pb.go b/chain/types/account.pb.go index cb352b87..59afd490 100644 --- a/chain/types/account.pb.go +++ b/chain/types/account.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/x/auth/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. diff --git a/chain/types/tx_ext.pb.go b/chain/types/tx_ext.pb.go index 3b5e02ae..5f48212a 100644 --- a/chain/types/tx_ext.pb.go +++ b/chain/types/tx_ext.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/types/tx_response.pb.go b/chain/types/tx_response.pb.go index e4d2327b..de584707 100644 --- a/chain/types/tx_response.pb.go +++ b/chain/types/tx_response.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/events.pb.go b/chain/wasmx/types/events.pb.go index 9f3f7471..a211e66a 100644 --- a/chain/wasmx/types/events.pb.go +++ b/chain/wasmx/types/events.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/genesis.pb.go b/chain/wasmx/types/genesis.pb.go index fe9147ae..c9405de5 100644 --- a/chain/wasmx/types/genesis.pb.go +++ b/chain/wasmx/types/genesis.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/proposal.pb.go b/chain/wasmx/types/proposal.pb.go index 128ae2cc..4e85c1c3 100644 --- a/chain/wasmx/types/proposal.pb.go +++ b/chain/wasmx/types/proposal.pb.go @@ -5,13 +5,14 @@ package types import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/CosmWasm/wasmd/x/wasm/types" _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/wasmx/types/query.pb.go b/chain/wasmx/types/query.pb.go index a94efce7..1b1f4cdb 100644 --- a/chain/wasmx/types/query.pb.go +++ b/chain/wasmx/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -13,9 +17,6 @@ import ( 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. diff --git a/chain/wasmx/types/tx.pb.go b/chain/wasmx/types/tx.pb.go index 02545b39..908d6219 100644 --- a/chain/wasmx/types/tx.pb.go +++ b/chain/wasmx/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -15,9 +19,6 @@ import ( 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. diff --git a/chain/wasmx/types/wasmx.pb.go b/chain/wasmx/types/wasmx.pb.go index 053a0a76..e3e8dee8 100644 --- a/chain/wasmx/types/wasmx.pb.go +++ b/chain/wasmx/types/wasmx.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/client/chain/chain.go b/client/chain/chain.go index f2dc9514..8b9b0720 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -6,7 +6,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" "math" "os" "strconv" @@ -15,6 +14,10 @@ import ( "sync/atomic" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + + "google.golang.org/grpc/credentials/insecure" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" log "github.com/InjectiveLabs/suplog" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -151,10 +154,9 @@ type chainClient struct { chainStreamConn *grpc.ClientConn txFactory tx.Factory - fromAddress sdk.AccAddress - doneC chan bool - msgC chan sdk.Msg - syncMux *sync.Mutex + doneC chan bool + msgC chan sdk.Msg + syncMux *sync.Mutex cancelCtx context.Context cancelFn func() @@ -231,7 +233,7 @@ func NewChainClientWithMarketsAssistant( if opts.TLSCert != nil { conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) stickySessionEnabled = false } if err != nil { @@ -243,7 +245,7 @@ func NewChainClientWithMarketsAssistant( if opts.TLSCert != nil { chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err = errors.Wrapf(err, "failed to connect to the chain stream gRPC: %s", network.ChainStreamGrpcEndpoint) @@ -393,7 +395,10 @@ func (c *chainClient) getAccSeq() uint64 { func (c *chainClient) requestCookie() metadata.MD { var header metadata.MD - c.txClient.GetTx(context.Background(), &txtypes.GetTxRequest{}, grpc.Header(&header)) + _, err := c.txClient.GetTx(context.Background(), &txtypes.GetTxRequest{}, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -475,16 +480,18 @@ func (c *chainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRes c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) res, err := c.broadcastTx(c.ctx, c.txFactory, true, msgs...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, true, msgs...) } if err != nil { @@ -494,8 +501,6 @@ func (c *chainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRes } } - c.accSeq++ - return res, nil } @@ -539,15 +544,17 @@ func (c *chainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRe c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) res, err := c.broadcastTx(c.ctx, c.txFactory, false, msgs...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, false, msgs...) } if err != nil { @@ -557,8 +564,6 @@ func (c *chainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxRe } } - c.accSeq++ - return res, nil } @@ -795,16 +800,18 @@ func (c *chainClient) runBatchBroadcast() { submitBatch := func(toSubmit []sdk.Msg) { c.syncMux.Lock() defer c.syncMux.Unlock() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("broadcastTx with nonce", c.accSeq) + log.Debugln("broadcastTx with nonce", sequence) res, err := c.broadcastTx(c.ctx, c.txFactory, true, toSubmit...) if err != nil { if strings.Contains(err.Error(), "account sequence mismatch") { c.syncNonce() - c.txFactory = c.txFactory.WithSequence(c.accSeq) + sequence := c.getAccSeq() + c.txFactory = c.txFactory.WithSequence(sequence) c.txFactory = c.txFactory.WithAccountNumber(c.accNum) - log.Debugln("retrying broadcastTx with nonce", c.accSeq) + log.Debugln("retrying broadcastTx with nonce", sequence) res, err = c.broadcastTx(c.ctx, c.txFactory, true, toSubmit...) } if err != nil { @@ -821,8 +828,6 @@ func (c *chainClient) runBatchBroadcast() { log.WithField("txHash", res.TxResponse.TxHash).Debugln("msg batch broadcasted successfully at height", res.TxResponse.Height) } - c.accSeq++ - log.Debugln("nonce incremented to", c.accSeq) log.Debugln("gas wanted: ", c.gasWanted) } @@ -1149,7 +1154,12 @@ func (c *chainClient) StreamEventOrderFail(sender string, failEventCh chan map[s panic(err) } } - defer cometbftClient.Stop() + defer func() { + err := cometbftClient.Stop() + if err != nil { + panic(err) + } + }() c.StreamEventOrderFailWithWebsocket(sender, cometbftClient, failEventCh) } @@ -1203,7 +1213,12 @@ func (c *chainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, m panic(err) } } - defer cometbftClient.Stop() + defer func() { + err := cometbftClient.Stop() + if err != nil { + panic(err) + } + }() c.StreamOrderbookUpdateEventsWithWebsocket(orderbookType, marketIds, cometbftClient, orderbookCh) diff --git a/client/chain/chain_test.go b/client/chain/chain_test.go index 4dc3741f..f286819b 100644 --- a/client/chain/chain_test.go +++ b/client/chain/chain_test.go @@ -2,6 +2,9 @@ package chain import ( "context" + "os" + "testing" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/InjectiveLabs/sdk-go/client/core" @@ -10,8 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" cosmtypes "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" - "os" - "testing" ) func accountForTests() (cosmtypes.AccAddress, keyring.Keyring, error) { diff --git a/client/common/embeded.go b/client/common/embeded.go index b22554cf..d1c7d7e6 100644 --- a/client/common/embeded.go +++ b/client/common/embeded.go @@ -1,4 +1,6 @@ package common -import _ "github.com/InjectiveLabs/sdk-go/client/cert" -import _ "github.com/InjectiveLabs/sdk-go/client/metadata/assets" +import ( + _ "github.com/InjectiveLabs/sdk-go/client/cert" + _ "github.com/InjectiveLabs/sdk-go/client/metadata/assets" +) diff --git a/client/common/network.go b/client/common/network.go index 7095823b..ec50a01b 100644 --- a/client/common/network.go +++ b/client/common/network.go @@ -4,14 +4,13 @@ import ( "context" "crypto/tls" "fmt" - "google.golang.org/grpc/metadata" "net" "net/http" - "path" - "runtime" "strings" "time" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/credentials" ) @@ -74,7 +73,7 @@ func (assistant *ExpiringCookieAssistant) checkCookieExpiration() { expirationTime, err := time.Parse(assistant.timeLayout, cookie.Value) if err == nil { - timestampDiff := expirationTime.Sub(time.Now()) + timestampDiff := time.Until(expirationTime) if timestampDiff < SessionRenewalOffset { assistant.cookie = "" } @@ -175,11 +174,6 @@ func (network *Network) ExplorerMetadata(provider MetadataProvider) (string, err return network.explorerCookieAssistant.Metadata(provider) } -func getFileAbsPath(relativePath string) string { - _, filename, _, _ := runtime.Caller(0) - return path.Join(path.Dir(filename), relativePath) -} - func LoadNetwork(name string, node string) Network { switch name { diff --git a/client/common/network_test.go b/client/common/network_test.go index cf63efcd..235c580e 100644 --- a/client/common/network_test.go +++ b/client/common/network_test.go @@ -2,9 +2,10 @@ package common import ( "fmt" - "google.golang.org/grpc/metadata" "testing" "time" + + "google.golang.org/grpc/metadata" ) func TestMainnetKubernetesLoadBalancedCookieAssistant(t *testing.T) { diff --git a/client/common/util.go b/client/common/util.go index 6f6af8ee..f7e0c9bc 100644 --- a/client/common/util.go +++ b/client/common/util.go @@ -5,7 +5,7 @@ import ( "crypto/x509" "encoding/hex" "fmt" - "io/ioutil" + "os" "strings" chaintypes "github.com/InjectiveLabs/sdk-go/chain/types" @@ -13,9 +13,7 @@ import ( ) func HexToBytes(str string) ([]byte, error) { - if strings.HasPrefix(str, "0x") { - str = str[2:] - } + str = strings.TrimPrefix(str, "0x") data, err := hex.DecodeString(str) if err != nil { @@ -31,7 +29,7 @@ func LoadTlsCert(path string, serverName string) credentials.TransportCredential } // build cert obj - rootCert, err := ioutil.ReadFile(path) + rootCert, err := os.ReadFile(path) if err != nil { fmt.Println(err, "cannot load tls cert from path") return nil diff --git a/client/core/market_test.go b/client/core/market_test.go index 0c56fe31..3ee77ea8 100644 --- a/client/core/market_test.go +++ b/client/core/market_test.go @@ -1,10 +1,11 @@ package core import ( + "testing" + "github.com/cosmos/cosmos-sdk/types" "github.com/huandu/go-assert" "github.com/shopspring/decimal" - "testing" ) func createINJUSDTSpotMarket() SpotMarket { diff --git a/client/core/markets_assistant.go b/client/core/markets_assistant.go index a046904f..5f6de9b6 100644 --- a/client/core/markets_assistant.go +++ b/client/core/markets_assistant.go @@ -3,15 +3,16 @@ package core import ( "context" "fmt" + "path" + "runtime" + "strings" + "github.com/InjectiveLabs/sdk-go/client/exchange" - injective_derivative_exchange_rpcpb "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" - injective_spot_exchange_rpcpb "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" + derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" + spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" "github.com/shopspring/decimal" "golang.org/x/exp/maps" "gopkg.in/ini.v1" - "path" - "runtime" - "strings" ) type MarketsAssistant struct { @@ -130,10 +131,10 @@ func NewMarketsAssistant(networkName string) (MarketsAssistant, error) { func NewMarketsAssistantUsingExchangeClient(ctx context.Context, exchangeClient exchange.ExchangeClient) (MarketsAssistant, error) { assistant := newMarketsAssistant() - spotMarketsRequest := injective_spot_exchange_rpcpb.MarketsRequest{ + spotMarketsRequest := spotExchangePB.MarketsRequest{ MarketStatus: "active", } - spotMarkets, err := exchangeClient.GetSpotMarkets(ctx, spotMarketsRequest) + spotMarkets, err := exchangeClient.GetSpotMarkets(ctx, &spotMarketsRequest) if err != nil { return assistant, err @@ -176,10 +177,10 @@ func NewMarketsAssistantUsingExchangeClient(ctx context.Context, exchangeClient } } - derivativeMarketsRequest := injective_derivative_exchange_rpcpb.MarketsRequest{ + derivativeMarketsRequest := derivativeExchangePB.MarketsRequest{ MarketStatus: "active", } - derivativeMarkets, err := exchangeClient.GetDerivativeMarkets(ctx, derivativeMarketsRequest) + derivativeMarkets, err := exchangeClient.GetDerivativeMarkets(ctx, &derivativeMarketsRequest) if err != nil { return assistant, err @@ -244,7 +245,7 @@ func uniqueSymbol(symbol string, denom string, tokenMetaSymbol string, tokenMeta return uniqueSymbol } -func spotTokenRepresentation(symbol string, tokenMeta *injective_spot_exchange_rpcpb.TokenMeta, denom string, assistant *MarketsAssistant) Token { +func spotTokenRepresentation(symbol string, tokenMeta *spotExchangePB.TokenMeta, denom string, assistant *MarketsAssistant) Token { _, isPresent := assistant.tokensByDenom[denom] if !isPresent { @@ -267,7 +268,7 @@ func spotTokenRepresentation(symbol string, tokenMeta *injective_spot_exchange_r return assistant.tokensByDenom[denom] } -func derivativeTokenRepresentation(symbol string, tokenMeta *injective_derivative_exchange_rpcpb.TokenMeta, denom string, assistant *MarketsAssistant) Token { +func derivativeTokenRepresentation(symbol string, tokenMeta *derivativeExchangePB.TokenMeta, denom string, assistant *MarketsAssistant) Token { _, isPresent := assistant.tokensByDenom[denom] if !isPresent { diff --git a/client/core/markets_assistant_test.go b/client/core/markets_assistant_test.go index adb28638..b727c559 100644 --- a/client/core/markets_assistant_test.go +++ b/client/core/markets_assistant_test.go @@ -2,11 +2,12 @@ package core import ( "context" + "strings" + "testing" + derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" "github.com/stretchr/testify/assert" - "strings" - "testing" ) func TestMarketAssistantCreationUsingMarketsFromExchange(t *testing.T) { @@ -17,14 +18,14 @@ func TestMarketAssistantCreationUsingMarketsFromExchange(t *testing.T) { apeUsdtSpotMarketInfo := createAPEUSDTSpotMarketInfo() btcUsdtDerivativeMarketInfo := createBTCUSDTDerivativeMarketInfo() - spotMarketInfos = append(spotMarketInfos, &injUsdtSpotMarketInfo) - spotMarketInfos = append(spotMarketInfos, &apeUsdtSpotMarketInfo) - derivativeMarketInfos = append(derivativeMarketInfos, &btcUsdtDerivativeMarketInfo) + spotMarketInfos = append(spotMarketInfos, injUsdtSpotMarketInfo) + spotMarketInfos = append(spotMarketInfos, apeUsdtSpotMarketInfo) + derivativeMarketInfos = append(derivativeMarketInfos, btcUsdtDerivativeMarketInfo) - mockExchange.SpotMarketsResponses = append(mockExchange.SpotMarketsResponses, spotExchangePB.MarketsResponse{ + mockExchange.SpotMarketsResponses = append(mockExchange.SpotMarketsResponses, &spotExchangePB.MarketsResponse{ Markets: spotMarketInfos, }) - mockExchange.DerivativeMarketsResponses = append(mockExchange.DerivativeMarketsResponses, derivativeExchangePB.MarketsResponse{ + mockExchange.DerivativeMarketsResponses = append(mockExchange.DerivativeMarketsResponses, &derivativeExchangePB.MarketsResponse{ Markets: derivativeMarketInfos, }) diff --git a/client/core/markets_assistant_test_support.go b/client/core/markets_assistant_test_support.go index a369d7eb..9febc8df 100644 --- a/client/core/markets_assistant_test_support.go +++ b/client/core/markets_assistant_test_support.go @@ -2,6 +2,7 @@ package core import ( "context" + accountPB "github.com/InjectiveLabs/sdk-go/exchange/accounts_rpc/pb" auctionPB "github.com/InjectiveLabs/sdk-go/exchange/auction_rpc/pb" derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" @@ -58,7 +59,7 @@ func createUSDTPerpTokenMeta() derivativeExchangePB.TokenMeta { } } -func createINJUSDTSpotMarketInfo() spotExchangePB.SpotMarketInfo { +func createINJUSDTSpotMarketInfo() *spotExchangePB.SpotMarketInfo { injTokenMeta := createINJTokenMeta() usdtTokenMeta := createUSDTTokenMeta() marketInfo := spotExchangePB.SpotMarketInfo{ @@ -76,10 +77,10 @@ func createINJUSDTSpotMarketInfo() spotExchangePB.SpotMarketInfo { MinQuantityTickSize: "1000000000000000", } - return marketInfo + return &marketInfo } -func createAPEUSDTSpotMarketInfo() spotExchangePB.SpotMarketInfo { +func createAPEUSDTSpotMarketInfo() *spotExchangePB.SpotMarketInfo { apeTokenMeta := createAPETokenMeta() usdtTokenMeta := createUSDTTokenMeta() marketInfo := spotExchangePB.SpotMarketInfo{ @@ -97,10 +98,10 @@ func createAPEUSDTSpotMarketInfo() spotExchangePB.SpotMarketInfo { MinQuantityTickSize: "1000000000000000", } - return marketInfo + return &marketInfo } -func createBTCUSDTDerivativeMarketInfo() derivativeExchangePB.DerivativeMarketInfo { +func createBTCUSDTDerivativeMarketInfo() *derivativeExchangePB.DerivativeMarketInfo { usdtPerpTokenMeta := createUSDTPerpTokenMeta() perpetualMarketInfo := derivativeExchangePB.PerpetualMarketInfo{ @@ -138,12 +139,12 @@ func createBTCUSDTDerivativeMarketInfo() derivativeExchangePB.DerivativeMarketIn PerpetualMarketFunding: &perpetualmarketFunding, } - return marketInfo + return &marketInfo } type MockExchangeClient struct { - SpotMarketsResponses []spotExchangePB.MarketsResponse - DerivativeMarketsResponses []derivativeExchangePB.MarketsResponse + SpotMarketsResponses []*spotExchangePB.MarketsResponse + DerivativeMarketsResponses []*derivativeExchangePB.MarketsResponse } func (e *MockExchangeClient) QueryClient() *grpc.ClientConn { @@ -151,16 +152,16 @@ func (e *MockExchangeClient) QueryClient() *grpc.ClientConn { return &dummyConnection } -func (e *MockExchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error) { - return derivativeExchangePB.MarketResponse{}, nil +func (e *MockExchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (*derivativeExchangePB.MarketResponse, error) { + return &derivativeExchangePB.MarketResponse{}, nil } -func (e *MockExchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error) { - return derivativeExchangePB.OrderbookV2Response{}, nil +func (e *MockExchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (*derivativeExchangePB.OrderbookV2Response, error) { + return &derivativeExchangePB.OrderbookV2Response{}, nil } -func (e *MockExchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error) { - return derivativeExchangePB.OrderbooksV2Response{}, nil +func (e *MockExchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.OrderbooksV2Response, error) { + return &derivativeExchangePB.OrderbooksV2Response{}, nil } func (e *MockExchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) { @@ -175,151 +176,155 @@ func (e *MockExchangeClient) StreamDerivativeMarket(ctx context.Context, marketI return nil, nil } -func (e *MockExchangeClient) GetDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersRequest) (derivativeExchangePB.OrdersResponse, error) { - return derivativeExchangePB.OrdersResponse{}, nil +func (e *MockExchangeClient) GetDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersRequest) (*derivativeExchangePB.OrdersResponse, error) { + return &derivativeExchangePB.OrdersResponse{}, nil } -func (e *MockExchangeClient) GetDerivativeMarkets(ctx context.Context, req derivativeExchangePB.MarketsRequest) (derivativeExchangePB.MarketsResponse, error) { - var response derivativeExchangePB.MarketsResponse +func (e *MockExchangeClient) GetDerivativeMarkets(ctx context.Context, req *derivativeExchangePB.MarketsRequest) (*derivativeExchangePB.MarketsResponse, error) { + var response *derivativeExchangePB.MarketsResponse var localError error if len(e.DerivativeMarketsResponses) > 0 { response = e.DerivativeMarketsResponses[0] e.DerivativeMarketsResponses = e.DerivativeMarketsResponses[1:] localError = nil } else { - response = derivativeExchangePB.MarketsResponse{} + response = &derivativeExchangePB.MarketsResponse{} localError = errors.New("There are no responses configured") } return response, localError } -func (e *MockExchangeClient) GetDerivativePositions(ctx context.Context, req derivativeExchangePB.PositionsRequest) (derivativeExchangePB.PositionsResponse, error) { - return derivativeExchangePB.PositionsResponse{}, nil +func (e *MockExchangeClient) GetDerivativePositions(ctx context.Context, req *derivativeExchangePB.PositionsRequest) (*derivativeExchangePB.PositionsResponse, error) { + return &derivativeExchangePB.PositionsResponse{}, nil +} + +func (e *MockExchangeClient) GetDerivativePositionsV2(ctx context.Context, req *derivativeExchangePB.PositionsV2Request) (*derivativeExchangePB.PositionsV2Response, error) { + return &derivativeExchangePB.PositionsV2Response{}, nil } -func (e *MockExchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req derivativeExchangePB.LiquidablePositionsRequest) (derivativeExchangePB.LiquidablePositionsResponse, error) { - return derivativeExchangePB.LiquidablePositionsResponse{}, nil +func (e *MockExchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req *derivativeExchangePB.LiquidablePositionsRequest) (*derivativeExchangePB.LiquidablePositionsResponse, error) { + return &derivativeExchangePB.LiquidablePositionsResponse{}, nil } -func (e *MockExchangeClient) StreamDerivativePositions(ctx context.Context, req derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { +func (e *MockExchangeClient) StreamDerivativePositions(ctx context.Context, req *derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { return nil, nil } -func (e *MockExchangeClient) StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { +func (e *MockExchangeClient) StreamDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { return nil, nil } -func (e *MockExchangeClient) GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error) { - return derivativeExchangePB.TradesResponse{}, nil +func (e *MockExchangeClient) GetDerivativeTrades(ctx context.Context, req *derivativeExchangePB.TradesRequest) (*derivativeExchangePB.TradesResponse, error) { + return &derivativeExchangePB.TradesResponse{}, nil } -func (e *MockExchangeClient) GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error) { - return derivativeExchangePB.TradesV2Response{}, nil +func (e *MockExchangeClient) GetDerivativeTradesV2(ctx context.Context, req *derivativeExchangePB.TradesV2Request) (*derivativeExchangePB.TradesV2Response, error) { + return &derivativeExchangePB.TradesV2Response{}, nil } -func (e *MockExchangeClient) StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { +func (e *MockExchangeClient) StreamDerivativeTrades(ctx context.Context, req *derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { return nil, nil } -func (e *MockExchangeClient) StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { +func (e *MockExchangeClient) StreamDerivativeV2Trades(ctx context.Context, req *derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { return nil, nil } -func (e *MockExchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error) { - return derivativeExchangePB.SubaccountOrdersListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req *derivativeExchangePB.SubaccountOrdersListRequest) (*derivativeExchangePB.SubaccountOrdersListResponse, error) { + return &derivativeExchangePB.SubaccountOrdersListResponse{}, nil } -func (e *MockExchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error) { - return derivativeExchangePB.SubaccountTradesListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req *derivativeExchangePB.SubaccountTradesListRequest) (*derivativeExchangePB.SubaccountTradesListResponse, error) { + return &derivativeExchangePB.SubaccountTradesListResponse{}, nil } -func (e *MockExchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error) { - return derivativeExchangePB.OrdersHistoryResponse{}, nil +func (e *MockExchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersHistoryRequest) (*derivativeExchangePB.OrdersHistoryResponse, error) { + return &derivativeExchangePB.OrdersHistoryResponse{}, nil } -func (e *MockExchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { +func (e *MockExchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { return nil, nil } -func (e *MockExchangeClient) GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error) { - return derivativeExchangePB.FundingPaymentsResponse{}, nil +func (e *MockExchangeClient) GetDerivativeFundingPayments(ctx context.Context, req *derivativeExchangePB.FundingPaymentsRequest) (*derivativeExchangePB.FundingPaymentsResponse, error) { + return &derivativeExchangePB.FundingPaymentsResponse{}, nil } -func (e *MockExchangeClient) GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error) { - return derivativeExchangePB.FundingRatesResponse{}, nil +func (e *MockExchangeClient) GetDerivativeFundingRates(ctx context.Context, req *derivativeExchangePB.FundingRatesRequest) (*derivativeExchangePB.FundingRatesResponse, error) { + return &derivativeExchangePB.FundingRatesResponse{}, nil } -func (e *MockExchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error) { - return oraclePB.PriceResponse{}, nil +func (e *MockExchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (*oraclePB.PriceResponse, error) { + return &oraclePB.PriceResponse{}, nil } -func (e *MockExchangeClient) GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, error) { - return oraclePB.OracleListResponse{}, nil +func (e *MockExchangeClient) GetOracleList(ctx context.Context) (*oraclePB.OracleListResponse, error) { + return &oraclePB.OracleListResponse{}, nil } func (e *MockExchangeClient) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error) { return nil, nil } -func (e *MockExchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error) { - return auctionPB.AuctionEndpointResponse{}, nil +func (e *MockExchangeClient) GetAuction(ctx context.Context, round int64) (*auctionPB.AuctionEndpointResponse, error) { + return &auctionPB.AuctionEndpointResponse{}, nil } -func (e *MockExchangeClient) GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error) { - return auctionPB.AuctionsResponse{}, nil +func (e *MockExchangeClient) GetAuctions(ctx context.Context) (*auctionPB.AuctionsResponse, error) { + return &auctionPB.AuctionsResponse{}, nil } func (e *MockExchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error) { return nil, nil } -func (e *MockExchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error) { - return accountPB.SubaccountsListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (*accountPB.SubaccountsListResponse, error) { + return &accountPB.SubaccountsListResponse{}, nil } -func (e *MockExchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error) { - return accountPB.SubaccountBalanceEndpointResponse{}, nil +func (e *MockExchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (*accountPB.SubaccountBalanceEndpointResponse, error) { + return &accountPB.SubaccountBalanceEndpointResponse{}, nil } func (e *MockExchangeClient) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) { return nil, nil } -func (e *MockExchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error) { - return accountPB.SubaccountBalancesListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (*accountPB.SubaccountBalancesListResponse, error) { + return &accountPB.SubaccountBalancesListResponse{}, nil } -func (e *MockExchangeClient) GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error) { - return accountPB.SubaccountHistoryResponse{}, nil +func (e *MockExchangeClient) GetSubaccountHistory(ctx context.Context, req *accountPB.SubaccountHistoryRequest) (*accountPB.SubaccountHistoryResponse, error) { + return &accountPB.SubaccountHistoryResponse{}, nil } -func (e *MockExchangeClient) GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error) { - return accountPB.SubaccountOrderSummaryResponse{}, nil +func (e *MockExchangeClient) GetSubaccountOrderSummary(ctx context.Context, req *accountPB.SubaccountOrderSummaryRequest) (*accountPB.SubaccountOrderSummaryResponse, error) { + return &accountPB.SubaccountOrderSummaryResponse{}, nil } -func (e *MockExchangeClient) GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error) { - return accountPB.OrderStatesResponse{}, nil +func (e *MockExchangeClient) GetOrderStates(ctx context.Context, req *accountPB.OrderStatesRequest) (*accountPB.OrderStatesResponse, error) { + return &accountPB.OrderStatesResponse{}, nil } -func (e *MockExchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error) { - return accountPB.PortfolioResponse{}, nil +func (e *MockExchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (*accountPB.PortfolioResponse, error) { + return &accountPB.PortfolioResponse{}, nil } -func (e *MockExchangeClient) GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error) { - return accountPB.RewardsResponse{}, nil +func (e *MockExchangeClient) GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error) { + return &accountPB.RewardsResponse{}, nil } -func (e *MockExchangeClient) GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error) { - return spotExchangePB.OrdersResponse{}, nil +func (e *MockExchangeClient) GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error) { + return &spotExchangePB.OrdersResponse{}, nil } -func (e *MockExchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error) { - return spotExchangePB.OrderbookV2Response{}, nil +func (e *MockExchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error) { + return &spotExchangePB.OrderbookV2Response{}, nil } -func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error) { - return spotExchangePB.OrderbooksV2Response{}, nil +func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) { + return &spotExchangePB.OrderbooksV2Response{}, nil } func (e *MockExchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) { @@ -330,75 +335,79 @@ func (e *MockExchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, mark return nil, nil } -func (e *MockExchangeClient) GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error) { - var response spotExchangePB.MarketsResponse +func (e *MockExchangeClient) GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error) { + var response *spotExchangePB.MarketsResponse var localError error if len(e.SpotMarketsResponses) > 0 { response = e.SpotMarketsResponses[0] e.SpotMarketsResponses = e.SpotMarketsResponses[1:] localError = nil } else { - response = spotExchangePB.MarketsResponse{} + response = &spotExchangePB.MarketsResponse{} localError = errors.New("There are no responses configured") } return response, localError } -func (e *MockExchangeClient) GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error) { - return spotExchangePB.MarketResponse{}, nil +func (e *MockExchangeClient) GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error) { + return &spotExchangePB.MarketResponse{}, nil } func (e *MockExchangeClient) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error) { return nil, nil } -func (e *MockExchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { +func (e *MockExchangeClient) StreamSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { return nil, nil } -func (e *MockExchangeClient) GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error) { - return spotExchangePB.TradesResponse{}, nil +func (e *MockExchangeClient) GetSpotTrades(ctx context.Context, req *spotExchangePB.TradesRequest) (*spotExchangePB.TradesResponse, error) { + return &spotExchangePB.TradesResponse{}, nil } -func (e *MockExchangeClient) GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error) { - return spotExchangePB.TradesV2Response{}, nil +func (e *MockExchangeClient) GetSpotTradesV2(ctx context.Context, req *spotExchangePB.TradesV2Request) (*spotExchangePB.TradesV2Response, error) { + return &spotExchangePB.TradesV2Response{}, nil } -func (e *MockExchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { +func (e *MockExchangeClient) StreamSpotTrades(ctx context.Context, req *spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { return nil, nil } -func (e *MockExchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { +func (e *MockExchangeClient) StreamSpotTradesV2(ctx context.Context, req *spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { return nil, nil } -func (e *MockExchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error) { - return spotExchangePB.SubaccountOrdersListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req *spotExchangePB.SubaccountOrdersListRequest) (*spotExchangePB.SubaccountOrdersListResponse, error) { + return &spotExchangePB.SubaccountOrdersListResponse{}, nil } -func (e *MockExchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error) { - return spotExchangePB.SubaccountTradesListResponse{}, nil +func (e *MockExchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req *spotExchangePB.SubaccountTradesListRequest) (*spotExchangePB.SubaccountTradesListResponse, error) { + return &spotExchangePB.SubaccountTradesListResponse{}, nil } -func (e *MockExchangeClient) GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error) { - return spotExchangePB.OrdersHistoryResponse{}, nil +func (e *MockExchangeClient) GetHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.OrdersHistoryRequest) (*spotExchangePB.OrdersHistoryResponse, error) { + return &spotExchangePB.OrdersHistoryResponse{}, nil } -func (e *MockExchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { +func (e *MockExchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { return nil, nil } -func (e *MockExchangeClient) GetInsuranceFunds(ctx context.Context, req insurancePB.FundsRequest) (insurancePB.FundsResponse, error) { - return insurancePB.FundsResponse{}, nil +func (e *MockExchangeClient) GetInsuranceFunds(ctx context.Context, req *insurancePB.FundsRequest) (*insurancePB.FundsResponse, error) { + return &insurancePB.FundsResponse{}, nil +} + +func (e *MockExchangeClient) GetRedemptions(ctx context.Context, req *insurancePB.RedemptionsRequest) (*insurancePB.RedemptionsResponse, error) { + return &insurancePB.RedemptionsResponse{}, nil } -func (e *MockExchangeClient) GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error) { - return insurancePB.RedemptionsResponse{}, nil +func (e *MockExchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioResponse, error) { + return &portfolioExchangePB.AccountPortfolioResponse{}, nil } -func (e *MockExchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error) { - return portfolioExchangePB.AccountPortfolioResponse{}, nil +func (e *MockExchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioBalancesResponse, error) { + return &portfolioExchangePB.AccountPortfolioBalancesResponse{}, nil } func (e *MockExchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) { @@ -409,16 +418,16 @@ func (e *MockExchangeClient) StreamKeepalive(ctx context.Context) (metaPB.Inject return nil, nil } -func (e *MockExchangeClient) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) { - return metaPB.InfoResponse{}, nil +func (e *MockExchangeClient) GetInfo(ctx context.Context, req *metaPB.InfoRequest) (*metaPB.InfoResponse, error) { + return &metaPB.InfoResponse{}, nil } -func (e *MockExchangeClient) GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error) { - return metaPB.VersionResponse{}, nil +func (e *MockExchangeClient) GetVersion(ctx context.Context, req *metaPB.VersionRequest) (*metaPB.VersionResponse, error) { + return &metaPB.VersionResponse{}, nil } -func (e *MockExchangeClient) Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error) { - return metaPB.PingResponse{}, nil +func (e *MockExchangeClient) Ping(ctx context.Context, req *metaPB.PingRequest) (*metaPB.PingResponse, error) { + return &metaPB.PingResponse{}, nil } func (e *MockExchangeClient) Close() { diff --git a/client/core/token_test.go b/client/core/token_test.go index 7ced75cd..ceb72366 100644 --- a/client/core/token_test.go +++ b/client/core/token_test.go @@ -1,9 +1,10 @@ package core import ( + "testing" + "github.com/huandu/go-assert" "github.com/shopspring/decimal" - "testing" ) func createINJToken() Token { diff --git a/client/exchange/exchange.go b/client/exchange/exchange.go index 59552049..17577000 100644 --- a/client/exchange/exchange.go +++ b/client/exchange/exchange.go @@ -3,6 +3,10 @@ package exchange import ( "context" "fmt" + "time" + + "google.golang.org/grpc/credentials/insecure" + "github.com/InjectiveLabs/sdk-go/client/common" accountPB "github.com/InjectiveLabs/sdk-go/exchange/accounts_rpc/pb" auctionPB "github.com/InjectiveLabs/sdk-go/exchange/auction_rpc/pb" @@ -22,74 +26,74 @@ import ( type ExchangeClient interface { QueryClient() *grpc.ClientConn - GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error) - GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error) - GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error) + GetDerivativeMarket(ctx context.Context, marketId string) (*derivativeExchangePB.MarketResponse, error) + GetDerivativeOrderbookV2(ctx context.Context, marketId string) (*derivativeExchangePB.OrderbookV2Response, error) + GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.OrderbooksV2Response, error) // StreamDerivativeOrderbook deprecated API StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) StreamDerivativeOrderbookUpdate(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookUpdateClient, error) 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) - StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) - GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error) - GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error) - StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) - StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) - GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error) - GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error) - GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error) - StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) - GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error) - GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error) - GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error) - GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, 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) + StreamDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) + GetDerivativeTrades(ctx context.Context, req *derivativeExchangePB.TradesRequest) (*derivativeExchangePB.TradesResponse, error) + GetDerivativeTradesV2(ctx context.Context, req *derivativeExchangePB.TradesV2Request) (*derivativeExchangePB.TradesV2Response, error) + StreamDerivativeTrades(ctx context.Context, req *derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) + StreamDerivativeV2Trades(ctx context.Context, req *derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) + GetSubaccountDerivativeOrdersList(ctx context.Context, req *derivativeExchangePB.SubaccountOrdersListRequest) (*derivativeExchangePB.SubaccountOrdersListResponse, error) + GetSubaccountDerivativeTradesList(ctx context.Context, req *derivativeExchangePB.SubaccountTradesListRequest) (*derivativeExchangePB.SubaccountTradesListResponse, error) + GetHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersHistoryRequest) (*derivativeExchangePB.OrdersHistoryResponse, error) + StreamHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) + GetDerivativeFundingPayments(ctx context.Context, req *derivativeExchangePB.FundingPaymentsRequest) (*derivativeExchangePB.FundingPaymentsResponse, error) + GetDerivativeFundingRates(ctx context.Context, req *derivativeExchangePB.FundingRatesRequest) (*derivativeExchangePB.FundingRatesResponse, error) + GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (*oraclePB.PriceResponse, error) + GetOracleList(ctx context.Context) (*oraclePB.OracleListResponse, error) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error) - GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error) - GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error) + GetAuction(ctx context.Context, round int64) (*auctionPB.AuctionEndpointResponse, error) + GetAuctions(ctx context.Context) (*auctionPB.AuctionsResponse, error) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error) - GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error) - GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error) + GetSubaccountsList(ctx context.Context, accountAddress string) (*accountPB.SubaccountsListResponse, error) + GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (*accountPB.SubaccountBalanceEndpointResponse, error) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) - GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error) - GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error) - GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error) - GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error) - GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error) - GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error) - GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error) - GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error) - GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error) + GetSubaccountBalancesList(ctx context.Context, subaccountId string) (*accountPB.SubaccountBalancesListResponse, error) + GetSubaccountHistory(ctx context.Context, req *accountPB.SubaccountHistoryRequest) (*accountPB.SubaccountHistoryResponse, error) + GetSubaccountOrderSummary(ctx context.Context, req *accountPB.SubaccountOrderSummaryRequest) (*accountPB.SubaccountOrderSummaryResponse, error) + GetOrderStates(ctx context.Context, req *accountPB.OrderStatesRequest) (*accountPB.OrderStatesResponse, error) + GetPortfolio(ctx context.Context, accountAddress string) (*accountPB.PortfolioResponse, error) + GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error) + GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error) + GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error) + GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) // StreamSpotOrderbook deprecated API StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) - GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error) - GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error) + GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error) + GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error) - StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) - GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error) - GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error) - StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) - StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) - GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error) - GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error) - GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error) - StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) - 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) + StreamSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) + GetSpotTrades(ctx context.Context, req *spotExchangePB.TradesRequest) (*spotExchangePB.TradesResponse, error) + GetSpotTradesV2(ctx context.Context, req *spotExchangePB.TradesV2Request) (*spotExchangePB.TradesV2Response, error) + StreamSpotTrades(ctx context.Context, req *spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) + StreamSpotTradesV2(ctx context.Context, req *spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) + GetSubaccountSpotOrdersList(ctx context.Context, req *spotExchangePB.SubaccountOrdersListRequest) (*spotExchangePB.SubaccountOrdersListResponse, error) + GetSubaccountSpotTradesList(ctx context.Context, req *spotExchangePB.SubaccountTradesListRequest) (*spotExchangePB.SubaccountTradesListResponse, error) + GetHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.OrdersHistoryRequest) (*spotExchangePB.OrdersHistoryResponse, error) + StreamHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) + 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) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) - GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) - GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error) - Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error) + GetInfo(ctx context.Context, req *metaPB.InfoRequest) (*metaPB.InfoResponse, error) + GetVersion(ctx context.Context, req *metaPB.VersionRequest) (*metaPB.VersionResponse, error) + Ping(ctx context.Context, req *metaPB.PingRequest) (*metaPB.PingResponse, error) Close() } @@ -113,7 +117,7 @@ func NewExchangeClient(network common.Network, options ...common.ClientOption) ( conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExchangeGrpcEndpoint) @@ -150,9 +154,6 @@ type exchangeClient struct { network common.Network conn *grpc.ClientConn logger log.Logger - client *grpc.ClientConn - - sessionCookie string metaClient metaPB.InjectiveMetaRPCClient explorerClient explorerPB.InjectiveExplorerRPCClient @@ -163,14 +164,15 @@ type exchangeClient struct { spotExchangeClient spotExchangePB.InjectiveSpotExchangeRPCClient derivativeExchangeClient derivativeExchangePB.InjectiveDerivativeExchangeRPCClient portfolioExchangeClient portfolioExchangePB.InjectivePortfolioRPCClient - - closed int64 } func (c *exchangeClient) requestCookie() metadata.MD { var header metadata.MD - req := metaPB.InfoRequest{} - c.metaClient.Info(context.Background(), &req, grpc.Header(&header)) + req := metaPB.InfoRequest{Timestamp: time.Now().UnixMilli()} + _, err := c.metaClient.Info(context.Background(), &req, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -186,52 +188,52 @@ func (c *exchangeClient) QueryClient() *grpc.ClientConn { // Derivatives RPC -func (c *exchangeClient) GetDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersRequest) (derivativeExchangePB.OrdersResponse, error) { +func (c *exchangeClient) GetDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersRequest) (*derivativeExchangePB.OrdersResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Orders(ctx, &req) + res, err := c.derivativeExchangeClient.Orders(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrdersResponse{}, err + return &derivativeExchangePB.OrdersResponse{}, err } - return *res, nil + return res, nil } // Deprecated: Use GetDerivativePositionsV2 instead. -func (c *exchangeClient) GetDerivativePositions(ctx context.Context, req derivativeExchangePB.PositionsRequest) (derivativeExchangePB.PositionsResponse, error) { +func (c *exchangeClient) GetDerivativePositions(ctx context.Context, req *derivativeExchangePB.PositionsRequest) (*derivativeExchangePB.PositionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Positions(ctx, &req) + res, err := c.derivativeExchangeClient.Positions(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.PositionsResponse{}, err + return &derivativeExchangePB.PositionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativePositionsV2(ctx context.Context, req derivativeExchangePB.PositionsV2Request) (derivativeExchangePB.PositionsV2Response, error) { +func (c *exchangeClient) GetDerivativePositionsV2(ctx context.Context, req *derivativeExchangePB.PositionsV2Request) (*derivativeExchangePB.PositionsV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.PositionsV2(ctx, &req) + res, err := c.derivativeExchangeClient.PositionsV2(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.PositionsV2Response{}, err + return &derivativeExchangePB.PositionsV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req derivativeExchangePB.LiquidablePositionsRequest) (derivativeExchangePB.LiquidablePositionsResponse, error) { +func (c *exchangeClient) GetDerivativeLiquidablePositions(ctx context.Context, req *derivativeExchangePB.LiquidablePositionsRequest) (*derivativeExchangePB.LiquidablePositionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.LiquidablePositions(ctx, &req) + res, err := c.derivativeExchangeClient.LiquidablePositions(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.LiquidablePositionsResponse{}, err + return &derivativeExchangePB.LiquidablePositionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (derivativeExchangePB.OrderbookV2Response, error) { +func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId string) (*derivativeExchangePB.OrderbookV2Response, error) { req := derivativeExchangePB.OrderbookV2Request{ MarketId: marketId, } @@ -240,13 +242,13 @@ func (c *exchangeClient) GetDerivativeOrderbookV2(ctx context.Context, marketId res, err := c.derivativeExchangeClient.OrderbookV2(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrderbookV2Response{}, err + return &derivativeExchangePB.OrderbookV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (derivativeExchangePB.OrderbooksV2Response, error) { +func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketIds []string) (*derivativeExchangePB.OrderbooksV2Response, error) { req := derivativeExchangePB.OrderbooksV2Request{ MarketIds: marketIds, } @@ -255,10 +257,10 @@ func (c *exchangeClient) GetDerivativeOrderbooksV2(ctx context.Context, marketId res, err := c.derivativeExchangeClient.OrderbooksV2(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.OrderbooksV2Response{}, err + return &derivativeExchangePB.OrderbooksV2Response{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamDerivativeOrderbookV2(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrderbookV2Client, error) { @@ -291,18 +293,18 @@ func (c *exchangeClient) StreamDerivativeOrderbookUpdate(ctx context.Context, ma return stream, nil } -func (c *exchangeClient) GetDerivativeMarkets(ctx context.Context, req derivativeExchangePB.MarketsRequest) (derivativeExchangePB.MarketsResponse, error) { +func (c *exchangeClient) GetDerivativeMarkets(ctx context.Context, req *derivativeExchangePB.MarketsRequest) (*derivativeExchangePB.MarketsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Markets(ctx, &req) + res, err := c.derivativeExchangeClient.Markets(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.MarketsResponse{}, err + return &derivativeExchangePB.MarketsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (derivativeExchangePB.MarketResponse, error) { +func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId string) (*derivativeExchangePB.MarketResponse, error) { req := derivativeExchangePB.MarketRequest{ MarketId: marketId, } @@ -311,10 +313,10 @@ func (c *exchangeClient) GetDerivativeMarket(ctx context.Context, marketId strin res, err := c.derivativeExchangeClient.Market(ctx, &req) if err != nil { fmt.Println(err) - return derivativeExchangePB.MarketResponse{}, err + return &derivativeExchangePB.MarketResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds []string) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamMarketClient, error) { @@ -332,9 +334,9 @@ func (c *exchangeClient) StreamDerivativeMarket(ctx context.Context, marketIds [ return stream, nil } -func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { +func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req *derivativeExchangePB.StreamPositionsRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamPositionsClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamPositions(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamPositions(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -343,9 +345,9 @@ func (c *exchangeClient) StreamDerivativePositions(ctx context.Context, req deri return stream, nil } -func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { +func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamOrders(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamOrders(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -354,31 +356,31 @@ func (c *exchangeClient) StreamDerivativeOrders(ctx context.Context, req derivat return stream, nil } -func (c *exchangeClient) GetDerivativeTrades(ctx context.Context, req derivativeExchangePB.TradesRequest) (derivativeExchangePB.TradesResponse, error) { +func (c *exchangeClient) GetDerivativeTrades(ctx context.Context, req *derivativeExchangePB.TradesRequest) (*derivativeExchangePB.TradesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.Trades(ctx, &req) + res, err := c.derivativeExchangeClient.Trades(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.TradesResponse{}, err + return &derivativeExchangePB.TradesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeTradesV2(ctx context.Context, req derivativeExchangePB.TradesV2Request) (derivativeExchangePB.TradesV2Response, error) { +func (c *exchangeClient) GetDerivativeTradesV2(ctx context.Context, req *derivativeExchangePB.TradesV2Request) (*derivativeExchangePB.TradesV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.TradesV2(ctx, &req) + res, err := c.derivativeExchangeClient.TradesV2(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.TradesV2Response{}, err + return &derivativeExchangePB.TradesV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { +func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req *derivativeExchangePB.StreamTradesRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamTrades(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamTrades(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -387,9 +389,9 @@ func (c *exchangeClient) StreamDerivativeTrades(ctx context.Context, req derivat return stream, nil } -func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { +func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req *derivativeExchangePB.StreamTradesV2Request) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamTradesV2Client, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamTradesV2(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamTradesV2(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -398,41 +400,41 @@ func (c *exchangeClient) StreamDerivativeV2Trades(ctx context.Context, req deriv return stream, nil } -func (c *exchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req derivativeExchangePB.SubaccountOrdersListRequest) (derivativeExchangePB.SubaccountOrdersListResponse, error) { +func (c *exchangeClient) GetSubaccountDerivativeOrdersList(ctx context.Context, req *derivativeExchangePB.SubaccountOrdersListRequest) (*derivativeExchangePB.SubaccountOrdersListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.SubaccountOrdersList(ctx, &req) + res, err := c.derivativeExchangeClient.SubaccountOrdersList(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.SubaccountOrdersListResponse{}, err + return &derivativeExchangePB.SubaccountOrdersListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req derivativeExchangePB.SubaccountTradesListRequest) (derivativeExchangePB.SubaccountTradesListResponse, error) { +func (c *exchangeClient) GetSubaccountDerivativeTradesList(ctx context.Context, req *derivativeExchangePB.SubaccountTradesListRequest) (*derivativeExchangePB.SubaccountTradesListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.SubaccountTradesList(ctx, &req) + res, err := c.derivativeExchangeClient.SubaccountTradesList(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.SubaccountTradesListResponse{}, err + return &derivativeExchangePB.SubaccountTradesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.OrdersHistoryRequest) (derivativeExchangePB.OrdersHistoryResponse, error) { +func (c *exchangeClient) GetHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.OrdersHistoryRequest) (*derivativeExchangePB.OrdersHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.OrdersHistory(ctx, &req) + res, err := c.derivativeExchangeClient.OrdersHistory(ctx, req) if err != nil { - return derivativeExchangePB.OrdersHistoryResponse{}, err + return &derivativeExchangePB.OrdersHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { +func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, req *derivativeExchangePB.StreamOrdersHistoryRequest) (derivativeExchangePB.InjectiveDerivativeExchangeRPC_StreamOrdersHistoryClient, error) { ctx = c.getCookie(ctx) - stream, err := c.derivativeExchangeClient.StreamOrdersHistory(ctx, &req) + stream, err := c.derivativeExchangeClient.StreamOrdersHistory(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -441,31 +443,31 @@ func (c *exchangeClient) StreamHistoricalDerivativeOrders(ctx context.Context, r return stream, nil } -func (c *exchangeClient) GetDerivativeFundingPayments(ctx context.Context, req derivativeExchangePB.FundingPaymentsRequest) (derivativeExchangePB.FundingPaymentsResponse, error) { +func (c *exchangeClient) GetDerivativeFundingPayments(ctx context.Context, req *derivativeExchangePB.FundingPaymentsRequest) (*derivativeExchangePB.FundingPaymentsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.FundingPayments(ctx, &req) + res, err := c.derivativeExchangeClient.FundingPayments(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.FundingPaymentsResponse{}, err + return &derivativeExchangePB.FundingPaymentsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetDerivativeFundingRates(ctx context.Context, req derivativeExchangePB.FundingRatesRequest) (derivativeExchangePB.FundingRatesResponse, error) { +func (c *exchangeClient) GetDerivativeFundingRates(ctx context.Context, req *derivativeExchangePB.FundingRatesRequest) (*derivativeExchangePB.FundingRatesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.derivativeExchangeClient.FundingRates(ctx, &req) + res, err := c.derivativeExchangeClient.FundingRates(ctx, req) if err != nil { fmt.Println(err) - return derivativeExchangePB.FundingRatesResponse{}, err + return &derivativeExchangePB.FundingRatesResponse{}, err } - return *res, nil + return res, nil } // Oracle RPC -func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (oraclePB.PriceResponse, error) { +func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string, oracleScaleFactor uint32) (*oraclePB.PriceResponse, error) { req := oraclePB.PriceRequest{ BaseSymbol: baseSymbol, QuoteSymbol: quoteSymbol, @@ -477,23 +479,23 @@ func (c *exchangeClient) GetPrice(ctx context.Context, baseSymbol string, quoteS res, err := c.oracleClient.Price(ctx, &req) if err != nil { fmt.Println(err) - return oraclePB.PriceResponse{}, err + return &oraclePB.PriceResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetOracleList(ctx context.Context) (oraclePB.OracleListResponse, error) { +func (c *exchangeClient) GetOracleList(ctx context.Context) (*oraclePB.OracleListResponse, error) { req := oraclePB.OracleListRequest{} ctx = c.getCookie(ctx) res, err := c.oracleClient.OracleList(ctx, &req) if err != nil { fmt.Println(err) - return oraclePB.OracleListResponse{}, err + return &oraclePB.OracleListResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamPrices(ctx context.Context, baseSymbol string, quoteSymbol string, oracleType string) (oraclePB.InjectiveOracleRPC_StreamPricesClient, error) { @@ -515,7 +517,7 @@ func (c *exchangeClient) StreamPrices(ctx context.Context, baseSymbol string, qu // Auction RPC -func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB.AuctionEndpointResponse, error) { +func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (*auctionPB.AuctionEndpointResponse, error) { req := auctionPB.AuctionEndpointRequest{ Round: round, } @@ -524,23 +526,23 @@ func (c *exchangeClient) GetAuction(ctx context.Context, round int64) (auctionPB res, err := c.auctionClient.AuctionEndpoint(ctx, &req) if err != nil { fmt.Println(err) - return auctionPB.AuctionEndpointResponse{}, err + return &auctionPB.AuctionEndpointResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetAuctions(ctx context.Context) (auctionPB.AuctionsResponse, error) { +func (c *exchangeClient) GetAuctions(ctx context.Context) (*auctionPB.AuctionsResponse, error) { req := auctionPB.AuctionsRequest{} ctx = c.getCookie(ctx) res, err := c.auctionClient.Auctions(ctx, &req) if err != nil { fmt.Println(err) - return auctionPB.AuctionsResponse{}, err + return &auctionPB.AuctionsResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuctionRPC_StreamBidsClient, error) { @@ -558,7 +560,7 @@ func (c *exchangeClient) StreamBids(ctx context.Context) (auctionPB.InjectiveAuc // Accounts RPC -func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (accountPB.SubaccountsListResponse, error) { +func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress string) (*accountPB.SubaccountsListResponse, error) { req := accountPB.SubaccountsListRequest{ AccountAddress: accountAddress, } @@ -567,13 +569,13 @@ func (c *exchangeClient) GetSubaccountsList(ctx context.Context, accountAddress res, err := c.accountClient.SubaccountsList(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountsListResponse{}, err + return &accountPB.SubaccountsListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (accountPB.SubaccountBalanceEndpointResponse, error) { +func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId string, denom string) (*accountPB.SubaccountBalanceEndpointResponse, error) { req := accountPB.SubaccountBalanceEndpointRequest{ SubaccountId: subaccountId, Denom: denom, @@ -583,10 +585,10 @@ func (c *exchangeClient) GetSubaccountBalance(ctx context.Context, subaccountId res, err := c.accountClient.SubaccountBalanceEndpoint(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountBalanceEndpointResponse{}, err + return &accountPB.SubaccountBalanceEndpointResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSubaccountBalance(ctx context.Context, subaccountId string) (accountPB.InjectiveAccountsRPC_StreamSubaccountBalanceClient, error) { @@ -604,7 +606,7 @@ func (c *exchangeClient) StreamSubaccountBalance(ctx context.Context, subaccount return stream, nil } -func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (accountPB.SubaccountBalancesListResponse, error) { +func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccountId string) (*accountPB.SubaccountBalancesListResponse, error) { req := accountPB.SubaccountBalancesListRequest{ SubaccountId: subaccountId, } @@ -613,46 +615,46 @@ func (c *exchangeClient) GetSubaccountBalancesList(ctx context.Context, subaccou res, err := c.accountClient.SubaccountBalancesList(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.SubaccountBalancesListResponse{}, err + return &accountPB.SubaccountBalancesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountHistory(ctx context.Context, req accountPB.SubaccountHistoryRequest) (accountPB.SubaccountHistoryResponse, error) { +func (c *exchangeClient) GetSubaccountHistory(ctx context.Context, req *accountPB.SubaccountHistoryRequest) (*accountPB.SubaccountHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.SubaccountHistory(ctx, &req) + res, err := c.accountClient.SubaccountHistory(ctx, req) if err != nil { fmt.Println(err) - return accountPB.SubaccountHistoryResponse{}, err + return &accountPB.SubaccountHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountOrderSummary(ctx context.Context, req accountPB.SubaccountOrderSummaryRequest) (accountPB.SubaccountOrderSummaryResponse, error) { +func (c *exchangeClient) GetSubaccountOrderSummary(ctx context.Context, req *accountPB.SubaccountOrderSummaryRequest) (*accountPB.SubaccountOrderSummaryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.SubaccountOrderSummary(ctx, &req) + res, err := c.accountClient.SubaccountOrderSummary(ctx, req) if err != nil { fmt.Println(err) - return accountPB.SubaccountOrderSummaryResponse{}, err + return &accountPB.SubaccountOrderSummaryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetOrderStates(ctx context.Context, req accountPB.OrderStatesRequest) (accountPB.OrderStatesResponse, error) { +func (c *exchangeClient) GetOrderStates(ctx context.Context, req *accountPB.OrderStatesRequest) (*accountPB.OrderStatesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.OrderStates(ctx, &req) + res, err := c.accountClient.OrderStates(ctx, req) if err != nil { fmt.Println(err) - return accountPB.OrderStatesResponse{}, err + return &accountPB.OrderStatesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (accountPB.PortfolioResponse, error) { +func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string) (*accountPB.PortfolioResponse, error) { req := accountPB.PortfolioRequest{ AccountAddress: accountAddress, } @@ -661,37 +663,37 @@ func (c *exchangeClient) GetPortfolio(ctx context.Context, accountAddress string res, err := c.accountClient.Portfolio(ctx, &req) if err != nil { fmt.Println(err) - return accountPB.PortfolioResponse{}, err + return &accountPB.PortfolioResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetRewards(ctx context.Context, req accountPB.RewardsRequest) (accountPB.RewardsResponse, error) { +func (c *exchangeClient) GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.accountClient.Rewards(ctx, &req) + res, err := c.accountClient.Rewards(ctx, req) if err != nil { fmt.Println(err) - return accountPB.RewardsResponse{}, err + return &accountPB.RewardsResponse{}, err } - return *res, nil + return res, nil } // Spot RPC -func (c *exchangeClient) GetSpotOrders(ctx context.Context, req spotExchangePB.OrdersRequest) (spotExchangePB.OrdersResponse, error) { +func (c *exchangeClient) GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Orders(ctx, &req) + res, err := c.spotExchangeClient.Orders(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.OrdersResponse{}, err + return &spotExchangePB.OrdersResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (spotExchangePB.OrderbookV2Response, error) { +func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error) { req := spotExchangePB.OrderbookV2Request{ MarketId: marketId, } @@ -700,13 +702,13 @@ func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string res, err := c.spotExchangeClient.OrderbookV2(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.OrderbookV2Response{}, err + return &spotExchangePB.OrderbookV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (spotExchangePB.OrderbooksV2Response, error) { +func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) { req := spotExchangePB.OrderbooksV2Request{ MarketIds: marketIds, } @@ -715,10 +717,10 @@ func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []st res, err := c.spotExchangeClient.OrderbooksV2(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.OrderbooksV2Response{}, err + return &spotExchangePB.OrderbooksV2Response{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) { @@ -751,18 +753,18 @@ func (c *exchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds [] return stream, nil } -func (c *exchangeClient) GetSpotMarkets(ctx context.Context, req spotExchangePB.MarketsRequest) (spotExchangePB.MarketsResponse, error) { +func (c *exchangeClient) GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Markets(ctx, &req) + res, err := c.spotExchangeClient.Markets(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.MarketsResponse{}, err + return &spotExchangePB.MarketsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (spotExchangePB.MarketResponse, error) { +func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error) { req := spotExchangePB.MarketRequest{ MarketId: marketId, } @@ -771,10 +773,10 @@ func (c *exchangeClient) GetSpotMarket(ctx context.Context, marketId string) (sp res, err := c.spotExchangeClient.Market(ctx, &req) if err != nil { fmt.Println(err) - return spotExchangePB.MarketResponse{}, err + return &spotExchangePB.MarketResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error) { @@ -792,9 +794,9 @@ func (c *exchangeClient) StreamSpotMarket(ctx context.Context, marketIds []strin return stream, nil } -func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { +func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamOrders(ctx, &req) + stream, err := c.spotExchangeClient.StreamOrders(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -803,31 +805,31 @@ func (c *exchangeClient) StreamSpotOrders(ctx context.Context, req spotExchangeP return stream, nil } -func (c *exchangeClient) GetSpotTrades(ctx context.Context, req spotExchangePB.TradesRequest) (spotExchangePB.TradesResponse, error) { +func (c *exchangeClient) GetSpotTrades(ctx context.Context, req *spotExchangePB.TradesRequest) (*spotExchangePB.TradesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.Trades(ctx, &req) + res, err := c.spotExchangeClient.Trades(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.TradesResponse{}, err + return &spotExchangePB.TradesResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSpotTradesV2(ctx context.Context, req spotExchangePB.TradesV2Request) (spotExchangePB.TradesV2Response, error) { +func (c *exchangeClient) GetSpotTradesV2(ctx context.Context, req *spotExchangePB.TradesV2Request) (*spotExchangePB.TradesV2Response, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.TradesV2(ctx, &req) + res, err := c.spotExchangeClient.TradesV2(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.TradesV2Response{}, err + return &spotExchangePB.TradesV2Response{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { +func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req *spotExchangePB.StreamTradesRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamTrades(ctx, &req) + stream, err := c.spotExchangeClient.StreamTrades(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -836,9 +838,9 @@ func (c *exchangeClient) StreamSpotTrades(ctx context.Context, req spotExchangeP return stream, nil } -func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { +func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req *spotExchangePB.StreamTradesV2Request) (spotExchangePB.InjectiveSpotExchangeRPC_StreamTradesV2Client, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamTradesV2(ctx, &req) + stream, err := c.spotExchangeClient.StreamTradesV2(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -847,41 +849,41 @@ func (c *exchangeClient) StreamSpotTradesV2(ctx context.Context, req spotExchang return stream, nil } -func (c *exchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req spotExchangePB.SubaccountOrdersListRequest) (spotExchangePB.SubaccountOrdersListResponse, error) { +func (c *exchangeClient) GetSubaccountSpotOrdersList(ctx context.Context, req *spotExchangePB.SubaccountOrdersListRequest) (*spotExchangePB.SubaccountOrdersListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.SubaccountOrdersList(ctx, &req) + res, err := c.spotExchangeClient.SubaccountOrdersList(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.SubaccountOrdersListResponse{}, err + return &spotExchangePB.SubaccountOrdersListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req spotExchangePB.SubaccountTradesListRequest) (spotExchangePB.SubaccountTradesListResponse, error) { +func (c *exchangeClient) GetSubaccountSpotTradesList(ctx context.Context, req *spotExchangePB.SubaccountTradesListRequest) (*spotExchangePB.SubaccountTradesListResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.SubaccountTradesList(ctx, &req) + res, err := c.spotExchangeClient.SubaccountTradesList(ctx, req) if err != nil { fmt.Println(err) - return spotExchangePB.SubaccountTradesListResponse{}, err + return &spotExchangePB.SubaccountTradesListResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetHistoricalSpotOrders(ctx context.Context, req spotExchangePB.OrdersHistoryRequest) (spotExchangePB.OrdersHistoryResponse, error) { +func (c *exchangeClient) GetHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.OrdersHistoryRequest) (*spotExchangePB.OrdersHistoryResponse, error) { ctx = c.getCookie(ctx) - res, err := c.spotExchangeClient.OrdersHistory(ctx, &req) + res, err := c.spotExchangeClient.OrdersHistory(ctx, req) if err != nil { - return spotExchangePB.OrdersHistoryResponse{}, err + return &spotExchangePB.OrdersHistoryResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { +func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req *spotExchangePB.StreamOrdersHistoryRequest) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrdersHistoryClient, error) { ctx = c.getCookie(ctx) - stream, err := c.spotExchangeClient.StreamOrdersHistory(ctx, &req) + stream, err := c.spotExchangeClient.StreamOrdersHistory(ctx, req) if err != nil { fmt.Println(err) return nil, err @@ -890,59 +892,59 @@ func (c *exchangeClient) StreamHistoricalSpotOrders(ctx context.Context, req spo return stream, nil } -func (c *exchangeClient) GetInsuranceFunds(ctx context.Context, req insurancePB.FundsRequest) (insurancePB.FundsResponse, error) { +func (c *exchangeClient) GetInsuranceFunds(ctx context.Context, req *insurancePB.FundsRequest) (*insurancePB.FundsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.insuranceClient.Funds(ctx, &req) + res, err := c.insuranceClient.Funds(ctx, req) if err != nil { fmt.Println(err) - return insurancePB.FundsResponse{}, err + return &insurancePB.FundsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error) { +func (c *exchangeClient) GetRedemptions(ctx context.Context, req *insurancePB.RedemptionsRequest) (*insurancePB.RedemptionsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.insuranceClient.Redemptions(ctx, &req) + res, err := c.insuranceClient.Redemptions(ctx, req) if err != nil { fmt.Println(err) - return insurancePB.RedemptionsResponse{}, err + return &insurancePB.RedemptionsResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) Ping(ctx context.Context, req metaPB.PingRequest) (metaPB.PingResponse, error) { +func (c *exchangeClient) Ping(ctx context.Context, req *metaPB.PingRequest) (*metaPB.PingResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Ping(ctx, &req) + res, err := c.metaClient.Ping(ctx, req) if err != nil { fmt.Println(err) - return metaPB.PingResponse{}, err + return &metaPB.PingResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetVersion(ctx context.Context, req metaPB.VersionRequest) (metaPB.VersionResponse, error) { +func (c *exchangeClient) GetVersion(ctx context.Context, req *metaPB.VersionRequest) (*metaPB.VersionResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Version(ctx, &req) + res, err := c.metaClient.Version(ctx, req) if err != nil { fmt.Println(err) - return metaPB.VersionResponse{}, err + return &metaPB.VersionResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) { +func (c *exchangeClient) GetInfo(ctx context.Context, req *metaPB.InfoRequest) (*metaPB.InfoResponse, error) { ctx = c.getCookie(ctx) - res, err := c.metaClient.Info(ctx, &req) + res, err := c.metaClient.Info(ctx, req) if err != nil { fmt.Println(err) - return metaPB.InfoResponse{}, err + return &metaPB.InfoResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) { @@ -959,30 +961,30 @@ func (c *exchangeClient) StreamKeepalive(ctx context.Context) (metaPB.InjectiveM } // Deprecated: Use GetAccountPortfolioBalances instead. -func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error) { +func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioResponse, error) { ctx = c.getCookie(ctx) res, err := c.portfolioExchangeClient.AccountPortfolio(ctx, &portfolioExchangePB.AccountPortfolioRequest{ AccountAddress: accountAddress, }) if err != nil { fmt.Println(err) - return portfolioExchangePB.AccountPortfolioResponse{}, err + return &portfolioExchangePB.AccountPortfolioResponse{}, err } - return *res, nil + return res, nil } -func (c *exchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioBalancesResponse, error) { +func (c *exchangeClient) GetAccountPortfolioBalances(ctx context.Context, accountAddress string) (*portfolioExchangePB.AccountPortfolioBalancesResponse, error) { ctx = c.getCookie(ctx) res, err := c.portfolioExchangeClient.AccountPortfolioBalances(ctx, &portfolioExchangePB.AccountPortfolioBalancesRequest{ AccountAddress: accountAddress, }) if err != nil { fmt.Println(err) - return portfolioExchangePB.AccountPortfolioBalancesResponse{}, err + return &portfolioExchangePB.AccountPortfolioBalancesResponse{}, err } - return *res, nil + return res, nil } func (c *exchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) { diff --git a/client/explorer/explorer.go b/client/explorer/explorer.go index e5fcef53..00c76fc6 100644 --- a/client/explorer/explorer.go +++ b/client/explorer/explorer.go @@ -3,6 +3,9 @@ package exchange import ( "context" "fmt" + + "google.golang.org/grpc/credentials/insecure" + "github.com/InjectiveLabs/sdk-go/client/common" explorerPB "github.com/InjectiveLabs/sdk-go/exchange/explorer_rpc/pb" "google.golang.org/grpc/metadata" @@ -14,21 +17,21 @@ import ( type ExplorerClient interface { QueryClient() *grpc.ClientConn - GetTxByTxHash(ctx context.Context, hash string) (explorerPB.GetTxByTxHashResponse, error) - GetTxs(ctx context.Context, req explorerPB.GetTxsRequest) (explorerPB.GetTxsResponse, error) - GetBlock(ctx context.Context, blockHeight string) (explorerPB.GetBlockResponse, error) - GetBlocks(ctx context.Context) (explorerPB.GetBlocksResponse, error) - GetAccountTxs(ctx context.Context, req explorerPB.GetAccountTxsRequest) (explorerPB.GetAccountTxsResponse, error) - GetPeggyDeposits(ctx context.Context, req explorerPB.GetPeggyDepositTxsRequest) (explorerPB.GetPeggyDepositTxsResponse, error) - GetPeggyWithdrawals(ctx context.Context, req explorerPB.GetPeggyWithdrawalTxsRequest) (explorerPB.GetPeggyWithdrawalTxsResponse, error) - GetIBCTransfers(ctx context.Context, req explorerPB.GetIBCTransferTxsRequest) (explorerPB.GetIBCTransferTxsResponse, error) + GetTxByTxHash(ctx context.Context, hash string) (*explorerPB.GetTxByTxHashResponse, error) + GetTxs(ctx context.Context, req *explorerPB.GetTxsRequest) (*explorerPB.GetTxsResponse, error) + GetBlock(ctx context.Context, blockHeight string) (*explorerPB.GetBlockResponse, error) + GetBlocks(ctx context.Context) (*explorerPB.GetBlocksResponse, error) + GetAccountTxs(ctx context.Context, req *explorerPB.GetAccountTxsRequest) (*explorerPB.GetAccountTxsResponse, error) + GetPeggyDeposits(ctx context.Context, req *explorerPB.GetPeggyDepositTxsRequest) (*explorerPB.GetPeggyDepositTxsResponse, error) + GetPeggyWithdrawals(ctx context.Context, req *explorerPB.GetPeggyWithdrawalTxsRequest) (*explorerPB.GetPeggyWithdrawalTxsResponse, error) + GetIBCTransfers(ctx context.Context, req *explorerPB.GetIBCTransferTxsRequest) (*explorerPB.GetIBCTransferTxsResponse, error) StreamTxs(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamTxsClient, error) StreamBlocks(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamBlocksClient, error) - GetWasmCodes(ctx context.Context, req explorerPB.GetWasmCodesRequest) (explorerPB.GetWasmCodesResponse, error) - GetWasmCodeByID(ctx context.Context, req explorerPB.GetWasmCodeByIDRequest) (explorerPB.GetWasmCodeByIDResponse, error) - GetWasmContracts(ctx context.Context, req explorerPB.GetWasmContractsRequest) (explorerPB.GetWasmContractsResponse, error) - GetWasmContractByAddress(ctx context.Context, req explorerPB.GetWasmContractByAddressRequest) (explorerPB.GetWasmContractByAddressResponse, error) - GetCW20Balance(ctx context.Context, req explorerPB.GetCw20BalanceRequest) (explorerPB.GetCw20BalanceResponse, error) + GetWasmCodes(ctx context.Context, req *explorerPB.GetWasmCodesRequest) (*explorerPB.GetWasmCodesResponse, error) + GetWasmCodeByID(ctx context.Context, req *explorerPB.GetWasmCodeByIDRequest) (*explorerPB.GetWasmCodeByIDResponse, error) + GetWasmContracts(ctx context.Context, req *explorerPB.GetWasmContractsRequest) (*explorerPB.GetWasmContractsResponse, error) + GetWasmContractByAddress(ctx context.Context, req *explorerPB.GetWasmContractByAddressRequest) (*explorerPB.GetWasmContractByAddressResponse, error) + GetCW20Balance(ctx context.Context, req *explorerPB.GetCw20BalanceRequest) (*explorerPB.GetCw20BalanceResponse, error) Close() } @@ -51,7 +54,7 @@ func NewExplorerClient(network common.Network, options ...common.ClientOption) ( if opts.TLSCert != nil { conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc)) } else { - conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithInsecure(), grpc.WithContextDialer(common.DialerFunc)) + conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc)) } if err != nil { err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExplorerGrpcEndpoint) @@ -80,14 +83,16 @@ type explorerClient struct { conn *grpc.ClientConn logger log.Logger - sessionCookie string explorerClient explorerPB.InjectiveExplorerRPCClient } func (c *explorerClient) requestCookie() metadata.MD { var header metadata.MD req := explorerPB.GetTxsRequest{} - c.explorerClient.GetTxs(context.Background(), &req, grpc.Header(&header)) + _, err := c.explorerClient.GetTxs(context.Background(), &req, grpc.Header(&header)) + if err != nil { + panic(err) + } return header } @@ -97,18 +102,11 @@ func (c *explorerClient) getCookie(ctx context.Context) context.Context { return metadata.AppendToOutgoingContext(ctx, "cookie", cookie) } -func (c *explorerClient) setCookie(metadata metadata.MD) { - md := metadata.Get("set-cookie") - if len(md) > 0 { - c.sessionCookie = md[0] - } -} - func (c *explorerClient) QueryClient() *grpc.ClientConn { return c.conn } -func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (explorerPB.GetTxByTxHashResponse, error) { +func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (*explorerPB.GetTxByTxHashResponse, error) { req := explorerPB.GetTxByTxHashRequest{ Hash: hash, } @@ -117,37 +115,37 @@ func (c *explorerClient) GetTxByTxHash(ctx context.Context, hash string) (explor res, err := c.explorerClient.GetTxByTxHash(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetTxByTxHashResponse{}, err + return &explorerPB.GetTxByTxHashResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetAccountTxs(ctx context.Context, req explorerPB.GetAccountTxsRequest) (explorerPB.GetAccountTxsResponse, error) { +func (c *explorerClient) GetAccountTxs(ctx context.Context, req *explorerPB.GetAccountTxsRequest) (*explorerPB.GetAccountTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetAccountTxs(ctx, &req) + res, err := c.explorerClient.GetAccountTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetAccountTxsResponse{}, err + return &explorerPB.GetAccountTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetBlocks(ctx context.Context) (explorerPB.GetBlocksResponse, error) { +func (c *explorerClient) GetBlocks(ctx context.Context) (*explorerPB.GetBlocksResponse, error) { req := explorerPB.GetBlocksRequest{} ctx = c.getCookie(ctx) res, err := c.explorerClient.GetBlocks(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetBlocksResponse{}, err + return &explorerPB.GetBlocksResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (explorerPB.GetBlockResponse, error) { +func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (*explorerPB.GetBlockResponse, error) { req := explorerPB.GetBlockRequest{ Id: blockHeight, } @@ -156,54 +154,54 @@ func (c *explorerClient) GetBlock(ctx context.Context, blockHeight string) (expl res, err := c.explorerClient.GetBlock(ctx, &req) if err != nil { fmt.Println(err) - return explorerPB.GetBlockResponse{}, err + return &explorerPB.GetBlockResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetTxs(ctx context.Context, req explorerPB.GetTxsRequest) (explorerPB.GetTxsResponse, error) { +func (c *explorerClient) GetTxs(ctx context.Context, req *explorerPB.GetTxsRequest) (*explorerPB.GetTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetTxs(ctx, &req) + res, err := c.explorerClient.GetTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetTxsResponse{}, err + return &explorerPB.GetTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetPeggyDeposits(ctx context.Context, req explorerPB.GetPeggyDepositTxsRequest) (explorerPB.GetPeggyDepositTxsResponse, error) { +func (c *explorerClient) GetPeggyDeposits(ctx context.Context, req *explorerPB.GetPeggyDepositTxsRequest) (*explorerPB.GetPeggyDepositTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetPeggyDepositTxs(ctx, &req) + res, err := c.explorerClient.GetPeggyDepositTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetPeggyDepositTxsResponse{}, err + return &explorerPB.GetPeggyDepositTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetPeggyWithdrawals(ctx context.Context, req explorerPB.GetPeggyWithdrawalTxsRequest) (explorerPB.GetPeggyWithdrawalTxsResponse, error) { +func (c *explorerClient) GetPeggyWithdrawals(ctx context.Context, req *explorerPB.GetPeggyWithdrawalTxsRequest) (*explorerPB.GetPeggyWithdrawalTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetPeggyWithdrawalTxs(ctx, &req) + res, err := c.explorerClient.GetPeggyWithdrawalTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetPeggyWithdrawalTxsResponse{}, err + return &explorerPB.GetPeggyWithdrawalTxsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetIBCTransfers(ctx context.Context, req explorerPB.GetIBCTransferTxsRequest) (explorerPB.GetIBCTransferTxsResponse, error) { +func (c *explorerClient) GetIBCTransfers(ctx context.Context, req *explorerPB.GetIBCTransferTxsRequest) (*explorerPB.GetIBCTransferTxsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetIBCTransferTxs(ctx, &req) + res, err := c.explorerClient.GetIBCTransferTxs(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetIBCTransferTxsResponse{}, err + return &explorerPB.GetIBCTransferTxsResponse{}, err } - return *res, nil + return res, nil } func (c *explorerClient) StreamTxs(ctx context.Context) (explorerPB.InjectiveExplorerRPC_StreamTxsClient, error) { @@ -232,59 +230,59 @@ func (c *explorerClient) StreamBlocks(ctx context.Context) (explorerPB.Injective return stream, nil } -func (c *explorerClient) GetWasmCodes(ctx context.Context, req explorerPB.GetWasmCodesRequest) (explorerPB.GetWasmCodesResponse, error) { +func (c *explorerClient) GetWasmCodes(ctx context.Context, req *explorerPB.GetWasmCodesRequest) (*explorerPB.GetWasmCodesResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmCodes(ctx, &req) + res, err := c.explorerClient.GetWasmCodes(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmCodesResponse{}, err + return &explorerPB.GetWasmCodesResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmCodeByID(ctx context.Context, req explorerPB.GetWasmCodeByIDRequest) (explorerPB.GetWasmCodeByIDResponse, error) { +func (c *explorerClient) GetWasmCodeByID(ctx context.Context, req *explorerPB.GetWasmCodeByIDRequest) (*explorerPB.GetWasmCodeByIDResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmCodeByID(ctx, &req) + res, err := c.explorerClient.GetWasmCodeByID(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmCodeByIDResponse{}, err + return &explorerPB.GetWasmCodeByIDResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmContracts(ctx context.Context, req explorerPB.GetWasmContractsRequest) (explorerPB.GetWasmContractsResponse, error) { +func (c *explorerClient) GetWasmContracts(ctx context.Context, req *explorerPB.GetWasmContractsRequest) (*explorerPB.GetWasmContractsResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmContracts(ctx, &req) + res, err := c.explorerClient.GetWasmContracts(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmContractsResponse{}, err + return &explorerPB.GetWasmContractsResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetWasmContractByAddress(ctx context.Context, req explorerPB.GetWasmContractByAddressRequest) (explorerPB.GetWasmContractByAddressResponse, error) { +func (c *explorerClient) GetWasmContractByAddress(ctx context.Context, req *explorerPB.GetWasmContractByAddressRequest) (*explorerPB.GetWasmContractByAddressResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetWasmContractByAddress(ctx, &req) + res, err := c.explorerClient.GetWasmContractByAddress(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetWasmContractByAddressResponse{}, err + return &explorerPB.GetWasmContractByAddressResponse{}, err } - return *res, nil + return res, nil } -func (c *explorerClient) GetCW20Balance(ctx context.Context, req explorerPB.GetCw20BalanceRequest) (explorerPB.GetCw20BalanceResponse, error) { +func (c *explorerClient) GetCW20Balance(ctx context.Context, req *explorerPB.GetCw20BalanceRequest) (*explorerPB.GetCw20BalanceResponse, error) { ctx = c.getCookie(ctx) - res, err := c.explorerClient.GetCw20Balance(ctx, &req) + res, err := c.explorerClient.GetCw20Balance(ctx, req) if err != nil { fmt.Println(err) - return explorerPB.GetCw20BalanceResponse{}, err + return &explorerPB.GetCw20BalanceResponse{}, err } - return *res, nil + return res, nil } func (c *explorerClient) Close() { diff --git a/client/metadata/assets/devnet-1.ini b/client/metadata/assets/devnet-1.ini index ea7462f8..5d4c12cb 100644 --- a/client/metadata/assets/devnet-1.ini +++ b/client/metadata/assets/devnet-1.ini @@ -255,4 +255,3 @@ decimals = 18 [USDC] peggy_denom = peggy0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals = 6 - diff --git a/client/metadata/fetch_metadata.go b/client/metadata/fetch_metadata.go index 4e9d02bb..cb4f08b0 100644 --- a/client/metadata/fetch_metadata.go +++ b/client/metadata/fetch_metadata.go @@ -3,25 +3,18 @@ package main import ( "context" "fmt" + "os" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" - "os" //derivativeExchangePB "github.com/InjectiveLabs/sdk-go/exchange/derivative_exchange_rpc/pb" - spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" "math" "strconv" -) -func find(slice []string, val string) bool { - for _, item := range slice { - if item == val { - return true - } - } - return false -} + spotExchangePB "github.com/InjectiveLabs/sdk-go/exchange/spot_exchange_rpc/pb" +) var metadataTemplate = `[%s] description = '%s %s %s' @@ -50,7 +43,7 @@ func FetchDenom(network common.Network) { // fetch spot markets spotMarketsReq := spotExchangePB.MarketsRequest{MarketStatus: "active"} ctx := context.Background() - spotRes, err := exchangeClient.GetSpotMarkets(ctx, spotMarketsReq) + spotRes, err := exchangeClient.GetSpotMarkets(ctx, &spotMarketsReq) if err != nil { panic(err) } @@ -90,7 +83,7 @@ func FetchDenom(network common.Network) { //fetch derivative markets derivativeMarketsReq := derivativeExchangePB.MarketsRequest{MarketStatus: "active"} - derivativeRes, err := exchangeClient.GetDerivativeMarkets(ctx, derivativeMarketsReq) + derivativeRes, err := exchangeClient.GetDerivativeMarkets(ctx, &derivativeMarketsReq) if err != nil { panic(err) } diff --git a/ethereum/util/amounts.go b/ethereum/util/amounts.go index b195b404..1435beaa 100644 --- a/ethereum/util/amounts.go +++ b/ethereum/util/amounts.go @@ -27,11 +27,11 @@ func (w *Wei) Scan(v interface{}) error { return nil } var source string - switch v.(type) { + switch value := v.(type) { case string: - source = v.(string) + source = value case []byte: - source = string(v.([]byte)) + source = string(value) default: return fmt.Errorf("incompatible type for decimal.Decimal: %T", v) } diff --git a/examples/chain/0_LocalOrderHash/example.go b/examples/chain/0_LocalOrderHash/example.go index d5b8efa0..2eb3e8f1 100644 --- a/examples/chain/0_LocalOrderHash/example.go +++ b/examples/chain/0_LocalOrderHash/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" "github.com/InjectiveLabs/sdk-go/client" diff --git a/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go b/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go index dafb9566..2b78c7df 100644 --- a/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go +++ b/examples/chain/10_MsgBatchCancelDerivativeOrders/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go b/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go index 1f329833..fd679dd3 100644 --- a/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go +++ b/examples/chain/11_MsgBatchCreateSpotLimitOrders/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go b/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go index 2843b8e7..4ddd83d3 100644 --- a/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go +++ b/examples/chain/12_MsgBatchCreateDerivativeLimitOrders/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/13_MsgIncreasePositionMargin/example.go b/examples/chain/13_MsgIncreasePositionMargin/example.go index 0d37a089..ce5742cd 100644 --- a/examples/chain/13_MsgIncreasePositionMargin/example.go +++ b/examples/chain/13_MsgIncreasePositionMargin/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/15_MsgWithdraw/example.go b/examples/chain/15_MsgWithdraw/example.go index ceaeb7f0..2f05671c 100644 --- a/examples/chain/15_MsgWithdraw/example.go +++ b/examples/chain/15_MsgWithdraw/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/16_MsgSubaccountTransfer/example.go b/examples/chain/16_MsgSubaccountTransfer/example.go index 70a5ee81..06bac9cf 100644 --- a/examples/chain/16_MsgSubaccountTransfer/example.go +++ b/examples/chain/16_MsgSubaccountTransfer/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/17_MsgBatchUpdateOrders/example.go b/examples/chain/17_MsgBatchUpdateOrders/example.go index 8c4e65e6..79c9db97 100644 --- a/examples/chain/17_MsgBatchUpdateOrders/example.go +++ b/examples/chain/17_MsgBatchUpdateOrders/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/18_MsgBid/example.go b/examples/chain/18_MsgBid/example.go index babe0f2c..74ac4de2 100644 --- a/examples/chain/18_MsgBid/example.go +++ b/examples/chain/18_MsgBid/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/19_MsgGrant/example.go b/examples/chain/19_MsgGrant/example.go index 1213cf4f..4fa1280b 100644 --- a/examples/chain/19_MsgGrant/example.go +++ b/examples/chain/19_MsgGrant/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/1_MsgSend/example.go b/examples/chain/1_MsgSend/example.go index 552e6dfa..c90c3c3b 100644 --- a/examples/chain/1_MsgSend/example.go +++ b/examples/chain/1_MsgSend/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/20_MsgExec/example.go b/examples/chain/20_MsgExec/example.go index aa3c0207..aef4f510 100644 --- a/examples/chain/20_MsgExec/example.go +++ b/examples/chain/20_MsgExec/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + 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" diff --git a/examples/chain/21_MsgRevoke/example.go b/examples/chain/21_MsgRevoke/example.go index ca2877c8..80ecc157 100644 --- a/examples/chain/21_MsgRevoke/example.go +++ b/examples/chain/21_MsgRevoke/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/22_MsgSendToEth/example.go b/examples/chain/22_MsgSendToEth/example.go index 81102cdb..4c79655f 100644 --- a/examples/chain/22_MsgSendToEth/example.go +++ b/examples/chain/22_MsgSendToEth/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/23_MsgRelayPriceFeedPrice/example.go b/examples/chain/23_MsgRelayPriceFeedPrice/example.go index a4cd3b9f..860e57d6 100644 --- a/examples/chain/23_MsgRelayPriceFeedPrice/example.go +++ b/examples/chain/23_MsgRelayPriceFeedPrice/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/24_MsgRegisterAsDMM/example.go b/examples/chain/24_MsgRegisterAsDMM/example.go index 1f3dfb70..7c9ec9ea 100644 --- a/examples/chain/24_MsgRegisterAsDMM/example.go +++ b/examples/chain/24_MsgRegisterAsDMM/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/25_MsgDelegate/example.go b/examples/chain/25_MsgDelegate/example.go index 60bcaf8b..84c18a20 100644 --- a/examples/chain/25_MsgDelegate/example.go +++ b/examples/chain/25_MsgDelegate/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/26_MsgWithdrawDelegatorReward/example.go b/examples/chain/26_MsgWithdrawDelegatorReward/example.go index d64c9df9..b93178db 100644 --- a/examples/chain/26_MsgWithdrawDelegatorReward/example.go +++ b/examples/chain/26_MsgWithdrawDelegatorReward/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/27_QueryAuthzGrants/example.go b/examples/chain/27_QueryAuthzGrants/example.go index f0fc0eb1..25ade850 100644 --- a/examples/chain/27_QueryAuthzGrants/example.go +++ b/examples/chain/27_QueryAuthzGrants/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/chain/28_BankBalances/example.go b/examples/chain/28_BankBalances/example.go index afcaca63..fbcabcf0 100644 --- a/examples/chain/28_BankBalances/example.go +++ b/examples/chain/28_BankBalances/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/chain/29_BankBalance/example.go b/examples/chain/29_BankBalance/example.go index ba2a0d5b..1946c666 100644 --- a/examples/chain/29_BankBalance/example.go +++ b/examples/chain/29_BankBalance/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/chain/2_MsgDeposit/example.go b/examples/chain/2_MsgDeposit/example.go index c4276c5d..26bc69f2 100644 --- a/examples/chain/2_MsgDeposit/example.go +++ b/examples/chain/2_MsgDeposit/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/30_MsgExternalTransfer/example.go b/examples/chain/30_MsgExternalTransfer/example.go index 4e89b201..2ff30426 100644 --- a/examples/chain/30_MsgExternalTransfer/example.go +++ b/examples/chain/30_MsgExternalTransfer/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/31_MsgMultiSend/example.go b/examples/chain/31_MsgMultiSend/example.go index 32ceba2a..e40018cd 100644 --- a/examples/chain/31_MsgMultiSend/example.go +++ b/examples/chain/31_MsgMultiSend/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/33_GetBlock/example.go b/examples/chain/33_GetBlock/example.go index a0e70672..35e195dd 100644 --- a/examples/chain/33_GetBlock/example.go +++ b/examples/chain/33_GetBlock/example.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" tmclient "github.com/InjectiveLabs/sdk-go/client/tm" ) diff --git a/examples/chain/34_OfflineSigning/example.go b/examples/chain/34_OfflineSigning/example.go index 16afce57..6962e625 100644 --- a/examples/chain/34_OfflineSigning/example.go +++ b/examples/chain/34_OfflineSigning/example.go @@ -4,11 +4,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "io/ioutil" "os" + "github.com/InjectiveLabs/sdk-go/client/core" + 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" diff --git a/examples/chain/35_StreamEventOrderFail/example.go b/examples/chain/35_StreamEventOrderFail/example.go index 93ec8115..4697f761 100644 --- a/examples/chain/35_StreamEventOrderFail/example.go +++ b/examples/chain/35_StreamEventOrderFail/example.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/chain/36_StreamEventOrderbookUpdate/example.go b/examples/chain/36_StreamEventOrderbookUpdate/example.go index a9b49ff1..c8394edc 100644 --- a/examples/chain/36_StreamEventOrderbookUpdate/example.go +++ b/examples/chain/36_StreamEventOrderbookUpdate/example.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/chain/37_DecodeTx/37_decode_tx.go b/examples/chain/37_DecodeTx/37_decode_tx.go index b444eb18..f72f564c 100644 --- a/examples/chain/37_DecodeTx/37_decode_tx.go +++ b/examples/chain/37_DecodeTx/37_decode_tx.go @@ -3,6 +3,7 @@ package main import ( "encoding/base64" "fmt" + cosmostxpb "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) diff --git a/examples/chain/38_MsgLiquidate/example.go b/examples/chain/38_MsgLiquidate/example.go index 26fd4522..2ca94cf6 100644 --- a/examples/chain/38_MsgLiquidate/example.go +++ b/examples/chain/38_MsgLiquidate/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/39_GetTx/example.go b/examples/chain/39_GetTx/example.go index 2a24f986..aaadc907 100644 --- a/examples/chain/39_GetTx/example.go +++ b/examples/chain/39_GetTx/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" - "github.com/InjectiveLabs/sdk-go/client/core" - exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "os" "time" + "github.com/InjectiveLabs/sdk-go/client/core" + exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/3_MsgCreateSpotLimitOrder/example.go b/examples/chain/3_MsgCreateSpotLimitOrder/example.go index 820e5103..fcdc56ab 100644 --- a/examples/chain/3_MsgCreateSpotLimitOrder/example.go +++ b/examples/chain/3_MsgCreateSpotLimitOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/40_ChainStream/example.go b/examples/chain/40_ChainStream/example.go index ce2c8ae0..3d933761 100644 --- a/examples/chain/40_ChainStream/example.go +++ b/examples/chain/40_ChainStream/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + chainStreamModule "github.com/InjectiveLabs/sdk-go/chain/stream/types" "github.com/InjectiveLabs/sdk-go/client" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/41_BroadcastMsgWithoutSimulation/example.go b/examples/chain/41_BroadcastMsgWithoutSimulation/example.go index ffcc0d02..7f353b9a 100644 --- a/examples/chain/41_BroadcastMsgWithoutSimulation/example.go +++ b/examples/chain/41_BroadcastMsgWithoutSimulation/example.go @@ -3,13 +3,14 @@ package main import ( "context" "fmt" + "os" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" "github.com/shopspring/decimal" - "os" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" chainclient "github.com/InjectiveLabs/sdk-go/client/chain" diff --git a/examples/chain/4_MsgCreateSpotMarketOrder/example.go b/examples/chain/4_MsgCreateSpotMarketOrder/example.go index c20cff97..8f24974c 100644 --- a/examples/chain/4_MsgCreateSpotMarketOrder/example.go +++ b/examples/chain/4_MsgCreateSpotMarketOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/5_MsgCancelSpotOrder/example.go b/examples/chain/5_MsgCancelSpotOrder/example.go index ae5af8f1..cb073f02 100644 --- a/examples/chain/5_MsgCancelSpotOrder/example.go +++ b/examples/chain/5_MsgCancelSpotOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go b/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go index cdac3ee3..8ab859cd 100644 --- a/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go +++ b/examples/chain/6_MsgCreateDerivativeLimitOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go b/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go index 2cc304ae..66967194 100644 --- a/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go +++ b/examples/chain/7_MsgCreateDerivativeMarketOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" "github.com/google/uuid" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" "github.com/shopspring/decimal" diff --git a/examples/chain/8_MsgCancelDerivativeOrder/example.go b/examples/chain/8_MsgCancelDerivativeOrder/example.go index 30b80304..a50656ec 100644 --- a/examples/chain/8_MsgCancelDerivativeOrder/example.go +++ b/examples/chain/8_MsgCancelDerivativeOrder/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/chain/9_MsgBatchCancelSpotOrders/example.go b/examples/chain/9_MsgBatchCancelSpotOrders/example.go index 38a93510..b37f0988 100644 --- a/examples/chain/9_MsgBatchCancelSpotOrders/example.go +++ b/examples/chain/9_MsgBatchCancelSpotOrders/example.go @@ -3,11 +3,12 @@ package main import ( "context" "fmt" + "os" + "time" + "github.com/InjectiveLabs/sdk-go/client" "github.com/InjectiveLabs/sdk-go/client/core" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" - "os" - "time" "github.com/InjectiveLabs/sdk-go/client/common" diff --git a/examples/exchange/accounts/5_SubaccountHistory/example.go b/examples/exchange/accounts/5_SubaccountHistory/example.go index b8b54798..8dc67c4a 100644 --- a/examples/exchange/accounts/5_SubaccountHistory/example.go +++ b/examples/exchange/accounts/5_SubaccountHistory/example.go @@ -32,7 +32,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountHistory(ctx, req) + res, err := exchangeClient.GetSubaccountHistory(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/6_SubaccountOrderSummary/example.go b/examples/exchange/accounts/6_SubaccountOrderSummary/example.go index 01176ee3..bc8da227 100644 --- a/examples/exchange/accounts/6_SubaccountOrderSummary/example.go +++ b/examples/exchange/accounts/6_SubaccountOrderSummary/example.go @@ -27,7 +27,7 @@ func main() { OrderDirection: orderDirection, } - res, err := exchangeClient.GetSubaccountOrderSummary(ctx, req) + res, err := exchangeClient.GetSubaccountOrderSummary(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/7_OrderStates/example.go b/examples/exchange/accounts/7_OrderStates/example.go index 1db56f65..f6b849da 100644 --- a/examples/exchange/accounts/7_OrderStates/example.go +++ b/examples/exchange/accounts/7_OrderStates/example.go @@ -26,7 +26,7 @@ func main() { DerivativeOrderHashes: derivativeOrderHashes, } - res, err := exchangeClient.GetOrderStates(ctx, req) + res, err := exchangeClient.GetOrderStates(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/accounts/9_Rewards/example.go b/examples/exchange/accounts/9_Rewards/example.go index af024703..3cdc0330 100644 --- a/examples/exchange/accounts/9_Rewards/example.go +++ b/examples/exchange/accounts/9_Rewards/example.go @@ -26,7 +26,7 @@ func main() { AccountAddress: accountAddress, } - res, err := exchangeClient.GetRewards(ctx, req) + res, err := exchangeClient.GetRewards(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/derivatives/10_StreamPositions/example.go b/examples/exchange/derivatives/10_StreamPositions/example.go index 23f38139..af23ee70 100644 --- a/examples/exchange/derivatives/10_StreamPositions/example.go +++ b/examples/exchange/derivatives/10_StreamPositions/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativePositions(ctx, req) + stream, err := exchangeClient.StreamDerivativePositions(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/11_StreamOrders/example.go b/examples/exchange/derivatives/11_StreamOrders/example.go index 393bc86b..245d6f69 100644 --- a/examples/exchange/derivatives/11_StreamOrders/example.go +++ b/examples/exchange/derivatives/11_StreamOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, OrderSide: orderSide, } - stream, err := exchangeClient.StreamDerivativeOrders(ctx, req) + stream, err := exchangeClient.StreamDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/12_Trades/example.go b/examples/exchange/derivatives/12_Trades/example.go index 48377621..2a5712c8 100644 --- a/examples/exchange/derivatives/12_Trades/example.go +++ b/examples/exchange/derivatives/12_Trades/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeTrades(ctx, req) + res, err := exchangeClient.GetDerivativeTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/13_StreamTrades/example.go b/examples/exchange/derivatives/13_StreamTrades/example.go index a94c49f7..02239ad5 100644 --- a/examples/exchange/derivatives/13_StreamTrades/example.go +++ b/examples/exchange/derivatives/13_StreamTrades/example.go @@ -26,7 +26,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativeTrades(ctx, req) + stream, err := exchangeClient.StreamDerivativeTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/14_SubaccountOrdersList/example.go b/examples/exchange/derivatives/14_SubaccountOrdersList/example.go index c8cd6db6..0177193e 100644 --- a/examples/exchange/derivatives/14_SubaccountOrdersList/example.go +++ b/examples/exchange/derivatives/14_SubaccountOrdersList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountDerivativeOrdersList(ctx, req) + res, err := exchangeClient.GetSubaccountDerivativeOrdersList(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/15_SubaccountTradesList/example.go b/examples/exchange/derivatives/15_SubaccountTradesList/example.go index 2b8a1d04..2bf30a1e 100644 --- a/examples/exchange/derivatives/15_SubaccountTradesList/example.go +++ b/examples/exchange/derivatives/15_SubaccountTradesList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountDerivativeTradesList(ctx, req) + res, err := exchangeClient.GetSubaccountDerivativeTradesList(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/16_FundingPayments/example.go b/examples/exchange/derivatives/16_FundingPayments/example.go index d1d960e0..8aa286c9 100644 --- a/examples/exchange/derivatives/16_FundingPayments/example.go +++ b/examples/exchange/derivatives/16_FundingPayments/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeFundingPayments(ctx, req) + res, err := exchangeClient.GetDerivativeFundingPayments(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/17_FundingRates/example.go b/examples/exchange/derivatives/17_FundingRates/example.go index 53c799af..0512f91a 100644 --- a/examples/exchange/derivatives/17_FundingRates/example.go +++ b/examples/exchange/derivatives/17_FundingRates/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, } - res, err := exchangeClient.GetDerivativeFundingRates(ctx, req) + res, err := exchangeClient.GetDerivativeFundingRates(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/18_HistoricalOrders/example.go b/examples/exchange/derivatives/18_HistoricalOrders/example.go index 2b39b069..718b6c00 100644 --- a/examples/exchange/derivatives/18_HistoricalOrders/example.go +++ b/examples/exchange/derivatives/18_HistoricalOrders/example.go @@ -32,7 +32,7 @@ func main() { IsConditional: isConditional, } - res, err := exchangeClient.GetHistoricalDerivativeOrders(ctx, req) + res, err := exchangeClient.GetHistoricalDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go b/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go index e3260f6c..3c49b01d 100644 --- a/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go +++ b/examples/exchange/derivatives/19_StreamHistoricalOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, Direction: direction, } - stream, err := exchangeClient.StreamHistoricalDerivativeOrders(ctx, req) + stream, err := exchangeClient.StreamHistoricalDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/20_LiquidablePositions/example.go b/examples/exchange/derivatives/20_LiquidablePositions/example.go index 0759019a..3b28112d 100644 --- a/examples/exchange/derivatives/20_LiquidablePositions/example.go +++ b/examples/exchange/derivatives/20_LiquidablePositions/example.go @@ -28,7 +28,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativeLiquidablePositions(ctx, req) + res, err := exchangeClient.GetDerivativeLiquidablePositions(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/21_TradesV2/example.go b/examples/exchange/derivatives/21_TradesV2/example.go index 51ea10cb..1edf4d98 100644 --- a/examples/exchange/derivatives/21_TradesV2/example.go +++ b/examples/exchange/derivatives/21_TradesV2/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetDerivativeTradesV2(ctx, req) + res, err := exchangeClient.GetDerivativeTradesV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/22_StreamTradesV2/example.go b/examples/exchange/derivatives/22_StreamTradesV2/example.go index e771be2f..3d78df5d 100644 --- a/examples/exchange/derivatives/22_StreamTradesV2/example.go +++ b/examples/exchange/derivatives/22_StreamTradesV2/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamDerivativeV2Trades(ctx, req) + stream, err := exchangeClient.StreamDerivativeV2Trades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/2_Markets/example.go b/examples/exchange/derivatives/2_Markets/example.go index c4654980..97618d7a 100644 --- a/examples/exchange/derivatives/2_Markets/example.go +++ b/examples/exchange/derivatives/2_Markets/example.go @@ -27,7 +27,7 @@ func main() { QuoteDenom: quoteDenom, } - res, err := exchangeClient.GetDerivativeMarkets(ctx, req) + res, err := exchangeClient.GetDerivativeMarkets(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/8_Positions/example.go b/examples/exchange/derivatives/8_Positions/example.go index b3ec5878..3b11e289 100644 --- a/examples/exchange/derivatives/8_Positions/example.go +++ b/examples/exchange/derivatives/8_Positions/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativePositionsV2(ctx, req) + res, err := exchangeClient.GetDerivativePositionsV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/derivatives/9_Orders/example.go b/examples/exchange/derivatives/9_Orders/example.go index 30d07946..824ebd28 100644 --- a/examples/exchange/derivatives/9_Orders/example.go +++ b/examples/exchange/derivatives/9_Orders/example.go @@ -29,7 +29,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetDerivativeOrders(ctx, req) + res, err := exchangeClient.GetDerivativeOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/insurance/1_InsuranceFunds/example.go b/examples/exchange/insurance/1_InsuranceFunds/example.go index 1d1d00df..63abd806 100644 --- a/examples/exchange/insurance/1_InsuranceFunds/example.go +++ b/examples/exchange/insurance/1_InsuranceFunds/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" insurancePB "github.com/InjectiveLabs/sdk-go/exchange/insurance_rpc/pb" @@ -21,7 +22,7 @@ func main() { req := insurancePB.FundsRequest{} - res, err := exchangeClient.GetInsuranceFunds(ctx, req) + res, err := exchangeClient.GetInsuranceFunds(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/insurance/2_Redemptions/example.go b/examples/exchange/insurance/2_Redemptions/example.go index 1fbb965e..e109cc7d 100644 --- a/examples/exchange/insurance/2_Redemptions/example.go +++ b/examples/exchange/insurance/2_Redemptions/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" insurancePB "github.com/InjectiveLabs/sdk-go/exchange/insurance_rpc/pb" @@ -21,7 +22,7 @@ func main() { req := insurancePB.RedemptionsRequest{} - res, err := exchangeClient.GetRedemptions(ctx, req) + res, err := exchangeClient.GetRedemptions(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/1_Ping/example.go b/examples/exchange/meta/1_Ping/example.go index f6acbeaf..15172af0 100644 --- a/examples/exchange/meta/1_Ping/example.go +++ b/examples/exchange/meta/1_Ping/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.PingRequest{} - res, err := exchangeClient.Ping(ctx, req) + res, err := exchangeClient.Ping(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/2_Version/example.go b/examples/exchange/meta/2_Version/example.go index 688de7d5..f9f9ef15 100644 --- a/examples/exchange/meta/2_Version/example.go +++ b/examples/exchange/meta/2_Version/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.VersionRequest{} - res, err := exchangeClient.GetVersion(ctx, req) + res, err := exchangeClient.GetVersion(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/3_Info/example.go b/examples/exchange/meta/3_Info/example.go index f7ee0227..571c3b6c 100644 --- a/examples/exchange/meta/3_Info/example.go +++ b/examples/exchange/meta/3_Info/example.go @@ -22,7 +22,7 @@ func main() { req := metaPB.InfoRequest{} - res, err := exchangeClient.GetInfo(ctx, req) + res, err := exchangeClient.GetInfo(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/meta/4_StreamKeepAlive/example.go b/examples/exchange/meta/4_StreamKeepAlive/example.go index 47da7ea2..c76a8605 100644 --- a/examples/exchange/meta/4_StreamKeepAlive/example.go +++ b/examples/exchange/meta/4_StreamKeepAlive/example.go @@ -29,7 +29,7 @@ func main() { case <-ctx.Done(): return default: - res, err := stream.Recv() + res, err := (*stream).Recv() if err != nil { fmt.Println(err) return diff --git a/examples/exchange/oracle/2_Price/example.go b/examples/exchange/oracle/2_Price/example.go index 9207e299..fe8840b1 100644 --- a/examples/exchange/oracle/2_Price/example.go +++ b/examples/exchange/oracle/2_Price/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" ) diff --git a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go index 570d0db9..4880fa69 100644 --- a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go +++ b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/InjectiveLabs/sdk-go/client/common" exchangeclient "github.com/InjectiveLabs/sdk-go/client/exchange" diff --git a/examples/exchange/spot/10_StreamTrades/example.go b/examples/exchange/spot/10_StreamTrades/example.go index a5040113..48d160c1 100644 --- a/examples/exchange/spot/10_StreamTrades/example.go +++ b/examples/exchange/spot/10_StreamTrades/example.go @@ -26,7 +26,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamSpotTrades(ctx, req) + stream, err := exchangeClient.StreamSpotTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/11_SubaccountOrdersList/example.go b/examples/exchange/spot/11_SubaccountOrdersList/example.go index 0b4fe839..6bb6d48b 100644 --- a/examples/exchange/spot/11_SubaccountOrdersList/example.go +++ b/examples/exchange/spot/11_SubaccountOrdersList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountSpotOrdersList(ctx, req) + res, err := exchangeClient.GetSubaccountSpotOrdersList(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/12_SubaccountTradesList/example.go b/examples/exchange/spot/12_SubaccountTradesList/example.go index 887ca1ae..401e981d 100644 --- a/examples/exchange/spot/12_SubaccountTradesList/example.go +++ b/examples/exchange/spot/12_SubaccountTradesList/example.go @@ -31,7 +31,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSubaccountSpotTradesList(ctx, req) + res, err := exchangeClient.GetSubaccountSpotTradesList(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/14_HistoricalOrders/example.go b/examples/exchange/spot/14_HistoricalOrders/example.go index 027855c3..288781b3 100644 --- a/examples/exchange/spot/14_HistoricalOrders/example.go +++ b/examples/exchange/spot/14_HistoricalOrders/example.go @@ -32,7 +32,7 @@ func main() { OrderTypes: orderTypes, } - res, err := exchangeClient.GetHistoricalSpotOrders(ctx, req) + res, err := exchangeClient.GetHistoricalSpotOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/15_StreamHistoricalOrders/example.go b/examples/exchange/spot/15_StreamHistoricalOrders/example.go index 0cfcf4c8..45c59723 100644 --- a/examples/exchange/spot/15_StreamHistoricalOrders/example.go +++ b/examples/exchange/spot/15_StreamHistoricalOrders/example.go @@ -27,7 +27,7 @@ func main() { SubaccountId: subaccountId, Direction: direction, } - stream, err := exchangeClient.StreamHistoricalSpotOrders(ctx, req) + stream, err := exchangeClient.StreamHistoricalSpotOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/16_TradesV2/example.go b/examples/exchange/spot/16_TradesV2/example.go index c4bf53cc..851dee00 100644 --- a/examples/exchange/spot/16_TradesV2/example.go +++ b/examples/exchange/spot/16_TradesV2/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetSpotTradesV2(ctx, req) + res, err := exchangeClient.GetSpotTradesV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/17_StreamTradesV2/example.go b/examples/exchange/spot/17_StreamTradesV2/example.go index 11855061..c5a5af87 100644 --- a/examples/exchange/spot/17_StreamTradesV2/example.go +++ b/examples/exchange/spot/17_StreamTradesV2/example.go @@ -25,7 +25,7 @@ func main() { MarketId: marketId, SubaccountId: subaccountId, } - stream, err := exchangeClient.StreamSpotTradesV2(ctx, req) + stream, err := exchangeClient.StreamSpotTradesV2(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/2_Markets/example.go b/examples/exchange/spot/2_Markets/example.go index 8c4dbf40..e11b3b6d 100644 --- a/examples/exchange/spot/2_Markets/example.go +++ b/examples/exchange/spot/2_Markets/example.go @@ -27,7 +27,7 @@ func main() { QuoteDenom: quoteDenom, } - res, err := exchangeClient.GetSpotMarkets(ctx, req) + res, err := exchangeClient.GetSpotMarkets(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/5_Orders/example.go b/examples/exchange/spot/5_Orders/example.go index 816bace4..4fe513c8 100644 --- a/examples/exchange/spot/5_Orders/example.go +++ b/examples/exchange/spot/5_Orders/example.go @@ -12,7 +12,7 @@ import ( func main() { //network := common.LoadNetwork("mainnet", "k8s") - network := common.LoadNetwork("testnet", "lb") + network := common.LoadNetwork("mainnet", "lb") exchangeClient, err := exchangeclient.NewExchangeClient(network) if err != nil { panic(err) @@ -29,7 +29,7 @@ func main() { Limit: limit, } - res, err := exchangeClient.GetSpotOrders(ctx, req) + res, err := exchangeClient.GetSpotOrders(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/exchange/spot/6_Trades/example.go b/examples/exchange/spot/6_Trades/example.go index 655146d2..9fce3efc 100644 --- a/examples/exchange/spot/6_Trades/example.go +++ b/examples/exchange/spot/6_Trades/example.go @@ -26,7 +26,7 @@ func main() { SubaccountId: subaccountId, } - res, err := exchangeClient.GetSpotTrades(ctx, req) + res, err := exchangeClient.GetSpotTrades(ctx, &req) if err != nil { panic(err) } diff --git a/examples/exchange/spot/9_StreamOrders/example.go b/examples/exchange/spot/9_StreamOrders/example.go index 5f73916e..cb4cfffb 100644 --- a/examples/exchange/spot/9_StreamOrders/example.go +++ b/examples/exchange/spot/9_StreamOrders/example.go @@ -28,7 +28,7 @@ func main() { SubaccountId: subaccountId, OrderSide: orderSide, } - stream, err := exchangeClient.StreamSpotOrders(ctx, req) + stream, err := exchangeClient.StreamSpotOrders(ctx, &req) if err != nil { panic(err) } diff --git a/examples/explorer/10_IBCTransfers/example.go b/examples/explorer/10_IBCTransfers/example.go index d17ad7ff..ad3a08dc 100644 --- a/examples/explorer/10_IBCTransfers/example.go +++ b/examples/explorer/10_IBCTransfers/example.go @@ -25,7 +25,7 @@ func main() { Receiver: receiver, } - res, err := explorerClient.GetIBCTransfers(ctx, req) + res, err := explorerClient.GetIBCTransfers(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/11_GetWasmCodes/example.go b/examples/explorer/11_GetWasmCodes/example.go index b2e47810..ea298b34 100644 --- a/examples/explorer/11_GetWasmCodes/example.go +++ b/examples/explorer/11_GetWasmCodes/example.go @@ -24,7 +24,7 @@ func main() { Limit: 10, } - res, err := explorerClient.GetWasmCodes(ctx, req) + res, err := explorerClient.GetWasmCodes(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/12_GetWasmCodeById/example.go b/examples/explorer/12_GetWasmCodeById/example.go index 26a92ba3..b8b932fa 100644 --- a/examples/explorer/12_GetWasmCodeById/example.go +++ b/examples/explorer/12_GetWasmCodeById/example.go @@ -24,7 +24,7 @@ func main() { CodeId: 10, } - res, err := explorerClient.GetWasmCodeByID(ctx, req) + res, err := explorerClient.GetWasmCodeByID(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/13_GetWasmContracts/example.go b/examples/explorer/13_GetWasmContracts/example.go index d4153e2f..33f7df07 100644 --- a/examples/explorer/13_GetWasmContracts/example.go +++ b/examples/explorer/13_GetWasmContracts/example.go @@ -22,7 +22,7 @@ func main() { req := explorerPB.GetWasmContractsRequest{} - res, err := explorerClient.GetWasmContracts(ctx, req) + res, err := explorerClient.GetWasmContracts(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/14_GetWasmContractByAddress/example.go b/examples/explorer/14_GetWasmContractByAddress/example.go index 5c142671..d3a880c2 100644 --- a/examples/explorer/14_GetWasmContractByAddress/example.go +++ b/examples/explorer/14_GetWasmContractByAddress/example.go @@ -23,7 +23,7 @@ func main() { req := explorerPB.GetWasmContractByAddressRequest{ ContractAddress: "inj1ru9nhdjtjtz8u8wrwxmcl9zsns4fh2838yr5ga", } - res, err := explorerClient.GetWasmContractByAddress(ctx, req) + res, err := explorerClient.GetWasmContractByAddress(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/15_GetCW20Balance/example.go b/examples/explorer/15_GetCW20Balance/example.go index 6a82495e..da38564d 100644 --- a/examples/explorer/15_GetCW20Balance/example.go +++ b/examples/explorer/15_GetCW20Balance/example.go @@ -23,7 +23,7 @@ func main() { req := explorerPB.GetCw20BalanceRequest{ Address: "inj1dc6rrxhfjaxexzdcrec5w3ryl4jn6x5t7t9j3z", } - res, err := explorerClient.GetCW20Balance(ctx, req) + res, err := explorerClient.GetCW20Balance(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/2_AccountTxs/example.go b/examples/explorer/2_AccountTxs/example.go index 8bce4684..3bbb56dc 100644 --- a/examples/explorer/2_AccountTxs/example.go +++ b/examples/explorer/2_AccountTxs/example.go @@ -27,7 +27,7 @@ func main() { } ctx := context.Background() - res, err := explorerClient.GetAccountTxs(ctx, req) + res, err := explorerClient.GetAccountTxs(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/5_TxsRequest/example.go b/examples/explorer/5_TxsRequest/example.go index 8ebbe1a2..dd57bfe8 100644 --- a/examples/explorer/5_TxsRequest/example.go +++ b/examples/explorer/5_TxsRequest/example.go @@ -26,7 +26,7 @@ func main() { Before: before, } - res, err := explorerClient.GetTxs(ctx, req) + res, err := explorerClient.GetTxs(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/8_PeggyDeposits/example.go b/examples/explorer/8_PeggyDeposits/example.go index 9cd17c67..bd00e9e1 100644 --- a/examples/explorer/8_PeggyDeposits/example.go +++ b/examples/explorer/8_PeggyDeposits/example.go @@ -26,7 +26,7 @@ func main() { Receiver: receiver, } - res, err := explorerClient.GetPeggyDeposits(ctx, req) + res, err := explorerClient.GetPeggyDeposits(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/examples/explorer/9_PeggyWithdrawals/example.go b/examples/explorer/9_PeggyWithdrawals/example.go index f7d221d4..d6284f5a 100644 --- a/examples/explorer/9_PeggyWithdrawals/example.go +++ b/examples/explorer/9_PeggyWithdrawals/example.go @@ -25,7 +25,7 @@ func main() { Sender: sender, } - res, err := explorerClient.GetPeggyWithdrawals(ctx, req) + res, err := explorerClient.GetPeggyWithdrawals(ctx, &req) if err != nil { fmt.Println(err) } diff --git a/go.mod b/go.mod index 6a8a21cd..3e0c72aa 100644 --- a/go.mod +++ b/go.mod @@ -16,14 +16,17 @@ require ( github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.0.1 github.com/ethereum/go-ethereum v1.11.5 + github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.4.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/huandu/go-assert v1.1.5 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/shopspring/decimal v1.2.0 + github.com/stretchr/testify v1.8.4 github.com/tyler-smith/go-bip39 v1.1.0 golang.org/x/crypto v0.11.0 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.31.0 @@ -86,7 +89,6 @@ require ( github.com/gofrs/uuid v4.3.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -139,7 +141,6 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -149,7 +150,6 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.12.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect From 0afd940acf15eae4be6c25d9b17819d03fa3b74b Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:35:35 -0300 Subject: [PATCH 08/15] (feat) Added GitHub workflow to run pre-commit for PRs and when pushing to master and dev --- .github/workflows/pre-commit.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..7b4efc6e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,17 @@ +name: pre-commit +on: + pull_request: + push: + branches: [master, dev] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: actions/setup-go@v3 + - run: go install golang.org/x/tools/cmd/goimports@latest + - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 + - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV + - uses: pre-commit/action@v2.0.2 From af96e92369a7ea7e7fd601029632239957c2e782 Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 17:48:55 -0300 Subject: [PATCH 09/15] (fix) Fix pre-commit configuration --- .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7b4efc6e..ba4a3f6b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 - run: go install golang.org/x/tools/cmd/goimports@latest - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c8d4cf5..f35e0ca6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,4 @@ repos: - id: go-fmt - id: go-imports - id: golangci-lint + args: [--timeout=15m] From 19442587295817e1eabb10543b98ada8bb04a25f Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 21 Dec 2023 18:21:57 -0300 Subject: [PATCH 10/15] (fix) Fix pre-commit configuration --- .github/workflows/pre-commit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ba4a3f6b..e822c838 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,10 +8,12 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - uses: actions/setup-go@v5 + with: + go-version: 1.19 - run: go install golang.org/x/tools/cmd/goimports@latest - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV + - uses: actions/checkout@v3 - uses: pre-commit/action@v2.0.2 From de6e2ac3f6d7973ac1ffb4355c3066cd39064558 Mon Sep 17 00:00:00 2001 From: abel Date: Fri, 22 Dec 2023 00:23:35 -0300 Subject: [PATCH 11/15] (feat) Added GitHub workflow to run tests and calculate coverage --- .github/workflows/run-tests.yml | 20 ++++++++++++++++++++ Makefile | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 00000000..c95973fc --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,20 @@ +name: run-tests +on: + pull_request: + push: + branches: [ master, dev ] + +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: actions/setup-go@v5 + with: + go-version: 1.19 + - name: Run test and calculate coverage + run: make coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/Makefile b/Makefile index a0ceca7c..627437a9 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ copy-exchange-client: cp -r ../injective-indexer/api/gen/grpc/injective_derivative_exchange_rpc/pb exchange/derivative_exchange_rpc/pb cp -r ../injective-indexer/api/gen/grpc/injective_portfolio_rpc/pb exchange/portfolio_rpc/pb -.PHONY: copy-exchange-client +.PHONY: copy-exchange-client tests coverage copy-chain-types: cp ../injective-core/injective-chain/types/*.go chain/types @@ -53,3 +53,8 @@ copy-chain-types: echo "👉 Replace injective-core/injective-chain/modules with sdk-go/chain" echo "👉 Replace injective-core/injective-chain/types with sdk-go/chain/types" echo "👉 Replace injective-core/injective-chain/crypto with sdk-go/chain/crypto" + +tests: + go test -race ./client/... ./ethereum/... +coverage: + go test -race -coverprofile=coverage.out -covermode=atomic ./client/... ./ethereum/... From f581f64e864d0840a5ce53b2e7d9517445dfe121 Mon Sep 17 00:00:00 2001 From: abel Date: Fri, 22 Dec 2023 00:36:35 -0300 Subject: [PATCH 12/15] (feat) Added Codecov badge in README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 32653a09..1ab21609 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Injective Protocol Golang SDK 🌟 +[![codecov](https://codecov.io/gh/InjectiveLabs/sdk-go/graph/badge.svg?token=XDGZV265EE)](https://codecov.io/gh/InjectiveLabs/sdk-go) + --- ## 📚 Getting Started From 6aa890a3a8788ac185aab3a91311988ed02a793c Mon Sep 17 00:00:00 2001 From: abel Date: Mon, 1 Jan 2024 15:44:23 -0300 Subject: [PATCH 13/15] (fix) Fixed incorrect numbers in example script module names --- .../example.go | 0 examples/chain/49_DenomOwners/example.go | 72 ------------------- 2 files changed, 72 deletions(-) rename examples/chain/{50_BankSendEnabled => 49_BankSendEnabled}/example.go (100%) delete mode 100644 examples/chain/49_DenomOwners/example.go diff --git a/examples/chain/50_BankSendEnabled/example.go b/examples/chain/49_BankSendEnabled/example.go similarity index 100% rename from examples/chain/50_BankSendEnabled/example.go rename to examples/chain/49_BankSendEnabled/example.go diff --git a/examples/chain/49_DenomOwners/example.go b/examples/chain/49_DenomOwners/example.go deleted file mode 100644 index e40b1d82..00000000 --- a/examples/chain/49_DenomOwners/example.go +++ /dev/null @@ -1,72 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - - "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/cosmos/cosmos-sdk/types/query" - - "os" -) - -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) - } - - denom := "factory/inj107aqkjc3t5r3l9j4n9lgrma5tm3jav8qgppz6m/position" - pagination := query.PageRequest{Limit: 10} - ctx := context.Background() - - res, err := chainClient.GetDenomOwners(ctx, denom, &pagination) - if err != nil { - fmt.Println(err) - } - - str, _ := json.MarshalIndent(res, "", " ") - fmt.Print(string(str)) - -} From f7516ac1422ae95f9fef6c3a1fefb7863c669a4a Mon Sep 17 00:00:00 2001 From: abel Date: Thu, 4 Jan 2024 17:21:09 -0300 Subject: [PATCH 14/15] (feat) Added support for all wasm module endpoints. Added also example scripts for the new endpoints. --- client/chain/chain.go | 150 +++++++++++++----- client/chain/chain_test_support.go | 67 ++++++-- examples/chain/50_ContractInfo/example.go | 70 ++++++++ examples/chain/51_ContractHistory/example.go | 73 +++++++++ examples/chain/52_ContractsByCode/example.go | 73 +++++++++ .../chain/53_AllContractsState/example.go | 73 +++++++++ examples/chain/54_RawContractState/example.go | 70 ++++++++ .../chain/55_SmartContractState/example.go | 70 ++++++++ .../chain/56_SmartContractCode/example.go | 69 ++++++++ .../chain/57_SmartContractCodes/example.go | 72 +++++++++ .../58_SmartContractPinnedCodes/example.go | 72 +++++++++ .../chain/59_ContractsByCreator/example.go | 73 +++++++++ 12 files changed, 876 insertions(+), 56 deletions(-) create mode 100644 examples/chain/50_ContractInfo/example.go create mode 100644 examples/chain/51_ContractHistory/example.go create mode 100644 examples/chain/52_ContractsByCode/example.go create mode 100644 examples/chain/53_AllContractsState/example.go create mode 100644 examples/chain/54_RawContractState/example.go create mode 100644 examples/chain/55_SmartContractState/example.go create mode 100644 examples/chain/56_SmartContractCode/example.go create mode 100644 examples/chain/57_SmartContractCodes/example.go create mode 100644 examples/chain/58_SmartContractPinnedCodes/example.go create mode 100644 examples/chain/59_ContractsByCreator/example.go diff --git a/client/chain/chain.go b/client/chain/chain.go index 31dd4a65..ad69dacb 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -131,17 +131,6 @@ type ChainClient interface { CreateDerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder OrderCancel(defaultSubaccountID eth.Hash, d *OrderCancelData) *exchangetypes.OrderData - SmartContractState( - ctx context.Context, - contractAddress string, - queryData []byte, - ) (*wasmtypes.QuerySmartContractStateResponse, error) - RawContractState( - ctx context.Context, - contractAddress string, - queryData []byte, - ) (*wasmtypes.QueryRawContractStateResponse, error) - GetGasFee() (string, error) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) @@ -153,6 +142,27 @@ type ChainClient interface { // get tx from chain node GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) + + // wasm module + FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error) + FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error) + FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error) + FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error) + RawContractState( + ctx context.Context, + contractAddress string, + queryData []byte, + ) (*wasmtypes.QueryRawContractStateResponse, error) + SmartContractState( + ctx context.Context, + contractAddress string, + queryData []byte, + ) (*wasmtypes.QuerySmartContractStateResponse, error) + FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error) + FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error) + FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error) + FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) + Close() } @@ -1155,34 +1165,6 @@ func (c *chainClient) BuildExchangeAuthz(granter string, grantee string, authzTy } } -func (c *chainClient) SmartContractState( - ctx context.Context, - contractAddress string, - queryData []byte, -) (*wasmtypes.QuerySmartContractStateResponse, error) { - return c.wasmQueryClient.SmartContractState( - ctx, - &wasmtypes.QuerySmartContractStateRequest{ - Address: contractAddress, - QueryData: queryData, - }, - ) -} - -func (c *chainClient) RawContractState( - ctx context.Context, - contractAddress string, - queryData []byte, -) (*wasmtypes.QueryRawContractStateResponse, error) { - return c.wasmQueryClient.RawContractState( - ctx, - &wasmtypes.QueryRawContractStateRequest{ - Address: contractAddress, - QueryData: queryData, - }, - ) -} - func (c *chainClient) BuildExchangeBatchUpdateOrdersAuthz( granter string, grantee string, @@ -1363,6 +1345,96 @@ func (c *chainClient) ChainStream(ctx context.Context, req chainstreamtypes.Stre return stream, nil } +// wasm module + +func (c *chainClient) FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error) { + req := &wasmtypes.QueryContractInfoRequest{ + Address: address, + } + return c.wasmQueryClient.ContractInfo(ctx, req) +} + +func (c *chainClient) FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error) { + req := &wasmtypes.QueryContractHistoryRequest{ + Address: address, + Pagination: pagination, + } + return c.wasmQueryClient.ContractHistory(ctx, req) +} + +func (c *chainClient) FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error) { + req := &wasmtypes.QueryContractsByCodeRequest{ + CodeId: codeId, + Pagination: pagination, + } + return c.wasmQueryClient.ContractsByCode(ctx, req) +} + +func (c *chainClient) FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error) { + req := &wasmtypes.QueryAllContractStateRequest{ + Address: address, + Pagination: pagination, + } + return c.wasmQueryClient.AllContractState(ctx, req) +} + +func (c *chainClient) RawContractState( + ctx context.Context, + contractAddress string, + queryData []byte, +) (*wasmtypes.QueryRawContractStateResponse, error) { + return c.wasmQueryClient.RawContractState( + ctx, + &wasmtypes.QueryRawContractStateRequest{ + Address: contractAddress, + QueryData: queryData, + }, + ) +} + +func (c *chainClient) SmartContractState( + ctx context.Context, + contractAddress string, + queryData []byte, +) (*wasmtypes.QuerySmartContractStateResponse, error) { + return c.wasmQueryClient.SmartContractState( + ctx, + &wasmtypes.QuerySmartContractStateRequest{ + Address: contractAddress, + QueryData: queryData, + }, + ) +} + +func (c *chainClient) FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error) { + req := &wasmtypes.QueryCodeRequest{ + CodeId: codeId, + } + return c.wasmQueryClient.Code(ctx, req) +} + +func (c *chainClient) FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error) { + req := &wasmtypes.QueryCodesRequest{ + Pagination: pagination, + } + return c.wasmQueryClient.Codes(ctx, req) +} + +func (c *chainClient) FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error) { + req := &wasmtypes.QueryPinnedCodesRequest{ + Pagination: pagination, + } + return c.wasmQueryClient.PinnedCodes(ctx, req) +} + +func (c *chainClient) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) { + req := &wasmtypes.QueryContractsByCreatorRequest{ + CreatorAddress: creator, + Pagination: pagination, + } + return c.wasmQueryClient.ContractsByCreator(ctx, req) +} + type DerivativeOrderData struct { OrderType exchangetypes.OrderType Price decimal.Decimal diff --git a/client/chain/chain_test_support.go b/client/chain/chain_test_support.go index 402541b8..d277a34f 100644 --- a/client/chain/chain_test_support.go +++ b/client/chain/chain_test_support.go @@ -6,6 +6,7 @@ import ( "time" 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" "github.com/InjectiveLabs/sdk-go/client/common" @@ -199,6 +200,47 @@ func (c *MockChainClient) OrderCancel(defaultSubaccountID eth.Hash, d *OrderCanc return &exchangetypes.OrderData{} } +func (c *MockChainClient) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) {} + +func (c *MockChainClient) StreamEventOrderFailWithWebsocket(sender string, websocket *rpchttp.HTTP, failEventCh chan map[string]uint) { +} + +func (c *MockChainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIds []string, orderbookCh chan exchangetypes.Orderbook) { +} + +func (c *MockChainClient) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIds []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) { +} + +func (c *MockChainClient) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) { + return nil, nil +} + +func (c *MockChainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) { + return &txtypes.GetTxResponse{}, nil +} + +func (c *MockChainClient) Close() {} + +func (c *MockChainClient) GetGasFee() (string, error) { + return "", nil +} + +func (c *MockChainClient) FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error) { + return &wasmtypes.QueryContractInfoResponse{}, nil +} + +func (c *MockChainClient) FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error) { + return &wasmtypes.QueryContractHistoryResponse{}, nil +} + +func (c *MockChainClient) FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error) { + return &wasmtypes.QueryContractsByCodeResponse{}, nil +} + +func (c *MockChainClient) FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error) { + return &wasmtypes.QueryAllContractStateResponse{}, nil +} + func (c *MockChainClient) SmartContractState( ctx context.Context, contractAddress string, @@ -215,27 +257,18 @@ func (c *MockChainClient) RawContractState( return &wasmtypes.QueryRawContractStateResponse{}, nil } -func (c *MockChainClient) GetGasFee() (string, error) { - return "", nil +func (c *MockChainClient) FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error) { + return &wasmtypes.QueryCodeResponse{}, nil } -func (c *MockChainClient) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) {} - -func (c *MockChainClient) StreamEventOrderFailWithWebsocket(sender string, websocket *rpchttp.HTTP, failEventCh chan map[string]uint) { +func (c *MockChainClient) FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error) { + return &wasmtypes.QueryCodesResponse{}, nil } -func (c *MockChainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIds []string, orderbookCh chan exchangetypes.Orderbook) { -} - -func (c *MockChainClient) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIds []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) { -} - -func (c *MockChainClient) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) { - return nil, nil +func (c *MockChainClient) FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error) { + return &wasmtypes.QueryPinnedCodesResponse{}, nil } -func (c *MockChainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) { - return &txtypes.GetTxResponse{}, nil +func (c *MockChainClient) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) { + return &wasmtypes.QueryContractsByCreatorResponse{}, nil } - -func (c *MockChainClient) Close() {} diff --git a/examples/chain/50_ContractInfo/example.go b/examples/chain/50_ContractInfo/example.go new file mode 100644 index 00000000..22f30995 --- /dev/null +++ b/examples/chain/50_ContractInfo/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) + } + + address := "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7" + ctx := context.Background() + + res, err := chainClient.FetchContractInfo(ctx, address) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/51_ContractHistory/example.go b/examples/chain/51_ContractHistory/example.go new file mode 100644 index 00000000..1961d612 --- /dev/null +++ b/examples/chain/51_ContractHistory/example.go @@ -0,0 +1,73 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + address := "inj18pp4vjwucpgg4nw3rr4wh4zyjg9ct5t8v9wqgj" + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchContractHistory(ctx, address, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/52_ContractsByCode/example.go b/examples/chain/52_ContractsByCode/example.go new file mode 100644 index 00000000..64aad253 --- /dev/null +++ b/examples/chain/52_ContractsByCode/example.go @@ -0,0 +1,73 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + codeId := uint64(3770) + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchContractsByCode(ctx, codeId, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/53_AllContractsState/example.go b/examples/chain/53_AllContractsState/example.go new file mode 100644 index 00000000..4f4f89a9 --- /dev/null +++ b/examples/chain/53_AllContractsState/example.go @@ -0,0 +1,73 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + address := "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7" + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchAllContractsState(ctx, address, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/54_RawContractState/example.go b/examples/chain/54_RawContractState/example.go new file mode 100644 index 00000000..a2056ab8 --- /dev/null +++ b/examples/chain/54_RawContractState/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) + } + + address := "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7" + queryData := []byte("{\"get_count\": {}}") + ctx := context.Background() + + res, err := chainClient.RawContractState(ctx, address, queryData) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/55_SmartContractState/example.go b/examples/chain/55_SmartContractState/example.go new file mode 100644 index 00000000..e98b3b14 --- /dev/null +++ b/examples/chain/55_SmartContractState/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) + } + + address := "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7" + queryData := []byte("{\"get_count\": {}}") + ctx := context.Background() + + res, err := chainClient.SmartContractState(ctx, address, queryData) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/56_SmartContractCode/example.go b/examples/chain/56_SmartContractCode/example.go new file mode 100644 index 00000000..31dae7b2 --- /dev/null +++ b/examples/chain/56_SmartContractCode/example.go @@ -0,0 +1,69 @@ +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) + } + + codeId := uint64(290) + ctx := context.Background() + + res, err := chainClient.FetchCode(ctx, codeId) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/57_SmartContractCodes/example.go b/examples/chain/57_SmartContractCodes/example.go new file mode 100644 index 00000000..301879c8 --- /dev/null +++ b/examples/chain/57_SmartContractCodes/example.go @@ -0,0 +1,72 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchCodes(ctx, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/58_SmartContractPinnedCodes/example.go b/examples/chain/58_SmartContractPinnedCodes/example.go new file mode 100644 index 00000000..6b2a8882 --- /dev/null +++ b/examples/chain/58_SmartContractPinnedCodes/example.go @@ -0,0 +1,72 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchPinnedCodes(ctx, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/59_ContractsByCreator/example.go b/examples/chain/59_ContractsByCreator/example.go new file mode 100644 index 00000000..cc0aa236 --- /dev/null +++ b/examples/chain/59_ContractsByCreator/example.go @@ -0,0 +1,73 @@ +package main + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/types/query" + + "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) + } + + creator := "inj1h3gepa4tszh66ee67he53jzmprsqc2l9npq3ty" + pagination := query.PageRequest{Limit: 2} + ctx := context.Background() + + res, err := chainClient.FetchContractsByCreator(ctx, creator, &pagination) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} From ce0a5547d22b22bba9e67e42d2f35658f1e7221f Mon Sep 17 00:00:00 2001 From: abel Date: Mon, 8 Jan 2024 12:23:19 -0300 Subject: [PATCH 15/15] (feat) Added support for token factory module endpoints. Included new example scripts for the endpoints. --- .pre-commit-config.yaml | 5 +- chain/auction/types/auction.pb.go | 7 +- chain/auction/types/genesis.pb.go | 5 +- chain/auction/types/query.pb.go | 7 +- chain/auction/types/tx.pb.go | 7 +- chain/crypto/ethsecp256k1/keys.pb.go | 5 +- chain/exchange/types/authz.pb.go | 5 +- chain/exchange/types/events.go | 2 + chain/exchange/types/events.pb.go | 7 +- chain/exchange/types/exchange.pb.go | 7 +- chain/exchange/types/genesis.pb.go | 7 +- chain/exchange/types/proposal.pb.go | 7 +- chain/exchange/types/query.pb.go | 7 +- chain/exchange/types/tx.pb.go | 10 +- chain/insurance/types/events.pb.go | 1365 ++++++++++++++++ chain/insurance/types/genesis.pb.go | 5 +- chain/insurance/types/insurance.pb.go | 1156 ++----------- chain/insurance/types/query.pb.go | 7 +- chain/insurance/types/tx.pb.go | 7 +- chain/ocr/types/genesis.pb.go | 7 +- chain/ocr/types/ocr.pb.go | 9 +- chain/ocr/types/query.pb.go | 7 +- chain/ocr/types/tx.pb.go | 7 +- chain/oracle/types/events.pb.go | 7 +- chain/oracle/types/genesis.pb.go | 5 +- chain/oracle/types/oracle.pb.go | 7 +- chain/oracle/types/proposal.pb.go | 7 +- chain/oracle/types/query.pb.go | 7 +- chain/oracle/types/tx.pb.go | 7 +- chain/peggy/types/attestation.pb.go | 7 +- chain/peggy/types/batch.pb.go | 3 +- chain/peggy/types/ethereum_signer.pb.go | 3 +- chain/peggy/types/events.pb.go | 7 +- chain/peggy/types/genesis.pb.go | 7 +- chain/peggy/types/msgs.pb.go | 7 +- chain/peggy/types/params.pb.go | 7 +- chain/peggy/types/pool.pb.go | 7 +- chain/peggy/types/proposal.pb.go | 7 +- chain/peggy/types/query.pb.go | 7 +- chain/peggy/types/types.pb.go | 7 +- chain/stream/types/query.pb.go | 7 +- chain/stream/types/response.go | 7 + .../types/authorityMetadata.pb.go | 7 +- chain/tokenfactory/types/events.pb.go | 111 +- chain/tokenfactory/types/genesis.pb.go | 5 +- chain/tokenfactory/types/params.pb.go | 7 +- chain/tokenfactory/types/query.pb.go | 7 +- chain/tokenfactory/types/tx.pb.go | 7 +- chain/types/account.pb.go | 7 +- chain/types/tx_ext.pb.go | 5 +- chain/types/tx_response.pb.go | 3 +- chain/wasmx/types/events.pb.go | 5 +- chain/wasmx/types/genesis.pb.go | 5 +- chain/wasmx/types/proposal.pb.go | 97 +- chain/wasmx/types/query.pb.go | 7 +- chain/wasmx/types/tx.pb.go | 7 +- chain/wasmx/types/util.go | 2 - chain/wasmx/types/wasmx.pb.go | 5 +- client/chain/chain.go | 70 +- client/chain/chain_test_support.go | 14 + .../60_DenomAuthorityMetadata/example.go | 71 + .../chain/61_DenomsFromCreator/example.go | 70 + .../62_TokenfactoryModuleState/example.go | 69 + examples/chain/64_CreateDenom/example.go | 72 + examples/chain/65_MsgMint/example.go | 74 + examples/chain/66_MsgBurn/example.go | 74 + .../chain/67_MsgSetDenomMetadata/example.go | 97 ++ examples/chain/68_MsgChangeAdmin/example.go | 72 + .../69_MsgExecuteContractCompat/example.go | 89 + .../injective_derivative_exchange_rpc.pb.go | 1449 +++++++++-------- .../injective_derivative_exchange_rpc.proto | 8 + go.mod | 22 +- go.sum | 44 +- 73 files changed, 3271 insertions(+), 2092 deletions(-) create mode 100644 chain/insurance/types/events.pb.go create mode 100644 examples/chain/60_DenomAuthorityMetadata/example.go create mode 100644 examples/chain/61_DenomsFromCreator/example.go create mode 100644 examples/chain/62_TokenfactoryModuleState/example.go create mode 100644 examples/chain/64_CreateDenom/example.go create mode 100644 examples/chain/65_MsgMint/example.go create mode 100644 examples/chain/66_MsgBurn/example.go create mode 100644 examples/chain/67_MsgSetDenomMetadata/example.go create mode 100644 examples/chain/68_MsgChangeAdmin/example.go create mode 100644 examples/chain/69_MsgExecuteContractCompat/example.go diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f35e0ca6..a70840d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,8 @@ exclude: | (?x)^( - proto/.*| - exchange/.* + chain/.*| + exchange/.*| + proto/.* )$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/chain/auction/types/auction.pb.go b/chain/auction/types/auction.pb.go index 0d7b6220..d0d2e780 100644 --- a/chain/auction/types/auction.pb.go +++ b/chain/auction/types/auction.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/auction/types/genesis.pb.go b/chain/auction/types/genesis.pb.go index c7c3ab27..d1452e2a 100644 --- a/chain/auction/types/genesis.pb.go +++ b/chain/auction/types/genesis.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/auction/types/query.pb.go b/chain/auction/types/query.pb.go index bde86cb4..ec9d8b68 100644 --- a/chain/auction/types/query.pb.go +++ b/chain/auction/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/auction/types/tx.pb.go b/chain/auction/types/tx.pb.go index b592915e..57d3be57 100644 --- a/chain/auction/types/tx.pb.go +++ b/chain/auction/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/crypto/ethsecp256k1/keys.pb.go b/chain/crypto/ethsecp256k1/keys.pb.go index 1f19c66a..c445cb5b 100644 --- a/chain/crypto/ethsecp256k1/keys.pb.go +++ b/chain/crypto/ethsecp256k1/keys.pb.go @@ -5,12 +5,11 @@ package ethsecp256k1 import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/authz.pb.go b/chain/exchange/types/authz.pb.go index 7989416a..e97e8a78 100644 --- a/chain/exchange/types/authz.pb.go +++ b/chain/exchange/types/authz.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/exchange/types/events.go b/chain/exchange/types/events.go index 7cb591cd..d0143c3c 100644 --- a/chain/exchange/types/events.go +++ b/chain/exchange/types/events.go @@ -4,6 +4,8 @@ import ( "github.com/ethereum/go-ethereum/common" ) +// Event type and attribute constants + func (e *EventOrderFail) AddOrderFail(orderHash common.Hash, flag uint32) { e.Hashes = append(e.Hashes, orderHash.Bytes()) e.Flags = append(e.Flags, flag) diff --git a/chain/exchange/types/events.pb.go b/chain/exchange/types/events.pb.go index 0b05ad3a..fde0ea75 100644 --- a/chain/exchange/types/events.pb.go +++ b/chain/exchange/types/events.pb.go @@ -5,15 +5,14 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "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/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. diff --git a/chain/exchange/types/exchange.pb.go b/chain/exchange/types/exchange.pb.go index 1db8e74d..d462df25 100644 --- a/chain/exchange/types/exchange.pb.go +++ b/chain/exchange/types/exchange.pb.go @@ -5,15 +5,14 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types1 "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/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. diff --git a/chain/exchange/types/genesis.pb.go b/chain/exchange/types/genesis.pb.go index d83d83f7..92998d1d 100644 --- a/chain/exchange/types/genesis.pb.go +++ b/chain/exchange/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_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. diff --git a/chain/exchange/types/proposal.pb.go b/chain/exchange/types/proposal.pb.go index 8ec78f6e..6f3eee76 100644 --- a/chain/exchange/types/proposal.pb.go +++ b/chain/exchange/types/proposal.pb.go @@ -5,10 +5,6 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types" @@ -17,6 +13,9 @@ import ( 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. diff --git a/chain/exchange/types/query.pb.go b/chain/exchange/types/query.pb.go index d95ca74e..b4111c76 100644 --- a/chain/exchange/types/query.pb.go +++ b/chain/exchange/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/exchange/types/tx.pb.go b/chain/exchange/types/tx.pb.go index b36abb8e..e57b3cd5 100644 --- a/chain/exchange/types/tx.pb.go +++ b/chain/exchange/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - 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" @@ -22,6 +18,9 @@ import ( 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. @@ -2463,7 +2462,8 @@ func (m *MsgEmergencySettleMarket) GetMarketId() string { return "" } -// MsgEmergencySettleMarketResponse defines the Msg/EmergencySettleMarket response type. +// MsgEmergencySettleMarketResponse defines the Msg/EmergencySettleMarket +// response type. type MsgEmergencySettleMarketResponse struct { } diff --git a/chain/insurance/types/events.pb.go b/chain/insurance/types/events.pb.go new file mode 100644 index 00000000..b81ef035 --- /dev/null +++ b/chain/insurance/types/events.pb.go @@ -0,0 +1,1365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: injective/insurance/v1beta1/events.proto + +package types + +import ( + fmt "fmt" + 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 EventInsuranceFundUpdate struct { + Fund *InsuranceFund `protobuf:"bytes,1,opt,name=fund,proto3" json:"fund,omitempty"` +} + +func (m *EventInsuranceFundUpdate) Reset() { *m = EventInsuranceFundUpdate{} } +func (m *EventInsuranceFundUpdate) String() string { return proto.CompactTextString(m) } +func (*EventInsuranceFundUpdate) ProtoMessage() {} +func (*EventInsuranceFundUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_238c43c591e30770, []int{0} +} +func (m *EventInsuranceFundUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventInsuranceFundUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventInsuranceFundUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventInsuranceFundUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventInsuranceFundUpdate.Merge(m, src) +} +func (m *EventInsuranceFundUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventInsuranceFundUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventInsuranceFundUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventInsuranceFundUpdate proto.InternalMessageInfo + +func (m *EventInsuranceFundUpdate) GetFund() *InsuranceFund { + if m != nil { + return m.Fund + } + return nil +} + +type EventRequestRedemption struct { + Schedule *RedemptionSchedule `protobuf:"bytes,1,opt,name=schedule,proto3" json:"schedule,omitempty"` +} + +func (m *EventRequestRedemption) Reset() { *m = EventRequestRedemption{} } +func (m *EventRequestRedemption) String() string { return proto.CompactTextString(m) } +func (*EventRequestRedemption) ProtoMessage() {} +func (*EventRequestRedemption) Descriptor() ([]byte, []int) { + return fileDescriptor_238c43c591e30770, []int{1} +} +func (m *EventRequestRedemption) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRequestRedemption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRequestRedemption.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventRequestRedemption) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRequestRedemption.Merge(m, src) +} +func (m *EventRequestRedemption) XXX_Size() int { + return m.Size() +} +func (m *EventRequestRedemption) XXX_DiscardUnknown() { + xxx_messageInfo_EventRequestRedemption.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRequestRedemption proto.InternalMessageInfo + +func (m *EventRequestRedemption) GetSchedule() *RedemptionSchedule { + if m != nil { + return m.Schedule + } + return nil +} + +type EventWithdrawRedemption struct { + // redemption schedule triggered withdraw + Schedule *RedemptionSchedule `protobuf:"bytes,1,opt,name=schedule,proto3" json:"schedule,omitempty"` + // redeem coin amount in base_currency + RedeemCoin types.Coin `protobuf:"bytes,2,opt,name=redeem_coin,json=redeemCoin,proto3" json:"redeem_coin"` +} + +func (m *EventWithdrawRedemption) Reset() { *m = EventWithdrawRedemption{} } +func (m *EventWithdrawRedemption) String() string { return proto.CompactTextString(m) } +func (*EventWithdrawRedemption) ProtoMessage() {} +func (*EventWithdrawRedemption) Descriptor() ([]byte, []int) { + return fileDescriptor_238c43c591e30770, []int{2} +} +func (m *EventWithdrawRedemption) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventWithdrawRedemption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventWithdrawRedemption.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventWithdrawRedemption) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventWithdrawRedemption.Merge(m, src) +} +func (m *EventWithdrawRedemption) XXX_Size() int { + return m.Size() +} +func (m *EventWithdrawRedemption) XXX_DiscardUnknown() { + xxx_messageInfo_EventWithdrawRedemption.DiscardUnknown(m) +} + +var xxx_messageInfo_EventWithdrawRedemption proto.InternalMessageInfo + +func (m *EventWithdrawRedemption) GetSchedule() *RedemptionSchedule { + if m != nil { + return m.Schedule + } + return nil +} + +func (m *EventWithdrawRedemption) GetRedeemCoin() types.Coin { + if m != nil { + return m.RedeemCoin + } + return types.Coin{} +} + +type EventUnderwrite struct { + // address of the underwriter + Underwriter string `protobuf:"bytes,1,opt,name=underwriter,proto3" json:"underwriter,omitempty"` + // marketId of insurance fund for the redemption + MarketId string `protobuf:"bytes,2,opt,name=marketId,proto3" json:"marketId,omitempty"` + // deposit coin amount + Deposit types.Coin `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit"` + // share coin amount + Shares types.Coin `protobuf:"bytes,4,opt,name=shares,proto3" json:"shares"` +} + +func (m *EventUnderwrite) Reset() { *m = EventUnderwrite{} } +func (m *EventUnderwrite) String() string { return proto.CompactTextString(m) } +func (*EventUnderwrite) ProtoMessage() {} +func (*EventUnderwrite) Descriptor() ([]byte, []int) { + return fileDescriptor_238c43c591e30770, []int{3} +} +func (m *EventUnderwrite) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUnderwrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUnderwrite.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUnderwrite) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUnderwrite.Merge(m, src) +} +func (m *EventUnderwrite) XXX_Size() int { + return m.Size() +} +func (m *EventUnderwrite) XXX_DiscardUnknown() { + xxx_messageInfo_EventUnderwrite.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUnderwrite proto.InternalMessageInfo + +func (m *EventUnderwrite) GetUnderwriter() string { + if m != nil { + return m.Underwriter + } + return "" +} + +func (m *EventUnderwrite) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventUnderwrite) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +func (m *EventUnderwrite) GetShares() types.Coin { + if m != nil { + return m.Shares + } + return types.Coin{} +} + +type EventInsuranceWithdraw struct { + MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + MarketTicker string `protobuf:"bytes,2,opt,name=market_ticker,json=marketTicker,proto3" json:"market_ticker,omitempty"` + Withdrawal types.Coin `protobuf:"bytes,3,opt,name=withdrawal,proto3" json:"withdrawal"` +} + +func (m *EventInsuranceWithdraw) Reset() { *m = EventInsuranceWithdraw{} } +func (m *EventInsuranceWithdraw) String() string { return proto.CompactTextString(m) } +func (*EventInsuranceWithdraw) ProtoMessage() {} +func (*EventInsuranceWithdraw) Descriptor() ([]byte, []int) { + return fileDescriptor_238c43c591e30770, []int{4} +} +func (m *EventInsuranceWithdraw) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventInsuranceWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventInsuranceWithdraw.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventInsuranceWithdraw) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventInsuranceWithdraw.Merge(m, src) +} +func (m *EventInsuranceWithdraw) XXX_Size() int { + return m.Size() +} +func (m *EventInsuranceWithdraw) XXX_DiscardUnknown() { + xxx_messageInfo_EventInsuranceWithdraw.DiscardUnknown(m) +} + +var xxx_messageInfo_EventInsuranceWithdraw proto.InternalMessageInfo + +func (m *EventInsuranceWithdraw) GetMarketId() string { + if m != nil { + return m.MarketId + } + return "" +} + +func (m *EventInsuranceWithdraw) GetMarketTicker() string { + if m != nil { + return m.MarketTicker + } + return "" +} + +func (m *EventInsuranceWithdraw) GetWithdrawal() types.Coin { + if m != nil { + return m.Withdrawal + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*EventInsuranceFundUpdate)(nil), "injective.insurance.v1beta1.EventInsuranceFundUpdate") + proto.RegisterType((*EventRequestRedemption)(nil), "injective.insurance.v1beta1.EventRequestRedemption") + proto.RegisterType((*EventWithdrawRedemption)(nil), "injective.insurance.v1beta1.EventWithdrawRedemption") + proto.RegisterType((*EventUnderwrite)(nil), "injective.insurance.v1beta1.EventUnderwrite") + proto.RegisterType((*EventInsuranceWithdraw)(nil), "injective.insurance.v1beta1.EventInsuranceWithdraw") +} + +func init() { + proto.RegisterFile("injective/insurance/v1beta1/events.proto", fileDescriptor_238c43c591e30770) +} + +var fileDescriptor_238c43c591e30770 = []byte{ + // 471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x41, 0x8b, 0xd4, 0x4c, + 0x10, 0x9d, 0x7c, 0xdf, 0xb0, 0xee, 0xd4, 0x28, 0x42, 0x23, 0x1a, 0x67, 0x21, 0x2e, 0xf1, 0xb2, + 0x28, 0xa6, 0x59, 0x3d, 0x88, 0x17, 0x95, 0x15, 0x85, 0x41, 0x41, 0x88, 0x2e, 0xc2, 0x5e, 0x96, + 0x4e, 0xba, 0x9c, 0xb4, 0xbb, 0xe9, 0x8e, 0xdd, 0x9d, 0x19, 0xfc, 0x17, 0xde, 0xfd, 0x03, 0xfe, + 0x0f, 0x2f, 0x7b, 0xdc, 0xa3, 0x27, 0x91, 0x99, 0x3f, 0x22, 0xe9, 0xf4, 0x64, 0xc6, 0xcb, 0x30, + 0x17, 0x6f, 0xa9, 0xca, 0x7b, 0xaf, 0x5e, 0xf5, 0xeb, 0x86, 0x03, 0x21, 0x3f, 0x61, 0x6e, 0xc5, + 0x14, 0xa9, 0x90, 0xa6, 0xd6, 0x4c, 0xe6, 0x48, 0xa7, 0x87, 0x19, 0x5a, 0x76, 0x48, 0x71, 0x8a, + 0xd2, 0x9a, 0xa4, 0xd2, 0xca, 0x2a, 0xb2, 0xd7, 0x21, 0x93, 0x0e, 0x99, 0x78, 0xe4, 0xe8, 0xc6, + 0x44, 0x4d, 0x94, 0xc3, 0xd1, 0xe6, 0xab, 0xa5, 0x8c, 0xa2, 0x5c, 0x99, 0x52, 0x19, 0x9a, 0x31, + 0xb3, 0x12, 0xcd, 0x95, 0x90, 0xfe, 0xff, 0xfd, 0x4d, 0xc3, 0x57, 0x43, 0x1c, 0x38, 0x3e, 0x81, + 0xf0, 0x65, 0xe3, 0x67, 0xbc, 0xec, 0xbf, 0xaa, 0x25, 0x3f, 0xae, 0x38, 0xb3, 0x48, 0x9e, 0x42, + 0xff, 0x63, 0x2d, 0x79, 0x18, 0xec, 0x07, 0x07, 0xc3, 0x87, 0xf7, 0x92, 0x0d, 0x56, 0x93, 0xbf, + 0xf8, 0xa9, 0xe3, 0xc5, 0x08, 0x37, 0x9d, 0x76, 0x8a, 0x9f, 0x6b, 0x34, 0x36, 0x45, 0x8e, 0x65, + 0x65, 0x85, 0x92, 0xe4, 0x35, 0xec, 0x9a, 0xbc, 0x40, 0x5e, 0x9f, 0xa3, 0x57, 0xa7, 0x1b, 0xd5, + 0x57, 0xd4, 0x77, 0x9e, 0x96, 0x76, 0x02, 0xf1, 0xf7, 0x00, 0x6e, 0xb9, 0x39, 0x1f, 0x84, 0x2d, + 0xb8, 0x66, 0xb3, 0x7f, 0x34, 0x88, 0x3c, 0x87, 0xa1, 0x46, 0x8e, 0x58, 0x9e, 0x36, 0xa7, 0x1d, + 0xfe, 0xe7, 0xf4, 0x6e, 0x27, 0x6d, 0x1c, 0x49, 0x13, 0x47, 0xa7, 0xf3, 0x42, 0x09, 0x79, 0xd4, + 0xbf, 0xf8, 0x75, 0xa7, 0x97, 0x42, 0xcb, 0x69, 0x3a, 0xf1, 0x8f, 0x00, 0xae, 0x3b, 0xab, 0xc7, + 0x92, 0xa3, 0x9e, 0x69, 0x61, 0x91, 0xec, 0xc3, 0xb0, 0xee, 0x2a, 0xed, 0x5c, 0x0e, 0xd2, 0xf5, + 0x16, 0x19, 0xc1, 0x6e, 0xc9, 0xf4, 0x19, 0xda, 0x31, 0x77, 0x43, 0x07, 0x69, 0x57, 0x93, 0x27, + 0x70, 0x85, 0x63, 0xa5, 0x8c, 0xb0, 0xe1, 0xff, 0xdb, 0xf9, 0x59, 0xe2, 0xc9, 0x63, 0xd8, 0x31, + 0x05, 0xd3, 0x68, 0xc2, 0xfe, 0x76, 0x4c, 0x0f, 0x8f, 0xbf, 0x05, 0x3e, 0xd8, 0x2e, 0xf4, 0xe5, + 0xc9, 0x93, 0x3d, 0x18, 0xb4, 0xd6, 0x4e, 0x05, 0xf7, 0xab, 0xac, 0xbc, 0xde, 0x85, 0x6b, 0xfe, + 0xa7, 0x15, 0xf9, 0x19, 0x6a, 0xbf, 0xcc, 0xd5, 0xb6, 0xf9, 0xde, 0xf5, 0xc8, 0x33, 0x80, 0x99, + 0x57, 0x63, 0xe7, 0xdb, 0xee, 0xb4, 0x46, 0x39, 0x12, 0x17, 0xf3, 0x28, 0xb8, 0x9c, 0x47, 0xc1, + 0xef, 0x79, 0x14, 0x7c, 0x5d, 0x44, 0xbd, 0xcb, 0x45, 0xd4, 0xfb, 0xb9, 0x88, 0x7a, 0x27, 0x6f, + 0x27, 0xc2, 0x16, 0x75, 0x96, 0xe4, 0xaa, 0xa4, 0xe3, 0xe5, 0x25, 0x78, 0xc3, 0x32, 0x43, 0xbb, + 0x2b, 0xf1, 0x20, 0x57, 0x1a, 0xd7, 0xcb, 0x82, 0x09, 0x49, 0x4b, 0xd5, 0xe4, 0x6f, 0xd6, 0x9e, + 0x93, 0xfd, 0x52, 0xa1, 0xc9, 0x76, 0xdc, 0x1b, 0x7a, 0xf4, 0x27, 0x00, 0x00, 0xff, 0xff, 0xdf, + 0x1c, 0x0d, 0x6e, 0xef, 0x03, 0x00, 0x00, +} + +func (m *EventInsuranceFundUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventInsuranceFundUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventInsuranceFundUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fund != nil { + { + size, err := m.Fund.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 *EventRequestRedemption) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRequestRedemption) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRequestRedemption) 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 *EventWithdrawRedemption) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventWithdrawRedemption) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventWithdrawRedemption) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.RedeemCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + 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 *EventUnderwrite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUnderwrite) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUnderwrite) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Shares.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + 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] = 0x12 + } + if len(m.Underwriter) > 0 { + i -= len(m.Underwriter) + copy(dAtA[i:], m.Underwriter) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Underwriter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventInsuranceWithdraw) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventInsuranceWithdraw) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventInsuranceWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Withdrawal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.MarketTicker) > 0 { + i -= len(m.MarketTicker) + copy(dAtA[i:], m.MarketTicker) + i = encodeVarintEvents(dAtA, i, uint64(len(m.MarketTicker))) + 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 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 *EventInsuranceFundUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fund != nil { + l = m.Fund.Size() + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventRequestRedemption) 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 *EventWithdrawRedemption) 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)) + } + l = m.RedeemCoin.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventUnderwrite) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Underwriter) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.Shares.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventInsuranceWithdraw) 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.MarketTicker) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.Withdrawal.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 *EventInsuranceFundUpdate) Unmarshal(dAtA []byte) 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: EventInsuranceFundUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventInsuranceFundUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fund", 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.Fund == nil { + m.Fund = &InsuranceFund{} + } + if err := m.Fund.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 *EventRequestRedemption) Unmarshal(dAtA []byte) 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: EventRequestRedemption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRequestRedemption: 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 = &RedemptionSchedule{} + } + 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 *EventWithdrawRedemption) Unmarshal(dAtA []byte) 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: EventWithdrawRedemption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventWithdrawRedemption: 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 = &RedemptionSchedule{} + } + if err := m.Schedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedeemCoin", 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.RedeemCoin.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 *EventUnderwrite) Unmarshal(dAtA []byte) 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: EventUnderwrite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUnderwrite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Underwriter", 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.Underwriter = 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 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 3: + 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 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.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shares", 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.Shares.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 *EventInsuranceWithdraw) Unmarshal(dAtA []byte) 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: EventInsuranceWithdraw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventInsuranceWithdraw: 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 MarketTicker", 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.MarketTicker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawal", 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.Withdrawal.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/insurance/types/genesis.pb.go b/chain/insurance/types/genesis.pb.go index 09aa4be5..2bd30a00 100644 --- a/chain/insurance/types/genesis.pb.go +++ b/chain/insurance/types/genesis.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/insurance/types/insurance.pb.go b/chain/insurance/types/insurance.pb.go index bf9d978e..3756d555 100644 --- a/chain/insurance/types/insurance.pb.go +++ b/chain/insurance/types/insurance.pb.go @@ -5,11 +5,6 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - time "time" - types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -18,6 +13,10 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. @@ -286,228 +285,10 @@ func (m *RedemptionSchedule) GetRedemptionAmount() types1.Coin { return types1.Coin{} } -type EventInsuranceFundUpdate struct { - Fund *InsuranceFund `protobuf:"bytes,1,opt,name=fund,proto3" json:"fund,omitempty"` -} - -func (m *EventInsuranceFundUpdate) Reset() { *m = EventInsuranceFundUpdate{} } -func (m *EventInsuranceFundUpdate) String() string { return proto.CompactTextString(m) } -func (*EventInsuranceFundUpdate) ProtoMessage() {} -func (*EventInsuranceFundUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_dbc47a7b76393948, []int{3} -} -func (m *EventInsuranceFundUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventInsuranceFundUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventInsuranceFundUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventInsuranceFundUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventInsuranceFundUpdate.Merge(m, src) -} -func (m *EventInsuranceFundUpdate) XXX_Size() int { - return m.Size() -} -func (m *EventInsuranceFundUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_EventInsuranceFundUpdate.DiscardUnknown(m) -} - -var xxx_messageInfo_EventInsuranceFundUpdate proto.InternalMessageInfo - -func (m *EventInsuranceFundUpdate) GetFund() *InsuranceFund { - if m != nil { - return m.Fund - } - return nil -} - -type EventRequestRedemption struct { - Schedule *RedemptionSchedule `protobuf:"bytes,1,opt,name=schedule,proto3" json:"schedule,omitempty"` -} - -func (m *EventRequestRedemption) Reset() { *m = EventRequestRedemption{} } -func (m *EventRequestRedemption) String() string { return proto.CompactTextString(m) } -func (*EventRequestRedemption) ProtoMessage() {} -func (*EventRequestRedemption) Descriptor() ([]byte, []int) { - return fileDescriptor_dbc47a7b76393948, []int{4} -} -func (m *EventRequestRedemption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventRequestRedemption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventRequestRedemption.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventRequestRedemption) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventRequestRedemption.Merge(m, src) -} -func (m *EventRequestRedemption) XXX_Size() int { - return m.Size() -} -func (m *EventRequestRedemption) XXX_DiscardUnknown() { - xxx_messageInfo_EventRequestRedemption.DiscardUnknown(m) -} - -var xxx_messageInfo_EventRequestRedemption proto.InternalMessageInfo - -func (m *EventRequestRedemption) GetSchedule() *RedemptionSchedule { - if m != nil { - return m.Schedule - } - return nil -} - -type EventWithdrawRedemption struct { - // redemption schedule triggered withdraw - Schedule *RedemptionSchedule `protobuf:"bytes,1,opt,name=schedule,proto3" json:"schedule,omitempty"` - // redeem coin amount in base_currency - RedeemCoin types1.Coin `protobuf:"bytes,2,opt,name=redeem_coin,json=redeemCoin,proto3" json:"redeem_coin"` -} - -func (m *EventWithdrawRedemption) Reset() { *m = EventWithdrawRedemption{} } -func (m *EventWithdrawRedemption) String() string { return proto.CompactTextString(m) } -func (*EventWithdrawRedemption) ProtoMessage() {} -func (*EventWithdrawRedemption) Descriptor() ([]byte, []int) { - return fileDescriptor_dbc47a7b76393948, []int{5} -} -func (m *EventWithdrawRedemption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventWithdrawRedemption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventWithdrawRedemption.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventWithdrawRedemption) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventWithdrawRedemption.Merge(m, src) -} -func (m *EventWithdrawRedemption) XXX_Size() int { - return m.Size() -} -func (m *EventWithdrawRedemption) XXX_DiscardUnknown() { - xxx_messageInfo_EventWithdrawRedemption.DiscardUnknown(m) -} - -var xxx_messageInfo_EventWithdrawRedemption proto.InternalMessageInfo - -func (m *EventWithdrawRedemption) GetSchedule() *RedemptionSchedule { - if m != nil { - return m.Schedule - } - return nil -} - -func (m *EventWithdrawRedemption) GetRedeemCoin() types1.Coin { - if m != nil { - return m.RedeemCoin - } - return types1.Coin{} -} - -type EventUnderwrite struct { - // address of the underwriter - Underwriter string `protobuf:"bytes,1,opt,name=underwriter,proto3" json:"underwriter,omitempty"` - // marketId of insurance fund for the redemption - MarketId string `protobuf:"bytes,2,opt,name=marketId,proto3" json:"marketId,omitempty"` - // deposit coin amount - Deposit types1.Coin `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit"` - // share coin amount - Shares types1.Coin `protobuf:"bytes,4,opt,name=shares,proto3" json:"shares"` -} - -func (m *EventUnderwrite) Reset() { *m = EventUnderwrite{} } -func (m *EventUnderwrite) String() string { return proto.CompactTextString(m) } -func (*EventUnderwrite) ProtoMessage() {} -func (*EventUnderwrite) Descriptor() ([]byte, []int) { - return fileDescriptor_dbc47a7b76393948, []int{6} -} -func (m *EventUnderwrite) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventUnderwrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventUnderwrite.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventUnderwrite) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventUnderwrite.Merge(m, src) -} -func (m *EventUnderwrite) XXX_Size() int { - return m.Size() -} -func (m *EventUnderwrite) XXX_DiscardUnknown() { - xxx_messageInfo_EventUnderwrite.DiscardUnknown(m) -} - -var xxx_messageInfo_EventUnderwrite proto.InternalMessageInfo - -func (m *EventUnderwrite) GetUnderwriter() string { - if m != nil { - return m.Underwriter - } - return "" -} - -func (m *EventUnderwrite) GetMarketId() string { - if m != nil { - return m.MarketId - } - return "" -} - -func (m *EventUnderwrite) GetDeposit() types1.Coin { - if m != nil { - return m.Deposit - } - return types1.Coin{} -} - -func (m *EventUnderwrite) GetShares() types1.Coin { - if m != nil { - return m.Shares - } - return types1.Coin{} -} - func init() { proto.RegisterType((*Params)(nil), "injective.insurance.v1beta1.Params") proto.RegisterType((*InsuranceFund)(nil), "injective.insurance.v1beta1.InsuranceFund") proto.RegisterType((*RedemptionSchedule)(nil), "injective.insurance.v1beta1.RedemptionSchedule") - proto.RegisterType((*EventInsuranceFundUpdate)(nil), "injective.insurance.v1beta1.EventInsuranceFundUpdate") - proto.RegisterType((*EventRequestRedemption)(nil), "injective.insurance.v1beta1.EventRequestRedemption") - proto.RegisterType((*EventWithdrawRedemption)(nil), "injective.insurance.v1beta1.EventWithdrawRedemption") - proto.RegisterType((*EventUnderwrite)(nil), "injective.insurance.v1beta1.EventUnderwrite") } func init() { @@ -515,63 +296,53 @@ func init() { } var fileDescriptor_dbc47a7b76393948 = []byte{ - // 894 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0xd3, 0xed, 0x26, 0x79, 0xdb, 0x16, 0x18, 0xa1, 0xc6, 0xdd, 0x4a, 0xbb, 0x5b, 0x43, - 0x51, 0xf8, 0x51, 0x9b, 0x06, 0x24, 0x44, 0x41, 0x08, 0x96, 0x16, 0x11, 0x51, 0x91, 0xe0, 0xa6, - 0x42, 0xea, 0xc5, 0x9a, 0xb5, 0x5f, 0x76, 0x87, 0xd8, 0x1e, 0x77, 0x3c, 0x4e, 0xc9, 0x9d, 0x33, - 0xea, 0x11, 0x71, 0xe2, 0xc8, 0xb5, 0xff, 0x02, 0x5c, 0x7a, 0xec, 0x11, 0x71, 0x08, 0x28, 0xb9, - 0x70, 0xe6, 0x2f, 0x40, 0xf3, 0xc3, 0xf6, 0x96, 0x8a, 0x24, 0x42, 0xea, 0x69, 0x3d, 0x6f, 0xbe, - 0xf7, 0xcd, 0x9b, 0xef, 0x7d, 0xf3, 0x16, 0xde, 0x64, 0xf9, 0x37, 0x18, 0x4b, 0xb6, 0x87, 0x01, - 0xcb, 0xcb, 0x4a, 0xd0, 0x3c, 0xc6, 0x60, 0xef, 0xfa, 0x04, 0x25, 0xbd, 0xde, 0x46, 0xfc, 0x42, - 0x70, 0xc9, 0xc9, 0xe5, 0x06, 0xec, 0xb7, 0x5b, 0x16, 0xdc, 0x7f, 0x79, 0xca, 0xa7, 0x5c, 0xe3, - 0x02, 0xf5, 0x65, 0x52, 0xfa, 0x83, 0x29, 0xe7, 0xd3, 0x14, 0x03, 0xbd, 0x9a, 0x54, 0x3b, 0x41, - 0x52, 0x09, 0x2a, 0x19, 0xcf, 0xed, 0xfe, 0xf0, 0xdf, 0xfb, 0x92, 0x65, 0x58, 0x4a, 0x9a, 0x15, - 0x35, 0x41, 0xcc, 0xcb, 0x8c, 0x97, 0xc1, 0x84, 0x96, 0x6d, 0x61, 0x31, 0x67, 0x35, 0xc1, 0xd5, - 0xf6, 0x02, 0x5c, 0xd0, 0x38, 0x6d, 0x41, 0x66, 0x69, 0x60, 0xde, 0x2f, 0x0e, 0x74, 0xb7, 0xa8, - 0xa0, 0x59, 0x49, 0x1e, 0x39, 0xf0, 0x7a, 0x82, 0x3b, 0xb4, 0x4a, 0x65, 0x24, 0x30, 0xc1, 0xac, - 0x50, 0xf5, 0x44, 0x39, 0x97, 0x2c, 0xc6, 0xa8, 0x40, 0xc1, 0x78, 0x12, 0xd5, 0x65, 0xba, 0xce, - 0xc8, 0x59, 0xeb, 0xad, 0x5f, 0xf2, 0x4d, 0x9d, 0x7e, 0x5d, 0xa7, 0x7f, 0xd3, 0x02, 0xc6, 0x1f, - 0x3e, 0x3e, 0x18, 0x2e, 0xfc, 0x7d, 0x30, 0x7c, 0x7b, 0x9f, 0x66, 0xe9, 0x0d, 0xef, 0xd4, 0xcc, - 0xde, 0x0f, 0x7f, 0x0c, 0x9d, 0xf0, 0xaa, 0xc5, 0x87, 0x0d, 0xfc, 0x4b, 0x8d, 0xde, 0xd2, 0xe0, - 0xfa, 0x90, 0x1b, 0x9d, 0xbf, 0x7e, 0x1a, 0x3a, 0xde, 0xf7, 0x67, 0xe1, 0xfc, 0x46, 0x2d, 0xfc, - 0x67, 0x55, 0x9e, 0x90, 0x57, 0xe0, 0x7c, 0x82, 0x05, 0x2f, 0x99, 0x8c, 0x12, 0xcc, 0x79, 0xa6, - 0xcb, 0x5d, 0x09, 0xcf, 0xd9, 0xe0, 0x4d, 0x15, 0x23, 0x1f, 0x40, 0xbf, 0x69, 0x57, 0x54, 0x70, - 0x9e, 0x46, 0x92, 0xef, 0x62, 0x6e, 0x33, 0x16, 0x75, 0xc6, 0x6a, 0x83, 0xd8, 0xe2, 0x3c, 0xdd, - 0x56, 0xfb, 0x26, 0xf9, 0x47, 0x07, 0xae, 0x9c, 0xac, 0xd2, 0x99, 0x93, 0x54, 0x7a, 0xd7, 0xaa, - 0xb4, 0x66, 0x54, 0x3a, 0xa5, 0x3a, 0x03, 0x71, 0xac, 0x2c, 0xe4, 0x73, 0x58, 0x9a, 0xd0, 0x54, - 0x55, 0xed, 0x76, 0xd4, 0x35, 0xc6, 0xbe, 0x3a, 0xe6, 0xf7, 0x83, 0xe1, 0x6b, 0x53, 0x26, 0x67, - 0xd5, 0xc4, 0x8f, 0x79, 0x16, 0x58, 0x03, 0x99, 0x9f, 0x6b, 0x65, 0xb2, 0x1b, 0xc8, 0xfd, 0x02, - 0x4b, 0x7f, 0x23, 0x97, 0x61, 0x9d, 0x4e, 0x36, 0xa1, 0x27, 0xb9, 0xa4, 0x69, 0x54, 0xce, 0xa8, - 0x40, 0xf7, 0xec, 0xff, 0x62, 0x03, 0x4d, 0x71, 0x47, 0x31, 0x90, 0xcb, 0xb0, 0x92, 0x51, 0xb1, - 0x8b, 0x32, 0x62, 0x89, 0xdb, 0xd5, 0x1a, 0x2f, 0x9b, 0xc0, 0x86, 0x6e, 0x9b, 0xdd, 0x94, 0x2c, - 0xde, 0x45, 0xe1, 0x2e, 0x99, 0xb6, 0x99, 0xe0, 0xb6, 0x8e, 0x91, 0x21, 0xf4, 0x8c, 0x85, 0x23, - 0xe5, 0x7d, 0x77, 0x59, 0x43, 0xc0, 0x84, 0xc6, 0xb4, 0x44, 0x72, 0x05, 0xce, 0x59, 0xc0, 0xfd, - 0x8a, 0x4b, 0x74, 0x57, 0x34, 0xc2, 0x26, 0x7d, 0xa5, 0x42, 0xe4, 0x56, 0xc3, 0xa1, 0xaa, 0x74, - 0x61, 0xe4, 0xac, 0x5d, 0x58, 0x7f, 0xd5, 0x6f, 0xdf, 0xb1, 0x7d, 0x24, 0xf6, 0xcd, 0xf8, 0x9b, - 0x7a, 0xb9, 0xbd, 0x5f, 0x60, 0x7d, 0x92, 0xfa, 0x26, 0x17, 0xa1, 0x8b, 0xdf, 0x16, 0x4c, 0xec, - 0xbb, 0xbd, 0x91, 0xb3, 0x76, 0x26, 0xb4, 0x2b, 0xef, 0xd1, 0x22, 0x90, 0xd6, 0xb9, 0x77, 0xe2, - 0x19, 0x26, 0x55, 0x8a, 0xe4, 0x02, 0x2c, 0xb2, 0x44, 0x5b, 0xb1, 0x13, 0x2e, 0xb2, 0x84, 0xf4, - 0xa1, 0xb9, 0xba, 0xb5, 0x5b, 0x2b, 0x45, 0x1f, 0x96, 0x55, 0x93, 0x31, 0x43, 0xa1, 0x5d, 0xb4, - 0x12, 0x36, 0x6b, 0xf2, 0x9d, 0x03, 0x97, 0xe2, 0x94, 0xb2, 0x8c, 0x4e, 0x52, 0x9c, 0x7f, 0x51, - 0x6a, 0x48, 0xe8, 0x8e, 0xf7, 0xd6, 0xfb, 0xcf, 0x78, 0x6e, 0xbb, 0x9e, 0x20, 0xe3, 0xb7, 0xac, - 0xe9, 0x46, 0xc6, 0x74, 0xff, 0x49, 0xe5, 0x3d, 0x54, 0x66, 0x5b, 0x6d, 0xf6, 0xdb, 0x2b, 0x29, - 0x2e, 0x72, 0x1b, 0x5e, 0x9a, 0x4b, 0xa0, 0x19, 0xaf, 0x72, 0xa9, 0x1d, 0xa2, 0x1c, 0x6f, 0x8c, - 0xe0, 0xab, 0x16, 0x35, 0x2a, 0x7e, 0xca, 0x59, 0x3e, 0xee, 0xa8, 0xc3, 0xc3, 0x17, 0xdb, 0xcc, - 0x4f, 0x74, 0xa2, 0x77, 0x0f, 0xdc, 0x5b, 0x7b, 0x98, 0xcb, 0xa7, 0x1e, 0xf2, 0xdd, 0x22, 0xa1, - 0x12, 0xc9, 0x47, 0xd0, 0xd9, 0xa9, 0xf2, 0xc4, 0x0e, 0x9d, 0x37, 0xfc, 0x63, 0xe6, 0xad, 0xff, - 0x54, 0x7e, 0xa8, 0xf3, 0x3c, 0x84, 0x8b, 0x9a, 0x3b, 0xc4, 0xfb, 0x15, 0x96, 0x73, 0x43, 0x85, - 0x7c, 0x01, 0xcb, 0xa5, 0x6d, 0x8f, 0x65, 0x0f, 0x8e, 0x65, 0x7f, 0xb6, 0xab, 0x61, 0x43, 0xe0, - 0xfd, 0xec, 0xc0, 0xaa, 0x3e, 0xe7, 0x6b, 0x26, 0x67, 0x89, 0xa0, 0x0f, 0x9e, 0xd3, 0x41, 0xe4, - 0x63, 0xe8, 0x19, 0x33, 0x44, 0x6a, 0xe2, 0x6b, 0xef, 0x9c, 0x42, 0x73, 0x30, 0x39, 0x2a, 0xe2, - 0xfd, 0xea, 0xc0, 0x0b, 0xba, 0xd4, 0xbb, 0x79, 0x82, 0xe2, 0x81, 0x60, 0x12, 0xc9, 0x08, 0x7a, - 0x55, 0xb3, 0x12, 0x76, 0x64, 0xce, 0x87, 0x8e, 0x35, 0xec, 0xfb, 0xb0, 0x64, 0xa7, 0x6b, 0x33, - 0xf5, 0x4e, 0xa8, 0xa7, 0xc6, 0x93, 0xf7, 0xa0, 0xab, 0xc7, 0x4b, 0x69, 0xbd, 0x7b, 0x62, 0xa6, - 0x85, 0x8f, 0xd9, 0xe3, 0xc3, 0x81, 0xf3, 0xe4, 0x70, 0xe0, 0xfc, 0x79, 0x38, 0x70, 0x1e, 0x1e, - 0x0d, 0x16, 0x9e, 0x1c, 0x0d, 0x16, 0x7e, 0x3b, 0x1a, 0x2c, 0xdc, 0xdb, 0x9c, 0x1b, 0x4d, 0x1b, - 0xb5, 0xcc, 0xb7, 0xe9, 0xa4, 0x0c, 0x1a, 0xd1, 0xaf, 0xc5, 0x5c, 0xe0, 0xfc, 0x72, 0x46, 0x59, - 0x1e, 0x64, 0x5c, 0x29, 0x5c, 0xce, 0xfd, 0xeb, 0xeb, 0x39, 0x36, 0xe9, 0xea, 0x77, 0xf4, 0xce, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x9d, 0x25, 0x93, 0x19, 0x08, 0x00, 0x00, + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0xd3, 0x34, 0x6d, 0x2e, 0x6d, 0x05, 0x27, 0x44, 0xdd, 0x54, 0x72, 0xd2, 0x40, 0x51, + 0x10, 0xd4, 0xa6, 0x85, 0xa9, 0xb0, 0x10, 0x0a, 0x22, 0x52, 0x45, 0x8b, 0x9b, 0x89, 0xc5, 0x3a, + 0xdb, 0xd7, 0xe4, 0x88, 0xed, 0x33, 0xf6, 0xb9, 0x22, 0x3b, 0x33, 0xea, 0x88, 0x98, 0xf8, 0x0b, + 0xfd, 0x0b, 0x4c, 0x1d, 0x3b, 0x22, 0x86, 0x82, 0xda, 0x85, 0x99, 0x5f, 0x80, 0xee, 0x7c, 0xb6, + 0x23, 0x10, 0xb4, 0x62, 0xb2, 0xdf, 0x7b, 0xdf, 0x7b, 0xf7, 0xee, 0x7b, 0xdf, 0x3b, 0x70, 0x87, + 0x04, 0xaf, 0xb1, 0xc3, 0xc8, 0x01, 0x36, 0x48, 0x10, 0x27, 0x11, 0x0a, 0x1c, 0x6c, 0x1c, 0xac, + 0xdb, 0x98, 0xa1, 0xf5, 0xc2, 0xa3, 0x87, 0x11, 0x65, 0x14, 0x2e, 0xe7, 0x60, 0xbd, 0x08, 0x49, + 0x70, 0xe3, 0xda, 0x80, 0x0e, 0xa8, 0xc0, 0x19, 0xfc, 0x2f, 0x4d, 0x69, 0x68, 0x03, 0x4a, 0x07, + 0x1e, 0x36, 0x84, 0x65, 0x27, 0xfb, 0x86, 0x9b, 0x44, 0x88, 0x11, 0x1a, 0xc8, 0x78, 0xf3, 0xf7, + 0x38, 0x23, 0x3e, 0x8e, 0x19, 0xf2, 0xc3, 0xac, 0x80, 0x43, 0x63, 0x9f, 0xc6, 0x86, 0x8d, 0xe2, + 0xa2, 0x31, 0x87, 0x92, 0xac, 0xc0, 0x6a, 0x71, 0x01, 0x1a, 0x21, 0xc7, 0x2b, 0x40, 0xa9, 0x99, + 0xc2, 0xda, 0x9f, 0x15, 0x50, 0xdd, 0x45, 0x11, 0xf2, 0x63, 0x78, 0xa4, 0x80, 0xdb, 0x2e, 0xde, + 0x47, 0x89, 0xc7, 0xac, 0x08, 0xbb, 0xd8, 0x0f, 0x79, 0x3f, 0x56, 0x40, 0x19, 0x71, 0xb0, 0x15, + 0xe2, 0x88, 0x50, 0xd7, 0xca, 0xda, 0x54, 0x95, 0x96, 0xd2, 0xa9, 0x6f, 0x2c, 0xe9, 0x69, 0x9f, + 0x7a, 0xd6, 0xa7, 0xbe, 0x25, 0x01, 0xdd, 0x47, 0xc7, 0xa7, 0xcd, 0xd2, 0xcf, 0xd3, 0xe6, 0xbd, + 0x31, 0xf2, 0xbd, 0xcd, 0xf6, 0xa5, 0x2b, 0xb7, 0x3f, 0x7c, 0x6b, 0x2a, 0xe6, 0xaa, 0xc4, 0x9b, + 0x39, 0xfc, 0x85, 0x40, 0xef, 0x0a, 0x70, 0x76, 0xc8, 0x66, 0xe5, 0xc7, 0xa7, 0xa6, 0xd2, 0x7e, + 0x3f, 0x0d, 0xe6, 0x7b, 0x19, 0xf1, 0xcf, 0x92, 0xc0, 0x85, 0x37, 0xc0, 0xbc, 0x8b, 0x43, 0x1a, + 0x13, 0x66, 0xb9, 0x38, 0xa0, 0xbe, 0x68, 0xb7, 0x66, 0xce, 0x49, 0xe7, 0x16, 0xf7, 0xc1, 0x87, + 0xa0, 0x91, 0x8f, 0xcb, 0x0a, 0x29, 0xf5, 0x2c, 0x46, 0x47, 0x38, 0x90, 0x19, 0x65, 0x91, 0xb1, + 0x98, 0x23, 0x76, 0x29, 0xf5, 0xfa, 0x3c, 0x9e, 0x26, 0x7f, 0x54, 0xc0, 0xca, 0xc5, 0x2c, 0x4d, + 0x5d, 0xc4, 0xd2, 0x03, 0xc9, 0x52, 0x27, 0x65, 0xe9, 0x92, 0xec, 0x68, 0xd1, 0x3f, 0x69, 0x81, + 0xcf, 0xc1, 0x8c, 0x8d, 0x3c, 0xde, 0xb5, 0x5a, 0xe1, 0xd7, 0xe8, 0xea, 0xfc, 0x98, 0xaf, 0xa7, + 0xcd, 0x5b, 0x03, 0xc2, 0x86, 0x89, 0xad, 0x3b, 0xd4, 0x37, 0xa4, 0x80, 0xd2, 0xcf, 0x5a, 0xec, + 0x8e, 0x0c, 0x36, 0x0e, 0x71, 0xac, 0xf7, 0x02, 0x66, 0x66, 0xe9, 0x70, 0x07, 0xd4, 0x19, 0x65, + 0xc8, 0xb3, 0xe2, 0x21, 0x8a, 0xb0, 0x3a, 0xfd, 0x5f, 0xd5, 0x80, 0x28, 0xb1, 0xc7, 0x2b, 0xc0, + 0x65, 0x50, 0xf3, 0x51, 0x34, 0xc2, 0xcc, 0x22, 0xae, 0x5a, 0x15, 0x1c, 0xcf, 0xa6, 0x8e, 0x9e, + 0x18, 0x9b, 0x0c, 0x32, 0xe2, 0x8c, 0x70, 0xa4, 0xce, 0xa4, 0x63, 0x4b, 0x9d, 0x7d, 0xe1, 0x83, + 0x4d, 0x50, 0x4f, 0x25, 0x6c, 0x71, 0xed, 0xab, 0xb3, 0x02, 0x02, 0x52, 0x57, 0x17, 0xc5, 0x18, + 0xae, 0x80, 0x39, 0x09, 0x78, 0x93, 0x50, 0x86, 0xd5, 0x9a, 0x40, 0xc8, 0xa4, 0x97, 0xdc, 0x05, + 0x9f, 0xe6, 0x35, 0x78, 0x97, 0x2a, 0x68, 0x29, 0x9d, 0x85, 0x8d, 0x9b, 0x7a, 0xb1, 0xc7, 0x72, + 0x49, 0xe4, 0xce, 0xe8, 0x3b, 0xc2, 0xec, 0x8f, 0x43, 0x9c, 0x9d, 0xc4, 0xff, 0xe1, 0x75, 0x50, + 0xc5, 0x6f, 0x43, 0x12, 0x8d, 0xd5, 0x7a, 0x4b, 0xe9, 0x4c, 0x99, 0xd2, 0x6a, 0x1f, 0x95, 0x01, + 0x2c, 0x94, 0xbb, 0xe7, 0x0c, 0xb1, 0x9b, 0x78, 0x18, 0x2e, 0x80, 0x32, 0x71, 0x85, 0x14, 0x2b, + 0x66, 0x99, 0xb8, 0xb0, 0x01, 0xf2, 0xab, 0x4b, 0xb9, 0x15, 0x54, 0x34, 0xc0, 0x2c, 0x1f, 0x32, + 0xf6, 0x71, 0x24, 0x54, 0x54, 0x33, 0x73, 0x1b, 0xbe, 0x53, 0xc0, 0x92, 0xe3, 0x21, 0xe2, 0x23, + 0xdb, 0xc3, 0x93, 0x1b, 0xc5, 0x1f, 0x09, 0x31, 0xf1, 0xfa, 0x46, 0xe3, 0x0f, 0xcd, 0xf5, 0xb3, + 0x17, 0xa4, 0x7b, 0x57, 0x8a, 0xae, 0x95, 0x8a, 0xee, 0xaf, 0xa5, 0xda, 0x87, 0x5c, 0x6c, 0x8b, + 0x79, 0xbc, 0xb8, 0x12, 0xaf, 0x05, 0xb7, 0xc1, 0xd5, 0x89, 0x04, 0xe4, 0xd3, 0x24, 0x60, 0x42, + 0x21, 0x5c, 0xf1, 0xa9, 0x10, 0x74, 0x3e, 0xa2, 0x9c, 0xc5, 0x27, 0x94, 0x04, 0xdd, 0x0a, 0x3f, + 0xdc, 0xbc, 0x52, 0x64, 0x3e, 0x16, 0x89, 0x5d, 0x72, 0x7c, 0xa6, 0x29, 0x27, 0x67, 0x9a, 0xf2, + 0xfd, 0x4c, 0x53, 0x0e, 0xcf, 0xb5, 0xd2, 0xc9, 0xb9, 0x56, 0xfa, 0x72, 0xae, 0x95, 0x5e, 0xed, + 0x4c, 0xc8, 0xac, 0x97, 0x4d, 0x68, 0x1b, 0xd9, 0xb1, 0x91, 0xcf, 0x6b, 0xcd, 0xa1, 0x11, 0x9e, + 0x34, 0x87, 0x88, 0x04, 0x86, 0x4f, 0x39, 0xed, 0xf1, 0xc4, 0x0b, 0x2e, 0x34, 0x69, 0x57, 0x05, + 0x27, 0xf7, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x78, 0x7e, 0xa2, 0xae, 0xe5, 0x05, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -792,253 +563,81 @@ func (m *RedemptionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventInsuranceFundUpdate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintInsurance(dAtA []byte, offset int, v uint64) int { + offset -= sovInsurance(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *EventInsuranceFundUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *EventInsuranceFundUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.Fund != nil { - { - size, err := m.Fund.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DefaultRedemptionNoticePeriodDuration) + n += 1 + l + sovInsurance(uint64(l)) + return n } -func (m *EventRequestRedemption) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *InsuranceFund) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *EventRequestRedemption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventRequestRedemption) 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 = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + l = len(m.DepositDenom) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *EventWithdrawRedemption) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + l = len(m.InsurancePoolTokenDenom) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) } - return dAtA[:n], nil -} - -func (m *EventWithdrawRedemption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RedemptionNoticePeriodDuration) + n += 1 + l + sovInsurance(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovInsurance(uint64(l)) + l = m.TotalShare.Size() + n += 1 + l + sovInsurance(uint64(l)) + l = len(m.MarketId) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) + } + l = len(m.MarketTicker) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) + } + l = len(m.OracleBase) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) + } + l = len(m.OracleQuote) + if l > 0 { + n += 1 + l + sovInsurance(uint64(l)) + } + if m.OracleType != 0 { + n += 1 + sovInsurance(uint64(m.OracleType)) + } + if m.Expiry != 0 { + n += 1 + sovInsurance(uint64(m.Expiry)) + } + return n } -func (m *EventWithdrawRedemption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *RedemptionSchedule) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.RedeemCoin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.Schedule != nil { - { - size, err := m.Schedule.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventUnderwrite) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventUnderwrite) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventUnderwrite) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Shares.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintInsurance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.MarketId) > 0 { - i -= len(m.MarketId) - copy(dAtA[i:], m.MarketId) - i = encodeVarintInsurance(dAtA, i, uint64(len(m.MarketId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Underwriter) > 0 { - i -= len(m.Underwriter) - copy(dAtA[i:], m.Underwriter) - i = encodeVarintInsurance(dAtA, i, uint64(len(m.Underwriter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintInsurance(dAtA []byte, offset int, v uint64) int { - offset -= sovInsurance(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 = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.DefaultRedemptionNoticePeriodDuration) - n += 1 + l + sovInsurance(uint64(l)) - return n -} - -func (m *InsuranceFund) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DepositDenom) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = len(m.InsurancePoolTokenDenom) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RedemptionNoticePeriodDuration) - n += 1 + l + sovInsurance(uint64(l)) - l = m.Balance.Size() - n += 1 + l + sovInsurance(uint64(l)) - l = m.TotalShare.Size() - n += 1 + l + sovInsurance(uint64(l)) - l = len(m.MarketId) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = len(m.MarketTicker) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = len(m.OracleBase) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = len(m.OracleQuote) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - if m.OracleType != 0 { - n += 1 + sovInsurance(uint64(m.OracleType)) - } - if m.Expiry != 0 { - n += 1 + sovInsurance(uint64(m.Expiry)) - } - return n -} - -func (m *RedemptionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovInsurance(uint64(m.Id)) + if m.Id != 0 { + n += 1 + sovInsurance(uint64(m.Id)) } l = len(m.MarketId) if l > 0 { @@ -1055,68 +654,6 @@ func (m *RedemptionSchedule) Size() (n int) { return n } -func (m *EventInsuranceFundUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fund != nil { - l = m.Fund.Size() - n += 1 + l + sovInsurance(uint64(l)) - } - return n -} - -func (m *EventRequestRedemption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schedule != nil { - l = m.Schedule.Size() - n += 1 + l + sovInsurance(uint64(l)) - } - return n -} - -func (m *EventWithdrawRedemption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schedule != nil { - l = m.Schedule.Size() - n += 1 + l + sovInsurance(uint64(l)) - } - l = m.RedeemCoin.Size() - n += 1 + l + sovInsurance(uint64(l)) - return n -} - -func (m *EventUnderwrite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Underwriter) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = len(m.MarketId) - if l > 0 { - n += 1 + l + sovInsurance(uint64(l)) - } - l = m.Deposit.Size() - n += 1 + l + sovInsurance(uint64(l)) - l = m.Shares.Size() - n += 1 + l + sovInsurance(uint64(l)) - return n -} - func sovInsurance(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1786,477 +1323,6 @@ func (m *RedemptionSchedule) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventInsuranceFundUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventInsuranceFundUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventInsuranceFundUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fund", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fund == nil { - m.Fund = &InsuranceFund{} - } - if err := m.Fund.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInsurance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInsurance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventRequestRedemption) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventRequestRedemption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventRequestRedemption: 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 ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schedule == nil { - m.Schedule = &RedemptionSchedule{} - } - if err := m.Schedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInsurance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInsurance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventWithdrawRedemption) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventWithdrawRedemption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventWithdrawRedemption: 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 ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schedule == nil { - m.Schedule = &RedemptionSchedule{} - } - if err := m.Schedule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedeemCoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RedeemCoin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInsurance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInsurance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventUnderwrite) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventUnderwrite: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventUnderwrite: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Underwriter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Underwriter = 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 ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - 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 Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInsurance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInsurance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthInsurance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Shares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInsurance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthInsurance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipInsurance(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/chain/insurance/types/query.pb.go b/chain/insurance/types/query.pb.go index 37fdf2bd..4b79acab 100644 --- a/chain/insurance/types/query.pb.go +++ b/chain/insurance/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -18,6 +14,9 @@ import ( 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. diff --git a/chain/insurance/types/tx.pb.go b/chain/insurance/types/tx.pb.go index 1113a9f8..846919ee 100644 --- a/chain/insurance/types/tx.pb.go +++ b/chain/insurance/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/InjectiveLabs/sdk-go/chain/oracle/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/types" @@ -20,6 +16,9 @@ import ( 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. diff --git a/chain/ocr/types/genesis.pb.go b/chain/ocr/types/genesis.pb.go index 68aee64a..210d8023 100644 --- a/chain/ocr/types/genesis.pb.go +++ b/chain/ocr/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - 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. diff --git a/chain/ocr/types/ocr.pb.go b/chain/ocr/types/ocr.pb.go index 4c0279d4..d80ac284 100644 --- a/chain/ocr/types/ocr.pb.go +++ b/chain/ocr/types/ocr.pb.go @@ -5,11 +5,6 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - time "time" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -17,6 +12,10 @@ import ( proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/ocr/types/query.pb.go b/chain/ocr/types/query.pb.go index 3000c85e..5320b68e 100644 --- a/chain/ocr/types/query.pb.go +++ b/chain/ocr/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -18,6 +14,9 @@ import ( 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. diff --git a/chain/ocr/types/tx.pb.go b/chain/ocr/types/tx.pb.go index b1574018..76af8a8c 100644 --- a/chain/ocr/types/tx.pb.go +++ b/chain/ocr/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -20,6 +16,9 @@ import ( 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. diff --git a/chain/oracle/types/events.pb.go b/chain/oracle/types/events.pb.go index 4f5e3139..d8b8118e 100644 --- a/chain/oracle/types/events.pb.go +++ b/chain/oracle/types/events.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/oracle/types/genesis.pb.go b/chain/oracle/types/genesis.pb.go index df592e98..04cb607c 100644 --- a/chain/oracle/types/genesis.pb.go +++ b/chain/oracle/types/genesis.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/oracle.pb.go b/chain/oracle/types/oracle.pb.go index 65482710..156c1208 100644 --- a/chain/oracle/types/oracle.pb.go +++ b/chain/oracle/types/oracle.pb.go @@ -5,15 +5,14 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/oracle/types/proposal.pb.go b/chain/oracle/types/proposal.pb.go index ae4c5169..2606c3f3 100644 --- a/chain/oracle/types/proposal.pb.go +++ b/chain/oracle/types/proposal.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/oracle/types/query.pb.go b/chain/oracle/types/query.pb.go index 4581b81c..d82bee6f 100644 --- a/chain/oracle/types/query.pb.go +++ b/chain/oracle/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -18,6 +14,9 @@ import ( 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. diff --git a/chain/oracle/types/tx.pb.go b/chain/oracle/types/tx.pb.go index 165fcf35..c993e9d9 100644 --- a/chain/oracle/types/tx.pb.go +++ b/chain/oracle/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/peggy/types/attestation.pb.go b/chain/peggy/types/attestation.pb.go index 3ea675f8..0d591bd2 100644 --- a/chain/peggy/types/attestation.pb.go +++ b/chain/peggy/types/attestation.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_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. diff --git a/chain/peggy/types/batch.pb.go b/chain/peggy/types/batch.pb.go index 65fac894..083ea8c7 100644 --- a/chain/peggy/types/batch.pb.go +++ b/chain/peggy/types/batch.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/ethereum_signer.pb.go b/chain/peggy/types/ethereum_signer.pb.go index 08af7a8a..d52e1b45 100644 --- a/chain/peggy/types/ethereum_signer.pb.go +++ b/chain/peggy/types/ethereum_signer.pb.go @@ -5,10 +5,9 @@ package types import ( fmt "fmt" - math "math" - _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/peggy/types/events.pb.go b/chain/peggy/types/events.pb.go index 571bb00b..13168705 100644 --- a/chain/peggy/types/events.pb.go +++ b/chain/peggy/types/events.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_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. diff --git a/chain/peggy/types/genesis.pb.go b/chain/peggy/types/genesis.pb.go index e4baffbc..197630ab 100644 --- a/chain/peggy/types/genesis.pb.go +++ b/chain/peggy/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "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. diff --git a/chain/peggy/types/msgs.pb.go b/chain/peggy/types/msgs.pb.go index 7797fcfe..6bf0619c 100644 --- a/chain/peggy/types/msgs.pb.go +++ b/chain/peggy/types/msgs.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -22,6 +18,9 @@ import ( 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. diff --git a/chain/peggy/types/params.pb.go b/chain/peggy/types/params.pb.go index 7afc74dd..f7932952 100644 --- a/chain/peggy/types/params.pb.go +++ b/chain/peggy/types/params.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/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. diff --git a/chain/peggy/types/pool.pb.go b/chain/peggy/types/pool.pb.go index 68e76b1a..a7eabb67 100644 --- a/chain/peggy/types/pool.pb.go +++ b/chain/peggy/types/pool.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_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. diff --git a/chain/peggy/types/proposal.pb.go b/chain/peggy/types/proposal.pb.go index 242fd142..dd9ece2a 100644 --- a/chain/peggy/types/proposal.pb.go +++ b/chain/peggy/types/proposal.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "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. diff --git a/chain/peggy/types/query.pb.go b/chain/peggy/types/query.pb.go index daac4c68..56cc080b 100644 --- a/chain/peggy/types/query.pb.go +++ b/chain/peggy/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -17,6 +13,9 @@ import ( 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. diff --git a/chain/peggy/types/types.pb.go b/chain/peggy/types/types.pb.go index 29281874..66673a3c 100644 --- a/chain/peggy/types/types.pb.go +++ b/chain/peggy/types/types.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_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. diff --git a/chain/stream/types/query.pb.go b/chain/stream/types/query.pb.go index fcbb41c6..1e7e3f0c 100644 --- a/chain/stream/types/query.pb.go +++ b/chain/stream/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/InjectiveLabs/sdk-go/chain/exchange/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/stream/types/response.go b/chain/stream/types/response.go index 0e8ecd5e..3a215960 100644 --- a/chain/stream/types/response.go +++ b/chain/stream/types/response.go @@ -6,6 +6,7 @@ import ( ) type StreamResponseMap struct { + tradeEventsCounter uint64 BlockHeight uint64 BlockTime time.Time BankBalancesByAccount map[string][]*BankBalance @@ -75,3 +76,9 @@ func (m *StreamRequest) Validate() error { } return nil } + +func (m *StreamResponseMap) NextTradeEventNumber() (tradeNumber uint64) { + currentTradesNumber := m.tradeEventsCounter + m.tradeEventsCounter++ + return currentTradesNumber +} diff --git a/chain/tokenfactory/types/authorityMetadata.pb.go b/chain/tokenfactory/types/authorityMetadata.pb.go index 8ee31dd6..51337590 100644 --- a/chain/tokenfactory/types/authorityMetadata.pb.go +++ b/chain/tokenfactory/types/authorityMetadata.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "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. diff --git a/chain/tokenfactory/types/events.pb.go b/chain/tokenfactory/types/events.pb.go index 17d0804f..8d71b85d 100644 --- a/chain/tokenfactory/types/events.pb.go +++ b/chain/tokenfactory/types/events.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/bank/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. @@ -130,23 +129,23 @@ func (m *EventMintTFDenom) GetAmount() types.Coin { return types.Coin{} } -type EventBurnTFDenom struct { +type EventBurnDenom struct { BurnerAddress string `protobuf:"bytes,1,opt,name=burner_address,json=burnerAddress,proto3" json:"burner_address,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` } -func (m *EventBurnTFDenom) Reset() { *m = EventBurnTFDenom{} } -func (m *EventBurnTFDenom) String() string { return proto.CompactTextString(m) } -func (*EventBurnTFDenom) ProtoMessage() {} -func (*EventBurnTFDenom) Descriptor() ([]byte, []int) { +func (m *EventBurnDenom) Reset() { *m = EventBurnDenom{} } +func (m *EventBurnDenom) String() string { return proto.CompactTextString(m) } +func (*EventBurnDenom) ProtoMessage() {} +func (*EventBurnDenom) Descriptor() ([]byte, []int) { return fileDescriptor_b9fd0c5434c2a5b7, []int{2} } -func (m *EventBurnTFDenom) XXX_Unmarshal(b []byte) error { +func (m *EventBurnDenom) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventBurnTFDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventBurnDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventBurnTFDenom.Marshal(b, m, deterministic) + return xxx_messageInfo_EventBurnDenom.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -156,26 +155,26 @@ func (m *EventBurnTFDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *EventBurnTFDenom) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBurnTFDenom.Merge(m, src) +func (m *EventBurnDenom) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBurnDenom.Merge(m, src) } -func (m *EventBurnTFDenom) XXX_Size() int { +func (m *EventBurnDenom) XXX_Size() int { return m.Size() } -func (m *EventBurnTFDenom) XXX_DiscardUnknown() { - xxx_messageInfo_EventBurnTFDenom.DiscardUnknown(m) +func (m *EventBurnDenom) XXX_DiscardUnknown() { + xxx_messageInfo_EventBurnDenom.DiscardUnknown(m) } -var xxx_messageInfo_EventBurnTFDenom proto.InternalMessageInfo +var xxx_messageInfo_EventBurnDenom proto.InternalMessageInfo -func (m *EventBurnTFDenom) GetBurnerAddress() string { +func (m *EventBurnDenom) GetBurnerAddress() string { if m != nil { return m.BurnerAddress } return "" } -func (m *EventBurnTFDenom) GetAmount() types.Coin { +func (m *EventBurnDenom) GetAmount() types.Coin { if m != nil { return m.Amount } @@ -289,7 +288,7 @@ func (m *EventSetTFDenomMetadata) GetMetadata() types1.Metadata { func init() { proto.RegisterType((*EventCreateTFDenom)(nil), "injective.tokenfactory.v1beta1.EventCreateTFDenom") proto.RegisterType((*EventMintTFDenom)(nil), "injective.tokenfactory.v1beta1.EventMintTFDenom") - proto.RegisterType((*EventBurnTFDenom)(nil), "injective.tokenfactory.v1beta1.EventBurnTFDenom") + proto.RegisterType((*EventBurnDenom)(nil), "injective.tokenfactory.v1beta1.EventBurnDenom") proto.RegisterType((*EventChangeTFAdmin)(nil), "injective.tokenfactory.v1beta1.EventChangeTFAdmin") proto.RegisterType((*EventSetTFDenomMetadata)(nil), "injective.tokenfactory.v1beta1.EventSetTFDenomMetadata") } @@ -299,35 +298,35 @@ func init() { } var fileDescriptor_b9fd0c5434c2a5b7 = []byte{ - // 440 bytes of a gzipped FileDescriptorProto + // 442 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xc1, 0x6a, 0x14, 0x41, - 0x10, 0xdd, 0x11, 0x8d, 0xda, 0xa2, 0x26, 0x43, 0xc0, 0x35, 0xe0, 0x28, 0x0b, 0x82, 0x18, 0x9c, - 0x21, 0x0a, 0x7a, 0x94, 0x6c, 0x62, 0x40, 0x30, 0x97, 0x35, 0x78, 0xf0, 0x12, 0x7a, 0x7a, 0xca, - 0xdd, 0x76, 0x33, 0x55, 0x43, 0x77, 0xcd, 0xc6, 0xfd, 0x0b, 0x3f, 0x2b, 0xc7, 0x1c, 0x3d, 0x89, - 0xec, 0xfe, 0x88, 0xcc, 0x4c, 0x77, 0xef, 0xaa, 0x88, 0x07, 0x6f, 0x53, 0x5d, 0xaf, 0xde, 0xab, - 0xf7, 0xa6, 0xc4, 0xae, 0xc6, 0xcf, 0xa0, 0x58, 0xcf, 0x20, 0x63, 0x9a, 0x02, 0x7e, 0x92, 0x8a, - 0xc9, 0xcc, 0xb3, 0xd9, 0x5e, 0x0e, 0x2c, 0xf7, 0x32, 0x98, 0x01, 0xb2, 0x4d, 0x2b, 0x43, 0x4c, - 0x71, 0x12, 0xc0, 0xe9, 0x3a, 0x38, 0x75, 0xe0, 0x9d, 0xed, 0x31, 0x8d, 0xa9, 0x85, 0x66, 0xcd, - 0x57, 0x37, 0xb5, 0x93, 0x28, 0xb2, 0x25, 0xd9, 0x2c, 0x97, 0x16, 0x02, 0xaf, 0x22, 0x8d, 0x7f, - 0xf4, 0x71, 0x1a, 0xfa, 0x4d, 0xe1, 0xfa, 0x2f, 0xff, 0xb1, 0xa2, 0xac, 0x79, 0x42, 0x46, 0xf3, - 0xfc, 0x18, 0x58, 0x16, 0x92, 0x65, 0x37, 0x37, 0x38, 0x14, 0xf1, 0x9b, 0x66, 0xfb, 0x03, 0x03, - 0x92, 0xe1, 0xe4, 0xe8, 0x10, 0x90, 0xca, 0xb8, 0x2f, 0xae, 0x4b, 0xa5, 0xa8, 0x46, 0xee, 0x47, - 0x8f, 0xa2, 0x27, 0x37, 0x47, 0xbe, 0x8c, 0xb7, 0xc5, 0xb5, 0xa2, 0x81, 0xf4, 0xaf, 0xb4, 0xef, - 0x5d, 0x31, 0xf8, 0x22, 0x36, 0x5b, 0x96, 0x63, 0x8d, 0xec, 0x39, 0x76, 0xc5, 0x96, 0x01, 0xa5, - 0x2b, 0x0d, 0xc8, 0xa7, 0xb2, 0x28, 0x0c, 0x58, 0xeb, 0xd8, 0x36, 0x43, 0x63, 0xbf, 0x7b, 0x8f, - 0x5f, 0x89, 0x0d, 0x59, 0xb6, 0x7a, 0x0d, 0xef, 0xad, 0xe7, 0xf7, 0xd3, 0xce, 0x6f, 0xda, 0xe4, - 0xe1, 0xa3, 0x4b, 0x0f, 0x48, 0xe3, 0xf0, 0xea, 0xc5, 0xf7, 0x87, 0xbd, 0x91, 0x83, 0x0f, 0x8c, - 0x53, 0x1e, 0xd6, 0x06, 0xbd, 0xf2, 0x63, 0x71, 0x27, 0xaf, 0x0d, 0x82, 0xf9, 0x4d, 0xf6, 0x76, - 0xf7, 0xfa, 0xdf, 0x9a, 0x1f, 0x7c, 0x66, 0x13, 0x89, 0x63, 0x38, 0x39, 0xda, 0x2f, 0x4a, 0x8d, - 0xab, 0x64, 0xa2, 0xb5, 0x64, 0xe2, 0xa7, 0x62, 0x0b, 0xe1, 0xfc, 0x54, 0x36, 0x90, 0xb0, 0x4e, - 0x97, 0xdd, 0x5d, 0x84, 0xf3, 0x76, 0xd4, 0x2d, 0x34, 0xa8, 0xc4, 0xbd, 0x96, 0xf7, 0x3d, 0xf8, - 0x10, 0xfd, 0xcf, 0xfa, 0x0b, 0xf9, 0x6b, 0x71, 0xa3, 0x74, 0x08, 0xe7, 0xe1, 0xc1, 0xca, 0x03, - 0x4e, 0x83, 0x07, 0x4f, 0xe3, 0x7c, 0x84, 0xa1, 0xe1, 0xd9, 0xc5, 0x22, 0x89, 0x2e, 0x17, 0x49, - 0xf4, 0x63, 0x91, 0x44, 0x5f, 0x97, 0x49, 0xef, 0x72, 0x99, 0xf4, 0xbe, 0x2d, 0x93, 0xde, 0xc7, - 0xd1, 0x58, 0xf3, 0xa4, 0xce, 0x53, 0x45, 0x65, 0xf6, 0xd6, 0x9f, 0xd6, 0x3b, 0x99, 0xdb, 0x2c, - 0x1c, 0xda, 0x33, 0x45, 0x06, 0xd6, 0xcb, 0x89, 0xd4, 0x98, 0x95, 0x54, 0xd4, 0x67, 0x60, 0x7f, - 0xbd, 0x42, 0x9e, 0x57, 0x60, 0xf3, 0x8d, 0xf6, 0xe4, 0x5e, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, - 0xf2, 0x1b, 0xa1, 0x5f, 0x4f, 0x03, 0x00, 0x00, + 0x10, 0xdd, 0x11, 0x8d, 0xda, 0x62, 0x4c, 0x86, 0x80, 0x6b, 0xc0, 0x51, 0x16, 0x04, 0x31, 0x38, + 0x43, 0x14, 0xf4, 0x28, 0xd9, 0xc4, 0x80, 0x60, 0x2e, 0x6b, 0xf0, 0xe0, 0x25, 0xf4, 0xf4, 0x94, + 0xbb, 0xed, 0x66, 0xaa, 0x86, 0xee, 0x9a, 0x8d, 0xfb, 0x17, 0x7e, 0x56, 0x8e, 0x39, 0x7a, 0x12, + 0xd9, 0xfd, 0x11, 0x99, 0x99, 0xee, 0xce, 0xaa, 0x88, 0x87, 0xdc, 0xa6, 0xba, 0x5e, 0xbd, 0x57, + 0xef, 0x4d, 0x89, 0x1d, 0x8d, 0x5f, 0x40, 0xb1, 0x9e, 0x41, 0xc6, 0x34, 0x05, 0xfc, 0x2c, 0x15, + 0x93, 0x99, 0x67, 0xb3, 0xdd, 0x1c, 0x58, 0xee, 0x66, 0x30, 0x03, 0x64, 0x9b, 0x56, 0x86, 0x98, + 0xe2, 0x24, 0x80, 0xd3, 0x55, 0x70, 0xea, 0xc0, 0xdb, 0x5b, 0x63, 0x1a, 0x53, 0x0b, 0xcd, 0x9a, + 0xaf, 0x6e, 0x6a, 0x3b, 0x51, 0x64, 0x4b, 0xb2, 0x59, 0x2e, 0x2d, 0x04, 0x5e, 0x45, 0x1a, 0xff, + 0xea, 0xe3, 0x34, 0xf4, 0x9b, 0xc2, 0xf5, 0x5f, 0xfd, 0x67, 0x45, 0x59, 0xf3, 0x84, 0x8c, 0xe6, + 0xf9, 0x11, 0xb0, 0x2c, 0x24, 0xcb, 0x6e, 0x6e, 0x70, 0x20, 0xe2, 0xb7, 0xcd, 0xf6, 0xfb, 0x06, + 0x24, 0xc3, 0xf1, 0xe1, 0x01, 0x20, 0x95, 0x71, 0x5f, 0xdc, 0x94, 0x4a, 0x51, 0x8d, 0xdc, 0x8f, + 0x1e, 0x47, 0x4f, 0x6f, 0x8f, 0x7c, 0x19, 0x6f, 0x89, 0x1b, 0x45, 0x03, 0xe9, 0x5f, 0x6b, 0xdf, + 0xbb, 0x62, 0xf0, 0x55, 0x6c, 0xb4, 0x2c, 0x47, 0x1a, 0xd9, 0x73, 0xec, 0x88, 0x4d, 0x03, 0x4a, + 0x57, 0x1a, 0x90, 0x4f, 0x64, 0x51, 0x18, 0xb0, 0xd6, 0xb1, 0x6d, 0x84, 0xc6, 0x5e, 0xf7, 0x1e, + 0xbf, 0x16, 0x6b, 0xb2, 0x6c, 0xf5, 0x1a, 0xde, 0x3b, 0x2f, 0x1e, 0xa4, 0x9d, 0xdf, 0xb4, 0xc9, + 0xc3, 0x47, 0x97, 0xee, 0x93, 0xc6, 0xe1, 0xf5, 0xf3, 0x1f, 0x8f, 0x7a, 0x23, 0x07, 0x1f, 0x54, + 0x62, 0xbd, 0x55, 0x1e, 0xd6, 0x06, 0x3b, 0xdd, 0x27, 0x62, 0x3d, 0xaf, 0x0d, 0x82, 0xf9, 0x43, + 0xf4, 0x6e, 0xf7, 0x7a, 0x65, 0xc5, 0x8f, 0x3e, 0xb1, 0x89, 0xc4, 0x31, 0x1c, 0x1f, 0xee, 0x15, + 0xa5, 0xc6, 0xcb, 0x5c, 0xa2, 0x95, 0x5c, 0xe2, 0x67, 0x62, 0x13, 0xe1, 0xec, 0x44, 0x36, 0x90, + 0xb0, 0x4e, 0x97, 0xdc, 0x3d, 0x84, 0xb3, 0x76, 0xd4, 0x2d, 0x34, 0xa8, 0xc4, 0xfd, 0x96, 0xf7, + 0x03, 0xf8, 0x08, 0xfd, 0xaf, 0xfa, 0x07, 0xf9, 0x1b, 0x71, 0xab, 0x74, 0x08, 0xe7, 0xe1, 0xe1, + 0xa5, 0x07, 0x9c, 0x06, 0x0f, 0x9e, 0xc6, 0xf9, 0x08, 0x43, 0xc3, 0xd3, 0xf3, 0x45, 0x12, 0x5d, + 0x2c, 0x92, 0xe8, 0xe7, 0x22, 0x89, 0xbe, 0x2d, 0x93, 0xde, 0xc5, 0x32, 0xe9, 0x7d, 0x5f, 0x26, + 0xbd, 0x4f, 0xa3, 0xb1, 0xe6, 0x49, 0x9d, 0xa7, 0x8a, 0xca, 0xec, 0x9d, 0x3f, 0xac, 0xf7, 0x32, + 0xb7, 0x59, 0x38, 0xb3, 0xe7, 0x8a, 0x0c, 0xac, 0x96, 0x13, 0xa9, 0x31, 0x2b, 0xa9, 0xa8, 0x4f, + 0xc1, 0xfe, 0x7e, 0x83, 0x3c, 0xaf, 0xc0, 0xe6, 0x6b, 0xed, 0xc1, 0xbd, 0xfc, 0x15, 0x00, 0x00, + 0xff, 0xff, 0x0f, 0x75, 0x34, 0xbb, 0x4d, 0x03, 0x00, 0x00, } func (m *EventCreateTFDenom) Marshal() (dAtA []byte, err error) { @@ -407,7 +406,7 @@ func (m *EventMintTFDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventBurnTFDenom) Marshal() (dAtA []byte, err error) { +func (m *EventBurnDenom) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -417,12 +416,12 @@ func (m *EventBurnTFDenom) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventBurnTFDenom) MarshalTo(dAtA []byte) (int, error) { +func (m *EventBurnDenom) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventBurnTFDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventBurnDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -567,7 +566,7 @@ func (m *EventMintTFDenom) Size() (n int) { return n } -func (m *EventBurnTFDenom) Size() (n int) { +func (m *EventBurnDenom) Size() (n int) { if m == nil { return 0 } @@ -849,7 +848,7 @@ func (m *EventMintTFDenom) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventBurnTFDenom) Unmarshal(dAtA []byte) error { +func (m *EventBurnDenom) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -872,10 +871,10 @@ func (m *EventBurnTFDenom) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventBurnTFDenom: wiretype end group for non-group") + return fmt.Errorf("proto: EventBurnDenom: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventBurnTFDenom: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventBurnDenom: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/chain/tokenfactory/types/genesis.pb.go b/chain/tokenfactory/types/genesis.pb.go index 9f623873..85a59947 100644 --- a/chain/tokenfactory/types/genesis.pb.go +++ b/chain/tokenfactory/types/genesis.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/tokenfactory/types/params.pb.go b/chain/tokenfactory/types/params.pb.go index 089844bc..9d705d9c 100644 --- a/chain/tokenfactory/types/params.pb.go +++ b/chain/tokenfactory/types/params.pb.go @@ -5,15 +5,14 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "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/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. diff --git a/chain/tokenfactory/types/query.pb.go b/chain/tokenfactory/types/query.pb.go index f8afd710..9d7f5742 100644 --- a/chain/tokenfactory/types/query.pb.go +++ b/chain/tokenfactory/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -18,6 +14,9 @@ import ( 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. diff --git a/chain/tokenfactory/types/tx.pb.go b/chain/tokenfactory/types/tx.pb.go index 33e4eb33..214084f8 100644 --- a/chain/tokenfactory/types/tx.pb.go +++ b/chain/tokenfactory/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -20,6 +16,9 @@ import ( 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. diff --git a/chain/types/account.pb.go b/chain/types/account.pb.go index 59afd490..cb352b87 100644 --- a/chain/types/account.pb.go +++ b/chain/types/account.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/x/auth/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. diff --git a/chain/types/tx_ext.pb.go b/chain/types/tx_ext.pb.go index 5f48212a..3b5e02ae 100644 --- a/chain/types/tx_ext.pb.go +++ b/chain/types/tx_ext.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/types/tx_response.pb.go b/chain/types/tx_response.pb.go index de584707..e4d2327b 100644 --- a/chain/types/tx_response.pb.go +++ b/chain/types/tx_response.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/events.pb.go b/chain/wasmx/types/events.pb.go index a211e66a..9f3f7471 100644 --- a/chain/wasmx/types/events.pb.go +++ b/chain/wasmx/types/events.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/genesis.pb.go b/chain/wasmx/types/genesis.pb.go index c9405de5..fe9147ae 100644 --- a/chain/wasmx/types/genesis.pb.go +++ b/chain/wasmx/types/genesis.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/chain/wasmx/types/proposal.pb.go b/chain/wasmx/types/proposal.pb.go index 4e85c1c3..04fe8406 100644 --- a/chain/wasmx/types/proposal.pb.go +++ b/chain/wasmx/types/proposal.pb.go @@ -5,14 +5,13 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - types "github.com/CosmWasm/wasmd/x/wasm/types" _ "github.com/cosmos/cosmos-proto" _ "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. @@ -347,51 +346,51 @@ func init() { func init() { proto.RegisterFile("injective/wasmx/v1/proposal.proto", fileDescriptor_ba51f3e994cc61a5) } var fileDescriptor_ba51f3e994cc61a5 = []byte{ - // 689 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xb6, 0x93, 0xb4, 0x8d, 0x37, 0xfd, 0x09, 0x4b, 0x05, 0x26, 0x2d, 0x4e, 0x68, 0x24, 0x08, - 0x48, 0xb5, 0x69, 0xb9, 0xf5, 0xd6, 0xb4, 0xa2, 0xaa, 0x68, 0x45, 0xe5, 0x8a, 0x0b, 0x17, 0x6b, - 0xe3, 0xdd, 0x38, 0x8b, 0x6c, 0xaf, 0xf1, 0x6e, 0x52, 0x2a, 0x2e, 0xdc, 0xe0, 0xc8, 0x23, 0x54, - 0xe2, 0x01, 0xb8, 0xf0, 0x02, 0xdc, 0x2a, 0x4e, 0x3d, 0x72, 0x42, 0xa8, 0xbd, 0xf0, 0x18, 0xc8, - 0x6b, 0x3b, 0x0d, 0x2a, 0x84, 0x8a, 0x8a, 0x5b, 0xbe, 0x99, 0x6f, 0x66, 0xbf, 0xf9, 0x76, 0xbc, - 0x01, 0x77, 0x68, 0xf8, 0x82, 0xb8, 0x82, 0x0e, 0x88, 0x75, 0x80, 0x78, 0xf0, 0xca, 0x1a, 0xac, - 0x58, 0x51, 0xcc, 0x22, 0xc6, 0x91, 0x6f, 0x46, 0x31, 0x13, 0x0c, 0xc2, 0x21, 0xc5, 0x94, 0x14, - 0x73, 0xb0, 0x52, 0xbb, 0xe5, 0x32, 0x1e, 0x30, 0xee, 0x48, 0x86, 0x95, 0x82, 0x94, 0x5e, 0xab, - 0x27, 0x28, 0x21, 0xca, 0x86, 0x17, 0xfb, 0xd5, 0xe6, 0x3d, 0xe6, 0xb1, 0xb4, 0x30, 0xf9, 0x95, - 0x46, 0x97, 0xde, 0x14, 0x40, 0x73, 0x83, 0x85, 0x22, 0x46, 0xae, 0xb0, 0x89, 0x47, 0xb9, 0x88, - 0x91, 0xa0, 0x2c, 0xb4, 0xc9, 0xcb, 0x3e, 0xe1, 0x62, 0x2f, 0xeb, 0x01, 0xe7, 0xc1, 0x84, 0xa0, - 0xc2, 0x27, 0xba, 0xda, 0x50, 0x5b, 0x9a, 0x9d, 0x02, 0xd8, 0x00, 0x15, 0x4c, 0xb8, 0x1b, 0xd3, - 0x28, 0xa9, 0xd1, 0x0b, 0x32, 0x37, 0x1a, 0x82, 0x87, 0xe0, 0xb6, 0x9b, 0xb5, 0x77, 0xe2, 0x91, - 0xfe, 0x4e, 0x9c, 0x1e, 0xa0, 0x17, 0x1b, 0x6a, 0xab, 0xb2, 0x6a, 0x99, 0x17, 0xa7, 0x35, 0xc7, - 0xe8, 0x6a, 0x97, 0x8e, 0xbf, 0xd5, 0x15, 0x7b, 0xc1, 0xfd, 0x33, 0x65, 0xed, 0xee, 0xbb, 0xa3, - 0xba, 0xf2, 0xe3, 0xa8, 0xae, 0x7c, 0xf9, 0xb4, 0x5c, 0xcb, 0xbc, 0xf2, 0xd8, 0xc0, 0x1c, 0xac, - 0x74, 0x88, 0x40, 0x69, 0x7b, 0x12, 0x8a, 0xa5, 0xb7, 0x05, 0xd0, 0x6a, 0x23, 0xe1, 0xf6, 0xfe, - 0xa7, 0x0f, 0xaf, 0x81, 0x31, 0xd6, 0x07, 0xae, 0x17, 0x1b, 0xc5, 0x7f, 0x37, 0x62, 0x71, 0x8c, - 0x11, 0xfc, 0xd2, 0x4e, 0x7c, 0x50, 0x41, 0xf3, 0x17, 0x27, 0x36, 0xc9, 0xa8, 0xd6, 0x2b, 0x9b, - 0xb0, 0x08, 0xb4, 0x5c, 0x67, 0x3a, 0xaf, 0x66, 0x9f, 0x07, 0x2e, 0xad, 0xf2, 0x63, 0x11, 0x2c, - 0x8c, 0x71, 0x04, 0xde, 0x07, 0xd5, 0xa1, 0xd5, 0x08, 0xe3, 0x98, 0x70, 0x9e, 0x09, 0x9d, 0xcb, - 0xe3, 0xeb, 0x69, 0x18, 0x2e, 0x00, 0xcd, 0x43, 0xdc, 0xf1, 0x69, 0x40, 0x85, 0x14, 0x5c, 0xb2, - 0xcb, 0x1e, 0xe2, 0x3b, 0x09, 0xce, 0x93, 0x51, 0x4c, 0x5d, 0x22, 0xd7, 0x34, 0x4d, 0xee, 0x25, - 0x18, 0x9a, 0xe0, 0x3a, 0xef, 0xb1, 0xbe, 0x8f, 0x9d, 0x88, 0x86, 0x4e, 0xde, 0x57, 0x2f, 0x35, - 0xd4, 0x56, 0xd9, 0xbe, 0x96, 0xa6, 0xf6, 0x68, 0x98, 0xeb, 0x84, 0x0f, 0xc1, 0x3c, 0xe5, 0x4e, - 0x40, 0xbd, 0xec, 0xda, 0x91, 0xef, 0xb3, 0x03, 0x82, 0xf5, 0x09, 0x59, 0x00, 0x29, 0xdf, 0xcd, - 0x53, 0xeb, 0x69, 0x06, 0xde, 0x04, 0x53, 0x2e, 0xc3, 0xc4, 0xa1, 0x58, 0x9f, 0x94, 0x87, 0x4f, - 0x26, 0x70, 0x1b, 0xc3, 0x26, 0x98, 0x41, 0x38, 0xa0, 0xe1, 0x70, 0xb8, 0x29, 0x39, 0xdc, 0xb4, - 0x0c, 0xe6, 0x93, 0xdd, 0x03, 0x73, 0x5e, 0x8c, 0x42, 0x41, 0xe2, 0x21, 0xad, 0x2c, 0x69, 0xb3, - 0x59, 0x38, 0x27, 0xb6, 0xc1, 0x74, 0xb7, 0x1f, 0x62, 0x1a, 0x7a, 0x4e, 0xc0, 0x30, 0xd1, 0xb5, - 0x86, 0xda, 0x9a, 0x5d, 0xad, 0xff, 0x6e, 0x0d, 0x1f, 0xa7, 0xbc, 0x5d, 0x86, 0x89, 0x5d, 0xe9, - 0x9e, 0x83, 0x35, 0xe3, 0x2f, 0x37, 0xf6, 0x59, 0x05, 0x37, 0xe4, 0x5e, 0xed, 0x0b, 0x16, 0x93, - 0x0d, 0x86, 0xc9, 0x95, 0x57, 0x69, 0x0b, 0x68, 0xf9, 0xfb, 0x96, 0x7f, 0x3a, 0x4d, 0x33, 0x7f, - 0x02, 0xa5, 0xe4, 0x44, 0xf1, 0x85, 0xf3, 0xb2, 0xcf, 0xe5, 0xbc, 0xf6, 0xb2, 0x5b, 0xf7, 0x60, - 0x0b, 0x54, 0x46, 0xe6, 0x87, 0x73, 0xa0, 0xf2, 0x2c, 0xe4, 0x11, 0x71, 0x69, 0x97, 0x12, 0x5c, - 0x55, 0xe0, 0x2c, 0x00, 0xfb, 0xc4, 0xef, 0x26, 0x1c, 0x82, 0xab, 0x2a, 0x9c, 0x01, 0xda, 0x56, - 0xe2, 0xf4, 0xd3, 0xd0, 0x3f, 0xac, 0x16, 0x60, 0x19, 0x94, 0x36, 0xfb, 0xc8, 0xaf, 0x16, 0xdb, - 0xe4, 0xf8, 0xd4, 0x50, 0x4f, 0x4e, 0x0d, 0xf5, 0xfb, 0xa9, 0xa1, 0xbe, 0x3f, 0x33, 0x94, 0x93, - 0x33, 0x43, 0xf9, 0x7a, 0x66, 0x28, 0xcf, 0x9f, 0x78, 0x54, 0xf4, 0xfa, 0x1d, 0xd3, 0x65, 0x81, - 0xb5, 0x9d, 0xdb, 0xbf, 0x83, 0x3a, 0xdc, 0x1a, 0x5e, 0xc6, 0xb2, 0xcb, 0x62, 0x32, 0x0a, 0x7b, - 0x88, 0x86, 0x56, 0xc0, 0x70, 0xdf, 0x27, 0x3c, 0xfb, 0x2b, 0x11, 0x87, 0x11, 0xe1, 0x9d, 0x49, - 0xf9, 0xbe, 0x3f, 0xfa, 0x19, 0x00, 0x00, 0xff, 0xff, 0x78, 0xce, 0x77, 0x78, 0x6a, 0x06, 0x00, - 0x00, + // 696 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0x93, 0xb4, 0x4d, 0x26, 0xfd, 0xc9, 0x37, 0x5f, 0x05, 0xa6, 0x2d, 0x4e, 0x68, 0xa4, + 0x12, 0x90, 0x6a, 0xd3, 0xb2, 0xeb, 0xae, 0x69, 0x45, 0x55, 0xd1, 0x8a, 0xca, 0x15, 0x1b, 0x36, + 0xd6, 0xc4, 0x73, 0xe3, 0x0c, 0xb2, 0x3d, 0xc6, 0x33, 0x49, 0x89, 0xd8, 0xb0, 0x83, 0x25, 0x8f, + 0x50, 0x89, 0x07, 0x60, 0xc3, 0x0b, 0xb0, 0xab, 0x58, 0x75, 0xc9, 0x0a, 0xa1, 0x76, 0xc3, 0x63, + 0x20, 0xff, 0xa5, 0x41, 0x85, 0x50, 0x51, 0xb1, 0xcb, 0xb9, 0xf7, 0xdc, 0x3b, 0xe7, 0x9e, 0xb9, + 0x9e, 0xa0, 0x3b, 0xcc, 0x7f, 0x0e, 0xb6, 0x64, 0x7d, 0x30, 0x8e, 0x88, 0xf0, 0x5e, 0x1a, 0xfd, + 0x35, 0x23, 0x08, 0x79, 0xc0, 0x05, 0x71, 0xf5, 0x20, 0xe4, 0x92, 0x63, 0x3c, 0xa4, 0xe8, 0x31, + 0x45, 0xef, 0xaf, 0x2d, 0xdc, 0xb2, 0xb9, 0xf0, 0xb8, 0xb0, 0x62, 0x86, 0x91, 0x80, 0x84, 0xbe, + 0xb0, 0x12, 0xa1, 0x88, 0x18, 0x37, 0x1c, 0xed, 0x67, 0xb9, 0xe0, 0x10, 0x7b, 0x90, 0xf2, 0xe6, + 0x1d, 0xee, 0xf0, 0xa4, 0x3e, 0xfa, 0x95, 0x44, 0x97, 0x5f, 0xe7, 0x51, 0x63, 0x8b, 0xfb, 0x32, + 0x24, 0xb6, 0x34, 0xc1, 0x61, 0x42, 0x86, 0x44, 0x32, 0xee, 0x9b, 0xf0, 0xa2, 0x07, 0x42, 0x1e, + 0xa4, 0xad, 0xf0, 0x3c, 0x9a, 0x90, 0x4c, 0xba, 0xa0, 0x2a, 0x75, 0xa5, 0x59, 0x36, 0x13, 0x80, + 0xeb, 0xa8, 0x42, 0x41, 0xd8, 0x21, 0x0b, 0xa2, 0x1a, 0x35, 0x1f, 0xe7, 0x46, 0x43, 0x78, 0x80, + 0x6e, 0xdb, 0x69, 0x7b, 0x2b, 0x1c, 0xe9, 0x6f, 0x85, 0xc9, 0x01, 0x6a, 0xa1, 0xae, 0x34, 0x2b, + 0xeb, 0x86, 0x7e, 0x79, 0x68, 0x7d, 0x8c, 0xae, 0x56, 0xf1, 0xe4, 0x6b, 0x2d, 0x67, 0x2e, 0xda, + 0xbf, 0xa7, 0x6c, 0xac, 0xbc, 0x3d, 0xae, 0xe5, 0xbe, 0x1f, 0xd7, 0x72, 0x9f, 0x3f, 0xae, 0x2e, + 0xa4, 0x96, 0x39, 0xbc, 0xaf, 0xf7, 0xd7, 0xda, 0x20, 0x49, 0xd2, 0x1e, 0x7c, 0xb9, 0xfc, 0x26, + 0x8f, 0x9a, 0x2d, 0x22, 0xed, 0xee, 0xbf, 0xf4, 0xe1, 0x15, 0xd2, 0xc6, 0xfa, 0x20, 0xd4, 0x42, + 0xbd, 0xf0, 0xf7, 0x46, 0x2c, 0x8d, 0x31, 0x42, 0x5c, 0xd9, 0x89, 0xf7, 0x0a, 0x6a, 0xfc, 0xe4, + 0xc4, 0x36, 0x8c, 0x6a, 0xbd, 0xb6, 0x09, 0x4b, 0xa8, 0x9c, 0xe9, 0x4c, 0xe6, 0x2d, 0x9b, 0x17, + 0x81, 0x2b, 0xab, 0xfc, 0x50, 0x40, 0x8b, 0x63, 0x1c, 0xc1, 0xf7, 0x50, 0x75, 0x68, 0x35, 0xa1, + 0x34, 0x04, 0x21, 0x52, 0xa1, 0x73, 0x59, 0x7c, 0x33, 0x09, 0xe3, 0x45, 0x54, 0x76, 0x88, 0xb0, + 0x5c, 0xe6, 0x31, 0x19, 0x0b, 0x2e, 0x9a, 0x25, 0x87, 0x88, 0xbd, 0x08, 0x67, 0xc9, 0x20, 0x64, + 0x36, 0xc4, 0x6b, 0x9a, 0x24, 0x0f, 0x22, 0x8c, 0x75, 0xf4, 0xbf, 0xe8, 0xf2, 0x9e, 0x4b, 0xad, + 0x80, 0xf9, 0x56, 0xd6, 0x57, 0x2d, 0xd6, 0x95, 0x66, 0xc9, 0xfc, 0x2f, 0x49, 0x1d, 0x30, 0x3f, + 0xd3, 0x89, 0x1f, 0xa0, 0x79, 0x26, 0x2c, 0x8f, 0x39, 0xe9, 0xb5, 0x13, 0xd7, 0xe5, 0x47, 0x40, + 0xd5, 0x89, 0xb8, 0x00, 0x33, 0xb1, 0x9f, 0xa5, 0x36, 0x93, 0x0c, 0xbe, 0x89, 0xa6, 0x6c, 0x4e, + 0xc1, 0x62, 0x54, 0x9d, 0x8c, 0x0f, 0x9f, 0x8c, 0xe0, 0x2e, 0xc5, 0x0d, 0x34, 0x43, 0xa8, 0xc7, + 0xfc, 0xe1, 0x70, 0x53, 0xf1, 0x70, 0xd3, 0x71, 0x30, 0x9b, 0xec, 0x2e, 0x9a, 0x73, 0x42, 0xe2, + 0x4b, 0x08, 0x87, 0xb4, 0x52, 0x4c, 0x9b, 0x4d, 0xc3, 0x19, 0xb1, 0x85, 0xa6, 0x3b, 0x3d, 0x9f, + 0x32, 0xdf, 0xb1, 0x3c, 0x4e, 0x41, 0x2d, 0xd7, 0x95, 0xe6, 0xec, 0x7a, 0xed, 0x57, 0x6b, 0xf8, + 0x28, 0xe1, 0xed, 0x73, 0x0a, 0x66, 0xa5, 0x73, 0x01, 0x36, 0xb4, 0x3f, 0xdc, 0xd8, 0x27, 0x05, + 0xdd, 0x88, 0xf7, 0xea, 0x50, 0xf2, 0x10, 0xb6, 0x38, 0x85, 0x6b, 0xaf, 0xd2, 0x0e, 0x2a, 0x67, + 0xcf, 0x5c, 0xf6, 0xe9, 0x34, 0xf4, 0xec, 0x25, 0x8c, 0x25, 0x47, 0x8a, 0x2f, 0x9d, 0x97, 0x7e, + 0x2e, 0x17, 0xb5, 0x57, 0xdd, 0xba, 0xfb, 0x3b, 0xa8, 0x32, 0x32, 0x3f, 0x9e, 0x43, 0x95, 0xa7, + 0xbe, 0x08, 0xc0, 0x66, 0x1d, 0x06, 0xb4, 0x9a, 0xc3, 0xb3, 0x08, 0x1d, 0x82, 0xdb, 0x89, 0x38, + 0x40, 0xab, 0x0a, 0x9e, 0x41, 0xe5, 0x9d, 0xc8, 0xe9, 0x27, 0xbe, 0x3b, 0xa8, 0xe6, 0x71, 0x09, + 0x15, 0xb7, 0x7b, 0xc4, 0xad, 0x16, 0x5a, 0x70, 0x72, 0xa6, 0x29, 0xa7, 0x67, 0x9a, 0xf2, 0xed, + 0x4c, 0x53, 0xde, 0x9d, 0x6b, 0xb9, 0xd3, 0x73, 0x2d, 0xf7, 0xe5, 0x5c, 0xcb, 0x3d, 0x7b, 0xec, + 0x30, 0xd9, 0xed, 0xb5, 0x75, 0x9b, 0x7b, 0xc6, 0x6e, 0x66, 0xff, 0x1e, 0x69, 0x0b, 0x63, 0x78, + 0x19, 0xab, 0x36, 0x0f, 0x61, 0x14, 0x76, 0x09, 0xf3, 0x0d, 0x8f, 0xd3, 0x9e, 0x0b, 0x22, 0xfd, + 0x47, 0x91, 0x83, 0x00, 0x44, 0x7b, 0x32, 0x7e, 0xdf, 0x1f, 0xfe, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x04, 0xe3, 0xe0, 0x18, 0x71, 0x06, 0x00, 0x00, } func (m *ContractRegistrationRequestProposal) Marshal() (dAtA []byte, err error) { diff --git a/chain/wasmx/types/query.pb.go b/chain/wasmx/types/query.pb.go index 1b1f4cdb..a94efce7 100644 --- a/chain/wasmx/types/query.pb.go +++ b/chain/wasmx/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -17,6 +13,9 @@ import ( 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. diff --git a/chain/wasmx/types/tx.pb.go b/chain/wasmx/types/tx.pb.go index 908d6219..02545b39 100644 --- a/chain/wasmx/types/tx.pb.go +++ b/chain/wasmx/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -19,6 +15,9 @@ import ( 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. diff --git a/chain/wasmx/types/util.go b/chain/wasmx/types/util.go index 0fc221c1..c7eb5ae2 100644 --- a/chain/wasmx/types/util.go +++ b/chain/wasmx/types/util.go @@ -7,8 +7,6 @@ import ( func IsAllowed(accessConfig types.AccessConfig, actor types2.AccAddress) bool { switch accessConfig.Permission { - case types.AccessTypeOnlyAddress: - return accessConfig.Address == actor.String() case types.AccessTypeAnyOfAddresses: for _, v := range accessConfig.Addresses { if v == actor.String() { diff --git a/chain/wasmx/types/wasmx.pb.go b/chain/wasmx/types/wasmx.pb.go index e3e8dee8..053a0a76 100644 --- a/chain/wasmx/types/wasmx.pb.go +++ b/chain/wasmx/types/wasmx.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/client/chain/chain.go b/client/chain/chain.go index ad69dacb..c85dde75 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -39,6 +39,7 @@ import ( 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" ethcommon "github.com/ethereum/go-ethereum/common" @@ -163,6 +164,11 @@ type ChainClient interface { FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) + // tokenfactory module + FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error) + FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error) + FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error) + Close() } @@ -190,14 +196,15 @@ type chainClient struct { sessionCookie string sessionEnabled bool - txClient txtypes.ServiceClient - authQueryClient authtypes.QueryClient - exchangeQueryClient exchangetypes.QueryClient - bankQueryClient banktypes.QueryClient - authzQueryClient authztypes.QueryClient - wasmQueryClient wasmtypes.QueryClient - chainStreamClient chainstreamtypes.StreamClient - subaccountToNonce map[ethcommon.Hash]uint32 + txClient txtypes.ServiceClient + authQueryClient authtypes.QueryClient + exchangeQueryClient exchangetypes.QueryClient + bankQueryClient banktypes.QueryClient + authzQueryClient authztypes.QueryClient + wasmQueryClient wasmtypes.QueryClient + chainStreamClient chainstreamtypes.StreamClient + tokenfactoryQueryClient tokenfactorytypes.QueryClient + subaccountToNonce map[ethcommon.Hash]uint32 closed int64 canSign bool @@ -283,14 +290,15 @@ func NewChainClient( sessionEnabled: stickySessionEnabled, - txClient: txtypes.NewServiceClient(conn), - authQueryClient: authtypes.NewQueryClient(conn), - exchangeQueryClient: exchangetypes.NewQueryClient(conn), - bankQueryClient: banktypes.NewQueryClient(conn), - authzQueryClient: authztypes.NewQueryClient(conn), - wasmQueryClient: wasmtypes.NewQueryClient(conn), - chainStreamClient: chainstreamtypes.NewStreamClient(chainStreamConn), - subaccountToNonce: make(map[ethcommon.Hash]uint32), + txClient: txtypes.NewServiceClient(conn), + authQueryClient: authtypes.NewQueryClient(conn), + exchangeQueryClient: exchangetypes.NewQueryClient(conn), + bankQueryClient: banktypes.NewQueryClient(conn), + authzQueryClient: authztypes.NewQueryClient(conn), + wasmQueryClient: wasmtypes.NewQueryClient(conn), + chainStreamClient: chainstreamtypes.NewStreamClient(chainStreamConn), + tokenfactoryQueryClient: tokenfactorytypes.NewQueryClient(conn), + subaccountToNonce: make(map[ethcommon.Hash]uint32), } if cc.canSign { @@ -401,7 +409,7 @@ func (c *chainClient) getAccSeq() uint64 { func (c *chainClient) requestCookie() metadata.MD { var header metadata.MD - _, err := c.txClient.GetTx(context.Background(), &txtypes.GetTxRequest{}, grpc.Header(&header)) + _, err := c.bankQueryClient.Params(context.Background(), &banktypes.QueryParamsRequest{}, grpc.Header(&header)) if err != nil { panic(err) } @@ -1435,6 +1443,34 @@ func (c *chainClient) FetchContractsByCreator(ctx context.Context, creator strin return c.wasmQueryClient.ContractsByCreator(ctx, req) } +// Tokenfactory module + +func (c *chainClient) FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error) { + req := &tokenfactorytypes.QueryDenomAuthorityMetadataRequest{ + Creator: creator, + } + + if subDenom != "" { + req.SubDenom = subDenom + } + + return c.tokenfactoryQueryClient.DenomAuthorityMetadata(ctx, req) +} + +func (c *chainClient) FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error) { + req := &tokenfactorytypes.QueryDenomsFromCreatorRequest{ + Creator: creator, + } + + return c.tokenfactoryQueryClient.DenomsFromCreator(ctx, req) +} + +func (c *chainClient) FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error) { + req := &tokenfactorytypes.QueryModuleStateRequest{} + + return c.tokenfactoryQueryClient.TokenfactoryModuleState(ctx, req) +} + type DerivativeOrderData struct { OrderType exchangetypes.OrderType Price decimal.Decimal diff --git a/client/chain/chain_test_support.go b/client/chain/chain_test_support.go index d277a34f..0b9debcc 100644 --- a/client/chain/chain_test_support.go +++ b/client/chain/chain_test_support.go @@ -5,6 +5,8 @@ import ( "errors" "time" + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" exchangetypes "github.com/InjectiveLabs/sdk-go/chain/exchange/types" @@ -272,3 +274,15 @@ func (c *MockChainClient) FetchPinnedCodes(ctx context.Context, pagination *quer func (c *MockChainClient) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) { return &wasmtypes.QueryContractsByCreatorResponse{}, nil } + +func (c *MockChainClient) FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error) { + return &tokenfactorytypes.QueryDenomAuthorityMetadataResponse{}, nil +} + +func (c *MockChainClient) FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error) { + return &tokenfactorytypes.QueryDenomsFromCreatorResponse{}, nil +} + +func (c *MockChainClient) FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error) { + return &tokenfactorytypes.QueryModuleStateResponse{}, nil +} diff --git a/examples/chain/60_DenomAuthorityMetadata/example.go b/examples/chain/60_DenomAuthorityMetadata/example.go new file mode 100644 index 00000000..848d7974 --- /dev/null +++ b/examples/chain/60_DenomAuthorityMetadata/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) + } + + creator := "inj1uv6psuupldve0c9n3uezqlecadszqexv5vxx04" + subDenom := "position" + ctx := context.Background() + + res, err := chainClient.FetchDenomAuthorityMetadata(ctx, creator, subDenom) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/61_DenomsFromCreator/example.go b/examples/chain/61_DenomsFromCreator/example.go new file mode 100644 index 00000000..5d2b4b8a --- /dev/null +++ b/examples/chain/61_DenomsFromCreator/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) + } + + creator := "inj1maeyvxfamtn8lfyxpjca8kuvauuf2qeu6gtxm3" + ctx := context.Background() + + res, err := chainClient.FetchDenomsFromCreator(ctx, creator) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/62_TokenfactoryModuleState/example.go b/examples/chain/62_TokenfactoryModuleState/example.go new file mode 100644 index 00000000..18ceaa1e --- /dev/null +++ b/examples/chain/62_TokenfactoryModuleState/example.go @@ -0,0 +1,69 @@ +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() + + res, err := chainClient.FetchTokenfactoryModuleState(ctx) + if err != nil { + fmt.Println(err) + } + + str, _ := json.MarshalIndent(res, "", " ") + fmt.Print(string(str)) + +} diff --git a/examples/chain/64_CreateDenom/example.go b/examples/chain/64_CreateDenom/example.go new file mode 100644 index 00000000..0ced42bf --- /dev/null +++ b/examples/chain/64_CreateDenom/example.go @@ -0,0 +1,72 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + message := new(tokenfactorytypes.MsgCreateDenom) + message.Sender = senderAddress.String() + message.Subdenom = "inj_test" + message.Name = "Injective Test Token" + message.Symbol = "INJTEST" + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Print(string(str)) +} diff --git a/examples/chain/65_MsgMint/example.go b/examples/chain/65_MsgMint/example.go new file mode 100644 index 00000000..26a43830 --- /dev/null +++ b/examples/chain/65_MsgMint/example.go @@ -0,0 +1,74 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "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" + sdktypes "github.com/cosmos/cosmos-sdk/types" +) + +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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + message := new(tokenfactorytypes.MsgMint) + message.Sender = senderAddress.String() + message.Amount = sdktypes.Coin{ + Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", + Amount: sdktypes.NewInt(1000000000), + } + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Print(string(str)) +} diff --git a/examples/chain/66_MsgBurn/example.go b/examples/chain/66_MsgBurn/example.go new file mode 100644 index 00000000..35c6cc64 --- /dev/null +++ b/examples/chain/66_MsgBurn/example.go @@ -0,0 +1,74 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "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" + sdktypes "github.com/cosmos/cosmos-sdk/types" +) + +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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + message := new(tokenfactorytypes.MsgBurn) + message.Sender = senderAddress.String() + message.Amount = sdktypes.Coin{ + Denom: "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test", + Amount: sdktypes.NewInt(100), + } + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Print(string(str)) +} diff --git a/examples/chain/67_MsgSetDenomMetadata/example.go b/examples/chain/67_MsgSetDenomMetadata/example.go new file mode 100644 index 00000000..d5787500 --- /dev/null +++ b/examples/chain/67_MsgSetDenomMetadata/example.go @@ -0,0 +1,97 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "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" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + denom := "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" + subdenom := "inj_test" + tokenDecimals := uint32(6) + + microDenomUnit := banktypes.DenomUnit{ + Denom: denom, + Exponent: 0, + Aliases: []string{fmt.Sprintf("micro%s", subdenom)}, + } + denomUnit := banktypes.DenomUnit{ + Denom: subdenom, + Exponent: tokenDecimals, + Aliases: []string{subdenom}, + } + + metadata := banktypes.Metadata{ + Description: "Injective Test Token", + DenomUnits: []*banktypes.DenomUnit{µDenomUnit, &denomUnit}, + Base: denom, + Display: subdenom, + Name: "Injective Test", + Symbol: "INJTEST", + URI: "http://injective-test.com/icon.jpg", + URIHash: "", + } + + message := new(tokenfactorytypes.MsgSetDenomMetadata) + message.Sender = senderAddress.String() + message.Metadata = metadata + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Print(string(str)) +} diff --git a/examples/chain/68_MsgChangeAdmin/example.go b/examples/chain/68_MsgChangeAdmin/example.go new file mode 100644 index 00000000..a9371ebb --- /dev/null +++ b/examples/chain/68_MsgChangeAdmin/example.go @@ -0,0 +1,72 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + tokenfactorytypes "github.com/InjectiveLabs/sdk-go/chain/tokenfactory/types" + "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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + message := new(tokenfactorytypes.MsgChangeAdmin) + message.Sender = senderAddress.String() + message.Denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" + // This is the zero address to remove admin permissions + message.NewAdmin = "inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49" + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Print(string(str)) +} diff --git a/examples/chain/69_MsgExecuteContractCompat/example.go b/examples/chain/69_MsgExecuteContractCompat/example.go new file mode 100644 index 00000000..dc405028 --- /dev/null +++ b/examples/chain/69_MsgExecuteContractCompat/example.go @@ -0,0 +1,89 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + wasmxtypes "github.com/InjectiveLabs/sdk-go/chain/wasmx/types" + "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", + "f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3", // 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 { + fmt.Println(err) + return + } + clientCtx = clientCtx.WithNodeURI(network.TmEndpoint).WithClient(tmClient) + + chainClient, err := chainclient.NewChainClient( + clientCtx, + network, + common.OptionGasPrices(client.DefaultGasPriceWithDenom), + ) + + if err != nil { + panic(err) + } + + firstAmount := 69 + firstToken := "factory/inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6/inj12ngevx045zpvacus9s6anr258gkwpmthnz80e9" + secondAmount := 420 + secondToken := "peggy0x44C21afAaF20c270EBbF5914Cfc3b5022173FEB7" + thirdAmount := 1 + thirdToken := "peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5" + funds := fmt.Sprintf( + "%v%s,%v%s,%v%s", + firstAmount, + firstToken, + secondAmount, + secondToken, + thirdAmount, + thirdToken, + ) + + message := wasmxtypes.MsgExecuteContractCompat{ + Sender: senderAddress.String(), + Contract: "inj1ady3s7whq30l4fx8sj3x6muv5mx4dfdlcpv8n7", + Msg: "{\"increment\": {}}", + Funds: funds, + } + + //AsyncBroadcastMsg, SyncBroadcastMsg, QueueBroadcastMsg + response, err := chainClient.AsyncBroadcastMsg(&message) + + if err != nil { + panic(err) + } + + str, _ := json.MarshalIndent(response, "", " ") + fmt.Println(string(str)) +} diff --git a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go index 4937e6f4..53d9769d 100644 --- a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go +++ b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.go @@ -2656,6 +2656,8 @@ type PositionsRequest struct { Direction string `protobuf:"bytes,8,opt,name=direction,proto3" json:"direction,omitempty"` // set to True to return subaccount total positions SubaccountTotalPositions bool `protobuf:"varint,9,opt,name=subaccount_total_positions,json=subaccountTotalPositions,proto3" json:"subaccount_total_positions,omitempty"` + // filter by account address + AccountAddress string `protobuf:"bytes,10,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` } func (x *PositionsRequest) Reset() { @@ -2753,6 +2755,13 @@ func (x *PositionsRequest) GetSubaccountTotalPositions() bool { return false } +func (x *PositionsRequest) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + type PositionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2982,6 +2991,8 @@ type PositionsV2Request struct { Direction string `protobuf:"bytes,8,opt,name=direction,proto3" json:"direction,omitempty"` // set to True to return subaccount total positions SubaccountTotalPositions bool `protobuf:"varint,9,opt,name=subaccount_total_positions,json=subaccountTotalPositions,proto3" json:"subaccount_total_positions,omitempty"` + // filter by account address + AccountAddress string `protobuf:"bytes,10,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` } func (x *PositionsV2Request) Reset() { @@ -3079,6 +3090,13 @@ func (x *PositionsV2Request) GetSubaccountTotalPositions() bool { return false } +func (x *PositionsV2Request) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + type PositionsV2Response struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3159,6 +3177,8 @@ type DerivativePositionV2 struct { MarkPrice string `protobuf:"bytes,9,opt,name=mark_price,json=markPrice,proto3" json:"mark_price,omitempty"` // Position updated timestamp in UNIX millis. UpdatedAt int64 `protobuf:"zigzag64,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // Market quote denom + Denom string `protobuf:"bytes,12,opt,name=denom,proto3" json:"denom,omitempty"` } func (x *DerivativePositionV2) Reset() { @@ -3263,6 +3283,13 @@ func (x *DerivativePositionV2) GetUpdatedAt() int64 { return 0 } +func (x *DerivativePositionV2) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + type LiquidablePositionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3813,6 +3840,8 @@ type StreamPositionsRequest struct { MarketIds []string `protobuf:"bytes,3,rep,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` // Subaccount ids of traders we want to get positions SubaccountIds []string `protobuf:"bytes,4,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` + // filter by account address + AccountAddress string `protobuf:"bytes,5,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` } func (x *StreamPositionsRequest) Reset() { @@ -3875,6 +3904,13 @@ func (x *StreamPositionsRequest) GetSubaccountIds() []string { return nil } +func (x *StreamPositionsRequest) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + type StreamPositionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6646,7 +6682,7 @@ var file_injective_derivative_exchange_rpc_proto_rawDesc = []byte{ 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xb3, 0x02, 0x0a, 0x10, 0x50, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xdc, 0x02, 0x0a, 0x10, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, @@ -6666,226 +6702,316 @@ var file_injective_derivative_exchange_rpc_proto_rawDesc = []byte{ 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xab, 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, + 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x11, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, + 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xb0, 0x03, 0x0a, 0x12, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, + 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, + 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x1b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, + 0x4f, 0x6e, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x12, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xde, 0x02, 0x0a, 0x12, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, + 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1a, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x13, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x52, + 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xe4, 0x02, + 0x0a, 0x14, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x63, 0x0a, 0x1a, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, + 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x72, 0x0a, 0x1b, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xb0, - 0x03, 0x0a, 0x12, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, - 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, - 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x43, - 0x0a, 0x1e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x75, - 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0xb5, 0x02, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, - 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbe, 0x01, + 0x0a, 0x16, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x1a, 0x73, - 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x18, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x55, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x52, 0x09, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xce, 0x02, 0x0a, 0x14, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, - 0x67, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, - 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x63, 0x0a, 0x1a, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x22, 0x72, 0x0a, 0x1b, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x53, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x16, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, - 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x46, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x77, 0x0a, 0x13, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, - 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x14, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0x0a, 0x0b, 0x46, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa0, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x17, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xcf, 0x03, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0xab, + 0x01, 0x0a, 0x17, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0x88, 0x01, 0x0a, + 0x0e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x77, 0x0a, 0x13, 0x46, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x6b, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0xae, 0x01, 0x0a, 0x14, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x66, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x41, + 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x22, 0x5c, 0x0a, 0x0b, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x61, 0x74, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0xc9, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x69, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x17, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xcf, 0x03, 0x0a, 0x13, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x69, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x73, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, 0x6e, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xbf, 0x03, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x73, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, 0x6e, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, + 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, + 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x54, 0x72, + 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xe8, 0x03, 0x0a, 0x0f, + 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, + 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0e, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xbf, 0x03, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, + 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x12, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, + 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x69, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, + 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x64, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x22, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, + 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, @@ -6912,543 +7038,462 @@ var file_injective_derivative_exchange_rpc_proto_rawDesc = []byte{ 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x0e, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x74, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, - 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xe8, 0x03, 0x0a, 0x0f, 0x44, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, - 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, - 0x72, 0x61, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, - 0x61, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x12, - 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, - 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x69, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x74, 0x72, 0x61, 0x64, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x72, - 0x67, 0x69, 0x6e, 0x22, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, - 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xc5, 0x03, 0x0a, + 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x6b, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x63, 0x69, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, + 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xc5, 0x03, 0x0a, 0x13, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, - 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, - 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x63, 0x69, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, - 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc7, 0x03, 0x0a, 0x15, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x6b, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, - 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, - 0x89, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xb2, 0x01, 0x0a, 0x1c, - 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, - 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, - 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, - 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, - 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, - 0x22, 0xce, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc7, 0x03, 0x0a, + 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x48, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0xfc, 0x03, - 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, - 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xad, 0x01, 0x0a, - 0x15, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, 0x65, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xa9, 0x05, 0x0a, - 0x16, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xb2, 0x01, 0x0a, + 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x41, + 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x22, 0xce, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x61, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, 0x6c, - 0x6c, 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x64, 0x75, 0x63, - 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x0a, - 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xdc, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x06, 0x74, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0xfc, + 0x03, 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xc4, 0x1a, - 0x0a, 0x1e, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x50, 0x43, - 0x12, 0x70, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x2e, 0x69, + 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, + 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, + 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xad, 0x01, + 0x0a, 0x15, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xa9, 0x05, + 0x0a, 0x16, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x71, 0x75, + 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, + 0x6c, 0x6c, 0x65, 0x64, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x64, 0x75, + 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x61, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0xdc, 0x01, 0x0a, 0x1a, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xc4, + 0x1a, 0x0a, 0x1e, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x50, + 0x43, 0x12, 0x70, 0x0a, 0x07, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x3e, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x94, 0x01, 0x0a, 0x13, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x42, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, + 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x94, 0x01, 0x0a, 0x13, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x12, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, - 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, - 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x12, 0x35, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x56, 0x32, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, - 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, - 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, - 0x6b, 0x73, 0x56, 0x32, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, - 0x6f, 0x6b, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, + 0x6f, 0x6f, 0x6b, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x56, 0x32, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x12, 0x3b, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x12, 0x3b, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, - 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x9c, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x12, 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, + 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x56, 0x32, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x9c, 0x01, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x6d, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, - 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x12, 0x35, 0x2e, - 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, - 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x6d, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x09, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, - 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7c, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x12, 0x35, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, + 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, - 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7f, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, - 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, - 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x36, + 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3a, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x81, 0x01, + 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x8a, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, - 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, - 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x36, 0x2e, - 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x6d, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, - 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x73, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x12, 0x32, 0x2e, 0x69, 0x6e, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x6d, 0x0a, 0x06, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x12, 0x38, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, 0x6e, - 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, - 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x38, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x13, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, + 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x73, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x12, 0x32, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x33, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x36, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, + 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x12, 0x38, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, + 0x0a, 0x14, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0d, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, + 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x96, 0x01, 0x0a, + 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x3d, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto index 00b0970d..6ebed93d 100644 --- a/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto +++ b/exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto @@ -489,6 +489,8 @@ message PositionsRequest { string direction = 8; // set to True to return subaccount total positions bool subaccount_total_positions = 9; + // filter by account address + string account_address = 10; } message PositionsResponse { @@ -546,6 +548,8 @@ message PositionsV2Request { string direction = 8; // set to True to return subaccount total positions bool subaccount_total_positions = 9; + // filter by account address + string account_address = 10; } message PositionsV2Response { @@ -574,6 +578,8 @@ message DerivativePositionV2 { string mark_price = 9; // Position updated timestamp in UNIX millis. sint64 updated_at = 11; + // Market quote denom + string denom = 12; } message LiquidablePositionsRequest { @@ -659,6 +665,8 @@ message StreamPositionsRequest { repeated string market_ids = 3; // Subaccount ids of traders we want to get positions repeated string subaccount_ids = 4; + // filter by account address + string account_address = 5; } message StreamPositionsResponse { diff --git a/go.mod b/go.mod index 3e0c72aa..e9fa9130 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/InjectiveLabs/sdk-go go 1.19 require ( - cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.1 + cosmossdk.io/errors v1.0.0 + cosmossdk.io/math v1.1.2 github.com/CosmWasm/wasmd v0.40.2 github.com/InjectiveLabs/suplog v1.3.3 github.com/bandprotocol/bandchain-packet v0.0.4 @@ -12,9 +12,9 @@ require ( github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.0.1 + github.com/cosmos/ibc-go/v7 v7.3.0 github.com/ethereum/go-ethereum v1.11.5 github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.4.0 @@ -26,7 +26,6 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tyler-smith/go-bip39 v1.1.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.31.0 @@ -42,7 +41,7 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/CosmWasm/wasmvm v1.2.4 // indirect + github.com/CosmWasm/wasmvm v1.5.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect @@ -64,7 +63,7 @@ require ( github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -126,10 +125,10 @@ require ( github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.0 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -150,6 +149,7 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.12.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect @@ -164,10 +164,10 @@ require ( replace ( cosmossdk.io/math => github.com/InjectiveLabs/cosmos-sdk/math v0.47.3-inj-1 - github.com/CosmWasm/wasmd => github.com/InjectiveLabs/wasmd v0.40.2-inj + github.com/CosmWasm/wasmd => github.com/InjectiveLabs/wasmd v0.45.0-inj github.com/bandprotocol/bandchain-packet => github.com/InjectiveLabs/bandchain-packet v0.0.4-inj-1 github.com/cometbft/cometbft => github.com/InjectiveLabs/cometbft v0.37.2-inj - github.com/cosmos/cosmos-sdk => github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-7 + github.com/cosmos/cosmos-sdk => github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-9 github.com/cosmos/ibc-go/v7 => github.com/InjectiveLabs/ibc-go/v7 v7.2.0-inj github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 2395bff9..f14d9487 100644 --- a/go.sum +++ b/go.sum @@ -39,16 +39,16 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= -cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= @@ -61,24 +61,24 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= -github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= +github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/InjectiveLabs/bandchain-packet v0.0.4-inj-1 h1:ZnvCV/lzjWmBwuGbkAz+okucfJEyEzkU9GYK3tKU9cU= github.com/InjectiveLabs/bandchain-packet v0.0.4-inj-1/go.mod h1:QELTDYiwnbAqIgTF9zeKr+hVlK6eVyt6Nxmh6/1mmzQ= github.com/InjectiveLabs/cometbft v0.37.2-inj h1:vKLatEKl3qzhvFAgyvywApTuq44K0XooJpDWWP0bSt0= github.com/InjectiveLabs/cometbft v0.37.2-inj/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-7 h1:FFzBEAKG2SbZK08ZL38zQh0gBEmcWOBHdMKyToFXSyI= -github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-7/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= +github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-9 h1:/x20L4ZfYIhGu/wsmXb2nV6DF6t5QVNq7ecAFqAcrMU= +github.com/InjectiveLabs/cosmos-sdk v0.47.3-inj-9/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= github.com/InjectiveLabs/cosmos-sdk/math v0.47.3-inj-1 h1:BHZQuZJXJctENiTfIBSH21HyR3a+Zx3Wd7RPz21spFI= github.com/InjectiveLabs/cosmos-sdk/math v0.47.3-inj-1/go.mod h1:An0MllWJY6PxibUpnwGk8jOm+a/qIxlKmL5Zyp9NnaM= github.com/InjectiveLabs/ibc-go/v7 v7.2.0-inj h1:CtzShjiD+mGQktWYS0kTzUu8hQaDOmtvSTMekvOm9Rw= github.com/InjectiveLabs/ibc-go/v7 v7.2.0-inj/go.mod h1:aEQF2stK9Bi/J56kW93MHlcKIF1uSt204mTngJYdNcY= github.com/InjectiveLabs/suplog v1.3.3 h1:ARIR3lWD9BxcrmqTwgcGBt8t7e10gwOqllUAXa/MfxI= github.com/InjectiveLabs/suplog v1.3.3/go.mod h1:+I9WRgUhzmo1V/n7IkW24kFBFB9ZTPAiXXXCogWxmTM= -github.com/InjectiveLabs/wasmd v0.40.2-inj h1:xC6D4UG17gUenuRCIesVMTYclBUyAq0s1oDxjlSo0LE= -github.com/InjectiveLabs/wasmd v0.40.2-inj/go.mod h1:pQClCO1jkKmBbF9YLwTdJF8DYmFS+80VrPnTb2lZMSI= +github.com/InjectiveLabs/wasmd v0.45.0-inj h1:hYRzxEiBNJqJA7EoE9kMTFpWayjT2ICo/FsmtAf8A+o= +github.com/InjectiveLabs/wasmd v0.45.0-inj/go.mod h1:M8hxvHoOzZkzdrFNqDYcPPcQw7EmJwYNZkslhHbCj0I= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= @@ -188,8 +188,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -353,14 +353,14 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -525,8 +525,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= -github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -540,8 +540,8 @@ github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -551,7 +551,7 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -749,7 +749,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -761,7 +761,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -918,7 +918,7 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=